Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.1.2]
### Fixed
- `Failed to locate the main schema resource at 'https://pmd.sourceforge.io/ruleset_xml_schema.xsd'` for php 8.3 and 8.4)

### Changed
- Update phpmd schema files to 2.0.0 (to match testing-suite's own requirements).

## [3.1.1]
### Fixed
- Magento 2 `phpmd.xml` incorrectly overrode `CouplingBetweenObjects`: the design ruleset was included twice, causing
Expand Down
6 changes: 3 additions & 3 deletions config/default/phpmd.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<ruleset name="Youwe/Global"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
<ruleset name="PHPMD"
xmlns="http://pmd.github.io/schema/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sourceforge.io/ruleset_xml_schema.xsd">
xsi:schemaLocation="http://pmd.github.io/schema/ruleset/2.0.0 https://pmd.github.io/schema/ruleset_2_0_0.xsd">
<description>Default / Fallback configuration for PHPMD rulesets.</description>

<!-- Taken from Global ruleset since we can't modify a referenced rule without overwriting it completely.
Expand Down
4 changes: 2 additions & 2 deletions config/drupal/phpmd.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<ruleset name="PHPMD"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns="http://pmd.github.io/schema/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sourceforge.io/ruleset_xml_schema.xsd">
xsi:schemaLocation="http://pmd.github.io/schema/ruleset/2.0.0 https://pmd.github.io/schema/ruleset_2_0_0.xsd">
<description>PHPMD rules for Drupal projects.</description>
<rule ref="./config/default/phpmd.xml" />

Expand Down
4 changes: 2 additions & 2 deletions config/magento2/phpmd.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<ruleset name="PHPMD"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns="http://pmd.github.io/schema/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sourceforge.io/ruleset_xml_schema.xsd">
xsi:schemaLocation="http://pmd.github.io/schema/ruleset/2.0.0 https://pmd.github.io/schema/ruleset_2_0_0.xsd">
<description>PHPMD rules for Magento 2 projects.</description>

<!-- Taken from Global ruleset since we can't modify a referenced rule without overwriting it completely.
Expand Down
10 changes: 5 additions & 5 deletions grumphp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ imports:
parameters:
composer.strict: false
xmllint.ignore_patterns:
- /^phpcs.xml$/
- /^phpmd.xml$/
- /^phpunit.xml$/
- /^pdepend.xml$/
- /^templates/
- /phpcs\.xml$/
- /phpmd\.xml$/
- /phpunit\.xml$/
- /pdepend\.xml$/
- /templates/

# Disable requirement for Jira ticket number in the commit message
git_commit_message.jira_matcher: '/.*/'
Expand Down
5 changes: 3 additions & 2 deletions phpmd.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0"?>
<ruleset name="PHPMD"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns="http://pmd.github.io/schema/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sourceforge.io/ruleset_xml_schema.xsd">
xsi:schemaLocation="http://pmd.github.io/schema/ruleset/2.0.0 https://pmd.github.io/schema/ruleset_2_0_0.xsd">
<description>PHPMD</description>

<rule ref="./config/default/phpmd.xml">
<exclude name="ShortVariable"/>
</rule>
Expand Down
8 changes: 4 additions & 4 deletions templates/files/default/phpmd.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<ruleset name="PHPMD"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns="http://pmd.github.io/schema/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sourceforge.io/ruleset_xml_schema.xsd">
xsi:schemaLocation="http://pmd.github.io/schema/ruleset/2.0.0 https://pmd.github.io/schema/ruleset_2_0_0.xsd">
<description>PHPMD</description>
<!--<exclude-pattern>path/to/exclude/*</exclude-pattern>-->
<rule ref="./vendor/youwe/testing-suite/config/default/phpmd.xml" />
</ruleset>
<rule ref="./vendor/youwe/testing-suite/config/pimcore/phpmd.xml" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rutgerrademaker Is this intended? Since ‎config/default/phpmd.xml is updated too in same PR

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting that issue, fixed in PR #78

</ruleset>
4 changes: 2 additions & 2 deletions templates/files/drupal/phpmd.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<ruleset name="PHPMD"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns="http://pmd.github.io/schema/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sourceforge.io/ruleset_xml_schema.xsd">
xsi:schemaLocation="http://pmd.github.io/schema/ruleset/2.0.0 https://pmd.github.io/schema/ruleset_2_0_0.xsd">
<description>PHPMD</description>
<!--<exclude-pattern>path/to/exclude/*</exclude-pattern>-->
<rule ref="./vendor/youwe/testing-suite/config/drupal/phpmd.xml" />
Expand Down
4 changes: 2 additions & 2 deletions templates/files/magento2/phpmd.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<ruleset name="PHPMD"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns="http://pmd.github.io/schema/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sourceforge.io/ruleset_xml_schema.xsd">
xsi:schemaLocation="http://pmd.github.io/schema/ruleset/2.0.0 https://pmd.github.io/schema/ruleset_2_0_0.xsd">
<description>PHPMD</description>
<!--<exclude-pattern>path/to/exclude/*</exclude-pattern>-->
<rule ref="./vendor/youwe/testing-suite/config/magento2/phpmd.xml" />
Expand Down
6 changes: 3 additions & 3 deletions templates/files/pimcore/phpmd.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<ruleset name="PHPMD"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns="http://pmd.github.io/schema/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sourceforge.io/ruleset_xml_schema.xsd">
xsi:schemaLocation="http://pmd.github.io/schema/ruleset/2.0.0 https://pmd.github.io/schema/ruleset_2_0_0.xsd">
<description>PHPMD</description>
<!--<exclude-pattern>path/to/exclude/*</exclude-pattern>-->
<rule ref="./vendor/youwe/testing-suite/config/pimcore/phpmd.xml" />
</ruleset>
</ruleset>
Loading