-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Translation] Deprecate TranslatableMessage::__toString
#61109
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
[Translation] Deprecate TranslatableMessage::__toString
#61109
Conversation
a624592
to
47bcebc
Compare
I tried to deprecate
because of the twig implémentation
Not sure how to do then @stof @xabbuh ? Also it means that removing the toString method in 8.0 will imply that such thing as
won't be considered as empty anymore. |
I extracted the first fix in #61111 |
TranslatableMessage::__toString
If the form theme relies on checking whether a TranslatableMessage is empty before translating it, it is broken, as it checks the emptyness of the wrong string. |
If it's broken then how would you "fix" it @stof ?
I'm not sure we could call this broken since it's the same with "string key". My main issue is currently the fact that
Should I just add |
The fix might be to NOT wrap empty strings into TranslatableMessage. Is that possible? |
We can "forbidden" this with
But that does not solve the fact that a deprecation in the For this, I dunno what to do @nicolas-grekas :/ |
Can't we replace the empty check by a simple |
5571d6e
to
b217c93
Compare
Great, it solves everything. I just need #61111 to be merge into 7.4 now. |
b217c93
to
b7f9b9f
Compare
UPGRADE-7.4.md
Outdated
Translation | ||
----------- | ||
|
||
* Deprecate `TranslatableMessage::__toString` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Deprecate `TranslatableMessage::__toString` | |
* Deprecate `TranslatableMessage::__toString` |
f60e9e2
to
0e67069
Compare
0e67069
to
916befb
Compare
Thank you @VincentLanglet. |
Resolve the following discussion #60935 (comment)
cc @stof @xabbuh