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

Skip to content

Use a dependency injection container within Composer #3803

@joshdifabio

Description

@joshdifabio

It's very difficult to make significant changes to the internals of Composer due to limited number of factory classes and the lack of a dependency injection container.

There are a number of changes I'd like to make to Composer in order to improve the performance of VCS operations, but it would be much easier to do so if there were factories for more of the classes (e.g. the repository classes) or at the very least a DI container. The current approach enforces fixed constructor signatures for a number of classes which makes it impossible to cleanly change their dependencies or introduce new repository implementations with non-standard dependencies.

Is there any appetite for introducing a DI container (for example PHP-DI or Symfony DI) into Composer? I'm willing to submit a PR myself in order to add a DIC and some more factory classes, but not if it isn't wanted by @stof and @Seldaek.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions