Skip to content
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

[Downgrade PHP 7.3] Trailing commas in function calls #4168

Closed
leoloso opened this issue Sep 8, 2020 · 2 comments
Closed

[Downgrade PHP 7.3] Trailing commas in function calls #4168

leoloso opened this issue Sep 8, 2020 · 2 comments
Labels

Comments

@leoloso
Copy link
Contributor

leoloso commented Sep 8, 2020

Feature Request

Downgrade new feature from PHP 7.3 to its equivalent PHP 7.2 code

Diff

$compacted = compact(
    'posts',
-    'units',
+    'units'
);
@quisse
Copy link
Contributor

quisse commented Sep 23, 2020

After some digging I can conclude that this is not possible using php-parser because php-parser isn't aware of the trailing comma AFAIK.
Any help would be appreciated.

@TomasVotruba
Copy link
Member

Closed by #4273,

merged in #4796

TomasVotruba added a commit that referenced this issue Jun 11, 2023
rectorphp/rector-src@d541d1a [Doc] Fix documentation code example of RemoveTypedPropertyDeadInstanceOfRector (#4168)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants