Skip to content

Commit 6d5ab31

Browse files
committed
Merge branch '4.4' into 5.4
* 4.4: [DependencyInjecion] Mention that service definitions replace previous ones
2 parents b072fe9 + cfd2056 commit 6d5ab31

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

service_container.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ each time you ask for it.
177177
- '../src/Entity/'
178178
- '../src/Kernel.php'
179179
180+
# order is important in this file because service definitions
181+
# always *replace* previous ones; add your own service configuration below
182+
180183
# ...
181184
182185
.. code-block:: xml
@@ -196,6 +199,9 @@ each time you ask for it.
196199
<!-- this creates a service per class whose id is the fully-qualified class name -->
197200
<prototype namespace="App\" resource="../src/" exclude="../src/{DependencyInjection,Entity,Kernel.php}"/>
198201
202+
<!-- order is important in this file because service definitions
203+
always *replace* previous ones; add your own service configuration below -->
204+
199205
<!-- ... -->
200206
201207
</services>
@@ -218,6 +224,9 @@ each time you ask for it.
218224
// this creates a service per class whose id is the fully-qualified class name
219225
$services->load('App\\', '../src/')
220226
->exclude('../src/{DependencyInjection,Entity,Kernel.php}');
227+
228+
// order is important in this file because service definitions
229+
// always *replace* previous ones; add your own service configuration below
221230
};
222231
223232
.. tip::

0 commit comments

Comments
 (0)