You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

64 rivejä
2.8 KiB

  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. asset_directory: '%kernel.project_dir%/assets'
  6. services:
  7. # default configuration for services in *this* file
  8. _defaults:
  9. autowire: true # Automatically injects dependencies in your services.
  10. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
  11. public: false # Allows optimizing the container by removing unused services; this also means
  12. # fetching services directly from the container via $container->get() won't work.
  13. # The best practice is to be explicit about your dependencies anyway.
  14. # makes classes in src/ available to be used as services
  15. # this creates a service per class whose id is the fully-qualified class name
  16. App\:
  17. resource: '../src/*'
  18. exclude: '../src/{Entity,Migrations,Tests,Kernel.php}'
  19. # controllers are imported separately to make sure services can be injected
  20. # as action arguments even if you don't extend any base controller class
  21. App\Controller\:
  22. resource: '../src/Controller'
  23. tags: ['controller.service_arguments']
  24. App\EventListener\ControllerListener:
  25. autowire: true
  26. arguments: ['@router', '@security.token_storage', '@doctrine.orm.entity_manager']
  27. tags:
  28. - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest }
  29. - { name: kernel.event_listener, event: kernel.exception, method: onKernelException }
  30. - { name: kernel.event_listener, event: kernel.response, method: onKernelResponse }
  31. - { name: kernel.event_listener, event: kernel.terminate, method: onKernelTerminate }
  32. App\EventListener\DatabaseListener:
  33. autowire: true
  34. arguments: ['@security.token_storage','%kernel.environment%']
  35. tags:
  36. - { name: doctrine.event_listener, event: postPersist }
  37. - { name: doctrine.event_listener, event: postUpdate }
  38. - { name: doctrine.event_listener, event: preRemove }
  39. App\Command\:
  40. resource: '../src/Command/'
  41. autowire: true
  42. autoconfigure: true
  43. arguments: ['@doctrine.orm.entity_manager', '@service_container']
  44. tags:
  45. - { name: 'console.command' }
  46. phpspreadsheet:
  47. class: 'Onurb\Bundle\ExcelBundle\Factory\ExcelFactory'
  48. public: true
  49. # add more service definitions when explicit configuration is needed
  50. # please note that last definitions always *replace* previous ones
  51. json_guard_authenticator:
  52. class: App\Security\JsonAuthenticator
  53. arguments: ['@doctrine.orm.entity_manager', '@router']