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
[Routing] Fixed type annotation #32185
Conversation
Thank you @derrabus. |
This PR was merged into the 3.4 branch. Discussion ---------- [Routing] Fixed type annotation | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | N/A | License | MIT | Doc PR | N/A The `UrlGeneratorInterface::generate()` method expects an array as argument `$parameters`, but the docblock does not reflect that. This PR fixes the type. Discovered while working on #32176. Commits ------- 753bf7e Fixed type annotation.
This does not seem correct. Our implementation expects an array. But others might not. The idea was to allow to generate urls from objects, see 04ac1fd |
But then, our own implementation should deal properly with non-array values ( |
Yeah we should probably throw an explicit exception. |
I know there was a bundle allowing to generate urls from objects. But I've never used it and don't know if its maintained. |
The
UrlGeneratorInterface::generate()
method expects an array as argument$parameters
, but the docblock does not reflect that. This PR fixes the type. Discovered while working on #32176.