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 unuseduse
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 ofprotected
for members infinal
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!)
- A new rule suggests using
🚀 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
- @yigitcukuren made their first contribution in #509
- @rachidify made their first contribution in #439
- @thorsten made their first contribution in #518
- @dotdash made their first contribution in #522
Closed Issues
Full Changelog: 1.0.0-beta.26...1.0.0-beta.27