File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
src/Symfony/Bundle/FrameworkBundle/Routing Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -77,8 +77,10 @@ public function warmUp($cacheDir)
77
77
* Replaces placeholders with service container parameter values in:
78
78
* - the route defaults,
79
79
* - the route requirements,
80
- * - the route pattern.
81
- * - the route host.
80
+ * - the route path,
81
+ * - the route host,
82
+ * - the route schemes,
83
+ * - the route methods.
82
84
*
83
85
* @param RouteCollection $collection
84
86
*/
@@ -90,11 +92,27 @@ private function resolveParameters(RouteCollection $collection)
90
92
}
91
93
92
94
foreach ($ route ->getRequirements () as $ name => $ value ) {
95
+ if ('_scheme ' === $ name || '_method ' === $ name ) {
96
+ continue ; // ignore deprecated requirements to not trigger deprecation warnings
97
+ }
98
+
93
99
$ route ->setRequirement ($ name , $ this ->resolve ($ value ));
94
100
}
95
101
96
102
$ route ->setPath ($ this ->resolve ($ route ->getPath ()));
97
103
$ route ->setHost ($ this ->resolve ($ route ->getHost ()));
104
+
105
+ $ schemes = array ();
106
+ foreach ($ route ->getSchemes () as $ scheme ) {
107
+ $ schemes = array_merge ($ schemes , explode ('| ' , $ this ->resolve ($ scheme )));
108
+ }
109
+ $ route ->setSchemes ($ schemes );
110
+
111
+ $ methods = array ();
112
+ foreach ($ route ->getMethods () as $ method ) {
113
+ $ methods = array_merge ($ methods , explode ('| ' , $ this ->resolve ($ method )));
114
+ }
115
+ $ route ->setMethods ($ methods );
98
116
}
99
117
}
100
118
You can’t perform that action at this time.
0 commit comments