1414use PHPUnit \Framework \Attributes \DataProvider ;
1515use Psr \Cache \CacheItemPoolInterface ;
1616use Psr \Log \LoggerAwareInterface ;
17+ use Psr \Log \LogLevel ;
1718use Symfony \Bundle \FrameworkBundle \DependencyInjection \FrameworkExtension ;
1819use Symfony \Bundle \FrameworkBundle \FrameworkBundle ;
1920use Symfony \Bundle \FrameworkBundle \Tests \DependencyInjection \Fixtures \Workflow \Validator \DefinitionValidator ;
5960use Symfony \Component \HttpClient \ThrottlingHttpClient ;
6061use Symfony \Component \HttpFoundation \IpUtils ;
6162use Symfony \Component \HttpKernel \DependencyInjection \LoggerPass ;
63+ use Symfony \Component \HttpKernel \Exception \BadRequestHttpException ;
64+ use Symfony \Component \HttpKernel \Exception \ConflictHttpException ;
65+ use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
66+ use Symfony \Component \HttpKernel \Exception \ServiceUnavailableHttpException ;
6267use Symfony \Component \HttpKernel \Fragment \FragmentUriGeneratorInterface ;
6368use Symfony \Component \Lock \Store \SemaphoreStore ;
6469use Symfony \Component \Messenger \Bridge \AmazonSqs \Transport \AmazonSqsTransportFactory ;
@@ -599,8 +604,8 @@ public function testPhpErrorsWithLogLevels()
599604 $ definition = $ container ->getDefinition ('debug.error_handler_configurator ' );
600605 $ this ->assertEquals (new Reference ('logger ' , ContainerInterface::NULL_ON_INVALID_REFERENCE ), $ definition ->getArgument (0 ));
601606 $ this ->assertSame ([
602- \E_NOTICE => \ Psr \ Log \ LogLevel::ERROR ,
603- \E_WARNING => \ Psr \ Log \ LogLevel::ERROR ,
607+ \E_NOTICE => LogLevel::ERROR ,
608+ \E_WARNING => LogLevel::ERROR ,
604609 ], $ definition ->getArgument (1 ));
605610 }
606611
@@ -611,35 +616,35 @@ public function testExceptionsConfig()
611616 $ configuration = $ container ->getDefinition ('exception_listener ' )->getArgument (3 );
612617
613618 $ this ->assertSame ([
614- \ Symfony \ Component \ HttpKernel \ Exception \ BadRequestHttpException::class,
615- \ Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException::class,
616- \ Symfony \ Component \ HttpKernel \ Exception \ ConflictHttpException::class,
617- \ Symfony \ Component \ HttpKernel \ Exception \ ServiceUnavailableHttpException::class,
619+ BadRequestHttpException::class,
620+ NotFoundHttpException::class,
621+ ConflictHttpException::class,
622+ ServiceUnavailableHttpException::class,
618623 ], array_keys ($ configuration ));
619624
620625 $ this ->assertEqualsCanonicalizing ([
621626 'log_channel ' => null ,
622627 'log_level ' => 'info ' ,
623628 'status_code ' => 422 ,
624- ], $ configuration [\ Symfony \ Component \ HttpKernel \ Exception \ BadRequestHttpException::class]);
629+ ], $ configuration [BadRequestHttpException::class]);
625630
626631 $ this ->assertEqualsCanonicalizing ([
627632 'log_channel ' => null ,
628633 'log_level ' => 'info ' ,
629634 'status_code ' => null ,
630- ], $ configuration [\ Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException::class]);
635+ ], $ configuration [NotFoundHttpException::class]);
631636
632637 $ this ->assertEqualsCanonicalizing ([
633638 'log_channel ' => null ,
634639 'log_level ' => 'info ' ,
635640 'status_code ' => null ,
636- ], $ configuration [\ Symfony \ Component \ HttpKernel \ Exception \ ConflictHttpException::class]);
641+ ], $ configuration [ConflictHttpException::class]);
637642
638643 $ this ->assertEqualsCanonicalizing ([
639644 'log_channel ' => null ,
640645 'log_level ' => null ,
641646 'status_code ' => 500 ,
642- ], $ configuration [\ Symfony \ Component \ HttpKernel \ Exception \ ServiceUnavailableHttpException::class]);
647+ ], $ configuration [ServiceUnavailableHttpException::class]);
643648 }
644649
645650 public function testRouter ()
0 commit comments