Skip to content

[Config] Added caution notice about nested bundle configs #15300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ whenever a service/controller defines a ``$projectDir`` argument, use this:
// pass this value to any $projectDir argument for any service
// that's created in this file (including controller arguments)
->bind('$projectDir', '%kernel.project_dir%');

// ...
};

Expand Down Expand Up @@ -953,6 +953,12 @@ namespace ``Symfony\Config``::
$security->accessControl(['path' => '^/admin', 'roles' => 'ROLE_ADMIN']);
};

.. caution::

Note that only "root" classes in the namespace ``Symfony\Config`` are ConfigBuilders.
Nested configs (e.g. ``\Symfony\Config\Framework\CacheConfig``) are the Plain Old PHP
Objects and cannot be autowired when you specify it as an argument type.

Keep Going!
-----------

Expand Down