You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If two independent interfaces are implemented by the same concrete class and used in a method binding only the first interface gets resolved.
Probable Cause
Following the issue in debug, it appears to be related to the interaction and logic behind alreadyInParameters and resolveMethodDependencies.
The method alreadyInParameters prevents the multiple injection of objects with the same class but compares the class name against the instanceof of the previous parameters after they have been resolved instead of the requested type of the parameters.
As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.
If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.
Laravel Version
11.26.0
PHP Version
8.3.12
Database Driver & Version
No response
Description
Description
If two independent interfaces are implemented by the same concrete class and used in a method binding only the first interface gets resolved.
Probable Cause
Following the issue in debug, it appears to be related to the interaction and logic behind
alreadyInParameters
andresolveMethodDependencies
.The method
alreadyInParameters
prevents the multiple injection of objects with the same class but compares the class name against theinstanceof
of the previous parameters after they have been resolved instead of the requested type of the parameters.Steps To Reproduce
given the following classes:
and registered with:
the route pointing to the following controller raise an
ArgumentCountError
The text was updated successfully, but these errors were encountered: