From 25c5adfcbb2c68ebe8261643afcebf53464206ea Mon Sep 17 00:00:00 2001 From: Yonel Ceruto Date: Wed, 3 Apr 2024 19:12:01 -0400 Subject: [PATCH] Updating prepend extension capabilities --- bundles/prepend_extension.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bundles/prepend_extension.rst b/bundles/prepend_extension.rst index 2a5736c440e..807c7f18caf 100644 --- a/bundles/prepend_extension.rst +++ b/bundles/prepend_extension.rst @@ -171,6 +171,9 @@ method:: $containerBuilder->prependExtensionConfig('framework', [ 'cache' => ['prefix_seed' => 'foo/bar'], ]); + + // prepend config from a file + $containerConfigurator->import('../config/packages/cache.php'); } } @@ -178,6 +181,12 @@ method:: The ``prependExtension()`` method, like ``prepend()``, is called only at compile time. +.. deprecated:: 7.1 + + The :method:`Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator::import` + method behavior was modified in Symfony 7.1 to prepend config instead of appending. This behavior change only + affects to the ``prependExtension()`` method. + Alternatively, you can use the ``prepend`` parameter of the :method:`Symfony\\Component\\DependencyInjection\\Loader\\Configurator\\ContainerConfigurator::extension` method::