Skip to content

Add phpmd3 task - #1210

Merged
veewee merged 2 commits into
phpro:v2.xfrom
guvra:feat-phpmd3
Oct 16, 2026
Merged

veewee merged 2 commits into
phpro:v2.xfrom
guvra:feat-phpmd3

Conversation

@guvra

@guvra guvra commented Mar 25, 2026 •

Copy link
Copy Markdown
Contributor
Q A
Branch 2.x
Bug fix? yesn't (grumphp is not able to run phpmd with php 8.5)
New feature? yes
BC breaks? no (but will introduce a BC break in the future if phpmd3 replaces phpmd)
Deprecations? no
Documented? yes
Fixed tickets #1209

This PR adds compatibility with the 3.x-dev branch of phpmd.

It looks like a bad idea to support a dev branch, but:

For example, Magento 2.4.9 uses the 3.x-dev branch by default.

TODO

  • Decide whether creating a task name phpmd3 is the best option
  • Check unit tests (I didn't manage to run them locally on php 8.5)

New Task Checklist:

  • Are the dependencies added to the composer.json suggestions?
  • Is the doc/tasks.md file updated?
  • Are the task parameters documented?
  • Is the task registered in the tasks.yml file?
  • Does the task contains phpunit tests?
  • Is the configuration having logical allowed types?
  • Does the task run in the correct context?
  • Is the run() method readable?
  • Is the run() method using the configuration correctly?
  • Are all CI services returning green?

@guvra
guvra marked this pull request as ready for review April 2, 2026 14:51
@maarsson-io

Copy link
Copy Markdown
Contributor

FYI: The v3 was officially released: https://github.com/phpmd/phpmd/releases/tag/3.0.0

Comment thread src/Task/PhpMd3.php Outdated
guvra and others added 2 commits October 16, 2026 14:01
Use addArgumentArray and the fluent file filter like Phpcs. Cover
multiple rulesets, triggered_by and whitelist_patterns in the run tests.
Link the task from doc/tasks.md, install ^3.0 for phpmd3 and pin the
phpmd docs to ^2.0, because a plain require now installs PHPMD 3.
@veewee
veewee merged commit f8389c8 into phpro:v2.x Oct 16, 2026
49 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants