Skip to content

Introduce support for various dependency injection containers #271

Open
@cweagans

Description

@cweagans

There are various DI container libraries available right now. Ideally, this language server would be able to look at something like this:

$container->get('service.name')->

and be able to resolve service.name to a class in the container and provide completions for that class.

To further complicate this, there are multiple ways that some containers can be configured. The symfony container can be configured via an XML file, a YAML file, or directly wiring things up in PHP - or any combination of these things! Perhaps a reasonable MVP for this functionality would be to support one container configured in one way + lay the groundwork for supporting other containers?

What do you think about this? Is it worthwhile? Or is it better to just rely on developers to do something like this:

$myclass = $container->get('service.name');
/** @var MyClass $myclass */
$myclass->

and parse the @var docblocks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions