-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
PregReplaceEModifierRector should work if $pattern is an array #3045
Comments
What's the expected change? |
Given, that all items in
But since, only one of them COULD match producing the correct output would be tricky. I have also encounterd that it also fails if $pattern is not "obviously" a string (is composed of function calls): https://getrector.org/demo/22f5b2b4-0823-48cc-8ce5-8a6b52fa2487 |
I've covered the concat case. If you find a replacement for https://getrector.org/demo/dfc1a6b3-aac1-478f-a8c4-f2d4fb63e98c, send PR with failing fixture. Just copy one of: https://github.com/rectorphp/rector/tree/master/rules/php55/tests/Rector/FuncCall/PregReplaceEModifierRector/Fixture and add before
-----
after code in them. |
rectorphp/rector-src@b31bb42 [Php81] Register uniqid function on NullToStrictStringFuncCallArgRector (#3045)
Bug Report
The
PregReplaceEModifierRector
throws Exception if$pattern
is an array.Minimal PHP Code Causing Issue
https://getrector.org/demo/dfc1a6b3-aac1-478f-a8c4-f2d4fb63e98c
Expected Behaviour
It should work, or at least not throw an Exception but rather indicate, that manual intervention might be necessary.
The text was updated successfully, but these errors were encountered: