8000 Updating prepend extension capabilities · symfony/symfony-docs@02a258d · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

8000
Appearance settings

Commit 02a258d

Browse files
committed
Updating prepend extension capabilities
1 parent 6b3d171 commit 02a258d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

bundles/prepend_extension.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ registered and the ``entity_manager_name`` setting for ``acme_hello`` is set to
154154
Prepending Extension in the Bundle Class
155155
----------------------------------------
156156

157-
You can also append or prepend extension configuration directly in your
157+
You can also prepend extension configuration directly in your
158158
Bundle class if you extend from the :class:`Symfony\\Component\\HttpKernel\\Bundle\\AbstractBundle`
159159
class and define the :method:`Symfony\\Component\\HttpKernel\\Bundle\\AbstractBundle::prependExtension`
160160
method::
@@ -172,12 +172,7 @@ method::
172172
'cache' => ['prefix_seed' => 'foo/bar'],
173173
]);
174174

175-
// append
176-
$containerConfigurator->extension('framework', [
177-
'cache' => ['prefix_seed' => 'foo/bar'],
178-
]);
179-
180-
// append from file
175+
// prepend config from a file
181176
$containerConfigurator->import('../config/packages/cache.php');
182177
}
183178
}
@@ -186,6 +181,12 @@ method::
186181

187182
The ``prependExtension()`` method, like ``prepend()``, is called only at compile time.
188183

184+
.. deprecated:: 7.1
185+
186+
The :method:`Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator::import`
187+
method behavior was modified in Symfony 7.1 to prepend config instead of appending. This behavior change only
188+
affects to the ``prependExtension()`` method.
189+
189190
Alternatively, you can use the ``prepend`` parameter of the
190191
:method:`Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator::extension`
191192
method::

0 commit comments

Comments
 (0)
0