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

Missing rector to downgrade Closure::fromCallable (PHP 7.1) #6671

Closed
bobab12 opened this issue Aug 31, 2021 · 3 comments
Closed

Missing rector to downgrade Closure::fromCallable (PHP 7.1) #6671

bobab12 opened this issue Aug 31, 2021 · 3 comments
Labels

Comments

@bobab12
Copy link

bobab12 commented Aug 31, 2021

Feature Request

There should be a rector rule to be able to downgrade Closure::fromCallable (PHP 7.1), see https://www.php.net/manual/en/closure.fromcallable.php.

Diff

-\Closure::fromCallable('strtolower');
+$callable = 'strtolower';
+function () use ($callable) {
+    return $callable(...func_get_args());
+};
@TomasVotruba
Copy link
Member

Hi, we don't plan to add such rule at the moment, as our main focus is improving DX and bug-fixes on upgrade. See https://getrector.org/blog/rector-for-php56-native

Would you like to contribute it?

@bobab12
Copy link
Author

bobab12 commented Aug 31, 2021

Hi, we don't plan to add such rule at the moment, as our main focus is improving DX and bug-fixes on upgrade. See https://getrector.org/blog/rector-for-php56-native

Would you like to contribute it?

I could give it a shot. :-) Let me get back to you whenever I have some spare time to work on this.

@TomasVotruba
Copy link
Member

Thank you 👍 💪 If you need some help, just ping me in the PR :)

TomasVotruba added a commit that referenced this issue Jan 16, 2025
rectorphp/rector-src@354ef50 [BetterPhpDocParser] Use str_starts_with() and str_starts_with() over str_contains() on DoctrineAnnotationDecorator (#6671)
TomasVotruba added a commit that referenced this issue Jan 16, 2025
rectorphp/rector-src@a26bfd9 [BetterPhpDocParser] Use str_contains() for DoctrineAnnotationDecorator (#6671) (#6674)
TomasVotruba added a commit that referenced this issue Jan 16, 2025
rectorphp/rector-src@a26bfd9 [BetterPhpDocParser] Use str_contains() for DoctrineAnnotationDecorator (#6671) (#6674)
TomasVotruba added a commit that referenced this issue Jan 17, 2025
rectorphp/rector-src@a26bfd9 [BetterPhpDocParser] Use str_contains() for DoctrineAnnotationDecorator (#6671) (#6674)
TomasVotruba added a commit that referenced this issue Jan 17, 2025
rectorphp/rector-src@a26bfd9 [BetterPhpDocParser] Use str_contains() for DoctrineAnnotationDecorator (#6671) (#6674)
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

2 participants