-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Translation] Fix the string casting in the XliffFileLoader #15619
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
Conversation
👍 Discovered this yesterday in the CmfMenuBundle tests. Status: Reviewed |
👍 |
@aitboudad can you merge this (and propagate to 2.7) ? This bug is annoying |
@stof sure |
Thank you @stof. |
…r (stof) This PR was merged into the 2.3 branch. Discussion ---------- [Translation] Fix the string casting in the XliffFileLoader | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a #15611 broke the usage of Xliff translation files (and so all Symfony projects as they are used in core) because it stores SimpleXmlElement instances in the MessageCatalogue, which breaks when loading the cache: ``` PHP Fatal error: Call to undefined method SimpleXMLElement::__set_state() in .../app/cache/test/translations/catalogue.en.1cd7e874b24ab41081c7781e4161053bf515fc91.php on line 9 ``` this is how the cache looks like (truncated a lot of course): ```php $catalogue = new MessageCatalogue('en', array ( 'validators' => array ( 'This value should be false.' => SimpleXMLElement::__set_state(array( 0 => 'This value should be false.', )), ), )); ``` This is a critical bug in the 2.3 and 2.7 branches Commits ------- b856f62 [Translation] Fix the string casting in the XliffFileLoader
@aitboudad can you propagate it to 2.7 too as the bug was already propagated there ? |
@stof there are many conflict, should I open PR for 2.7 or apply a cherry-pick ? |
I merged 2.3 in 2.7 |
@nicolas-grekas thank you :) |
@aitboudad many conflicts ? The merge done by @nicolas-grekas shows a single conflict on the line changed here (which is the same conflict than the one you had to resolved for the propagation of your buggy PR btw) |
because of the other conflicts I had on the merge just before I believe |
#15611 broke the usage of Xliff translation files (and so all Symfony projects as they are used in core) because it stores SimpleXmlElement instances in the MessageCatalogue, which breaks when loading the cache:
this is how the cache looks like (truncated a lot of course):
This is a critical bug in the 2.3 and 2.7 branches