Skip to content

Commit e65010c

Browse files
committed
[ci] handle 6.2 router resource namespace config
1 parent 52ea899 commit e65010c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Maker/MakeCrudTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,17 @@ public function getTestDetails(): \Generator
122122
Yaml::dump(['maker' => ['root_namespace' => 'Custom']])
123123
);
124124

125+
// Symfony 6.2 sets the path and namespace for router resources
126+
$runner->modifyYamlFile('config/routes.yaml', function (array $config) {
127+
if (!isset($config['controllers']['resource']['namespace'])) {
128+
return $config;
129+
}
130+
131+
$config['controllers']['resource']['namespace'] = 'Custom\Controller';
132+
133+
return $config;
134+
});
135+
125136
$runner->copy(
126137
'make-crud/SweetFood-custom-namespace.php',
127138
'src/Entity/SweetFood.php'

0 commit comments

Comments
 (0)