Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Routing] Fixed route generation with fragment defined as defaults#20001
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Routing] Fixed route generation with fragment defined as defaults#20001
Uh oh!
There was an error while loading.Please reload this page.
Conversation
b79dabb to9d445a0Compare| $fragment =$defaults['_fragment']; | ||
| } | ||
| if (array_key_exists('_fragment',$extra)) { |
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.
You changed behaviour here for the case when_fragment isnull.isset() will return false, whilearray_key_exists() will return true for a key withnull value.
9d445a0 to40d9306Compareakovalyov commentedSep 21, 2016
@jakzal reverted original behaviour. |
| publicfunctiontestFragmentsCanBeDefinedAsDefaults() | ||
| { | ||
| $routes =$this->getRoutes('test',newRoute('/testing',array('_fragment' =>'fragment'))); | ||
| $url =$this->getGenerator($routes)->generate('test',array(),true); |
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.
The third argument must not be a boolean. Please passUrlGeneratorInterface::ABSOLUTE_PATH here (see#20009 which fixes the other tests).
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.
Resolved.
40d9306 to3c36596Comparexabbuh commentedSep 21, 2016
👍 Status: Reviewed |
fabpot commentedSep 21, 2016
Thank you@akovalyov. |
…defaults (akovalyov)This PR was merged into the 3.2-dev branch.Discussion----------[Routing] Fixed route generation with fragment defined as defaults| Q | A| ------------- | ---| Branch? | "master"| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| License | MITAs stated inhttps://symfony.com/blog/new-in-symfony-3-2-routing-improvements, it should support `_fragment` option as part of `_defaults` of route definition.Commits-------3c36596 [Routing] Fixed route generation with fragment defined as defaults
akovalyov commentedSep 21, 2016
@fabpot my pleasure! |
Uh oh!
There was an error while loading.Please reload this page.
As stated inhttps://symfony.com/blog/new-in-symfony-3-2-routing-improvements, it should support
_fragmentoption as part of_defaultsof route definition.