Closed
Description
Symfony version(s) affected
7.1.*
Description
Using the phpdoc param type for $calls
(array<string, array<array-key, mixed>>
) results in: Invalid method call for service "App\TestService", did you forgot a leading dash before "testFunc: ..." in "App\TestService"?
How to reproduce
Create a service with #[Autoconfigure]
attribute, with calls
property
#[Autoconfigure(calls: [
'testFunc' => ['arg'],
])
class TestService {
public function testFunc($arg) {}
}
Possible Solution
No response
Additional Context
Using the format: [['testFunc', ['arg']]]
or [['testFunc' => ['arg']]]
works as expected, but phpstan reports as error, becuse of parameter type mismatch