8000 bugfix(#58614): Add check for the __callStatic method to the Abstract… · symfony/symfony@ce67b78 · GitHub
[go: up one dir, main page]

Skip to content

Commit ce67b78

Browse files
bugfix(#58614): Add check for the __callStatic method to the AbstractRecursivePass
1 parent f929b1e commit ce67b78

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ protected function getReflectionMethod(Definition $definition, string $method)
202202
return new \ReflectionMethod(static function (...$arguments) {}, '__invoke');
203203
}
204204

205+
if ($r->hasMethod('__callStatic') && ($r = $r->getMethod('__callStatic')) && $r->isPublic()) {
206+
return new \ReflectionMethod(static function (...$arguments) {}, '__invoke');
207+
}
208+
205209
throw new RuntimeException(sprintf('Invalid service "%s": method "%s()" does not exist.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method));
206210
}
207211

0 commit comments

Comments
 (0)
0