github carthage-software/mago 0.20.1
Mago 0.20.1

latest releases: 1.0.0-beta.14, 1.0.0-beta.13, 1.0.0-beta.12...
6 months ago

Mago 0.20.1

We are releasing 0.20.1 to address a critical bug in the formatter related to heredoc and nowdoc string handling.

Bug Fixes

  • Formatter:
    • Fixed an issue where the formatter was incorrectly removing leading whitespace within heredoc/nowdoc strings when expressions preceded the literal content.
    • Previously, when a heredoc/nowdoc contained an expression followed by a literal part, the formatter would incorrectly strip leading whitespace from the literal, altering the intended string content.
    • For example:
      $a = <<<FOO
      {$bar}            Hello
      FOO;
      would incorrectly become:
      $a = <<<FOO
      {$bar}Hello
      FOO;
    • This release corrects this behavior, ensuring that leading whitespace is preserved in literal parts of heredoc/nowdoc strings, as long as they are preceded by content other than a newline.

We recommend all users update to v0.20.1 to ensure correct formatting of heredoc and nowdoc strings.


Full Changelog: 0.20.0...0.20.1

Don't miss a new mago release

NewReleases is sending notifications on new releases.