Skip to content

Commit e570cf8

Browse files
alongoszbarw4
authored andcommitted
[BC break] Added implements \Stringable to Translation Value Object (#344)
For more details see #344 Breaking changes: Any class extending `\Ibexa\Contracts\Core\Repository\Values\Translation` will need to implement `\Stringable`.
1 parent 29e6434 commit e570cf8

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8480,11 +8480,6 @@ parameters:
84808480
count: 1
84818481
path: src/lib/Base/Exceptions/UnauthorizedException.php
84828482

8483-
-
8484-
message: "#^Cannot cast Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Translation to string\\.$#"
8485-
count: 1
8486-
path: src/lib/Base/Exceptions/UserPasswordValidationException.php
8487-
84888483
-
84898484
message: "#^Method Ibexa\\\\Core\\\\Base\\\\Exceptions\\\\UserPasswordValidationException\\:\\:__construct\\(\\) has parameter \\$errors with no value type specified in iterable type array\\.$#"
84908485
count: 1
@@ -42900,11 +42895,6 @@ parameters:
4290042895
count: 1
4290142896
path: tests/lib/FieldType/FloatValueValidatorTest.php
4290242897

42903-
-
42904-
message: "#^Cannot cast Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Translation to string\\.$#"
42905-
count: 1
42906-
path: tests/lib/FieldType/Generic/GenericTest.php
42907-
4290842898
-
4290942899
message: "#^Class Symfony\\\\Component\\\\Validator\\\\ConstraintViolation constructor invoked with 1 parameter, 6\\-10 required\\.$#"
4291042900
count: 1

src/contracts/Repository/Values/Translation.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@
88

99
namespace Ibexa\Contracts\Core\Repository\Values;
1010

11+
use Stringable;
12+
1113
/**
12-
* Base class fro translation messages.
14+
* Abstract for UI translation messages, use its extensions: Translation\Message, Translation\Plural.
1315
*
14-
* Use its extensions: Translation\Singular, Translation\Plural.
16+
* @see \Ibexa\Contracts\Core\Repository\Values\Translation\Message
17+
* @see \Ibexa\Contracts\Core\Repository\Values\Translation\Plural
1518
*/
16-
abstract class Translation extends ValueObject
19+
abstract class Translation extends ValueObject implements Stringable
1720
{
1821
}
1922

0 commit comments

Comments
 (0)