File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,34 @@ method::
186
186
187
187
The ``prependExtension() `` method, like ``prepend() ``, is called only at compile time.
188
188
189
+ Alternatively, you can use the ``prepend `` parameter of the
190
+ :method: `Symfony\\ Component\\ DependencyInjection\\ Loader\\ ContainerConfigurator::extension `
191
+ method::
192
+
193
+ use Symfony\Component\DependencyInjection\ContainerBuilder;
194
+ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
195
+ use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
196
+
197
+ class FooBundle extends AbstractBundle
198
+ {
199
+ public function prependExtension(ContainerConfigurator $containerConfigurator, ContainerBuilder $containerBuilder): void
200
+ {
201
+ // ...
202
+
203
+ $containerConfigurator->extension('framework', [
204
+ 'cache' => ['prefix_seed' => 'foo/bar'],
205
+ ], prepend: true);
206
+
207
+ // ...
208
+ }
209
+ }
210
+
211
+ .. versionadded :: 7.1
212
+
213
+ The ``prepend `` parameter of the
214
+ :method: `Symfony\\ Component\\ DependencyInjection\\ Loader\\ ContainerConfigurator::extension `
215
+ method was added in Symfony 7.1.
216
+
189
217
More than one Bundle using PrependExtensionInterface
190
218
----------------------------------------------------
191
219
You can’t perform that action at this time.
0 commit comments