8000 FIX · symfony/symfony@4e92c8b · GitHub
[go: up one dir, main page]

Skip to content

Commit 4e92c8b

Browse files
committed
FIX
1 parent 476787e commit 4e92c8b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/DependencyInjection/Loader/PhpFileLoader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ class_alias(AppReference::class, App::class);
5454
}
5555

5656
// the closure forbids access to the private scope in the included file
57-
$load = \Closure::bind(static fn ($path, $env) => include $path, null, null);
57+
$load = \Closure::bind(static function ($path, $env) use ($container, $loader, $resource, $type) {
58+
return include $path;
59+
}, null, null);
5860

5961
$instanceof = $this->instanceof;
6062
$this->instanceof = [];
@@ -205,3 +207,5 @@ private function callConfigurator(callable $callback, ContainerConfigurator $con
205207
}
206208
}
207209
}
210+
211+
// @php-cs-fixer-ignore use_arrow_functions to prevent arrow function overriding callback that includes file in limited context, ref https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues/9388

0 commit comments

Comments
 (0)
0