diff --git a/src/Symfony/Component/Routing/Loader/PhpFileLoader.php b/src/Symfony/Component/Routing/Loader/PhpFileLoader.php index b7d3885ffc..31fe88ddd8 100644 --- a/src/Symfony/Component/Routing/Loader/PhpFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/PhpFileLoader.php @@ -40,7 +40,7 @@ class PhpFileLoader extends FileLoader // the closure forbids access to the private scope in the included file $loader = $this; - $load = \Closure::bind(static function ($file) { + $load = \Closure::bind(static function ($file) use ($loader) { return include $file; }, null, ProtectedPhpFileLoader::class);