Skip to content

Prevent autoloading targets of static analysis

Compare
Choose a tag to compare
@janmartenjongerius janmartenjongerius released this 04 Sep 07:25
· 69 commits to master since this release
6a99bd2

Using native Reflection, the target symbols were 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 resulted in fatal errors.

This release is built to 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.

Thanks to @Idrinth for reporting this issue, helping determine the cause and supplying a regression test to prevent this issue from returning.