Skip to content

[DependencyInjection] Do we support scalar services? #32411

@derrabus

Description

@derrabus

While working on #32266, I noticed that adding object type declarations for services breaks the test suite.

Supporting scalar services would be legal according to PSR-11, but it violates the contract documented by the docblocks of our ContainerInterface.

I suggest to either…

  • Document the possibility of scalar services and cover this behavior with tests inside the DI component or…
  • deprecate scalar services in 4.4 and add object type declarations to master.

Metadata

Metadata

Assignees

No one assigned

    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