Mago 1.0.0-beta.6
This release focuses on improving the stability of the linter and introducing a new rule for modern MVC frameworks.
🚀 New Linter Rule
final-controller
: A new rule has been added to theBestPractices
category. This rule enforces that controller classes (e.g.,UserController
) are declared asfinal
. In modern frameworks, controllers should not be extended; this rule helps enforce the best practice of favoring composition over inheritance. This rule is automatically enabled when using theLaravel
,Symfony
,CakePHP
,Yii
,Spiral
, orTempest
integrations.
🐛 Bug Fixes
- Fixed a critical panic in the docblock parser that would occur when linting files with Windows-style (CRLF) line endings, especially when comments contained multi-byte characters. Mago will now correctly process files regardless of their line-ending format.
Internal Improvements
We've made significant internal improvements to how the linter handles rule requirements. While these changes won't be visible to most users, they lay the groundwork for us to add more powerful and context-aware rules in the future. The only user-facing change from this work is the new final-controller
rule.
Full Changelog: 1.0.0-beta.5...1.0.0-beta.6