-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
method injection only passes the first parameter if the method uses a splat for its parameter #881
Comments
ObjectCreator::injectMethodsAndProperties() seems to be correctly getting $args in both cases, which makes it look like the problem is when the method is invoked here:
But doing that directly on the objects works properly:
|
My mistake -- I got confused with $args in the loop. This line doesn't get the complete array but only the first item:
|
serge-kvashnin
added a commit
to serge-kvashnin/PHP-DI
that referenced
this issue
Apr 16, 2024
@joachim-n The PR I created should fix the issue you mentioned: #883 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I do:
and
then both services are passed in. But if I change the method signature to this:
Then $letters is an array with only the first service.
Full test code:
The text was updated successfully, but these errors were encountered: