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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readonly classes cannot be combined with
#[AllowDynamicProperties]
#3738Readonly classes cannot be combined with
#[AllowDynamicProperties]
#3738Changes from all commits
b96f17b
65a5889
0b750a9
ff83891
b1cebc2
b2b833c
b35a845
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to do something with $scope here. Please recreate this problem 3447391 but with a trait.
We probably need to do
$scope->enterTrait()
here before calling the check. Just doif !$scope instanceof MutatingScope then throw ShouldNotHappen
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have adjusted the PR. I think I have reproduced the problem you are after.
adding
$scope->enterTrait($classReflection)
didn't work and throws:at this point I have no idea what todo. could you fix the remaining thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me fix the build real quick
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Push the code that's crashing like that please, I will take a look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here you are
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, we need to be in a class first before we can enter a trait.
I'd try two things: try to put the trait reflection into enterClass (but a different ShouldNotHappen might be thrown, not sure).
If that fails, we need to come up with some fake class to put into enterClass before we can enterTrait. It might be okay to simulate some anonymous Class_ node to use.
If it's too much work, don't worry and I'll merge the original code that doesn't use MutatingScope at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have class-faking without a thrown exception working. the test-case is still failling though
Will have another look after sleeping over it