phparch
phparch copied to clipboard
Add visitor that extracts dependencies from dependency injection
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.