Better Reflection v3.4.0 Release Notes
Release Date: 2019-04-22 // about 5 years ago-
๐ This release drops support for PHP 7.1 and introduces major performance improvements
when inspecting sources of projects that usecomposer.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
- ๐ 442: Add a source locator that can detect
"autoload"
and"autoload-dev"
when given a composer schema definition from either acomposer.json
or acomposer.lock
thanks to @Ocramius - ๐ 461: Composer-specific source locator builder thanks to @Ocramius
- โก๏ธ 463: Updated some build dependencies thanks to @kukulich
- ๐ 464: AppVeyor is dead, long live Travis thanks to @kukulich
- ๐