Skip to content

Commit 8d7daad

Browse files
Merge branch '5.4' into 6.2
* 5.4: CS fix Fix test provider
2 parents e34c975 + 535d93f commit 8d7daad

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Tests/Constraints/RangeTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testThrowsConstraintExceptionIfBothMinLimitAndPropertyPathNamed(
3232
{
3333
$this->expectException(\Symfony\Component\Validator\Exception\ConstraintDefinitionException::class);
3434
$this->expectExceptionMessage('requires only one of the "min" or "minPropertyPath" options to be set, not both.');
35-
eval('new \Symfony\Component\Validator\Constraints\Range(min: "min", minPropertyPath: "minPropertyPath");');
35+
new Range(min: 'min', minPropertyPath: 'minPropertyPath');
3636
}
3737

3838
public function testThrowsConstraintExceptionIfBothMaxLimitAndPropertyPath()
@@ -49,7 +49,7 @@ public function testThrowsConstraintExceptionIfBothMaxLimitAndPropertyPathNamed(
4949
{
5050
$this->expectException(\Symfony\Component\Validator\Exception\ConstraintDefinitionException::class);
5151
$this->expectExceptionMessage('requires only one of the "max" or "maxPropertyPath" options to be set, not both.');
52-
eval('new \Symfony\Component\Validator\Constraints\Range(max: "max", maxPropertyPath: "maxPropertyPath");');
52+
new Range(max: 'max', maxPropertyPath: 'maxPropertyPath');
5353
}
5454

5555
public function testThrowsConstraintExceptionIfNoLimitNorPropertyPath()
@@ -69,6 +69,6 @@ public function testThrowsConstraintDefinitionExceptionIfBothMinAndMaxAndMinMess
6969
{
7070
$this->expectException(\Symfony\Component\Validator\Exception\ConstraintDefinitionException::class);
7171
$this->expectExceptionMessage('can not use "minMessage" and "maxMessage" when the "min" and "max" options are both set. Use "notInRangeMessage" instead.');
72-
eval('new \Symfony\Component\Validator\Constraints\Range(min: "min", max: "max", minMessage: "minMessage", maxMessage: "maxMessage");');
72+
new Range(min: 'min', max: 'max', minMessage: 'minMessage', maxMessage: 'maxMessage');
7373
}
7474
}

Tests/Constraints/UlidValidatorTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Validator\Tests\Constraints;
1313

14-
use stdClass;
1514
use Symfony\Component\Validator\Constraints\Ulid;
1615
use Symfony\Component\Validator\Constraints\UlidValidator;
1716
use Symfony\Component\Validator\Exception\UnexpectedValueException;
@@ -44,7 +43,7 @@ public function testEmptyStringIsValid()
4443
public function testExpectsStringCompatibleType()
4544
{
4645
$this->expectException(UnexpectedValueException::class);
47-
$this->validator->validate(new stdClass(), new Ulid());
46+
$this->validator->validate(new \stdClass(), new Ulid());
4847
}
4948

5049
public function testValidUlid()

0 commit comments

Comments
 (0)