-
-
Notifications
You must be signed in to change notification settings - Fork 863
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
Support for self::CONST_*_SUFFIX with suffixes #5534
Comments
could you show us in a code sample what you expect on the https://phpstan.org/ sandbox? |
Sure https://phpstan.org/r/b84f6dba-50dd-4e59-bd37-e83826e80d88 I expect no error here :) As you can see I couldn't simply use FOO_* in this case as it would include other constants I am not interested in, forcing me to list all of them one by one as |
This isn't to hard too do. Two places need to be modified:
|
phpstan/phpstan-src@1c6bb6b Add support for multiple wildcards in const type annotations, fixes #5534
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature request
I tried using a const wildcard in the middle and it blew up on me :) I assumed this would just work but it appears to be only supported as a trailing wildcard. I'm not sure if there is a good reason for this or if it's just an omission, but it would be nice if wildcards were supported anywhere in the constant name IMO.
Happy to try and send a PR if you approve of the idea and can maybe point me in the right direction, as I am not familiar with the large codebase.
The text was updated successfully, but these errors were encountered: