Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

Commit214e5df

Browse files
committed
minor#19738 [DependencyInjection] Updating prepend extension capabilities (yceruto)
This PR was merged into the 7.1 branch.Discussion----------[DependencyInjection] Updating prepend extension capabilitiesFixes#19735I'm also suggesting removing the append example in the prepend extension method. As explained in PRsymfony/symfony#52843 and related issues, it's flawed and should be discouraged from the official documentation.I'll create a new PR to target the lower branch and remove it there too.Commits-------25c5adf Updating prepend extension capabilities
2 parentsa58dccf +25c5adf commit214e5df

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)

[8]ページ先頭

©2009-2025 Movatter.jp