diff --git a/src/EventSubscriber/RedirectToHttpsSubscriber.php b/src/EventSubscriber/RedirectToHttpsSubscriber.php index 400b50e5..7089109e 100644 --- a/src/EventSubscriber/RedirectToHttpsSubscriber.php +++ b/src/EventSubscriber/RedirectToHttpsSubscriber.php @@ -36,7 +36,7 @@ final class RedirectToHttpsSubscriber implements EventSubscriberInterface { public function __construct( - #[Autowire('env(bool:REDIRECT_TO_HTTPS)')] + #[Autowire('%env(bool:REDIRECT_TO_HTTPS)%')] private readonly bool $enabled, private readonly HttpUtils $httpUtils) { @@ -45,7 +45,7 @@ final class RedirectToHttpsSubscriber implements EventSubscriberInterface public static function getSubscribedEvents(): array { return [ - KernelEvents::REQUEST => ['onKernelRequest', 0], + KernelEvents::REQUEST => 'onKernelRequest', ]; }