Services.yaml¶
Services can be configured in this file. TYPO3 uses it for:
Command Controllers (see Feature: #89139 - Add dependency injection support for console commands)
A typical Configuration/Services.yaml
may look like this:
typo3/sysext/core/Configuration/Services.yaml¶
services:
# general settings
_defaults:
autowire: true
autoconfigure: true
public: false
TYPO3\CMS\Core\:
resource: '../Classes/*'
# dependency injection (override public setting)
TYPO3\CMS\Core\Mail\Mailer:
public: true
TYPO3\CMS\Core\Command\SendEmailCommand:
tags:
- name: 'console.command'
command: 'mailer:spool:send'
- name: 'console.command'
command: 'swiftmailer:spool:send'
alias: true
schedulable: false
See also
TYPO3 uses the Symfony Dependency Injection component, so official documentation can be found at https://symfony.com/doc/current/service_container.html