[DowngradePhp84] Add DowngradeExitNamedArgumentRector - #387
Conversation
|
@TomasVotruba ready 👍 |
|
LGTM 👍 Probably all named args in native functions should be downgraded, not just |
|
That's special on exit/die only for php 8.4. Other downgrade named argument is on DowngradePhp80 DowngradeNamedArgumentRector |
|
The |
|
Why this doesn't worK? https://3v4l.org/f0f3a#v8.3.33 |
|
that's "Process exited with code 1" means works on php 8.4, the page shows 2 part, php 8.4: Process exited with code 1. see https://php.watch/versions/8.4/exit-die-as-functions the transformation is remove the identifier |
|
The downgrade process is from top to bottom, if I want to downgrade to php 8.3 only, this take care of it. The original node is but start from php 8.4, it can be any function call with |
|
I see, so PHP 8.4 switched from |
Closes rectorphp/rector#9844
Diff
In PHP 8.4,
exitordiecan be marked as function call with provide named argument statushttps://php.watch/versions/8.4/exit-die-as-functions
On downgrade to php 8.3, it currently doesn't remove the named argument
https://getrector.com/demo/ef539935-7ed2-4cc4-9063-dd07681260ba
On usage, it will create error:
https://3v4l.org/f0f3a#v8.3.33
So, the DowngradePhp84 rule is needed for it.