-
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.2 - DNF Support #3731
PHP 8.2 - DNF Support #3731
Comments
PHPCS does not support DNF (at all) yet. PHP 8.2 support has yet to be added. Also see a number of open PRs covering bits and pieces of PHP 8.2 support (but not DNF yet). |
Well at least I'm not crazy :) Is there an 8.2 checklist issue open yet like there was for 8.1? Definitely have to change the tokenizing, probably similarly to what was done for union types then.. |
disables for anyone who finds this ticket and needs them @jrfnl I'm going to retitle this ticket to make it easier to find |
No, there's no PHP 8.2 checklist (yet), then again, for the Tokenizer, PHP 8.2 is finally a quite manageble release after three years of onslaught with new syntaxes, so I don't think a checklist is needed. AFAICS, DNF is the only thing which necessitates changes to the A preliminary discussion about how to handle DNF for the tokenizer is in this (quite unrelated) ticket: #3667 (comment) (as that's when the build started failing). |
I'm doing this right now: // phpcs:ignore Squiz.WhiteSpace.OperatorSpacing.NoSpaceAfter, Squiz.WhiteSpace.OperatorSpacing.NoSpaceBefore
public function foo(): (A&B)|null
{
... |
FYI: DNF support will be included in the next PHPCS release (3.10.0). |
Describe the bug
DNF in properties and as return types creates spurious formatting errors
Code sample
To reproduce
Steps to reproduce the behavior:
test.php
with the code sample above...phpcs test.php ...
Expected behavior
Ignoring the "each interface/class must be in a file by itself" all the rest of the errors marked are NOT errors
and definitely should not be autocorrecting
The single space between colon and type declaration doesn't apparently recognize the parentheses () as part of the type declaration
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: