idea-php-symfony2-plugin icon indicating copy to clipboard operation
idea-php-symfony2-plugin copied to clipboard

Auto-injecting service in constructor is too high priority

Open jannes-io opened this issue 1 year ago • 1 comments

When I have the following class:

class Test
{
    public function __construct(private readonly EntityRepository $productRepository)
    {
    }

    public function test()
    {
    }
}

And I type some code in the test function like:

$this->produ

Instead of suggesting the already injected $productRepository, it is recommending me other services first and then the already injected service. image

Expected behavior: Always favor already injected services in code autocomplete over service suggestions.

jannes-io avatar Apr 17 '24 09:04 jannes-io

yeah, they are already highly downvoted. will try to fine tune it.

Haehnchen avatar Apr 17 '24 18:04 Haehnchen