mediact / dependency-guard

Static production dependency analysis.
MIT License
83 stars 5 forks source link

1.0.4 - Prevent autoloading targets of static analysis #24

Closed janmartenjongerius closed 6 years ago

janmartenjongerius commented 6 years ago

This pull request fixes #21

Using native Reflection, the target symbols are loaded in using the autoloader, thus contaminating the current code base. When the target for static analysis conflicts with the code base of DependencyGuard, this results in fatal errors.

The commits in this pull request use BetterReflection instead, which can apply static analysis of symbols, without having to load in the code.

The DependencyGuard command no longer registers the autoloader for vendor directories, as that will cause targets for analysis to be loaded in the active code base.

Idrinth commented 6 years ago

I can confirm the fatal no longer occurs.