File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,32 @@ readable. These are the main advantages and disadvantages of each format:
7979 By default Symfony only loads the configuration files defined in YAML
8080 format. If you define configuration in XML and/or PHP formats, update the
8181 ``src/Kernel.php `` file to add support for the ``.xml `` and ``.php `` file
82- extensions.
82+ extensions by overriding the
83+ :method: `Symfony\\ Component\\ HttpKernel\\ Kernel::configureContainer ` method::
84+
85+ // src/Kernel.php
86+ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
87+ use Symfony\Component\HttpKernel\Kernel as BaseKernel;
88+
89+ class Kernel extends BaseKernel
90+ {
91+ // ...
92+
93+ private function configureContainer(ContainerConfigurator $container): void
94+ {
95+ $configDir = $this->getConfigDir();
96+
97+ $container->import($configDir.'/{packages}/*.{yaml,php}');
98+ $container->import($configDir.'/{packages}/'.$this->environment.'/*.{yaml,php}');
99+
100+ if (is_file($configDir.'/services.yaml')) {
101+ $container->import($configDir.'/services.yaml');
102+ $container->import($configDir.'/{services}_'.$this->environment.'.yaml');
103+ } else {
104+ $container->import($configDir.'/{services}.php');
105+ }
106+ }
107+ }
83108
84109Importing Configuration Files
85110~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -1150,6 +1150,7 @@ it in the ``port`` parameter of the DSN (e.g. ``amqps://localhost?cacert=/etc/ss
11501150 By default, the transport will automatically create any exchanges, queues and
11511151 binding keys that are needed. That can be disabled, but some functionality
11521152 may not work correctly (like delayed queues).
1153+ To not autocreate any queues, you can configure a transport with ``queues: [] ``.
11531154
11541155.. note ::
11551156
You can’t perform that action at this time.
0 commit comments