You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Misleading error message for array unpacking of objects/enums in constant expression #9769
@cmb69 , I created a PR targeting 8.1 as this is indeed a bug and 8.1 is still in support. However if you believe this is a BC break that doesn't suitable for 8.1, feel free to change the target branch to 8.2.
I'm unsure about which branch to target. There is a recent discussion on internals about unserialization where the point was made by some that changing an exception message would constitute a BC break, even for an Error exception.
That's a silly thing. Message texts are not, and have never been considered stable.
Personally I fully agree with you, but I did see the debatees on mail list as well. Anyway, I leave the PR open for RMs to decide which branch is suitable.
Activity
cmb69 commentedon Oct 18, 2022
Indeed, this error message is wrong. Given that there still will be two RCs for 8.2, it might make sense to fix it right away.
jhdxr commentedon Oct 18, 2022
Indeed. For constant expression actually only arrays are accepted. This issue is shadowed coz
newis not allowed before.jhdxr commentedon Oct 18, 2022
@cmb69 , I created a PR targeting 8.1 as this is indeed a bug and 8.1 is still in support. However if you believe this is a BC break that doesn't suitable for 8.1, feel free to change the target branch to 8.2.
cmb69 commentedon Oct 18, 2022
I'm unsure about which branch to target. There is a recent discussion on internals about unserialization where the point was made by some that changing an exception message would constitute a BC break, even for an
Errorexception.derickr commentedon Oct 18, 2022
jhdxr commentedon Oct 19, 2022
Personally I fully agree with you, but I did see the debatees on mail list as well. Anyway, I leave the PR open for RMs to decide which branch is suitable.
cmb69 commentedon Oct 19, 2022
Then we should ask the RMs: @ramsey, @patrickallaert, @krakjoe, what do you think?
ramsey commentedon Oct 25, 2022
I'm okay with changing the error message.
Merge branch 'PHP-8.1' into PHP-8.2
Merge branch 'PHP-8.2'
Fix phpGH-9769: Misleading error message for unpacking of objects