-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[8.x] Fix translation bug and add test #39298
Conversation
@taylorotwell So yeah i was wondering about the process - the function should be probably marked as deprecated and left empty and removed in the next version (9) Am I totally off-base ? |
@cgaube are you affected by this? |
@driesvints yes - I am extending the translator - and was using that function - |
Same here, we are extending translator as well, and the patch upgrade of Laravel broke our tests. Also an easy fix here, but technically this is a breaking change. |
I'm afraid we won't be reverting this. We were fixing a bug here and as always, when you're overwriting core functionality you have to be aware that in some very edge cases it can break your specific use case. I'm sorry you both got caught with this but we believe this bug warranted fixing. |
Oh yeah I was never suggesting that we revert those changes. It was more of a question about how Laravel handle breaking changes - Usually when introducing one you update to the next major version, and you document any breaking change in a CHANGELOG or something. I was just curious about the process for this project - because if laravel is ok with introducing breaking change on minor updates it will require extra care for us when updating. Fortunately In my project every laravel services that we had to extend have a feature or unit test associated to catch those kind of issues. Thank you |
Fixes #39258
Uses
strtr
function instead ofstr_replace
.strtr
internally sorts keys by length so sort replacements can be removed as well.