Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jannes-io opened this issue Apr 17, 2024 · 1 comment
Open

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

jannes-io opened this issue Apr 17, 2024 · 1 comment

Comments

@jannes-io
Copy link

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants