Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

[FrameworkBundle] Remove DI, Entity and Kernel exclusion from the default services file#20871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
javiereguiluz merged 1 commit intosymfony:7.3fromJean-Beru:patch-1
Apr 9, 2025
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletionsservice_container.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -162,10 +162,6 @@ each time you ask for it.
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../src/'
exclude:
- '../src/DependencyInjection/'
- '../src/Entity/'
- '../src/Kernel.php'

# order is important in this file because service definitions
# always *replace* previous ones; add your own service configuration below
Expand All@@ -187,7 +183,7 @@ each time you ask for it.

<!-- makes classes in src/ available to be used as services -->
<!-- this creates a service per class whose id is the fully-qualified class name -->
<prototype namespace="App\" resource="../src/" exclude="../src/{DependencyInjection,Entity,Kernel.php}"/>
<prototype namespace="App\" resource="../src/"/>

<!-- order is important in this file because service definitions
always *replace* previous ones; add your own service configuration below -->
Expand All@@ -212,18 +208,15 @@ each time you ask for it.

// makes classes in src/ available to be used as services
// this creates a service per class whose id is the fully-qualified class name
$services->load('App\\', '../src/')
->exclude('../src/{DependencyInjection,Entity,Kernel.php}');
$services->load('App\\', '../src/');

// order is important in this file because service definitions
// always *replace* previous ones; add your own service configuration below
};

.. tip::

The value of the ``resource`` and ``exclude`` options can be any valid
`glob pattern`_. The value of the ``exclude`` option can also be an
array of glob patterns.
The value of the ``resource`` option can be any valid `glob pattern`_.

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

[8]ページ先頭

©2009-2025 Movatter.jp