All Versions
56
Latest Version
Avg Release Cycle
43 days
Latest Release
26 days ago

Changelog History
Page 1

  • v4.13.0 Changes

    September 20, 2021

    โž• Added

    • ๐Ÿ‘ [PHP 8.1] Added support for intersection types using a new IntersectionType node. Additionally a ComplexType parent class for NullableType, UnionType and IntersectionType has been added.
    • ๐Ÿ‘ [PHP 8.1] Added support for explicit octal literals.
    • ๐Ÿ‘ [PHP 8.1] Added support for first-class callables. These are represented using a call whose first argument is a VariadicPlaceholder. The representation is intended to be forward-compatible with partial function application, just like the PHP feature itself. Call nodes now extend from Expr\CallLike, which provides an isFirstClassCallable() method to determine whether a placeholder id present. getArgs() can be used to assert that the call is not a first-class callable and returns Arg[] rather than array<Arg|VariadicPlaceholder>.

    ๐Ÿ›  Fixed

    • Multiple modifiers for promoted properties are now accepted. In particular this allows something like public readonly for promoted properties.
    • ๐Ÿ–จ Formatting-preserving pretty printing for comments in array literals has been fixed.
  • v4.12.0 Changes

    July 21, 2021

    โž• Added

    • ๐Ÿ‘ [PHP 8.1] Added support for readonly properties (through a new MODIFIER_READONLY).
    • ๐Ÿ‘ [PHP 8.1] Added support for final class constants.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed compatibility with PHP 8.1. & tokens are now canonicalized to the T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG and T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG tokens used in PHP 8.1. This happens unconditionally, regardless of whether the emulative lexer is used.
  • v4.11.0 Changes

    July 03, 2021

    โž• Added

    • ๐Ÿ— BuilderFactory::args() now accepts named arguments.
    • ๐Ÿ— BuilderFactory::attribute() has been added.
    • An addAttribute() method accepting an Attribute or AttributeGroup has been adde to all builders that accept attributes, such as Builder\Class_.

    ๐Ÿ›  Fixed

    • NameResolver now handles enums.
    • ๐Ÿ–จ PrettyPrinter now prints backing enum type.
    • ๐Ÿ— Builder methods for types now property handle never type.
  • v4.10.5 Changes

    May 03, 2021

    โž• Added

    • ๐Ÿ‘ [PHP 8.1] Added support for enums. These are represented using the Stmt\Enum_ and Stmt\EnumCase nodes.
    • ๐Ÿ‘ [PHP 8.1] Added support for never type. This type will now be returned as an Identifier rather than Name.
    • โž• Added ClassConst builder.

    ๐Ÿ”„ Changed

    • Non-UTF-8 code units in strings will now be hex-encoded.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed precedence of arrow functions.
  • v4.10.4 Changes

    December 20, 2020

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed position information for variable-variables (#741).
    • ๐Ÿ›  Fixed position information for traits/interfaces preceded by if statement (#738).
  • v4.10.3 Changes

    December 03, 2020

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed formatting-preserving pretty printing for "{$x}".
    • ๐Ÿ–จ Ternary expressions are now treated as non-associative in the pretty printer, in order to generate code that is compatible with the parentheses requirement introduced in PHP 8.
    • Removed no longer necessary error_clear_last() call in lexer, which may interfere with fatal error handlers if invoked during shutdown.
  • v4.10.2 Changes

    September 26, 2020

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed check for token emulation conflicts with other libraries.
  • v4.10.1 Changes

    September 23, 2020

    โž• Added

    • โž• Added support for recovering from a missing semicolon after a property or class constant declaration.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fix spurious whitespace in formatting-preserving pretty printer when both removing and adding elements at the start of a list.
    • ๐Ÿ›  Fix incorrect case-sensitivity in keyword token emulation.
  • v4.10.0 Changes

    September 19, 2020

    โž• Added

    • ๐Ÿ‘ [PHP 8.0] Added support for attributes. These are represented using a new AttributeGroup node containing Attribute nodes. A new attrGroups subnode is available on all node types that support attributes, i.e. Stmt\Class_, Stmt\Trait_, Stmt\Interface_, Stmt\Function_, Stmt\ClassMethod, Stmt\ClassConst, Stmt\Property, Expr\Closure, Expr\ArrowFunction and Param.
    • ๐Ÿ‘ [PHP 8.0] Added support for nullsafe properties inside interpolated strings, in line with an upstream change.

    ๐Ÿ›  Fixed

    • ๐Ÿ‘Œ Improved compatibility with other libraries that use forward compatibility defines for PHP tokens.
  • v4.9.1 Changes

    August 30, 2020

    โž• Added

    • โž• Added support for removing the first element of a list to the formatting-preserving pretty printer.

    ๐Ÿ›  Fixed

    • ๐Ÿ‘ Allow member modifiers as part of namespaced names. These were missed when support for other keywords was added.