Skip to content

fix(ci): constrain PHPMD to 2.x for scheduled CI stability - #37

Merged
Alexandre-T merged 1 commit into
mainfrom
36-fixci-pin-phpmd-to-215-to-restore-scheduled-ci-stability
Oct 12, 2026
Merged

Alexandre-T merged 1 commit into
mainfrom
36-fixci-pin-phpmd-to-215-to-restore-scheduled-ci-stability

Conversation

@Alexandre-T

@Alexandre-T Alexandre-T commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Closes #36

Summary

Constrain phpmd/phpmd to ^2.15 so Composer updates retain compatible PHPMD 2.x releases instead of installing PHPMD 3.x.

The October 9 scheduled workflow failed after an uncontrolled PHPMD/PDepend major upgrade introduced LongMethodName violations in 22 existing test methods. This change restores successful CI without changing application code, test names, or PHPMD rulesets.

The branch also adds repository development instructions in AGENTS.md.

Acceptance criteria

  • PHPMD is constrained to ^2.15.
  • Composer dependency resolution excludes PHPMD 3.x; CI installs PHPMD 2.15.0.
  • Existing PHPMD configuration remains unchanged.
  • No test methods are renamed for PHPMD 3.x.
  • PHPMD analysis succeeds for both lib/ and tests/.
  • The complete PHP CI workflow succeeds.
  • The scheduled workflow can use the same successful dependency installation and analysis steps without application changes. The cron event itself will be observed after merge.
  • No unrelated dependencies, quality rules, or application behavior are modified.

Validation

Verified revision: ffc943c05240d99a45e2119b4d2fa6700784db4b.

PHP CI #191 completed successfully on October 12, 2026. All PHP 8.3/8.4/8.5 and supported Doctrine Lexer matrix jobs passed. The separate push run skipped its full matrix as designed because an open PR exists.

The PHP 8.3 job confirms:

  • Composer installs PHPMD 2.15.0.
  • 509 tests and 1,815 assertions pass.
  • Line coverage is 100% (minimum 99%).
  • PHP-CS-Fixer, PHPStan level 9, and PHPMD on both source and tests pass.

Commands executed by CI

composer update --working-dir=quality/php-mess-detector
composer run-script test
./quality/php-cs-fixer/vendor/bin/php-cs-fixer fix --config=quality/php-cs-fixer/.php-cs-fixer.php --dry-run --allow-risky=yes
./quality/php-mess-detector/vendor/bin/phpmd lib text quality/php-mess-detector/ruleset.xml
./quality/php-mess-detector/vendor/bin/phpmd tests text quality/php-mess-detector/test-ruleset.xml
./quality/php-stan/vendor/bin/phpstan analyse --configuration=quality/php-stan/php-stan.neon lib tests --error-format=table --no-progress --no-interaction --no-ansi --level=9 --memory-limit=256M -v

No application regression tests are added for this dependency constraint change; the existing suite and CI dependency resolution verify the fix.

Standards

  • No normative spatial behavior is affected.

Normative references

N/A

Architecture

  • No architectural boundary is affected.

Architecture decision

N/A

Compatibility

  • No supported public API is affected.
  • No breaking change is introduced.

Documentation

  • No public behavior documentation change is required.
  • Repository development instructions are added in AGENTS.md.

Developer handoff

Important implementation decisions

^2.15 permits compatible PHPMD 2.x releases while excluding 3.x. Existing rulesets and test method names are preserved. Migration to PHPMD 3.x remains outside this change.

Compatibility considerations

No runtime dependencies, public API, or parsing behavior change.

Remaining risks or questions

The next scheduled execution after merge remains to be observed; the successful PR run validates the same workflow installation and analysis steps. Independent review and merge remain pending.

@Alexandre-T Alexandre-T linked an issue Oct 12, 2026 that may be closed by this pull request
16 tasks
@codecov-commenter

codecov-commenter commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (a44cb24) to head (ffc943c).

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #37   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       149       149           
===========================================
  Files             10        10           
  Lines            303       303           
===========================================
  Hits             303       303           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Pin phpmd to version 2.15 for CI stability and update ruleset exclusions
@Alexandre-T
Alexandre-T force-pushed the 36-fixci-pin-phpmd-to-215-to-restore-scheduled-ci-stability branch from a4b7f6d to ffc943c Compare October 12, 2026 11:17
@Alexandre-T
Alexandre-T marked this pull request as ready for review October 12, 2026 11:23
@Alexandre-T
Alexandre-T merged commit 0de0f30 into main Oct 12, 2026
14 checks passed
@Alexandre-T
Alexandre-T deleted the 36-fixci-pin-phpmd-to-215-to-restore-scheduled-ci-stability branch October 12, 2026 11:26
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.

fix(ci): Pin PHPMD to 2.15 to restore scheduled CI stability

2 participants