Skip to content

Tweak configuration for app.yaml #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions symfony/framework-bundle/3.3/etc/packages/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@ services:
_defaults:
# automatically injects dependencies in your services
autowire: true
# automatically registers your services as commands, form types, etc.
# automatically registers your services as commands, event subscribers, etc.
autoconfigure: true
# this means you cannot fetch services directly from the container via $container->get()
# if you need to do this, you can override this setting on individual services
public: false

# loads services from whatever directories you want (you can add directories!)
# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../../src/{Command,Form,EventSubscriber,Twig,Security}'
resource: '../../src/*'
# you can exclude directories or files
# but if a service is unused, it's removed anyway
exclude: '../../src/{Entity,Repository}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about excluding Controller too (see symfony/symfony-standard#1070 (comment))?


# controllers are imported separately to make sure they're public
# and have a tag that allows actions to type-hint services
App\Controller\:
resource: '../../src/Controller'
public: true
Expand Down