-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DI][Routing] Allow invokable objects to be used as PHP-DSL loaders #27065
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
Conversation
Thanks :) |
For which case? When tried to supply array callback? Because when array would be passed nothing will happen so I don't know what to test against. |
For the case when you pass an invokable object. |
Oh right forgot about this simple case 😊 |
@nicolas-grekas I don't know about Routing test I did not want to introduce copied test case so I just extended existing test case there. |
@@ -0,0 +1,10 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra unneeded line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @aurimasniekis. |
…P-DSL loaders (aurimasniekis) This PR was squashed before being merged into the 4.1-dev branch (closes #27065). Discussion ---------- [DI][Routing] Allow invokable objects to be used as PHP-DSL loaders | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #26583, #25630 | License | MIT | Doc PR | none Changed DI/Router PHPFileLoader to check is_object && is_callable instead of instance of Closure Commits ------- 662ff7e [DI][Routing] Allow invokable objects to be used as PHP-DSL loaders
Changed DI/Router PHPFileLoader to check is_object && is_callable instead of instance of Closure