Rector: [PHP 8.0] Add Symfony/Validator to attributes

Created on 4 Oct 2020  Â·  7Comments  Â·  Source: rectorphp/rector

All 7 comments

While the validator itself understands attributes now, I'm still working on migrating the individual constraints.

If migration path has the same logic as @Route → #[Route], then all we need to do here is to add validator annotatoin classes.

Most constraints have been migrated now.

  • Composite constraints (like All and AtLeastOneOf) must remain Doctrine-style annotations because we cannot nest PHP attributes unfortunately.
  • The UniqueEntity constraint hasn't been migrated because we need to wait for a compatible Doctrine ORM version.

Thank you for updates. Could you also link PRs with those changes? Just so its easier to implement it.

My priorities have shifted now, but I'll give a try in the future.

Sure:

  • symfony/symfony#38382
  • symfony/symfony#38410
  • symfony/symfony#38499
Was this page helpful?
0 / 5 - 0 ratings