diff --git a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php index 4ec54eccf555d..b5f2b85e89404 100644 --- a/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php +++ b/src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php @@ -43,6 +43,7 @@ use Symfony\Component\Dotenv\Dotenv; use Symfony\Component\ErrorHandler\ErrorHandler; use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass; +use Symfony\Component\Form\ChoiceList\Factory\Cache\AbstractStaticOption; use Symfony\Component\Form\DependencyInjection\FormPass; use Symfony\Component\HttpClient\DependencyInjection\HttpClientPass; use Symfony\Component\HttpFoundation\Request; @@ -97,6 +98,15 @@ public function boot() } } + public function shutdown() + { + parent::shutdown(); + + if (class_exists(AbstractStaticOption::class)) { + AbstractStaticOption::reset(); + } + } + public function build(ContainerBuilder $container) { parent::build($container);