Skip to content

Releases: xp-framework/core

10.5.0: PHP 8 support

26 Nov 21:24

Choose a tag to compare

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 special eval key 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)

Bugfixes

  • Fixed util.Random class to use openssl_random_pseudo_bytes()
    instead uniqid() for creating an IV.
    (@thekid)

10.4.0: Field, method parameter and return types consistency

22 Nov 15:32

Choose a tag to compare

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 for array<self> and others for return
    and parameter types, see PR #252
    (@thekid)

10.3.3: Return types fix

22 Nov 12:56

Choose a tag to compare

Bugfixes

  • Fixed static return type being shadowed by self type restriction
    (@thekid)
  • Fixed specific function types being shadowed when a callable type
    restriction is present
    (@thekid)
  • Fixed braced function return types, e.g. @return (function(): int)
    (@thekid)

10.3.2: Union types fix

14 Nov 11:02

Choose a tag to compare

Bugfixes

  • Updated bundled test library - fixing PHP 8 compatibility - @thekid
  • Fixed issue #248: PHP 8 native type union causes error - @thekid
  • Fixed string|int type union not being equal to int|string - @thekid

10.3.1: Strcspn fix

06 Oct 21:15

Choose a tag to compare

  • Fixed strspn(): Argument #3 ($offset) must be contained in argument #1
    ($str))
    warnings, which started appearing in PHP 8.0.0, RC 1.
    (@thekid)

10.3.0: PHP 8 parameter attributes

06 Oct 21:14

Choose a tag to compare

  • Added support for PHP 8 parameter attributes - @thekid

10.2.0: PHP 8 attribute support

23 Sep 21:25

Choose a tag to compare

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

Bugfixes

10.1.0: Return type performance

31 May 15:06

Choose a tag to compare

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

05 Apr 15:15

Choose a tag to compare

Bugfixes

10.0.4: PHP 8 union types

05 Apr 14:08

Choose a tag to compare

Bugfixes