Skip to content

Mago 0.20.1

Compare
Choose a tag to compare
@github-actions github-actions released this 14 Mar 12:23
· 46 commits to main since this release
acd8a77

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