[Hackday] - trigger errors for deprecated classes

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12669
| License       | MIT
| Doc PR        | -

trigger errors for deprecated classes Symfony\Component\Validator\Constraints\Required and Symfony\Component\Validator\Constraints\Optional

Whould I create a UPGRADE-2.7.md and explain this?

Please move the notices below the namespace declaration (see https://github.com/symfony/symfony/pull/12739/files)