Problem/Motivation
When working on contrib modules I want to make them forward compatible with drupal 9. This is not possible due to Symfony 4.4 EventDispatcher.
This way as mainainer of a module, I can prepare the module for drupal 9.
As site owner/developer I can then prepare the project and don't need to patch every module when upgrading to drupal 9
Steps to reproduce
For instance on the search api module:
Line search_api/src/Event/MappingViewsHandlersEvent.php
------ ---------------------------------------------------------------------------------------------------------------------------
10 Class Drupal\search_api\Event\MappingViewsHandlersEvent extends deprecated class Symfony\Component\EventDispatcher\Event:
since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead
------ ---------------------------------------------------------------------------------------------------------------------------
Proposed resolution
Add the Drupal\Component\EventDispatcher\Event to drupal8.
See: https://www.drupal.org/node/3159012
Also see where we tried to solve this for one of the contrib modules #3137602: Drupal 9 compatibility description
The solution is not elegant, and if I understand correctly disables the autoloader :(
Maybe this is already on the roadmap and will be backported to drupal 8, but I could not find an issue about this.
Close this issue if it is, but this way other people can find how to update their contrib modules.
Also I don't know which component this issue is about, so I selected "other" please correct me if you know which component this is.
Thanks
Jack