Issue #3359649 by arnested, aduthois, cilefen, Manuel.loth, smustgrave:...
1 unresolved thread
Merge request reports
Activity
added 1 commit
added 6 commits
-
ff520e94...8300a7a2 - 5 commits from branch
project:11.x
- 0714761e - Issue #3359649 by arnested, aduthois, cilefen, Manuel.loth, smustgrave:...
-
ff520e94...8300a7a2 - 5 commits from branch
added 1 commit
- Resolved by Arne Jørgensen
added 62 commits
-
89a54168...0fd4bdcb - 61 commits from branch
project:11.x
- b191b85b - Issue #3359649 by arnested, arunkumark, aduthois, cilefen, quietone,...
-
89a54168...0fd4bdcb - 61 commits from branch
- Resolved by Arne Jørgensen
52 52 $routes = $event->getRouteCollection(); 53 53 foreach ($route_names as $route_name) { 54 54 if ($route = $routes->get($route_name)) { 55 $formats = explode('|', $route->getRequirement('_format')); 55 $formats = array_filter(explode('|', $route->getRequirement('_format') ?? '')); The use of array_filter() and magically removing anything the PHP considers falsey concerns me. I think the array_filter() should use an arrow function to only remove empty strings. Consider https://3v4l.org/kNAfK
But actually we can ignore all of this if we change the code to:
if (($route = $routes->get($route_name)) && $route->hasRequirement('_format')) { $formats = explode('|', $route->getRequirement('_format')); $formats = array_unique(array_merge($formats, $this->serializerFormats)); $route->setRequirement('_format', implode('|', $formats)); }
no?
changed this line in version 7 of the diff
added 52 commits
-
b191b85b...b8aa161c - 51 commits from branch
project:11.x
- 23896ef1 - Issue #3359649 by arnested, arunkumark, aduthois, cilefen, quietone,...
-
b191b85b...b8aa161c - 51 commits from branch
added 186 commits
-
af9b020a...43e738a6 - 183 commits from branch
project:11.x
- aceffa1e - Issue #3359649 by arnested, arunkumark, aduthois, cilefen, quietone,...
- be230599 - Issue #3359649: Addressed PR feedback
- adeeb4d3 - Issue #3359649: Fixed pipeline failure by updating test assertions based on route alteration logic
Toggle commit list-
af9b020a...43e738a6 - 183 commits from branch
- Resolved by Alex Pott
Please register or sign in to reply