-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Labels
Description
According to the Changelog the _scheme requirement is deprecated in favor of the schemes property.
The
_schemeand
_methodrequirements have been moved to the
schemesand
methods settings
Still everywhere in the symfony/routing code the _schema requirement is used and (the more important part) it is assumed that _schema may only be a single scheme.
So when using the function Route->setSchemes(array) function with multiple schemes some code stops working. In our case the RedirectableUrlMatcher calls now the redirect method with scheme http|https
.
Is this something that is planned to be worked on? Or am I just missing something?
If this is really a problem I can have a look at this and send PR.
this is the test for our problem:
public function testNoSchemaRedirectIfOnOfMultipleSchemesMatches()
{
$coll = new RouteCollection();
$coll->add('foo', new Route('/foo', array(), array(), array(),'', array('http', 'https')));
$matcher = $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', array($coll, new RequestContext()));
$matcher
->expects($this->never())
->method('redirect')
;
$matcher->match('/foo');
}