Releases: xp-framework/core
Releases · xp-framework/core
10.5.0: PHP 8 support
Features
- Added support for PHP 8.0, see issue #211:
- Support PHP 8 attributes in all PHP 7 versions if written without
line breaks, adding specialevalkey to support non-static scalar
expressions. - Add support for union types for return and parameter types
- Add forward- and backward compatible handling for various type-
checking related changes - Verified support with PHP 8.0.0 on Windows and Linux
(@thekid)
- Support PHP 8 attributes in all PHP 7 versions if written without
Bugfixes
- Fixed
util.Randomclass to useopenssl_random_pseudo_bytes()
insteaduniqid()for creating an IV.
(@thekid)
10.4.0: Field, method parameter and return types consistency
Features
- Added
lang.reflect.Field::getTypeRestriction()which is consistent
with the API exposed by method parameter and return types. This adds
support for PHP 7.4 property types.
(@thekid) - Made field, method parameter and return types consistent in that they
check for native type syntax before checking meta information except
for when that may yield a more specific type
(@thekid) - Added new method
lang.Type::resolve()to correctly resolve types in
a given context. Adds support forarray<self>and others for return
and parameter types, see PR #252
(@thekid)
10.3.3: Return types fix
10.3.2: Union types fix
10.3.1: Strcspn fix
10.3.0: PHP 8 parameter attributes
- Added support for PHP 8 parameter attributes - @thekid
10.2.0: PHP 8 attribute support
RFCs
- Merged PRs #246 and #247, rewriting the code base to PHP 8 attributes
(@thekid) - Implemented first step of xp-framwwork/rfc#336 by converting PHP 8
attributes into XP annotations:#[Test(true)]will beinterpreted the
same as#[@test(true)]. This way, converting libraries over to the
new syntax can start now. Implementation details in pull request #245.
Features
- Merged PR #225: Overload
newinstanceto accept closures for single-
method interfaces (like lang.Runnable, for instance).
(@thekid) - Added support for
mixedtype, see https://wiki.php.net/rfc/mixed_type_v2
(@thekid)
Bugfixes
- Fixed grouped imports when used inside generics in PHP 8.0 - @thekid
- Add handling for
T_NAME_FULLY_QUALIFIEDandT_NAME_QUALIFIEDtokens
introduced in PHP 8 by https://wiki.php.net/rfc/namespaced_names_as_token
(@thekid)
10.1.0: Return type performance
Features
- Improved performance of type lookups for parameters and return types;
only looking at the API docs if either no type syntax is used or for
array types (e.g.array=>string[])
(@thekid) - Added
lang.reflect.Routine::getReturnTypeRestriction()to be consistent
with parameters.
(@thekid)
Bugfixes
- Fixed imports not being resolved inside annotations with functions and
closures as values.
(@thekid) - Merged PR #242: Use ReflectionType API instead of deprecated isArray and
isCallable on parameters - for PHP 8 compatibility (see php/php-src#5209).
(@thekid)
10.0.5: PHP 7.4 property types
Bugfixes
- Fixed issue #241: Support PHP 7.4 property types (e.g.
private int $id)
See https://wiki.php.net/rfc/typed_properties_v2
(@thekid)
10.0.4: PHP 8 union types
Bugfixes
- Fixed issue #240: Add support for PHP 8 union types (e.g.
string|int)
See https://wiki.php.net/rfc/union_types_v2
(@thekid)