PHP Parser v5.7.0 Release Notes

Release Date: 2025-12-06 // 6 months ago
  • 🛠 Fixed

    • 🛠 Fixed changing modifier on anonymous class with formatting preserving pretty printer.
    • 🖨 Emit an error for unparenthesized arrow functions in pipe operator, and print necessary parentheses in the pretty printer.
    • 🛠 Fix PHP 8.5 deprecation warning in php-parse binary.

    🔄 Changed

    • When targeting PHP 8.4 or newer, omit parentheses around immediately dereferenced new expressions.

    ➕ Added

    • ➕ Added shouldPrintRawValue attribute to Scalar\Int_, which makes the pretty printer use the rawValue of the node. This can be used to print integers with separators.

Previous changes from v5.6.2

  • 🛠 Fixed

    • 🛠 Fixed formatting-preserving pretty-printing when changing the visibility modifier on a node that has attributes.
    • 🛠 Fixed chr() deprecation warning on PHP 8.5.

    ➕ Added

    • ➕ Added Param::isFinal() method.