File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 "ignore_php_platform_requirements" : {
33 "8.6" : true
44 },
5- "backwardCompatibilityCheck" : false
5+ "backwardCompatibilityCheck" : true
66}
Original file line number Diff line number Diff line change 66
77use InvalidArgumentException ;
88use Psr \Container \ContainerExceptionInterface ;
9+ use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
10+
11+ use function sprintf ;
912
1013class InvalidConfigException extends InvalidArgumentException implements
1114 ContainerExceptionInterface,
1215 ExceptionInterface
1316{
1417 public const string MESSAGE_INVALID_EVENT_DISPATCHER
15- = 'The event dispatcher service must implement Symfony\Component\EventDispatcher\EventDispatcherInterface . ' ;
18+ = 'The event dispatcher service must implement "%s" . ' ;
1619
1720 public static function invalidEventDispatcher (): self
1821 {
19- return new self (self ::MESSAGE_INVALID_EVENT_DISPATCHER );
22+ return new self (sprintf ( self ::MESSAGE_INVALID_EVENT_DISPATCHER , EventDispatcherInterface::class) );
2023 }
2124}
Original file line number Diff line number Diff line change 1919use Symfony \Component \EventDispatcher \EventDispatcher ;
2020use Symfony \Component \EventDispatcher \EventDispatcherInterface ;
2121
22+ use function sprintf ;
23+
2224class ApplicationFactoryTest extends TestCase
2325{
2426 use CommonTrait;
@@ -118,7 +120,9 @@ public function testRejectsNonDispatcherService(): void
118120 $ container = $ this ->createContainer ()->set (ApplicationFactory::EVENT_DISPATCHER , new stdClass ());
119121
120122 $ this ->expectException (InvalidConfigException::class);
121- $ this ->expectExceptionMessage (InvalidConfigException::MESSAGE_INVALID_EVENT_DISPATCHER );
123+ $ this ->expectExceptionMessage (
124+ sprintf (InvalidConfigException::MESSAGE_INVALID_EVENT_DISPATCHER , EventDispatcherInterface::class)
125+ );
122126
123127 (new ApplicationFactory ())($ container );
124128 }
You can’t perform that action at this time.
0 commit comments