Repository navigation
Cascade merge: 4.x into master - #264
Merged
Merged
Conversation
…utoloader Constructing a ReflectionParameter whose default is a `new` expression evaluated the default eagerly, and NodeExpressionResolver loaded the class with include_once of the located file. Reflecting a signature thus declared a class, bypassing the autoloader: in goaop/framework such a class could not be woven any more in that process. - ReflectionParameter resolves its default value on the first access (getDefaultValue(), getDefaultValueConstantName(), isDefaultValueConstant(), getDefaultValueExpression(), __toString()). The implicit nullability of the type is decided on the AST (a literal `null` default), like PHP does at compile time, and only constant fetches are evaluated to answer isDefaultValueConstant(). - NodeExpressionResolver::loadClassDefinition() loads the class through the autoloaders instead of including its file. Fixes #261 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FxhC1GTbduntXjyF8E9Feb
fix: Resolve parameter defaults lazily and load classes through the autoloader
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.
Automated cascade merge that keeps
masterin sync with the4.xmaintenance branch.This PR tracks
4.xand merges automatically once required checks pass, when auto-merge is allowed for the repository; otherwise merge it manually. A new one is opened after each merge, so every future push to4.xkeeps flowing forward intomaster.If this PR shows a conflict, resolve it manually on
4.x(or directly on this PR's branch) — auto-merge will pick it up once it's clean again.