Skip to content

Commit f6efca4

Browse files
Merge pull request #4874 from alanpoulain/feat/add-default-api-resource-dir-paths
feat: add default for mapping.paths
2 parents f2833d3 + 9f0cc25 commit f6efca4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/Symfony/Bundle/DependencyInjection/Configuration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public function getConfigTreeBuilder(): TreeBuilder
129129
->addDefaultsIfNotSet()
130130
->children()
131131
->arrayNode('paths')
132+
->defaultValue(['%kernel.project_dir%/src/ApiResource', '%kernel.project_dir%/src/Entity'])
132133
->prototype('scalar')->end()
133134
->end()
134135
->end()

tests/Symfony/Bundle/DependencyInjection/ConfigurationTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ private function runDefaultConfigTests(array $doctrineIntegrationsToLoad = ['orm
167167
],
168168
],
169169
'mapping' => [
170-
'paths' => [],
170+
'paths' => [
171+
'%kernel.project_dir%/src/ApiResource',
172+
'%kernel.project_dir%/src/Entity',
173+
],
171174
],
172175
'http_cache' => [
173176
'invalidation' => [

0 commit comments

Comments
 (0)