Skip to content

chore: merge 4.x into master - #241

Merged
lisachenko merged 4 commits into
masterfrom
cascade/4.x-into-master
Oct 6, 2026
Merged

lisachenko merged 4 commits into
masterfrom
cascade/4.x-into-master

Conversation

@lisachenko

Copy link
Copy Markdown
Member

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) into master. Only src/ReflectionClassConstant.php conflicted:

  • 4.x got the PHP 8.6 boolean rendering of __toString() as a backport.
  • master already had the same rendering, plus the doc-comment prefix.

I kept master's version, which is a superset. Everything else merges cleanly:

  • src/ReflectionEngine.php gets the lazy parser;
  • tests/ReflectionEngineTest.php is new;
  • phpstan.neon is unchanged, since both branches added identical lines.

Effects

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 src reports no errors.

🤖 Generated with Claude Code

https://claude.ai/code/session_019bYFRwMWKndKaj6SemwDn2


Generated by Claude Code

claude and others added 4 commits October 4, 2026 23:16
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
@lisachenko
lisachenko marked this pull request as ready for review October 6, 2026 20:59
@lisachenko
lisachenko merged commit 3a0d788 into master Oct 6, 2026
8 checks passed
@lisachenko
lisachenko deleted the cascade/4.x-into-master branch October 6, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants