Skip to content

Commit 28b86de

Browse files
committed
minor #19045 [Validator] Change return type from iterable to Generator (momito69)
This PR was merged into the 5.4 branch. Discussion ---------- [Validator] Change return type from iterable to Generator As a Generator can introduce some specific code path and behavior, I recommend using this type to be clearer about the provider intent. Commits ------- 17705eb [Validator] Change return type from iterable to Generator
2 parents 2ef7e5d + 17705eb commit 28b86de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

validation/custom_constraint.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ class to simplify writing unit tests for your custom constraints::
660660
->assertRaised();
661661
}
662662

663-
public function provideInvalidConstraints(): iterable
663+
public function provideInvalidConstraints(): \Generator
664664
{
665665
yield [new ContainsAlphanumeric(message: 'myMessage')];
666666
// ...

0 commit comments

Comments
 (0)