Better Reflection v3.4.0 Release Notes

Release Date: 2019-04-22 // about 5 years ago
  • ๐Ÿ— Build Status

    ๐Ÿš€ This release drops support for PHP 7.1 and introduces major performance improvements
    when inspecting sources of projects that use composer.json as main dependency tracking
    mechanism.

    Specifically, following utilities have been introduced to aid in inspecting project
    sources:

    • ๐Ÿ‘ Roave\BetterReflection\SourceLocator\Type\Composer\Factory\MakeLocatorForComposerJsonAndInstalledJson - if
      you need to inspect project and dependencies
    • ๐Ÿ‘ Roave\BetterReflection\SourceLocator\Type\Composer\Factory\MakeLocatorForComposerJson - if you only want to
      inspect project sources
    • ๐Ÿ‘ Roave\BetterReflection\SourceLocator\Type\Composer\Factory\MakeLocatorForInstalledJson - if you only want
      to inspect project dependencies

    ๐Ÿ“š To use them, please follow the usage documentation examples, such as following:

    \<?phpuse Roave\BetterReflection\BetterReflection;use Roave\BetterReflection\Reflector\ClassReflector;use Roave\BetterReflection\SourceLocator\Type\AggregateSourceLocator;use Roave\BetterReflection\SourceLocator\Type\PhpInternalSourceLocator;use Roave\BetterReflection\SourceLocator\Type\Composer\Factory\MakeLocatorForComposerJsonAndInstalledJson;$astLocator = (new BetterReflection())-\>astLocator();$reflector= new ClassReflector(new AggregateSourceLocator([(new MakeLocatorForComposerJsonAndInstalledJson)('path/to/the/project', $astLocator),new PhpInternalSourceLocator($astLocator)]));$classes = $reflector-\>getAllClasses();
    

    Total issues resolved: 4