Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here: TYPO3 ELTS.
Services.yaml
New in version 10
Services can be configured in this file. TYPO3 uses it for:
- Dependency Injection
 - Event Listeners
 - Command Controllers (see Feature: #89139 - Add dependency injection support for console commands)
 - Registering a widget with the dashboard
 
A typical Configuration/ may look like this:
        EXT:my_extension/Configuration/Services.yaml
    
services:
  _defaults:
    autowire: true
    autoconfigure: true
    public: false
  T3docs\Examples\:
    resource: '../Classes/*'
    exclude: '../Classes/Domain/Model/*'
  MyVendor\MyExtension\LinkValidator\LinkType\ExampleLinkType:
    tags:
      -  name: linkvalidator.linktype
    
See also
- TYPO3 uses the Symfony Dependency Injection component, so official documentation can be found at https://symfony.com/doc/current/service_container.html