Skip to content

build: require goaop/parser-reflection ^4.0.2 || ^5.0.2 - #784

Merged
lisachenko merged 2 commits into
masterfrom
feature/serene-cannon-miqun3
Nov 2, 2026
Merged

lisachenko merged 2 commits into
masterfrom
feature/serene-cannon-miqun3

Conversation

@lisachenko

@lisachenko lisachenko commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

What and why

This raises the parser-reflection constraint from ^4.0.1 || ^5.0.1 to ^4.0.2 || ^5.0.2, so every installation gets the fixes released in 5.0.2 and 4.0.2:

CHANGELOG.md and UPGRADE-4.0.md list the new constraint.

Second commit: PHPStan on a fresh install

Changing composer.json changes the key of the CI dependency cache, so this PR's PHPStan jobs installed the current tools from scratch: PHPStan 2.3.4, phpstan-strict-rules 2.1.1. They then reported 3 booleanAnd.*NotBoolean errors that master only passes thanks to its cached vendor/; a fresh install fails on master too. The second commit fixes them without changing behaviour:

  • AopComposerLoader::$isAllowedFilter documents its closure signature, (Closure(string): bool)|null, the type Enumerator::getPathFilter() returns, so calling it gives a bool.
  • TypeGenerator::resolveReflectionNamedTypeName() compares isSelf() / isParent() (PHP 8.5 methods behind method_exists(), so mixed for PHPStan on 8.4) with true.

Checklist

  • The title follows Conventional Commits (type(scope): summary)
  • Tests cover the change: n/a, a dependency constraint plus type annotations (the parser-reflection fixes are tested there)
  • composer check passes. PHPStan: no errors. php-cs-fixer: the 2 changed files are clean. vendor/bin/phpunit: OK (3330 tests, 1 skipped). composer validate --strict: valid.
  • User-facing or breaking changes are in CHANGELOG.md (and the upgrade guide for breaking changes)

🤖 Generated with Claude Code

https://claude.ai/code/session_01FxhC1DaSZY1jAz2XfyjhPa

The 4.0.2 and 5.0.2 releases stop reading the pseudo file of classes declared
by eval() (no more file_get_contents() warning when such a class is the parent
of a woven class) and document the return types of the node visitors, which
Symfony's DebugClassLoader reported as deprecations in debug mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxhC1DaSZY1jAz2XfyjhPa
@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.47%. Comparing base (f045cb8) to head (7fd84e4).
⚠️ Report is 3 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #784   +/-   ##
=========================================
  Coverage     98.47%   98.47%           
  Complexity     2038     2038           
=========================================
  Files           125      125           
  Lines          5313     5316    +3     
=========================================
+ Hits           5232     5235    +3     
  Misses           81       81           

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

phpstan-strict-rules 2.1 reports the result of the path filter closure and of
ReflectionNamedType::isSelf()/isParent() behind method_exists() as mixed in a
boolean context. The filter property documents its closure signature, and the
PHP 8.5 methods are compared with true. The CI cache had hidden this: a fresh
install of the dependencies fails PHPStan on master as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FxhC1DaSZY1jAz2XfyjhPa
@lisachenko
lisachenko marked this pull request as ready for review November 2, 2026 19:19
@lisachenko
lisachenko merged commit b317c7b into master Nov 2, 2026
14 checks passed
@lisachenko
lisachenko deleted the feature/serene-cannon-miqun3 branch November 2, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants