-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Errors about interface/trait/enum names say "class name" #15976
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
Labels
Comments
DanielEScherzer
added a commit
to DanielEScherzer/php-src
that referenced
this issue
Sep 21, 2024
So that it is clearer what changes
DanielEScherzer
added a commit
to DanielEScherzer/php-src
that referenced
this issue
Sep 21, 2024
Instead of always saying that a name is reserved or deprecated and cannot/should not be used as a class name, take the usage into account and say the name cannot be used as an enum name, trait name, etc. In the process, for class names add a missing "a".
PR at #15977 |
DanielEScherzer
added a commit
to DanielEScherzer/php-src
that referenced
this issue
Sep 21, 2024
Instead of always saying that a name is reserved or deprecated and cannot/should not be used as a class name, take the usage into account and say the name cannot be used as an enum name, trait name, etc. In the process, for class names add a missing "a".
Girgias
pushed a commit
that referenced
this issue
Sep 22, 2024
Instead of always saying that a name is reserved or deprecated and cannot/should not be used as a class name, take the usage into account and say the name cannot be used as an enum name, trait name, etc. In the process, for class names add a missing "a".
Fixed by #15977 |
DanielEScherzer
added a commit
to DanielEScherzer/php-src
that referenced
this issue
Sep 22, 2024
Follow-up to php#15977
DanielEScherzer
added a commit
to DanielEScherzer/php-src
that referenced
this issue
Sep 22, 2024
Follow-up to php#15977
Girgias
pushed a commit
that referenced
this issue
Sep 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description
The following code:
Resulted in this output:
But I expected this output instead:
This example is for the
_
deprecation (#15360) but this is a general issue inzend_assert_valid_class_name()
- tryenum bool {}
and you get a fatal error about the class name. Also applies toclass_alias
errors:produces
PHP Version
PHP 8.2+
The text was updated successfully, but these errors were encountered: