-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
PHP 8 and PSR12: bitwise or vs union type #3201
Comments
I don't believe this library is PHP 8 ready yet. |
@dlakomski AFAIK this has already been fixed via #3032 three months ago. Please test with the
@phanan This is not true. Nearly all PHP 8 syntaxes are by now supported, safe for |
@jrfnl Unless I'm mistaken, PHP 8 support hasn't been released. The latest tag was last year October, which simply breaks a lot if run against a PHP 8 codebase. Edit: On second look, 3.5.8 is the version @dlakomski uses as well, so it only makes sense that it breaks. I believe if he used constructor param promotion e.g., |
@phanan The 3.5.8 release - or rather the 3.5.7 - release already contained a number of PHP 8 related fixes, but yes, as I said before, while most of the rest of the fixes have been made, not all fixes have been released. And no, I have no clue when 3.6.0 will be released. |
@jrfnl yes, on |
No, this will go into the next minor Regarding the planning: as I said before - that's not my area and I have no influence on it. |
Closing as duplicate of #3032. Version 3.6.0 is close to release. The items remaining are currently here: https://github.com/squizlabs/PHP_CodeSniffer/milestone/25 |
Describe the bug
CodeSniffer do not distinguishes between "bitwise or" operator and union type.
Code sample
To reproduce
Steps to reproduce the behavior:
Country.php
with the code sample above.phpcs --standard=PSR12 Country.php
Expected behavior
I expected that error not to be reported, because the union type is not a operator described in PSR12 that needs spaces around it.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: