Skip to content

Instantly share code, notes, and snippets.

@Stoakes
Created September 30, 2018 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Stoakes/2f67278c5e529acdf5512d348e487f17 to your computer and use it in GitHub Desktop.
Save Stoakes/2f67278c5e529acdf5512d348e487f17 to your computer and use it in GitHub Desktop.
Bug for services key in messenger.yaml ?
# Doesn't work with that
framework:
messenger:
transports:
amqp: '%env(MESSENGER_TRANSPORT_DSN)%'
routing:
'*': amqp
services:
App\MessageHandler\WithDelaySerializer:
decorates: 'messenger.transport.serializer'
arguments: ['@App\MessageHandler\WithDelaySerializer.inner']
# Works with that
parameters:
locale: 'en'
services:
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
public: false # Allows optimizing the container by removing unused services; this also means
App\:
resource: '../src/*'
exclude: '../src/{Entity,Migrations,Tests,DataFixtures/data}'
App\Controller\:
resource: '../src/Controller'
tags: ['controller.service_arguments']
App\MessageHandler\WithDelaySerializer:
decorates: 'messenger.transport.serializer'
arguments: ['@App\MessageHandler\WithDelaySerializer.inner']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment