[2.7] adds deprecation notices.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

This is wrong, because it will be triggered by Symfony when dispatching the event because of the BC layer. We should trigger it only in the getter (calling the setter in your own events does not work properly anyway, because the EventDispatcher always sets itself again)