Closed
Description
Symfony version(s) affected: 5.2.3
Description
If a service has a method called method, such as Zebra_Pagination has, it is not possible to declare calls to such a method in YAML.
How to reproduce
services:
Zebra_Pagination:
class: Zebra_Pagination
calls:
- method:
- url
- padding:
- false
Note the call syntax is correct because the call to padding()
alone (and others) succeeds, only the call to method()
fails because Symfony interprets the configuration differently for a key called method
for some (legacy?) reason.
The specific error thrown is:
Invalid service "Zebra_Pagination": method "url()" does not exist.
dependency-injection\Compiler\AbstractRecursivePass.php (line 186)