Releases: Roave/BetterReflection
4.1.0
Release 4.1.0
4.1.0
- Total issues resolved: 1
- Total pull requests resolved: 2
- Total contributors: 2
enhancement
4.0.0
Release 4.0.0
4.0.0
- Total issues resolved: 3
- Total pull requests resolved: 46
- Total contributors: 12
dependencies
- 548: bump phpbench and phpstan thanks to @orklah
- 510: Bump phpunit/phpunit from 8.3.5 to 8.5.1 thanks to @dependabot-preview[bot]
- 508: Bump phpdocumentor/reflection-docblock from 4.3.2 to 4.3.4 thanks to @dependabot-preview[bot]
- 507: Bump doctrine/coding-standard from 6.0.0 to 7.0.2 thanks to @dependabot-preview[bot]
- 502: Bump nikic/php-parser from 4.2.4 to 4.3.0 thanks to @dependabot-preview[bot]
- 495: Bump phpdocumentor/reflection-docblock from 4.3.1 to 4.3.2 thanks to @dependabot-preview[bot]
- 492: Bump phpunit/phpunit from 8.1.6 to 8.3.2 thanks to @dependabot-preview[bot]
- 478: Bump phpunit/phpunit from 8.1.5 to 8.1.6 thanks to @dependabot-preview[bot]
dependencies,enhancement
- 547: fix SA thanks to @orklah
- 545: fix CS thanks to @orklah
- 544: bump psalm, fix errors, add usePhpDocPropertiesWithoutMagicCall thanks to @orklah
- 543: CS fixes thanks to @kukulich
- 540: Upgrade reflection-docblock to version ^5.0.0 and upgrade deps thanks to @paul-thebaud
- 521: Travis improvements thanks to @kukulich
- 520: Bump jetbrains/phpstorm-stubs from 2019.2 to 2019.3 thanks to @kukulich
- 518: Run CI only once on PR from another branch of the repo thanks to @Lctrs
- 517: Bump psalm to 3.8.2 thanks to @Lctrs
- 498: Allow phpdocumentor/type-resolver version ^1.0.0 thanks to @paul-thebaud
- 491: Updated jetbrains/phpstorm-stubs thanks to @kukulich
bug
- 546: Fixed .travis.yml thanks to @kukulich and @orklah
- 532: fix windows path to linux + phpcbf thanks to @orklah
- 523:
ReflectionClass#getConstructor()
should work event if the constructor isn't the first method in the class thanks to @kukulich and @ondrejmirtes - 522: Fixed deprecated warning in
ReflectionSourceStubber
thanks to @kukulich - 506: Fix CS thanks to @ondrejmirtes
- 481: Make getDocComment in adapter test return a string thanks to @asgrim
enhancement
- 541: Provide path to PHP Storm stubs directory thanks to @michaeljoelphillips
- 537: various improvements for psalm thanks to @orklah
- 534: Show our type coverage thanks to @Lctrs
- 533: Add compatibility with Composer v2 installed.json files thanks to @naderman
- 526: Improve Psalm coverage for decoded datas from json files thanks to @orklah and @Lctrs
- 524: Speedup code coverage generation by using xdebug filter thanks to @Lctrs
- 514: Update doctrine/coding-standard from 6.0.0 to 7.0.2 thanks to @Lctrs
dependencies,duplicate,enhancement
- 538: Bump PHPStan to 0.12.9 thanks to @ondrejmirtes
- 501: Replaced the string cast with a getName() call thanks to @duncan3dc
enhancement,reflection compatibility
- 531: add psalm types thanks to @orklah and @Lctrs
bug,dependencies
- 529: Fix dependencies installation thanks to @Lctrs
- 527: CS fix thanks to @kukulich
- 516: Run PHPStan without memory limit thanks to @Lctrs
bug,enhancement
dependencies,duplicate
- 500: Correct a coding standard issue thanks to @duncan3dc
- 488: Bump jetbrains/phpstorm-stubs from 2019.1 to 2019.2 thanks to @dependabot-preview[bot]
duplicate
BC break,enhancement
- 483: Make source stubber required parameter in EvaledCodeSourceLocator and PhpInternalSourceLocator thanks to @kukulich
- 482: Removed wrong classes and functions from PHPStorm stubs map thanks to @kukulich
- 479: Fix behaviour of ReflectionClass::export/ReflectionObject::export to match behaviour of core classes thanks to @asgrim
duplicate,enhancement,question
3.5.0
This release introduces support for ReflectionConstant
, adds support
for PHP 7.4 typed properties,
and replaces the internal class stubbing mechanisms with direct hits to
the installed JetBrains stubs. In addition to that, parent::class
, self::class
and static::class
are now correctly evaluated to the target class name.
Total issues resolved: 13
- 444:
self::class
,parent::class
andstatic::class
are not correctly resolved into their corresponding strings thanks to @Ocramius - 465: Fix
.gitignore
format for Windows environments thanks to @kukulich - 466: Correct PHPUnit MockObject class names as per PHPUnit 8+ thanks to @kukulich
- 467: Tests for source stubbers thanks to @kukulich
- 469: Refactor SourceLocators to no longer depend on CoreReflection thanks to @theofidry
- 470: PhpInternalSourceLocator is not based on internal reflection anymore thanks to @kukulich
- 471: Added ReflectionConstant thanks to @kukulich
- 472: Fixed resolving self::, static:: and parent:: as property or constant values thanks to @kukulich
- 473: Added support for PHP 7.4 typed properties thanks to @kukulich
- 474: Run tests on PHP 7.4 thanks to @kukulich
- 475: Bump phpunit/phpunit from 8.1.3 to 8.1.5 thanks to @dependabot-preview[bot]
- 476: Bump phpdocumentor/reflection-docblock from 4.3.0 to 4.3.1 thanks to @dependabot-preview[bot]
- 477: Bump nikic/php-parser from 4.2.1 to 4.2.2 thanks to @dependabot-preview[bot]
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
3.3.0
This release replaces the internal source locator provided by
this package with the more updated and widely used class and
function definitions by jetbrains/phpstorm-stubs
, allowing
for quicker updates and more community-based internal symbol
reflection synchronisation.
Total issues resolved: 4
3.2.0
This release introduces PHP 7.3 support, reduces the exported package size,
and improves the overall code quality of the package through updated coding
style conventions.
Total issues resolved: 6
- 440: Test failures under PHP 7.3 thanks to @Majkl578
- 450: PHP_Parser v4 introduces a
string
type declaration on a parameter, breaking PHP 7.1 installations thanks to @Ocramius - 451: Remove .idea from .gitignore thanks to @Majkl578
- 452: Upgrade to Doctrine CS 5.0 thanks to @Majkl578
- 453: export-ignores, appveyor.yml -> .appveyor.yml thanks to @Majkl578
- 455: PHP 7.3 stub and PHP-Parser compatibility thanks to @paxal
3.1.1
This release fixes an incompatibility between ext-reflection
and roave/better-reflection
in which ReflectionClass#getConstructor()
led to an exception rather than a null
return value in case of
constructors being missing.
Total issues resolved: 1
3.1.0
This release hardens the AutoloadSourceLocator
to allow for multiple PSR-4
paths to be crawled for class existence.
Also, it is now possible to alter reflection instances to set the function/method
docBlocks while monkey-patching code.
Total issues resolved: 7
- 384:
AutoloadSourceLocator
uses the wrong directory thanks to @oqq - 425: Better exception messages and assertions for unrecognized class constant fetch expressions thanks to @Ocramius
- 431: #430 Add ability to specify doc comment for the functions thanks to @funivan
- 433: Fixed error on anonymous classes with interfaces thanks to @prisis
- 435: Return of the PHPStan thanks to @kukulich
- 436: Updated to PHPStan 0.10.1 thanks to @kukulich
- 437: Fixing AutoloadSourceLocator when multiple PSR-0/4 directories are possible thanks to @moufmouf
3.0.0
This release improves the performance and reliability of the library, which is now
fully working with PHP 7.2 and newer nikic/php-parser
releases.
Some BC breaks had to be performed:
- 389: Throw
ReflectionException
when a property is not found thanks to @muglug - 391: Adapter method
ReflectionClass#getProperty()
throw an exception when a property doesn't exist thanks to @kukulich - 415: Improved
ReflectionType
API so that a target reflection class can directly be retrieved, removed existing named constructor thanks to @Ocramius
Total issues resolved: 23
- 381: rename
$myMethod
to$myParameter
as expected bygetParameter('myParameter')
thanks to @tobemedia - 382: [TYPO\ Minimal grammar correction in Exception message thanks to @afoeder
- 389: Throw
ReflectionException
when a property is not found thanks to @muglug - 391: Adapter method
ReflectionClass#getProperty()
throw an exception when a property doesn't exist thanks to @kukulich - 392: Disallow build failures on PHP 7.2 thanks to @kukulich
- 393: Updated to
doctrine/coding-standard
2.0 thanks to @kukulich - 394: Fix issues found by static analysis thanks to @muglug
- 395: Updated to
doctrine/coding-standard
2.1 thanks to @kukulich - 400: Updated PHPUnit and PHPStan dependencies thanks to @kukulich
- 403: Use HTTPS instead of HTTP when referencing external documentation thanks to @carusogabriel
- 404: Account for case insensitivity thanks to @theofidry
- 405: Corrected typos in variable names and docblocks thanks to @ntzm
- 406: Remove useless
final
keyword from theprivate
methodReflectionFunctionAbstract#loadStaticParser()
thanks to @ntzm - 410: Updated to
nikic/PHP-Parser
4.x thanks to @kukulich - 411:
ReflectionClass#isInstantiable()
should reportfalse
forprivate
constructors thanks to @UFOMelkor - 412:
ReflectionClass::isInstantiable()
now reportsfalse
in case of inaccessible constructors thanks to @kukulich - 415: Improved
ReflectionType
API so that a target reflection class can directly be retrieved, removed existing named constructor thanks to @Ocramius - 418: Updated to
doctrine/coding-standard
4.0 thanks to @kukulich - 420: Tidied docs and simply removed weasel words thanks to @GeeH
- 421: PHP 7.2 build is failing thanks to @asgrim
- 422: Corrected build failures caused by
ext/date-time
upgrades in PHP 7.2 thanks to @kukulich - 423: Add
vimeo/psalm
to the build and fixed detected static analysis issues that were detected by it thanks to @muglug - 424: Fixed build failure caused by incorrectly formatted inline IDE hints thanks to @kukulich
2.0.2
Total issues resolved: 2