Releases: Roave/BetterReflection
Releases · Roave/BetterReflection
1.2.0
This release introduces two new source locator classes, which are very helpful if you analyze directory trees that are not controlled by your autoloader:
BetterReflection\SourceLocator\Type\FileIteratorSourceLocator
, which, given
an iterator of.php
files, will be able to find classes, functions, and so
on in that set.BetterReflection\SourceLocator\Type\DirectoriesSourceLocator
, which, given
a set of directories, will allow reflecting.php
files in those directories.
Total issues resolved: 1
1.1.0
Summary of new features:
- Ability to modify function, method and class structure (basic monkey patching)
- Ability to replace the body of a function or method
- Updated documentation
- PHP 7 compatibility
- Some PHP 7.1 compatibility (more features will come in a future version!)
- Implemented ::class constant resolution
FindReflectionOnLine
helper (look up code unit by filename and line number)- Various other improvements and bugfixes
Total issues resolved: 39
- 35: Investigate PHP 7 compatibility
- 134: Add methods to modify reflections
- 141: Method body replacement
- 155: Write .phpt test suite
- 161: Review & improve documentation
- 162: Ability to add/remove type declarations and return type declarations
- 164: Support parameter type and return type declarations in PHP 7
- 165: Fix coding standards with fix-cs.sh script
- 168: Implemented ::class constant resolution
- 171: Update dependencies
- 174: Correct use statements in documentation
- 175: Drastically improved quality of library
- 176: PHP 7 types support
- 177: Docs and phpdoc fixes for PHP 7 types
- 178: Look up code unit by filename and line number
- 180: Set/remove PHP 7 types
- 181: Added FindReflectionOnLine helper utility
- 183: Fixed broken monkey patching example
- 184: Add demo tests to Travis build
- 185: Use prefer-dist in travis now (see composer/composer#4884)
- 187: ReflectionClass modifications
- 188: New phpt suite
- 189: Call to a member function isInterface() on null
- 190: ReflectionClass expected, null given
- 191: Call to a member function getInterfacesHierarchy() on null
- 192: Need to report which files are unparseable.
- 193: Throw exceptions when ClassReflector cannot locate identifiers
- 194: Rethrow any exception encountered whilst finding reflections
- 195: Any way to get fully qualified class names in AST
- 196: Added addParameter and removeParameter methods
- 197: Added ReflectionProperty::setVisibility method
- 198: Add ReflectionFunctionAbstract->getReturnStatementAst()
- 199: Fix unit test broken by PhpParser 2.1.0 change
- 203: Review PHP 7.1 feature: void return type
- 206: Added ReflectionFunctionAbstract::getReturnStatementsAst() method
- 207: Updates to documentation from BR presentation at DPC
- 208: Replaced fabpot/php-cs-fixer with friendsofphp/php-cs-fixer
- 209: Added test for
void
return type for PHP 7.1 - 210: Fixed docblock for AbstractSourceLocator
1.0.1
Total issues resolved: 1
1.0.0
Total issues resolved: 19
- 37: Add ability to create a ReflectionFunction from a closure
- 61: Reflection* classes should be uncloneable
- 87: Cannot determine default value for internal classes
- 101: #87 Loads of stubs
- 109: Variadic arguments are always optional
- 114: Implement [g|s\etStaticPropertyValue in ReflectionClass
- 130: Fetch AST or Code for a method/function
- 133: Allow exporting a reflection to PHP
- 135: Add returning AST methods
- 145: Ability to create non-class/function reflections by Name
- 147: Added demo folder
- 149: Use branch-alias instead of dev-master
- 150: Make reflections uncloneable
- 151: Reflect from Closures
- 153: Added functions for static initialisation
- 156: Removed var_dump to avoid spinning tests
- 157: Make sure variadic arguments are always optional
- 158: Run against lowest dependencies as well
- 160: Updated require versions ready for 1.0.0 release
0.1.0
Total issues resolved: 107
- 3: Refactored entire Reflector to be more flexible
- 4: Replace getClassesFromFile with a better API for getAllClasses
- 5: Resolve imported classes for phpdoc blocks
- 6: Move to use BetterReflection namespace
- 7: Need to become "mostly" compatible with PHP's Reflection API
- 8: Support "required" type enforcement on parameters
- 9: Compatibility for ReflectionParameter
- 10: Discover return types from DocBlocks
- 11: Added short messages that explain why some functionality will not be available
- 12: Add core reflection .phpt tests to ensure compatibility
- 13: Support ReflectionParameter->getClass()
- 16: Implement ReflectionObject
- 17: All BetterReflection reflection classes should implement \Reflector
- 18: Extend core \ReflectionClass etc.
- 19: CompileNodeToValue does not evaluate the value of constant expressions
- 23: Added some more documentation
- 24: Improve the unit test suite further
- 25: Reorganised tests and added @covers annotations
- 27: Fixed the DeclaringClass being null when finding types
- 28: Refactored TypesFinder static methods into invokable classes
- 29: Create context in FindParameterType type finder
- 30: Create context in FindTypeFromAst type finder
- 31: Context should be required parameter in ResolveTypes type finder
- 32: Improve coverage #24
- 33: ResolveTypes invokable now requires Context always
- 34: Implement lazy/runtime reflection
- 36: Implement "autoloading" source locator
- 40: Compatibility for ReflectionFunctionAbstract and ReflectionFunction
- 41: Add AutoloadSourceLocator enabling ReflectionClass and ReflectionFunction instantiation
- 42: [WIP\ Added core reflection tests
- 43: StringSourceLocator doesn't "locate" source, but returns a LocatedSource object
- 44: Use LocatedSource better
- 45: Context for FindParameterType
- 46: Context for FindTypeFromAst
- 47: FindPropertyType could fail when using StringSourceLocator
- 48: Ability to reflect globally declared constants
- 49: Added scrutinizer configs and some cheeky refactoring
- 51: CompileNodeToValue: compile array correctly
- 52: Fix resolution of imported namespaces within docblocks in params and properties
- 54: LocatedSource should check file exists / is file
- 55: Updating documentation a lot
- 56: Adds compatibility for ReflectionProperty
- 57: Implement Method->getPrototype() fully
- 58: Pretty much compatible ReflectionMethod
- 59: Compatibility for ReflectionClass
- 60: Update CS rules
- 107:
ReflectionClass#getMethods()
returns methods defined in the current source only (and not all scope visible/inherited methods) - 108:
ReflectionFunctionAbstract#$node
type is too generic - 110: Make ReflectionFunctionABstract#populateFunctionAbstract only accept specific nodes
- 111: Test failing (PHP7): testPopulateFunctionAbstractThrowsExceptionWithInvalidNode
- 112: Resolve TypeError in testPopulateFunctionAbstractThrowsExceptionWithInvalidNode
- 113: ReflectionClass#getMethods inheritance correction
- 115: Hotfix - evaled source locator should load only evaled classes
- 116: Hotfix - autoload source locator should also consider traits and interfaces
- 117: Hotfix - autoload source locator should ignore non existing files
- 118: Hotfix - generic reflector should not care about locator implementation
- 119:
PhpInternalSourceLocator
andEvaledCodeSourceLocator
can only stub classes - 120: Hotfix - #119 - workaround for stubbing internal and evaluated sources
- 123: SourceLocators should return definitely located source, not potentially located source
- 124: Add DefaultSourceLocator
- 125: Add the package license for composer
- 126: Delete composer.lock
- 128: added getImmediateMethods
- 129: added identifier accessor for IdentifierNotFoundException
- 132: Inconsistent capitalisation of method names in getDocBlock*
- 136: Internal refactoring of source locators
- 137: Be consistent with capitalisation of DocBlock
- 138: Digitalkaoz feature/immediate methods
- 139: More PHPT tests
- 143: Added autoload-dev.