-
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.0 | Backfill the new T_NULLSAFE_OBJECT_OPERATOR token #3040
Comments
All the commits I had ready & waiting for this have now been pulled. |
That was an amazing set of PRs adding so much support. Thank you very much. I've still got a couple more to review but will get to those soon. |
Going to close this now as all linked PRs have been merged. If anything else needs doing, it can be handled as new a PR. Thanks again for the massive effort getting this in. |
@gsherwood Actually, #3089 also still belongs with this series, even though it's more a "clean up" than "add support" type PR, but yes, all the "add support" type PRs have now been merged for this issue. |
squizlabs/PHP_CodeSniffer#3040 From changelog: The PHP 8.0 T_NULLSAFE_OBJECT_OPERATOR token has been made available for older versions Existing sniffs that check for T_OBJECT_OPERATOR have been modified to apply the same rules for the nullsafe object operator Change-Id: Ie59f2a0de1ca96d2d7372cd279b2fd60a9329305
PHP 8 introduces a new object chaining operator
?->
which short-circuits moving to the next expression if the left-hand side evaluates tonull
.Refs:
Impact for PHP_CodeSniffer
I have already prepared the necessary changes and will pull them once I've run some additional tests.
In addition to that, various sniffs will need to be adjusted to take the new token into account.
Initial inventory of affected sniffs:
I have commits ready for all sniffs with a checkmark and will pull those once the initial tokenizer changes have been merged.
Not claiming completeness, there may be more sniffs which need changes, but this should take care of the bulk of it.
The text was updated successfully, but these errors were encountered: