Mago 1.0.0-beta.22
Mago 1.0.0-beta.22
is a quality-of-life release focused on improving the analysis of common PHP patterns, especially in template files, and making the command-line interface more intuitive and powerful.
📄 Improved PHP Template Analysis
This release resolves two key issues that significantly improve the experience of analyzing files that mix PHP and HTML.
- Echo Tag (
<?=
) Usage: Variables and expressions used inside short echo tags (<?= $var ?>
) are now correctly recognized as "used," eliminating a common source ofunused-statement
false positives. (#479) @var
Before Closing Tag:@var
docblocks placed immediately before a PHP closing tag (?>
) are now correctly processed. This makes it much easier to properly type-hint variables that are available to the template scope. (#445)
✨ CLI & Linter Improvements
- New
--colors
Flag: The old--no-color
flag has been deprecated in favor of a more flexible--colors=[auto|always|never]
option. This aligns with modern CLI tool conventions and allows you to force colorized output in CI environments with--colors=always
. (#481) - Smarter Baseline Flags: Action flags like
--generate-baseline
and--verify-baseline
now automatically use thebaseline
path from yourmago.toml
file. You no longer need to specify--baseline <path>
on the command line every time. (#480) no-noop
Rule Fix & Auto-Fix: Theno-noop
rule has been corrected to avoid false positives on intentional empty statements (e.g.,if(...);
). Additionally, it now has a safe auto-fix to remove truly redundant semicolons when you runmago lint --fix
.
Closed Issues
Full Changelog: 1.0.0-beta.21...1.0.0-beta.22