Mago 0.20.1
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:
would incorrectly become:
$a = <<<FOO {$bar} Hello FOO;
$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