Changelog History
Page 3
-
v2.0.2 Changes
February 05, 2018Total issues resolved: 2
- ๐ 398: Trait method aliases thanks to @lookyman
- ๐ 401: Method from trait renamed with alias should be available by the alias thanks to @kukulich
-
v2.0.1 Changes
November 01, 2017๐ This release fixes constraint incompatibilities with PHP 7.1.0, newer PHP 7.1.11
UConverter
API
and a type error raised when attempting to fetch the AST nodes of an interface's method.Total issues resolved: 5
- โ 372: Added missing parent::setUp() in tests thanks to @kukulich
- ๐ 376: Incorrect PHP version constraint thanks to @nikic
- ๐ 377: composer: allow PHP 7.1 thanks to @TomasVotruba
- ๐ 379: Return empty ast for interface method body thanks to @codeliner
- ๐ 380: #379
UConverter#getAliases($name)
is not an optional parameter anymore as per latest PHP releases thanks to @Ocramius
-
v2.0.0 Changes
September 18, 2017๐ This major release is a massive rework of the internal implementation details
๐ of BetterReflection.๐ Improvements
๐ Version 2.0.0 provides a massive performance boost when using the
๐ newRoave\BetterReflection\BetterReflection
kernel as an entry point
for using the library.๐ The minimum supported PHP version is now
7.1.0
, which allows for
a much cleaner API definition: we added nullable hints to our own
API wherever applicable.๐ The compatibility with the
ext-reflection
API is also almost complete, excluding some scenarios that would
๐ฎ forcefully require class autoloading.๐ Among the many new implemented features, we now support:
- Property/Method accessors
- Start/End line analysis for defined symbols
- PHP 7.1 nullable types
- PHP 7.1
iterable
type declarations - PHP 7.2
object
type declarations - ๐ PHP 7.1
const
visibility support - Monkey-patching classes on the fly via hijacked autoloader
- Immediate/inherited constants/methods/properties lookup
- PHP 4.x constructor detection
- Constant expression value resolution
- Closure reflection
- Anonymous class reflection
- 0๏ธโฃ Internal class parameter default value reflection (through stubs)
- Retrieving AST nodes for each reflection
BC Breaks
Most of the generally used API was not touched, but a lot of internal
๐ components were completely rewritten to address design and performance
issues. Please make sure that you read
โฌ๏ธ the upgrade notes.Total issues resolved: 138
- ๐ 14: Implement accessors without instantiating thanks to @asgrim
- ๐ 20: Validate identifier name in Identifier value object thanks to @asgrim
- ๐ 68: Add getColumn everywhere to complement getStartLine/getEndLine thanks to @asgrim
- ๐ 94: Improve
__toString()
functionality internally thanks to @asgrim - ๐ 98: Find a way to decrease complexity of compileBinaryOperator method thanks to @asgrim
- ๐ 103: ReflectionClass getMethods() and getProperties() do not filter thanks to @asgrim
- ๐ 131: Make Better Reflection faster thanks to @asgrim
- ๐ 152:
ClosureSourceLocator#locateIdentifiersByType()
- investigate implementation thanks to @asgrim - โฌ๏ธ 169: Investigate upgrading to
phpdocumentor/reflection-docblock 3.1
thanks to @asgrim - ๐ 202: Review PHP 7.1 feature: nullable types thanks to @asgrim
- ๐ 204: Review PHP 7.1 feature: Class constant visibility modifiers thanks to @asgrim
- ๐ 205: Autoload interruption for dynamic monkey patching thanks to @asgrim
- ๐ 216: Autoload interruption for monkey patching thanks to @asgrim
- โก๏ธ 217: Update our code for API changes in PHP-Parser thanks to @asgrim
- โฌ๏ธ 218: Upgrade phpdocumentor reflection docblock thanks to @asgrim
- ๐ 219: Check compatibility with PHP 7.2 thanks to @asgrim
- ๐ 220: Fixed issues found by static analysis thanks to @ondrejmirtes
- โฌ๏ธ 221: Upgrade minimum version to PHP 7.0 thanks to @asgrim
- ๐ 223: Add vendor prefix to namespaces thanks to @asgrim
- ๐ 225: Fixed function reflector doc thanks to @dantleech
- โ 226: Require minimum of PHP 7, enabling tests on PHP 7.1 thanks to @asgrim
- ๐ 227: Prefix namespaces with Roave thanks to @asgrim
- ๐ 228: Implement internal parsing of closures thanks to @asgrim
- ๐ 229: getDocBlockTypes() causes error when no docblock is present thanks to @dantleech
- ๐ 231: Inherited properties not returned by getProperties thanks to @dantleech
- ๐ 235:
LocatedSource#__construct()
should accept empty string as $source thanks to @asgrim - ๐ป 236: Fix exception being thrown in AutoloadSourceLocator thanks to @asgrim
- ๐ 238: LocatedSource now allows empty strings as source code thanks to @asgrim
- ๐ 240: ReflectionParameter doesn't resolve parameter type
self
thanks to @malukenho - ๐ 241: Fix
self
andparent
hinted ReflectionParameter class reference thanks to @malukenho - ๐ 242: Support for the PHP 7.1
iterable
type thanks to @Ocramius - ๐ 243:
ReflectionType#__toString()
should NOT prepend backslashes to class/interface types thanks to @Ocramius - ๐ 244: Fix for #243:
ReflectionType
(string)
cast should not prepend backslash to class and interface types thanks to @Ocramius - ๐ 246: Fixed class constant value fetch when constant is declared in parent thanks to @janlanger
- ๐ 250: Types with no doc block thanks to @marcosh
- ๐ 251: Retrieve all functions in SourceLocator scope thanks to @marcosh
- ๐ 252: get all functions available in SourceLocator scope thanks to @marcosh
- ๐ 253: Usage: fix DirectoriesSourceLocator usage thanks to @TomasVotruba
- ๐ 254: README: drop unstable dependencies reference thanks to @TomasVotruba
- ๐ 255: create ReflectionParameter from closure thanks to @marcosh
- ๐ 256: create reflection parameter from closure thanks to @marcosh
- ๐ 257: Possible unused code path thanks to @asgrim
- โก๏ธ 258: PHP 7.1 updates thanks to @asgrim
- ๐ 259: [Docs] Usage: drop SingleDirectorySourceLocator thanks to @TomasVotruba
- ๐ 260: [Docs] Usage - add FunctionReflector getAllFunctions() example thanks to @TomasVotruba
- ๐ 263: Support PHP4-style constructors? thanks to @asgrim
- ๐ 264: ReflectionMethod::isDestructor is case insensitive thanks to @asgrim
- ๐ 266: get file name of unlocated source could be null thanks to @marcosh
- โ 267: Testing that class constant visibility works thanks to @asgrim
- ๐ 268: Ensure locateFunctionByName returns ?string always thanks to @asgrim
- ๐ 269: Added case insensitivity to isConstructor and isDestructor methods thanks to @asgrim
- ๐ 271: getProperties returns inherited properties thanks to @marcosh
- โ 272: Added test cases for ?nullable and iterable types in PHP 7.1 thanks to @asgrim
- ๐ 273: [docs] example2.php - flip fallen space from the bottom thanks to @TomasVotruba
- โ 274: [failing-test] Namespaced Trait fails to be resolved thanks to @TomasVotruba
- ๐ 275: Filter get methods and properties thanks to @marcosh
- ๐ 277: [demo] add getAllClasses() examples, ref #276 thanks to @TomasVotruba
- ๐ 278: object immediate properties includes runtime properties thanks to @marcosh
- ๐ 279: Reflect on instances of anonymous classes thanks to @marcosh
- 280: [NodeCompiler] add support for
__DIR__
thanks to @TomasVotruba - ๐ 281: [PHP7.1] ::getReflectionConstant() and ::getReflectionConstants() support thanks to @POPSuL
- ๐ 282: [PHP 7.1] Add support for ReflectionClassConstant (#281) thanks to @POPSuL
- ๐ 284: fixed improper docblock retrieval thanks to @vlastavesely
- ๐ง 285: FindReflectionOnLine cannot be configured to load dependencies thanks to @moufmouf
- ๐ง 286: Make FindReflectionOnline more configurable thanks to @moufmouf
- ๐ 287: Remove namespace BC shim thanks to @asgrim
- 0๏ธโฃ 288: added ReflectionProperty::getDefaultValueAsString() thanks to @vlastavesely
- ๐ 290: Documentation fix regarding new Roave namespace thanks to @moufmouf
- ๐ 291: Added support for getStart/EndLine() for ReflectionClassConstant and ReflectionProperty thanks to @POPSuL
- ๐ 293: getDefaultValueAsString removals/deprecation thanks to @asgrim
- ๐ 294: Support for PHP 7.2's
object
hint thanks to @Ocramius - 0๏ธโฃ 296: ReflectionParameter::parseDefaultValueNode() - case insensitive check of TRUE, FALSE and NULL thanks to @vlastavesely
- 0๏ธโฃ 297: ReflectionParameter: return full name if default value is class' constant thanks to @vlastavesely
- 298: CompileNodeToValue: added support for
__CLASS__
magic const thanks to @vlastavesely - ๐ 300: Support for anonymous classes thanks to @kukulich
- ๐ 301: Fixed travis.yml - no PHP 7.0 support already thanks to @kukulich
- ๐ 302: ReflectionClass::getConstants() and ::getReflectionConstants() should return inherited constants thanks to @kukulich
- ๐ 303: Added missing
getReturnType
functionality to adapters thanks to @kukulich - ๐ 304: Adapters API is not consistent with internal reflection thanks to @kukulich
- ๐ 305: Fixed almost all tests on Windows thanks to @kukulich
- ๐ 306: Adding appveyor config to test on windows thanks to @Ocramius
- ๐ 307: Removed dead code that skipped tests for older PHP versions thanks to @kukulich
- ๐ 308: Improve AppVeyor build setup to include more extensions thanks to @kukulich
- ๐ 309: Use
PhpParser\ParserFactory
withPREFER_PHP7
parser everywhere thanks to @kukulich - ๐ 311:
declare(strict_types=1)
everywhere thanks to @kukulich - ๐ 313: Adapters are more compatible with internal reflections thanks to @kukulich
- ๐ 314: Internal functions are to be used with
\
(FQN) thanks to @kukulich - ๐ 315: Adding type hints to closures thanks to @kukulich
- ๐ท 316: PHPStan integration (Level 5 with exclusions) and CI stages thanks to @Ocramius
- ๐ 317: Incompatibility between
ReflectionClass#newInstance()
on PHP 7.1 vs PHP 7.2 thanks to @Ocramius - ๐ 318: #317 locking onto PHP 7.1 due to reflection API changes that cannot be made compatible with both versions thanks to @Ocramius
- โช 319: Remowing workarounds used in pre-php-7 code to catch any exception that isn't a
Throwable
thanks to @Ocramius - ๐ 320: Support for PHP4 style constructors thanks to @kukulich
- ๐ 321: ClosureSourceLocator improvements thanks to @kukulich
- ๐ 322: Implemented
getStartColumn()
andgetEndColumn()
methods thanks to @kukulich - ๐ 323: Method isSubclassOf() of ReflectionClass adapter should check also implemented interfaces to be compatible with internal reflection thanks to @kukulich
- ๐ 324: Method getFileName() of adapters should return false where no filename to be compatible with internal reflection thanks to @kukulich
- ๐ 325: Class with name "Scalar" is not resolved right thanks to @kukulich
- ๐ 327: Property from Trait should have actual class as declaring class thanks to @kukulich
- ๐ 328: Coding standard thanks to @kukulich
- ๐ 329: More coding standard checks thanks to @kukulich
- ๐ 330: Adapters compatibility for properties and methods from traits thanks to @kukulich
- ๐ 331: Used
PhpParser\NodeVisitor\NameResolver
to simplify code thanks to @kukulich - ๐ 332: Added missing documentation of
AnonymousClassObjectSourceLocator
thanks to @kukulich - ๐ 333:
PhpParser\BuilderFactory
instead ofZend\Code\Generator\ClassGenerator
in theSourceStubber
thanks to @kukulich - โก๏ธ 334: Update phpdocumentor/reflection-docblock thanks to @asgrim
- ๐ 335: Self and parent are not builtin types in internal reflection thanks to @kukulich
- ๐ 336: Fixes of bugs introduced in #331 thanks to @kukulich
- ๐ 337: BetterReflection entry-point class thanks to @Ocramius
- ๐ 338: Memoize parsing and symbol detection: improves performance by removing repeated I/O and parsing thanks to @Ocramius
- ๐ 340: Fixed AppVeyor badge thanks to @kukulich
- ๐ 341: Check if identifier name is valid thanks to @kukulich
- ๐ 342: ReflectionClass::newInstance() and ReflectionObject::newInstance() compatibility in all PHP versions thanks to @kukulich
- ๐ 343: Implemented ReflectionProperty::setAccessible(), getValue() and setValue() and ReflectionClass::getStaticProperties() thanks to @kukulich
- ๐ 344: Fixed stubs searching thanks to @kukulich
- ๐ 345: Introduced PHPBench with sample benchmark thanks to @dantleech
- ๐ 346: Avoid repeated source parsing when trying to analyse docblock types thanks to @Ocramius
- โฌ๏ธ 347: FindTypeFromAst dropped in #331 with no upgrade path thanks to @asgrim
- ๐ 348: Migrate BC Breaks documentation to migration path docs thanks to @Ocramius
- โ 349: Improved SourceStubber trait tests thanks to @kukulich
- ๐ 350: Implement
ReflectionClass#getExtensionName()
thanks to @kukulich - ๐ 351: ReflectionClass::implementsInterface() stopped working thanks to @TomasVotruba
- ๐ 352: Cleanup: generic type/static analysis fixes thanks to @Ocramius
- ๐ 353: #351 verify stub implemented interfaces and extended classes thanks to @Ocramius
- ๐ 354: Implemented ReflectionMethod::getClosure() thanks to @kukulich
- ๐ 355: Implemented ReflectionMethod::invoke(), invokeArgs() and setAccessible() thanks to @kukulich
- ๐ 356: Replacing internal
assertObject
return type withobject
, removing therefore the implicit upcast thanks to @Ocramius - ๐ 357: Implemented missing functions in ReflectionFunction thanks to @kukulich
- ๐ 358: Mark
*::createFromNode
methods as@internal
thanks to @asgrim - ๐ 359: #334 bump
phpdocumentor/reflection-docblock
dependency version thanks to @Ocramius - ๐ 360: Mark
*::createFromNode
methods as@internal
to indicate theyโฆ thanks to @marcomenzel - ๐ 361: String casting improvements thanks to @kukulich
- ๐ง 362: AppVeyor configuration tuning thanks to @kukulich
- ๐ 363: Fixed infinite recursion in CompileNodeToValue thanks to @kukulich
- ๐ 364: Not all constants defined with const keyword are detected thanks to @kukulich
- ๐ 366: Fixed detection of all constants and properties defined by one keyword thanks to @kukulich
- ๐ 367: Added
Closure::fromCallable()
to stubs thanks to @kukulich - โ
368: Improved
PhpInternalSourceLocator
test andClosure
stub thanks to @kukulich - ๐ 369: Added
SlevomatCodingStandard.ControlStructures.RequireYodaComparison
thanks to @kukulich - ๐ 370: Added
ReflectionParameter::getAst()
thanks to @kukulich