Repository navigation
build: require goaop/parser-reflection ^4.0.2 || ^5.0.2 - #784
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
This raises the parser-reflection constraint from
^4.0.1 || ^5.0.1to^4.0.2 || ^5.0.2, so every installation gets the fixes released in 5.0.2 and 4.0.2:eval()is reported as not found instead offile_get_contents()being called on its pseudo file name. Before, reflecting a woven class whose parent was declared byeval()emitted a warning, and the cache warm-up treats warnings as failures.DebugClassLoaderno longer reports "might add a native return type" deprecations whenever weaving runs in debug mode.CHANGELOG.mdandUPGRADE-4.0.mdlist the new constraint.Second commit: PHPStan on a fresh install
Changing
composer.jsonchanges 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-rules2.1.1. They then reported 3booleanAnd.*NotBooleanerrors thatmasteronly passes thanks to its cachedvendor/; a fresh install fails onmastertoo. The second commit fixes them without changing behaviour:AopComposerLoader::$isAllowedFilterdocuments its closure signature,(Closure(string): bool)|null, the typeEnumerator::getPathFilter()returns, so calling it gives abool.TypeGenerator::resolveReflectionNamedTypeName()comparesisSelf()/isParent()(PHP 8.5 methods behindmethod_exists(), somixedfor PHPStan on 8.4) withtrue.Checklist
type(scope): summary)composer checkpasses. PHPStan: no errors. php-cs-fixer: the 2 changed files are clean.vendor/bin/phpunit: OK (3330 tests, 1 skipped).composer validate --strict: valid.🤖 Generated with Claude Code
https://claude.ai/code/session_01FxhC1DaSZY1jAz2XfyjhPa