-
Notifications
You must be signed in to change notification settings - Fork 261
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
Fix for new way of handling scheme in Symfony 3.0 #254
Conversation
Hi, @willdurand : When could this MR be integrated in the project ? |
🆙 |
@stof @willdurand Could you please look at this PR? It is one of the only blocking dependencies for our project to migrate to Symfony 3. |
@stof @willdurand +1 Please merge... |
Apparently, I did not fix all of the broken functionality. I just fixed that (included schemes in the |
@stof @willdurand Anything I can do to get this merged? |
Is this project maintained at all? |
@stof Sorry to bother you but I'd really appreciate if you would take a look at this. |
@stof C'mon, this is getting embarrassing. What is wrong with this PR? |
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.
LGTM though I don't use this bundle so my opinion on this has not much value :)
@@ -56,6 +56,8 @@ public function getRoutes() | |||
'defaults' => $defaults, | |||
'requirements' => $route->getRequirements(), | |||
'hosttokens' => method_exists($compiledRoute, 'getHostTokens') ? $compiledRoute->getHostTokens() : array(), | |||
'methods' => $route->getMethods(), |
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.
Is this used somewhere?
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.
@GuilhemN it isn't, but as this could be defined in the requirements, similar to the schemes, before Symfony 3, I migrated that as well so someone that uses it could make it work. I could remove this or add it to the prototype in the JS file as well. What do you think?
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.
it isn't, but as this could be defined in the requirements, similar to the schemes, before Symfony 3, I migrated that as well so someone that uses it could make it work.
Ok, good point 👍
I could remove this or add it to the prototype in the JS file as well.
Imo you should add it to the JS prototype :)
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.
Thanks, done 😄
Thank you @tobias-93! |
@GuilhemN Thank you so much for merging! Would it be possible to cherry-pick this commit to branch 1.x (if not, I will gladly make a new PR) and tag a new release? Thanks! |
You're welcome :) |
Since Symfony 2.2, the way to go to provide the scheme (and method) for a routing entry is no longer via the
requirements:
key but through theschemes
key.Although this has worked throughout the 2.x versioning of Symfony, in 3.x the deprecated way has been removed.
This commit fixes the handling to comply to the new way of supplying the scheme to Symfony, while preserving (and favouring) the old behaviour.