Skip to content
Merged
Changes from all 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
48 changes: 24 additions & 24 deletions service_container/import.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,23 +158,23 @@ from auto-registering classes that are defined manually elsewhere:

.. configuration-block::

.. code-block:: yaml
.. code-block:: yaml

# config/services.yaml
imports:
- { resource: services/mailer.yaml }
# ... other imports
# config/services.yaml
imports:
- { resource: services/mailer.yaml }
# ... other imports

services:
_defaults:
autowire: true
autoconfigure: true
services:
_defaults:
autowire: true
autoconfigure: true

App\:
resource: '../src/*'
exclude:
- '../src/Mailer/'
- '../src/SpecificClass.php'
App\:
resource: '../src/*'
exclude:
- '../src/Mailer/'
- '../src/SpecificClass.php'

.. code-block:: xml

Expand Down Expand Up @@ -235,19 +235,19 @@ same file. These later definitions will override the auto-registered ones:

.. configuration-block::

.. code-block:: yaml
.. code-block:: yaml

# config/services.yaml
services:
_defaults:
autowire: true
autoconfigure: true
# config/services.yaml
services:
_defaults:
autowire: true
autoconfigure: true

App\:
resource: '../src/*'
App\:
resource: '../src/*'

App\Mailer\MyMailer:
arguments: ['%env(MAILER_DSN)%']
App\Mailer\MyMailer:
arguments: ['%env(MAILER_DSN)%']

.. code-block:: xml

Expand Down