services.yaml 1.4 KB

123456789101112131415161718192021222324252627
  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. services:
  5. # default configuration for services in *this* file
  6. _defaults:
  7. autowire: true # Automatically injects dependencies in your services.
  8. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
  9. public: false # Allows optimizing the container by removing unused services; this also means
  10. # fetching services directly from the container via $container->get() won't work.
  11. # The best practice is to be explicit about your dependencies anyway.
  12. # makes classes in src/ available to be used as services
  13. # this creates a service per class whose id is the fully-qualified class name
  14. App\:
  15. resource: '../src/*'
  16. exclude: '../src/{Entity,Migrations,Tests}'
  17. # controllers are imported separately to make sure services can be injected
  18. # as action arguments even if you don't extend any base controller class
  19. App\Controller\:
  20. resource: '../src/Controller'
  21. tags: ['controller.service_arguments']
  22. # add more service definitions when explicit configuration is needed
  23. # please note that last definitions always *replace* previous ones