Skip to content

Commit 983b683

Browse files
Deprecate TranslatableMessage::__toString
1 parent cabe552 commit 983b683

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

UPGRADE-7.4.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ Security
5050
* Deprecate `AbstractListener::__invoke`
5151
* Deprecate `LazyFirewallContext::__invoke()`
5252

53+
Translation
54+
-----------
55+
56+
* Deprecate `TranslatableMessage::__toString`
57+
5358
Validator
5459
---------
5560

src/Symfony/Component/Translation/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
7.4
5+
---
6+
7+
* Deprecate `TranslatableMessage::__toString`
8+
49
7.3
510
---
611

src/Symfony/Component/Translation/TranslatableMessage.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public function __construct(
2828

2929
public function __toString(): string
3030
{
31+
trigger_deprecation('symfony/translation', '7.4', 'Calling "%s()" is deprecated.', __METHOD__);
32+
3133
return $this->getMessage();
3234
}
3335

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy