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

Add a toggle to disable the injecting services feature

Open pkly opened this issue 1 year ago • 3 comments

It's bad for me as I know what I want to write and I have 5 suggestions that I don't need. It keeps adding services to my classes and it's annoying. I can't find a way to disable it atm, is there one?

pkly avatar Sep 04 '24 09:09 pkly

When I use auto-completion for $this->, the plug-in is adding non-existing class properties with top priority and, should I pick one, it changes or creates the class constructor to inject a new service. IMHO, this is wrong for several reasons:

  • It can break my app by introducing circular dependencies.
  • I don't want the IDE to make design decisions for me, let alone without telling me.
  • 99% of the times I type $this-> what I want is to use existing class properties, not add new ones.
  • When you want to add new properties, the intuitive way is to add a new property directly to either the class or the constructor. Doing it from the location where you want to use and as part of auto-completion is a bit convoluted.

Is there a way to disable this?

image

kAlvaro avatar Jan 13 '25 10:01 kAlvaro

yeah it's annoying and barely works, doesn't respect formatting styles and is overall not a good thing

pkly avatar Jan 13 '25 16:01 pkly

@Haehnchen any chance this could be added as a toggle in a future update? It keeps happening and breaking my working code.

pkly avatar Apr 28 '25 09:04 pkly