-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Disallow assigning reference to unset readonly property #8188
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
Conversation
The commit message is a bit confusing, I'll rephrase to something like "Can't set unset readonly property to a reference" |
@nikic Are you ok with this change? |
Codecov Report
@@ Coverage Diff @@
## PHP-8.1 #8188 +/- ##
===========================================
+ Coverage 67.34% 67.43% +0.09%
===========================================
Files 800 806 +6
Lines 301568 305901 +4333
===========================================
+ Hits 203084 206278 +3194
- Misses 98484 99623 +1139
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Is this waiting on anything? Can we merge it to PHP-8.1? |
@ramsey I still haven't addressed Nikitas comments. Hopefully I can do that in the coming days. |
8fbc8e7
to
6e73012
Compare
--TEST-- | ||
Readonly variations | ||
--FILE-- |
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.
Add a string concatenation variation maybe? And maybe ++
, --
as IIRC those are different opcodes
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.
+=
and .=
both result in ASSIGN_OP
. ++
might be worth checking. I'll adjust the test.
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.
LGTM
Closes GH-7942