Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Nov 15, 2018. It is now read-only.
This repository was archived by the owner on Nov 15, 2018. It is now read-only.

Overriding of automatic registration should be done by class name #32

@weaverryan

Description

@weaverryan

Situation:

  1. Some directory is configured to be automatically registered as autowired service by this bundle.
  2. The user eventually needs to customize one of these services.

Currently, to do that, you just configure the service using it's auto-generated name - e.g. controller.Foo\Bar\Baz. Instead, I'm proposing that this is done by class instead - i.e. as soon as I register a service with the class Foo\Bar\Baz (regardless of its name), the automatic registration will stop happening.

Why? Because this is consistent with the Form component and with how the automatic, private services that AutowirePass creates are done. Specifically: AutowirePass will automatically create a service for a Foo class until the user defines a service with this class, under any name. Then, it will just use that.

Overall, the whole trick with autowiring is that the service ids should become invisible. I know implementing this might be challenging - but that shouldn't stop us if it's the right way :D.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions