File tree Expand file tree Collapse file tree 3 files changed +6
-18
lines changed Expand file tree Collapse file tree 3 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -103,10 +103,6 @@ what the file looks like in Symfony 4):
103
103
This small bit of configuration contains a paradigm shift of how services
104
104
are configured in Symfony.
105
105
106
- .. versionadded :: 3.4
107
-
108
- PHP Fluent DI was introduced in Symfony 3.4.
109
-
110
106
.. _`service-33-changes-automatic-registration` :
111
107
112
108
1) Services are Loaded Automatically
Original file line number Diff line number Diff line change @@ -225,14 +225,6 @@ Anonymous Services
225
225
226
226
Anonymous services are only supported by the XML, YAML, and PHP Fluent configuration formats.
227
227
228
- .. versionadded :: 3.3
229
-
230
- The feature to configure anonymous services in YAML was introduced in Symfony 3.3.
231
-
232
- .. versionadded :: 4.1
233
-
234
- The feaature to configure anonymous services in PHP Fluent was introduced in Symfony 3.4.
235
-
236
228
In some cases, you may want to prevent a service being used as a dependency of
237
229
other services. This can be achieved by creating an anonymous service. These
238
230
services are like regular services but they don't define an ID and they are
@@ -274,8 +266,8 @@ The following example shows how to inject an anonymous service into another serv
274
266
// config/services.php
275
267
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
276
268
277
- use App\Foo;
278
269
use App\AnonymousBar;
270
+ use App\Foo;
279
271
280
272
return function(ContainerConfigurator $configurator) {
281
273
$container = $configurator->services();
@@ -323,8 +315,8 @@ Using an anonymous service as a factory looks like this:
323
315
// config/services.php
324
316
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
325
317
326
- use App\Foo;
327
318
use App\AnonymousBar;
319
+ use App\Foo;
328
320
329
321
return function(ContainerConfigurator $configurator) {
330
322
$container = $configurator->services();
Original file line number Diff line number Diff line change @@ -119,9 +119,9 @@ duplicated service definitions:
119
119
// config/services.php
120
120
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
121
121
122
- use App\Repository\DoctrineUserRepository;
123
- use App\Repository\DoctrinePostRepository;
124
122
use App\Repository\BaseDoctrineRepository;
123
+ use App\Repository\DoctrinePostRepository;
124
+ use App\Repository\DoctrineUserRepository;
125
125
126
126
return function(ContainerConfigurator $configurator) {
127
127
$configurator->services()
@@ -225,9 +225,9 @@ the child class:
225
225
// config/services.php
226
226
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
227
227
228
- use App\Repository\DoctrineUserRepository;
229
- use App\Repository\DoctrinePostRepository;
230
228
use App\Repository\BaseDoctrineRepository;
229
+ use App\Repository\DoctrinePostRepository;
230
+ use App\Repository\DoctrineUserRepository;
231
231
// ...
232
232
233
233
return function(ContainerConfigurator $configurator) {
You can’t perform that action at this time.
0 commit comments