services.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # Learn more about services, parameters and containers at
  2. # https://symfony.com/doc/current/service_container.html
  3. parameters:
  4. #parameter_name: value
  5. services:
  6. # default configuration for services in *this* file
  7. _defaults:
  8. # automatically injects dependencies in your services
  9. autowire: true
  10. # automatically registers your services as commands, event subscribers, etc.
  11. autoconfigure: true
  12. # this means you cannot fetch services directly from the container via $container->get()
  13. # if you need to do this, you can override this setting on individual services
  14. public: false
  15. # makes classes in src/AppBundle available to be used as services
  16. # this creates a service per class whose id is the fully-qualified class name
  17. AppBundle\:
  18. resource: '../../src/AppBundle/*'
  19. # you can exclude directories or files
  20. # but if a service is unused, it's removed anyway
  21. exclude: '../../src/AppBundle/{Entity,Repository,Tests}'
  22. # controllers are imported separately to make sure they're public
  23. # and have a tag that allows actions to type-hint services
  24. AppBundle\Controller\:
  25. resource: '../../src/AppBundle/Controller'
  26. public: true
  27. tags: ['controller.service_arguments']
  28. # add more services, or override services that need manual wiring
  29. # AppBundle\Service\ExampleService:
  30. # arguments:
  31. # $someArgument: 'some_value'