Issue #3153803 by catch, Krzysztof Domański, andypost, longwave, kim.pepper,...
Issue #3153803 by catch, Krzysztof Domański, andypost, longwave, kim.pepper, alexpott: [Symfony 5] Update EventDispatcher::dispatch() to make it forward-compatible with Symfony 5
$deprecation_message='Symfony\Component\EventDispatcher\Event is deprecated in drupal:9.1.0 and will be replaced by Symfony\Contracts\EventDispatcher\Event in drupal:10.0.0. A new Drupal\Component\EventDispatcher\Event class is available to bridge the two versions of the class. See https://www.drupal.org/node/3159012';
// Trigger a deprecation error if the deprecated Event class is used
@trigger_error('Calling the Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch() method with a string event name as the first argument is deprecated in drupal:9.1.0, an Event object will be required instead in drupal:10.0.0. See https://www.drupal.org/node/3154407',E_USER_DEPRECATED);
* Unit tests for the ContainerAwareEventDispatcher.
@@ -152,6 +154,39 @@ public function testDispatchArgumentOrderDeprecation() {
$dispatcher->dispatch('foo');
}
/**
* Tests deprecation notice for Symfony Event class.
*
* @group legacy
* @expectedDeprecation Symfony\Component\EventDispatcher\Event is deprecated in drupal:9.1.0 and will be replaced by Symfony\Contracts\EventDispatcher\Event in drupal:10.0.0. A new Drupal\Component\EventDispatcher\Event class is available to bridge the two versions of the class. See https://www.drupal.org/node/3159012
* Tests deprecation notice for Symfony Event class inheritance.
*
* @group legacy
* @expectedDeprecation Symfony\Component\EventDispatcher\Event is deprecated in drupal:9.1.0 and will be replaced by Symfony\Contracts\EventDispatcher\Event in drupal:10.0.0. A new Drupal\Component\EventDispatcher\Event class is available to bridge the two versions of the class. See https://www.drupal.org/node/3159012