[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        | ~

Sall I change the message in the getter method to something like: `'The '.__METHOD__.' and '.__CLASS__.'::setDispatcher method are deprecated since version 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.`