Skip to content

Controller as a Service cookbook article missing failfast mentioning #6749

@linaori

Description

@linaori

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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy