Skip to content

Commit f2833d3

Browse files
Merge pull request #4853 from coldic3/feat/support-new-sf-best-practices-for-bundles
feat: adjust mapping paths to the SF best practices for Bundles
2 parents d36f842 + ce2cf85 commit f2833d3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Symfony/Bundle/DependencyInjection/ApiPlatformExtension.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,16 +275,22 @@ private function getBundlesResourcesPaths(ContainerBuilder $container, array $co
275275
$bundlesResourcesPaths = [];
276276

277277
foreach ($container->getParameter('kernel.bundles_metadata') as $bundle) {
278-
$paths = [];
279278
$dirname = $bundle['path'];
279+
$paths = [
280+
"$dirname/ApiResource",
281+
"$dirname/src/ApiResource",
282+
];
280283
foreach (['.yaml', '.yml', '.xml', ''] as $extension) {
281284
$paths[] = "$dirname/Resources/config/api_resources$extension";
285+
$paths[] = "$dirname/config/api_resources$extension";
282286
}
283287
if ($this->isConfigEnabled($container, $config['doctrine'])) {
284288
$paths[] = "$dirname/Entity";
289+
$paths[] = "$dirname/src/Entity";
285290
}
286291
if ($this->isConfigEnabled($container, $config['doctrine_mongodb_odm'])) {
287292
$paths[] = "$dirname/Document";
293+
$paths[] = "$dirname/src/Document";
288294
}
289295

290296
foreach ($paths as $path) {

0 commit comments

Comments
 (0)