github carthage-software/mago 1.0.0-beta.14
Mago 1.0.0-beta.14

4 hours ago

Mago 1.0.0-beta.14

This release introduces a new linter rule to promote best practices and improves the formatter's handling of yield expressions.

✨ New Linter Rule: no-ini-set

A new rule, best-practices/no-ini-set, has been added to discourage the use of ini_set() and its alias ini_alter().

Changing PHP settings at runtime can make application behavior unpredictable and mask server misconfigurations. This rule encourages managing configuration explicitly through php.ini or framework-level settings for more stable and consistent applications.

Contributed by @Bleksak in #422.

💅 Formatter Fix

The formatter now correctly handles line breaks in yield key => value expressions. Previously, long values like closures could create unreadably long lines. Now, the formatter will break the line after the => and indent the value if necessary.

Before:

yield ['some_key'] => /**
 * comment
 */
static function () { /* ... */ };

After:

yield ['some_key'] =>
    /**
     * comment
     */
    static function () { /* ... */ };

Full Changelog: 1.0.0-beta.13...1.0.0-beta.14

Don't miss a new mago release

NewReleases is sending notifications on new releases.