SymfonyContainerContextResolver::CONTAINER_CLASS as Psr\Container\ContainerInterface · Issue #3024 · phpactor/phpactor · GitHub
Skip to content

SymfonyContainerContextResolver::CONTAINER_CLASS as Psr\Container\ContainerInterface #3024

Description

@przepompownia
diff --git a/lib/Extension/Symfony/WorseReflection/SymfonyContainerContextResolver.php b/lib/Extension/Symfony/WorseReflection/SymfonyContainerContextResolver.php
index 069a45df..5a6570d2 100644
--- a/lib/Extension/Symfony/WorseReflection/SymfonyContainerContextResolver.php
+++ b/lib/Extension/Symfony/WorseReflection/SymfonyContainerContextResolver.php
@@ -16,7 +16,7 @@ use Phpactor\WorseReflection\Reflector;
 
 class SymfonyContainerContextResolver implements MemberContextResolver
 {
-    const CONTAINER_CLASS = 'Symfony\\Component\\DependencyInjection\\ContainerInterface';
+    const CONTAINER_CLASS = 'Psr\\Container\\ContainerInterface';
 
     public function __construct(private SymfonyContainerInspector $inspector)
     {

Would this be a bad thing in projects with Symfony Extension enabled? This change work for me, but maybe I missed something.

When using a custom container factory that returns Psr\Container\ContainerInterface, completion does not work:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions