Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8797be8

Browse filesBrowse files
committed
bug #58316 [Form] Don't call the constructor of LogicalOr (derrabus)
This PR was merged into the 5.4 branch. Discussion ---------- [Form] Don't call the constructor of LogicalOr | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | N/A | License | MIT This PR fixes an incompatibility of our `ConstraintValidatorTestCase` with PHPUnit 11. In PHPUnit 11, the constructors of `LogicalOr` and friends are protected. The static constructor `fromConstraints()` is the proper replacement and has existed since PHPUnit 6. Commits ------- b5fc170 Don't call the constructor of LogicalOr
2 parents 60a39d6 + b5fc170 commit 8797be8
Copy full SHA for 8797be8

File tree

1 file changed

+1
-2
lines changed
Filter options

1 file changed

+1
-2
lines changed

‎src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ protected function expectValidateAt(int $i, string $propertyPath, $value, $group
234234
{
235235
$validator = $this->context->getValidator()->inContext($this->context);
236236
$validator->expectValidation($i, $propertyPath, $value, $group, function ($passedConstraints) {
237-
$expectedConstraints = new LogicalOr();
238-
$expectedConstraints->setConstraints([new IsNull(), new IsIdentical([]), new IsInstanceOf(Valid::class)]);
237+
$expectedConstraints = LogicalOr::fromConstraints(new IsNull(), new IsIdentical([]), new IsInstanceOf(Valid::class));
239238

240239
Assert::assertThat($passedConstraints, $expectedConstraints);
241240
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.