File tree Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Expand file tree Collapse file tree 2 files changed +22
-5
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:
111
111
# config/packages/doctrine.yaml
112
112
doctrine :
113
113
dbal :
114
- password : ' %env(secret: DATABASE_PASSWORD)%'
114
+ password : ' %env(DATABASE_PASSWORD)%'
115
115
# ...
116
116
# ...
117
117
@@ -129,7 +129,7 @@ If you stored a ``DATABASE_PASSWORD`` secret, you can reference by:
129
129
130
130
<doctrine : config >
131
131
<doctrine : dbal
132
- password =" %env(secret: DATABASE_PASSWORD)%"
132
+ password =" %env(DATABASE_PASSWORD)%"
133
133
/>
134
134
</doctrine : config >
135
135
@@ -140,7 +140,7 @@ If you stored a ``DATABASE_PASSWORD`` secret, you can reference by:
140
140
// config/packages/doctrine.php
141
141
$container->loadFromExtension('doctrine', [
142
142
'dbal' => [
143
- 'password' => '%env(secret: DATABASE_PASSWORD)%',
143
+ 'password' => '%env(DATABASE_PASSWORD)%',
144
144
]
145
145
]);
146
146
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
117
117
118
118
119
119
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::
122
123
123
124
// src/Kernel.php
124
125
class Kernel extends BaseKernel
@@ -133,6 +134,22 @@ method in an :doc:`extension </bundles/extension>` or from your kernel::
133
134
}
134
135
}
135
136
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
+
136
153
Creating custom Tags
137
154
--------------------
138
155
You can’t perform that action at this time.
0 commit comments