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:
79
79
By default Symfony only loads the configuration files defined in YAML
80
80
format. If you define configuration in XML and/or PHP formats, update the
81
81
``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
+ }
83
108
84
109
Importing Configuration Files
85
110
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
1150
1150
By default, the transport will automatically create any exchanges, queues and
1151
1151
binding keys that are needed. That can be disabled, but some functionality
1152
1152
may not work correctly (like delayed queues).
1153
+ To not autocreate any queues, you can configure a transport with ``queues: [] ``.
1153
1154
1154
1155
.. note ::
1155
1156
You can’t perform that action at this time.
0 commit comments