From 46309e581431630783d98156571dbd8de2262086 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sat, 3 Jul 2021 21:19:39 +0200 Subject: [PATCH] [DI] CS fix --- src/Symfony/Component/DependencyInjection/Container.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index e17c1caa95..b731a70bc9 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -404,9 +404,7 @@ class Container implements ResettableContainerInterface $this->set($id, new ServiceLocator([])); } if (!$this->getEnv) { - $this->getEnv = new \ReflectionMethod($this, __FUNCTION__); - $this->getEnv->setAccessible(true); - $this->getEnv = $this->getEnv->getClosure($this); + $this->getEnv = \Closure::fromCallable([$this, 'getEnv']); } $processors = $this->get($id);