Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 14b1088

Browse files
bug #50498 [FrameworkBundle] ease migration to symfony 6.3 (lyrixx)
This PR was merged into the 6.3 branch. Discussion ---------- [FrameworkBundle] ease migration to symfony 6.3 | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | kind of | New feature? | no | Deprecations? | no | Tickets | #50504 | License | MIT | Doc PR | - Commits ------- 06ab7ec [FrameworkBundle] ease migration to symfony 6.3
2 parents c31276b + 06ab7ec commit 14b1088

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ public function boot()
9898
$_ENV['DOCTRINE_DEPRECATIONS'] = $_SERVER['DOCTRINE_DEPRECATIONS'] ??= 'trigger';
9999

100100
$handler = ErrorHandler::register(null, false);
101-
$this->container->get('debug.error_handler_configurator')->configure($handler);
101+
102+
// When upgrading an existing Symfony application from 6.2 to 6.3, and
103+
// the cache is warmed up, the service is not available yet, so we need
104+
// to check if it exists.
105+
if ($this->container->has('debug.error_handler_configurator')) {
106+
$this->container->get('debug.error_handler_configurator')->configure($handler);
107+
}
102108

103109
if ($this->container->getParameter('kernel.http_method_override')) {
104110
Request::enableHttpMethodParameterOverride();

0 commit comments

Comments
 (0)