Skip to content

Commit 487c9ad

Browse files
committed
Merge branch '6.1' into 6.2
* 6.1: Update service documentation with udpate recipe files
2 parents ae14433 + efb5b62 commit 487c9ad

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

service_container.rst

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,11 @@ each time you ask for it.
169169
# makes classes in src/ available to be used as services
170170
# this creates a service per class whose id is the fully-qualified class name
171171
App\:
172-
resource: '../src/*'
173-
exclude: '../src/{DependencyInjection,Entity,Tests,Kernel.php}'
172+
resource: '../src/'
173+
exclude:
174+
- '../src/DependencyInjection/'
175+
- '../src/Entity/'
176+
- '../src/Kernel.php'
174177
175178
# ...
176179
@@ -189,7 +192,7 @@ each time you ask for it.
189192
190193
<!-- makes classes in src/ available to be used as services -->
191194
<!-- this creates a service per class whose id is the fully-qualified class name -->
192-
<prototype namespace="App\" resource="../src/*" exclude="../src/{DependencyInjection,Entity,Tests,Kernel.php}"/>
195+
<prototype namespace="App\" resource="../src/" exclude="../src/{DependencyInjection,Entity,Kernel.php}"/>
193196
194197
<!-- ... -->
195198
@@ -211,8 +214,8 @@ each time you ask for it.
211214
212215
// makes classes in src/ available to be used as services
213216
// this creates a service per class whose id is the fully-qualified class name
214-
$services->load('App\\', '../src/*')
215-
->exclude('../src/{DependencyInjection,Entity,Tests,Kernel.php}');
217+
$services->load('App\\', '../src/')
218+
->exclude('../src/{DependencyInjection,Entity,Kernel.php}');
216219
};
217220
218221
.. tip::
@@ -446,8 +449,8 @@ pass here. No problem! In your configuration, you can explicitly set this argume
446449
447450
# same as before
448451
App\:
449-
resource: '../src/*'
450-
exclude: '../src/{DependencyInjection,Entity,Tests,Kernel.php}'
452+
resource: '../src/'
453+
exclude: '../src/{DependencyInjection,Entity,Kernel.php}'
451454
452455
# explicitly configure the service
453456
App\Service\SiteUpdateManager:
@@ -469,8 +472,8 @@ pass here. No problem! In your configuration, you can explicitly set this argume
469472
<!-- Same as before -->
470473
471474
<prototype namespace="App\"
472-
resource="../src/*"
473-
exclude="../src/{DependencyInjection,Entity,Tests,Kernel.php}"
475+
resource="../src/"
476+
exclude="../src/{DependencyInjection,Entity,Kernel.php}"
474477
/>
475478
476479
<!-- Explicitly configure the service -->
@@ -491,8 +494,8 @@ pass here. No problem! In your configuration, you can explicitly set this argume
491494
// ...
492495
493496
// same as before
494-
$services->load('App\\', '../src/*')
495-
->exclude('../src/{DependencyInjection,Entity,Tests,Kernel.php}');
497+
$services->load('App\\', '../src/')
498+
->exclude('../src/{DependencyInjection,Entity,Kernel.php}');
496499
497500
$services->set(SiteUpdateManager::class)
498501
->arg('$adminEmail', 'manager@example.com')
@@ -932,8 +935,8 @@ key. For example, the default Symfony configuration contains this:
932935
# makes classes in src/ available to be used as services
933936
# this creates a service per class whose id is the fully-qualified class name
934937
App\:
935-
resource: '../src/*'
936-
exclude: '../src/{DependencyInjection,Entity,Tests,Kernel.php}'
938+
resource: '../src/'
939+
exclude: '../src/{DependencyInjection,Entity,Kernel.php}'
937940
938941
.. code-block:: xml
939942
@@ -947,7 +950,7 @@ key. For example, the default Symfony configuration contains this:
947950
<services>
948951
<!-- ... same as before -->
949952
950-
<prototype namespace="App\" resource="../src/*" exclude="../src/{DependencyInjection,Entity,Tests,Kernel.php}"/>
953+
<prototype namespace="App\" resource="../src/" exclude="../src/{DependencyInjection,Entity,Kernel.php}"/>
951954
</services>
952955
</container>
953956
@@ -961,8 +964,8 @@ key. For example, the default Symfony configuration contains this:
961964
962965
// makes classes in src/ available to be used as services
963966
// this creates a service per class whose id is the fully-qualified class name
964-
$services->load('App\\', '../src/*')
965-
->exclude('../src/{DependencyInjection,Entity,Tests,Kernel.php}');
967+
$services->load('App\\', '../src/')
968+
->exclude('../src/{DependencyInjection,Entity,Kernel.php}');
966969
};
967970
968971
.. tip::

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy