Repository navigation
chore: merge 4.x into master - #241
Merged
Merged
Conversation
The composer "files" bootstrap of this package calls ReflectionEngine::init() on every request of an application that installs it, and init() built the PHP-Parser parser, lexer and name resolving traverser right away. Most requests never parse anything: in goaop/framework, parsing only happens on a cache miss. init() now only stores the locator and the grammar version, getParser() and parseFile() create the parser and the traverser on first use. The ComposerLocator stays eager on purpose: it must find composer's own class loader before other loaders wrap it. Warm request with opcache (built-in server, median of 200): requiring vendor/autoload.php of goaop/framework takes 87-91 instead of 229-242 µs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019bYFRwMWKndKaj6SemwDn2
… master PHP 8.6 native reflection prints boolean constant values as "true" and "false" instead of the string casts "1" and "", so the experimental PHP 8.6 jobs of 4.x fail ReflectionClassTest::testGetReflectionConstant. Ported from the same rendering on master, with its PHPStan ignores for releases that do not know PHP 8.6 yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019bYFRwMWKndKaj6SemwDn2
perf(engine): create the parser and the name resolver on the first parse (4.x)
Brings the lazy parser of #239 and the PHP 8.6 boolean constant rendering from 4.x into master. ReflectionClassConstant::__toString() keeps the master version: it already renders booleans the same way and also prints the doc comment of the constant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019bYFRwMWKndKaj6SemwDn2
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 resolves the conflict that keeps the cascade PR #240 (
4.x→master) unmergeable.The PR merges
4.x(at 9cd97a1, which includes #239) intomaster. Onlysrc/ReflectionClassConstant.phpconflicted:__toString()as a backport.I kept master's version, which is a superset. Everything else merges cleanly:
src/ReflectionEngine.phpgets the lazy parser;tests/ReflectionEngineTest.phpis new;phpstan.neonis unchanged, since both branches added identical lines.Effects
master, so Cascade merge: 4.x into master #240 has nothing left to merge.Resource not accessible by integration) is a separate problem, fixed on4.xby ci: let the cascade workflow enable auto-merge on its PR #242.Tests
On the merge result: full PHPUnit suite 13827 tests OK (136 skipped and 2 incomplete, the same as master), and
vendor/bin/phpstan analyse srcreports no errors.🤖 Generated with Claude Code
https://claude.ai/code/session_019bYFRwMWKndKaj6SemwDn2
Generated by Claude Code