Advertisement
Guest User

services.yaml

a guest
Nov 16th, 2018
697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 3.14 KB | None | 0 0
  1. # Put parameters here that don't need to change on each machine where the app is deployed
  2. # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
  3. parameters:
  4.     locale: 'en'
  5.  
  6. imports:
  7.   - {resource: services/repositories.yaml}
  8.  
  9. services:
  10.    # default configuration for services in *this* file
  11.     _defaults:
  12.         autowire: true      # Automatically injects dependencies in your services.
  13.         autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
  14.         public: false       # Allows optimizing the container by removing unused services; this also means
  15.                             # fetching services directly from the container via $container->get() won't work.
  16.                             # The best practice is to be explicit about your dependencies anyway.
  17.  
  18.         bind:
  19.           $commandLogger: '@monolog.logger.command'
  20.           #  $queryBus: '@tactician.commandbus.query'
  21.           #$commandBus: '@tactician.commandbus.command'
  22.  
  23.     _instanceof:
  24.         App\Domain\Shared\Command\CommandHandlerInterface:
  25.           public: true
  26.           tags:
  27.               - { name: tactician.handler, typehints: true, bus: command }
  28.  
  29.         App\Domain\Shared\Query\QueryHandlerInterface:
  30.           public: true
  31.           tags:
  32.               - { name: tactician.handler, typehints: true, bus: query }
  33.  
  34.     monolog.linebreaks_formatter:
  35.         class: Monolog\Formatter\LineFormatter
  36.         arguments: [~, ~, true]
  37.  
  38.     app.middleware.command_exception_handler:
  39.         public: false
  40.         class: App\Infrastructure\Plugins\CommandExceptionHandlerMiddleware
  41.  
  42.     App\EventListener\AuthenticationFailureListener:
  43.         tags:
  44.             - { name: kernel.event_listener, event: lexik_jwt_authentication.on_authentication_failure, method: onAuthenticationFailureResponse }
  45.  
  46.     App\EventListener\AuthenticationSuccessListener:
  47.       tags:
  48.           - { name: kernel.event_listener, event: lexik_jwt_authentication.on_authentication_success, method: onAuthenticationSuccessResponse }
  49.  
  50.     App\EventListener\RequestListener: ~
  51.  
  52.     # makes classes in src/ available to be used as services
  53.     # this creates a service per class whose id is the fully-qualified class name
  54.     App\:
  55.         resource: '../src/*'
  56.         exclude: '../src/{Entity,Migrations,Tests,Kernel.php}'
  57.  
  58.     # controllers are imported separately to make sure services can be injected
  59.     # as action arguments even if you don't extend any base controller class
  60.     App\Controller\:
  61.         resource: '../src/Controller'
  62.         tags: ['controller.service_arguments']
  63.  
  64.     # add more service definitions when explicit configuration is needed
  65.     # please note that last definitions always *replace* previous ones
  66.  
  67.     Money\Currencies\ISOCurrencies: ~
  68.     Money\Currencies: '@Money\Currencies\ISOCurrencies'
  69.  
  70.     App\Domain\Billing\CurrencyConverter\CurrencyConverter: ~
  71.  
  72.     App\Utils\NoopInflector: ~
  73.  
  74.     App\Domain\EventListeners\UserSignedUpEvent\SendWelcomeEmail:
  75.         public: true
  76.         tags:
  77.           - { name: kernel.event_listener, event: user.signed.up }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement