-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Fix GH-9769: Improve error message for array unpacking in constant expression #9776
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
Yes please 🙂 They're not required per-se but are certainly welcome. |
If this is the case I prefer to explore to bring |
As said in #9769 I'll jus leave this PR open for RMs to decide. Exploration on |
I don't think user code should depend on error messages. It's fine for us to depend on them though, as there's no other way to test them. For bulk-changes we have the |
@ramsey is fine with changing the error message, so this can go into PHP-8.1. However, I think we should have a test for this; not because of the error message, but rather because this code path is apparently not tested so far (otherwise the changed message should have triggered a test failure). @jhdxr, could you please add a simple test (basically, just |
the AppVeyor failure seems to be unrelated, but I can rerun it if necessary. |
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.
Thank you! Besides the minor issue pointed out below, this looks good. And yeah, that AppVeyor failure is unrelated; I've retriggred the build nonetheless.
Thank you! |
I didn't attach a test script for this as it's only changing the error message. But I can add one if it's required.
(fix #9769 )