3.4.0
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 dependenciesRoave\BetterReflection\SourceLocator\Type\Composer\Factory\MakeLocatorForComposerJson
- if you only want to
inspect project sourcesRoave\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:
<?php
use 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