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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy