symfony / symfony-docs

The Symfony documentation
https://symfony.com/doc
Other
2.15k stars 5.1k forks source link

[Validator] drop type-hints for properties where the ´Type´ constraint is used #20059

Closed xabbuh closed 1 month ago

xabbuh commented 1 month ago

partially revert #18362 as having the native type-hints prevents the Type constraint to be applied in a meaningful way (if the types don't match, PHP will error before)

javiereguiluz commented 1 month ago

Thank you Christian!

I liked the comment you added in the description, so while merging I added a short paragraph with that information. See https://github.com/symfony/symfony-docs/commit/d7071c7ed801a36963d0e4535a16532f778b7726

xabbuh commented 1 month ago

good idea Javier 👍 thanks for doing it