Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2e90c4f

Browse filesBrowse files
committed
minor #20871 [FrameworkBundle] Remove DI, Entity and Kernel exclusion from the default services file (Jean-Beru)
This PR was merged into the 7.3 branch. Discussion ---------- [FrameworkBundle] Remove DI, Entity and Kernel exclusion from the default services file Since symfony/symfony#59987 and according to the [recipe](https://github.com/symfony/recipes/blob/main/symfony/framework-bundle/7.3/config/services.yaml), the default `config/services.yaml` does not exclude DI, Entity and Kernel file/folders anymore. Commits ------- 70716ab Update service_container.rst to 7.3
2 parents 3f949af + 70716ab commit 2e90c4f
Copy full SHA for 2e90c4f

File tree

1 file changed

+3
-10
lines changed
Filter options

1 file changed

+3
-10
lines changed

‎service_container.rst

Copy file name to clipboardExpand all lines: service_container.rst
+3-10
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@ each time you ask for it.
162162
# this creates a service per class whose id is the fully-qualified class name
163163
App\:
164164
resource: '../src/'
165-
exclude:
166-
- '../src/DependencyInjection/'
167-
- '../src/Entity/'
168-
- '../src/Kernel.php'
169165
170166
# order is important in this file because service definitions
171167
# always *replace* previous ones; add your own service configuration below
@@ -187,7 +183,7 @@ each time you ask for it.
187183
188184
<!-- makes classes in src/ available to be used as services -->
189185
<!-- this creates a service per class whose id is the fully-qualified class name -->
190-
<prototype namespace="App\" resource="../src/" exclude="../src/{DependencyInjection,Entity,Kernel.php}"/>
186+
<prototype namespace="App\" resource="../src/"/>
191187
192188
<!-- order is important in this file because service definitions
193189
always *replace* previous ones; add your own service configuration below -->
@@ -212,18 +208,15 @@ each time you ask for it.
212208
213209
// makes classes in src/ available to be used as services
214210
// this creates a service per class whose id is the fully-qualified class name
215-
$services->load('App\\', '../src/')
216-
->exclude('../src/{DependencyInjection,Entity,Kernel.php}');
211+
$services->load('App\\', '../src/');
217212
218213
// order is important in this file because service definitions
219214
// always *replace* previous ones; add your own service configuration below
220215
};
221216
222217
.. tip::
223218

224-
The value of the ``resource`` and ``exclude`` options can be any valid
225-
`glob pattern`_. The value of the ``exclude`` option can also be an
226-
array of glob patterns.
219+
The value of the ``resource`` option can be any valid `glob pattern`_.
227220

228221
Thanks to this configuration, you can automatically use any classes from the
229222
``src/`` directory as a service, without needing to manually configure

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.