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

[Validator] Define which collection keys should be checked for uniqueness #42403

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

Closed
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
Remove yield from the older test
  • Loading branch information
wkania committed Apr 3, 2022
commit c5d9e286e7ab33a19ba06baa2391e9145bfa22e0
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ public function testExpectsNonUniqueObjects($callback)
->assertRaised();
}

public function getCallback()
public function getCallback(): array
{
return [
yield 'static function' => [static function (\stdClass $object) {
'static function' => [static function (\stdClass $object) {
return [$object->name, $object->email];
}],
yield 'callable with string notation' => ['Symfony\Component\Validator\Tests\Constraints\CallableClass::execute'],
yield 'callable with static notation' => [[CallableClass::class, 'execute']],
yield 'callable with object' => [[new CallableClass(), 'execute']],
'callable with string notation' => ['Symfony\Component\Validator\Tests\Constraints\CallableClass::execute'],
'callable with static notation' => [[CallableClass::class, 'execute']],
'callable with object' => [[new CallableClass(), 'execute']],
];
}

Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.