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
Add support for nullsafe object operator ("?->") #5586
Add support for nullsafe object operator ("?->") #5586
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good as a fix!
only wish for future - we should find a way to cleanup Token
to serve as DTO and not have all that extra logic
Thank you @kubawerlos. |
yield [ | ||
'<?php return $this->myObject1?->{$index}+$b === "";', | ||
//null, | ||
//['equal' => true, 'identical' => true] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kubawerlos , should we uncomment? please take over and cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handled in #5646
This PR was merged into the 3.0 branch. Discussion ---------- DX: YodaStyleFixerTest - fix CI I noticed it here: https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/5641/checks?check_run_id=2374783267 FYI @kubawerlos , looks like coming from #5586 Commits ------- e9cdb51 DX: YodaStyleFixerTest - fix CI
The difference where you can use
T_OBJECT_OPERATOR
, but cannotT_NULLSAFE_OBJECT_OPERATOR
is write context (see: https://3v4l.org/PJZJo).Current list of files having
T_OBJECT_OPERATOR
:Initial list of files having
T_OBJECT_OPERATOR
(there was no single occurrence ofT_NULLSAFE_OBJECT_OPERATOR
):Closes #5584