phptools-docs icon indicating copy to clipboard operation
phptools-docs copied to clipboard

Show and remove unused constructor-based dependency injections (DI)

Open Morgy93 opened this issue 1 year ago • 1 comments

Hello,

I'd love to have a feature where it shows and is able to remove unused constructor-based dependency injections (DI).

For example:

public function __construct(
        private readonly \Some\Class $someClass,
) {
}

If $this->someClass is nowhere found in the code, I'd like to have some "this DI is not used, do you want to remove?"-Feature.

There's a feature for "Remove Unused Uses" and that would be great for the DI stuff as well. 😊

Morgy93 avatar Aug 02 '24 08:08 Morgy93

Good idea!

jakubmisek avatar Aug 07 '24 15:08 jakubmisek