Haehnchen / idea-php-symfony2-plugin

IntelliJ IDEA / PhpStorm Symfony Plugin
https://plugins.jetbrains.com/plugin/7219
MIT License
910 stars 138 forks source link

Auto-injecting service in constructor is too high priority #2350

Open jannes-io opened 3 months ago

jannes-io commented 3 months ago

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.

Haehnchen commented 3 months ago

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