Syntax

Pre Symfony 5.0

# config/services.yaml
services:
    tags:
      - { name: kernel.event_listener, event: kernel.request }

Symfony 5.0

Simpler Event Listeners