minor #29509 [Validator] Add tests in regex validator for objects with __toString method (raulfraile)
minor #29509 [Validator] Add tests in regex validator for objects with __toString method (raulfraile)

This PR was merged into the 4.3-dev branch.

Discussion
----------

[Validator] Add tests in regex validator for objects with __toString method

This PR adds tests to cover objects implementing the `__toString` method for the `Regex` validator.

| Q             | A
| ------------- | ---
| Branch?       | 3.4 (careful when merging)
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

11e0df4f55 [Validator] Add tests in regex validator for objects with __toString method

symfony/Validator