phparch icon indicating copy to clipboard operation
phparch copied to clipboard

Add visitor that extracts dependencies from dependency injection

Open j6s opened this issue 7 years ago • 0 comments

Currently if a class is injected from a dependency injection framework it is not tracked as a dependency. There should be a Visitor/Extractor that detects dependency framework calls.

Examples (laravel):

app(MyClass::class);
app('MyVendor\\MyPackage\\MyClass');

If I have seen correctly both styles of referencing classes (Through strings and ::class) are handled by the PHP Parser as strings.

j6s avatar Nov 30 '18 14:11 j6s