github carthage-software/mago 0.0.4
Mago 0.0.4

latest releases: 1.0.0-beta.13, 1.0.0-beta.12, 1.0.0-beta.11...
9 months ago

Fixes

Overview

In this release, we've addressed a critical bug in the formatter that affected the parsing of closure creations in PHP code. Specifically, the formatter was removing parentheses around the left-hand side (lhs) of a closure creation node when it was necessary, leading to parse errors.

Bug Details:

Before the fix:

$a = (function(): void {})(...);

After the formatter incorrectly processed it:

$a = function(): void {}(...);

This removal of parentheses caused the PHP parser to throw an error, disrupting the intended functionality.

What’s Fixed:

  • The formatter now correctly preserves the parentheses around the lhs of closure creation nodes. This ensures that the following code is formatted correctly and parses without errors:
$a = (function(): void {})(...);

What's Next

We continue working diligently towards achieving a stable 1.0.0 release. Stay tuned for more updates, features, and fixes in upcoming versions!

We have skipped the release version 0.0.3 due to a minor issue.

Don't miss a new mago release

NewReleases is sending notifications on new releases.