File tree Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ If you stored a ``DATABASE_PASSWORD`` secret, you can reference by:
111111 # config/packages/doctrine.yaml
112112 doctrine :
113113 dbal :
114- password : ' %env(secret: DATABASE_PASSWORD)%'
114+ password : ' %env(DATABASE_PASSWORD)%'
115115 # ...
116116 # ...
117117
@@ -129,7 +129,7 @@ If you stored a ``DATABASE_PASSWORD`` secret, you can reference by:
129129
130130 <doctrine : config >
131131 <doctrine : dbal
132- password =" %env(secret: DATABASE_PASSWORD)%"
132+ password =" %env(DATABASE_PASSWORD)%"
133133 />
134134 </doctrine : config >
135135
@@ -140,7 +140,7 @@ If you stored a ``DATABASE_PASSWORD`` secret, you can reference by:
140140 // config/packages/doctrine.php
141141 $container->loadFromExtension('doctrine', [
142142 'dbal' => [
143- 'password' => '%env(secret: DATABASE_PASSWORD)%',
143+ 'password' => '%env(DATABASE_PASSWORD)%',
144144 ]
145145 ]);
146146
Original file line number Diff line number Diff line change @@ -65,8 +65,9 @@ to a route definition. Then, after creating your project:
6565 of controllers, actions, etc. as in your original application.
6666#. Create a small controller and add your routing definition that shows the bug.
6767#. Don't create or modify any other file.
68- #. Execute ``composer require symfony/web-server-bundle `` and use the ``server:run ``
69- command to browse to the new route and see if the bug appears or not.
68+ #. Install the :doc: `local web server </setup/symfony_server >` provided by Symfony
69+ and use the ``symfony server:start `` command to browse to the new route and
70+ see if the bug appears or not.
7071#. If you can see the bug, you're done and you can already share the code with us.
7172#. If you can't see the bug, you must keep making small changes. For example, if
7273 your original route was defined using XML, forget about the previous route
Original file line number Diff line number Diff line change @@ -117,8 +117,9 @@ If you want to apply tags automatically for your own services, use the
117117
118118
119119 For more advanced needs, you can define the automatic tags using the
120- :method: `Symfony\\ Component\\ DependencyInjection\\ ContainerBuilder::registerForAutoconfiguration `
121- method in an :doc: `extension </bundles/extension >` or from your kernel::
120+ :method: `Symfony\\ Component\\ DependencyInjection\\ ContainerBuilder::registerForAutoconfiguration ` method.
121+
122+ In a Symfony application, call this method in your kernel class::
122123
123124 // src/Kernel.php
124125 class Kernel extends BaseKernel
@@ -133,6 +134,22 @@ method in an :doc:`extension </bundles/extension>` or from your kernel::
133134 }
134135 }
135136
137+ In a Symfony bundle, call this method in the ``load() `` method of the
138+ :doc: `bundle extension class </bundles/extension >`::
139+
140+ // src/DependencyInjection/MyBundleExtension.php
141+ class MyBundleExtension extends Extension
142+ {
143+ // ...
144+
145+ public function load(array $configs, ContainerBuilder $container)
146+ {
147+ $container->registerForAutoconfiguration(CustomInterface::class)
148+ ->addTag('app.custom_tag')
149+ ;
150+ }
151+ }
152+
136153Creating custom Tags
137154--------------------
138155
You can’t perform that action at this time.
0 commit comments