Skip to content

Commit b1fd2e9

Browse files
Merge branch '5.4' into 6.2
* 5.4: Fix deprecations on PHP 8.3 [WebProfilerBundle] Fix error in case of 'Content-Type' set null in dev environment with no debug [Routing] Use vsprintf instead of sprintf + unpacking
2 parents d59dc6a + c886862 commit b1fd2e9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Matcher/Dumper/CompiledUrlMatcherDumper.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ private function generateCompiledRoutes(): string
136136
foreach ($staticRoutes as $path => $routes) {
137137
$code .= sprintf(" %s => [\n", self::export($path));
138138
foreach ($routes as $route) {
139-
$r = array_map([__CLASS__, 'export'], $route);
140-
$code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", $r[0], $r[1], $r[2], $r[3], $r[4], $r[5], $r[6]);
139+
$code .= vsprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", array_map([__CLASS__, 'export'], $route));
141140
}
142141
$code .= " ],\n";
143142
}
@@ -149,8 +148,7 @@ private function generateCompiledRoutes(): string
149148
foreach ($dynamicRoutes as $path => $routes) {
150149
$code .= sprintf(" %s => [\n", self::export($path));
151150
foreach ($routes as $route) {
152-
$r = array_map([__CLASS__, 'export'], $route);
153-
$code .= sprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", $r[0], $r[1], $r[2], $r[3], $r[4], $r[5], $r[6]);
151+
$code .= vsprintf(" [%s, %s, %s, %s, %s, %s, %s],\n", array_map([__CLASS__, 'export'], $route));
154152
}
155153
$code .= " ],\n";
156154
}

0 commit comments

Comments
 (0)