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

15 hours ago

Mago 1.0.0-beta.27

This release is packed with community contributions, featuring powerful new linter rules, major analyzer correctness fixes, and expanded support for the PHP ecosystem.

We're thrilled to welcome several new contributors to the project! A huge thank you to @yigitcukuren, @rachidify, @thorsten, @dotdash, and @bendavies for their fantastic work on this release!

✨ New Linter Features (Community-Driven!)

The linter has received a huge upgrade, thanks to our community.

  • New Rule: no-redundant-use (#439): The highly-requested rule for detecting and removing unused use statements is here! It correctly handles symbols used in docblocks and comes with a powerful auto-fix. (Thanks, @rachidify!)

  • New Suggestions & Fixes for final & readonly (#530, #522, #529):

    • A new rule suggests using private instead of protected for members in final classes.
    • The linter can now detect and flag redundant readonly modifiers (no-redundant-readonly rule).
    • An auto-fix has been added for the no-redundant-final rule.
      (Thanks, @dotdash!)

🚀 Analyzer Improvements

  • Magic Constant Inference (#521): The analyzer now infers the exact literal value of magic constants like __DIR__, __FILE__, and __LINE__, leading to more precise path analysis.
  • Array Shape Correctness (#528, #523): The logic for comparing array shapes has been overhauled to be much stricter and more correct. This includes always reporting access to optional array keys, regardless of other settings.
  • Trait Visibility (#520): Fixed a critical bug where visibility changes on aliased trait methods (e.g., use Trait { method as private newName; }) were not being respected.
  • @method Parameter Casing (#507): The analyzer now correctly handles case-sensitivity for named arguments in magic methods defined with @method tags.

🐘 PHP Ecosystem Support

  • GD Extension (#509): Stubs for the GD graphics extension have been added. (Thanks, @yigitcukuren!)
  • phpMyFAQ (#518): We're excited to welcome phpMyFAQ to the list of projects using the tool! (Thanks, @thorsten!)

🤝 New Contributors

Closed Issues


Full Changelog: 1.0.0-beta.26...1.0.0-beta.27

Don't miss a new mago release

NewReleases is sending notifications on new releases.