Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Controller as a Service cookbook article missing failfast mentioning #6749

Copy link
Copy link
Closed
@linaori

Description

@linaori
Issue body actions

One of the (imo) foremost advantages of controller as a service, is the fail fast principle. This means that if you're missing service definitions or try to inject something that does not exist, it will throw an error during compilation. When using the (Base)Controller provided by Symfony, you won't find out if the service exist until you call get() run-time, which might happen once in a blue moon. It also makes it impossible to use private services in 4.0.

http://symfony.com/doc/current/cookbook/controller/service.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    hasPRA Pull Request has already been submitted for this issue.A Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.