Skip to content

Commit 25c5adf

Browse files
committed
Updating prepend extension capabilities
1 parent 7b591e0 commit 25c5adf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

bundles/prepend_extension.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,22 @@ method::
171171
$containerBuilder->prependExtensionConfig('framework', [
172172
'cache' => ['prefix_seed' => 'foo/bar'],
173173
]);
174+
175+
// prepend config from a file
176+
$containerConfigurator->import('../config/packages/cache.php');
174177
}
175178
}
176179

177180
.. note::
178181

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

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+
181190
Alternatively, you can use the ``prepend`` parameter of the
182191
:method:`Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator::extension`
183192
method::

0 commit comments

Comments
 (0)