Skip to content

Commit 7172784

Browse files
committed
minor #15300 [Config] Added caution notice about nested bundle configs (a-menshchikov)
This PR was merged into the 5.3-dev branch. Discussion ---------- [Config] Added caution notice about nested bundle configs Inspired by a chat with `@Nyholm` Commits ------- 3cceddc Added caution notice about nested bundle configs
2 parents 2e0d81c + 3cceddc commit 7172784

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

configuration.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ whenever a service/controller defines a ``$projectDir`` argument, use this:
876876
// pass this value to any $projectDir argument for any service
877877
// that's created in this file (including controller arguments)
878878
->bind('$projectDir', '%kernel.project_dir%');
879-
879+
880880
// ...
881881
};
882882
@@ -953,6 +953,12 @@ namespace ``Symfony\Config``::
953953
$security->accessControl(['path' => '^/admin', 'roles' => 'ROLE_ADMIN']);
954954
};
955955

956+
.. caution::
957+
958+
Note that only "root" classes in the namespace ``Symfony\Config`` are ConfigBuilders.
959+
Nested configs (e.g. ``\Symfony\Config\Framework\CacheConfig``) are the Plain Old PHP
960+
Objects and cannot be autowired when you specify it as an argument type.
961+
956962
Keep Going!
957963
-----------
958964

0 commit comments

Comments
 (0)