Mago 1.1.0
This release includes a significant number of new features, bug fixes, and improvements across the formatter, analyzer, linter, and codex.
Note: This release includes a breaking change in the formatter's default behavior for heredoc indentation.
Breaking Changes
Formatter
- Heredoc content is now indented by default. To restore the previous behavior, set
indent-heredoctofalsein your configuration.
Features
Formatter
- Added formatter presets support for quick configuration (
psr-12,per-cs,drupal, etc.) (#839) - Added
following-clause-on-newlineoption to placeelse,catch, andfinallyon a new line (#860) - Added
uppercase-literal-keywordoption for uppercaseTRUE,FALSE,NULLliterals (Drupal style) (#857) - Added
empty-line-before-class-like-closesetting for empty line before closing brace (#855) - Added
newline-after-class-like-opening-bracesetting (#853)
Analyzer
- Added support for
@mixindocblock annotations - Added docblock type mismatch detection for function parameters and return types
Linter
- Added Pest-specific lint rules for better Pest PHP testing framework support
- Added auto-fix for the
explicit-nullable-paramlint (#847)
Guard
- Added mode selection and ability to skip unconfigured guards
Bug Fixes
Formatter
- Fixed kebab-case alias support for settings values
- Fixed indentation in arrays when expression spans multiple lines (#864)
Analyzer
- Fixed method signature validation to compare against direct interface instead of grandparent interface (#871)
- Fixed type assertion propagation through null coalesce expressions (
$x['foo'] ?? null) - Fixed
invalid-extendreporting when a readonly class extends a non-readonly class (#873) - Fixed
staticand$thistype handling and expansion in template contexts - Fixed recursive template constraint inference
- Fixed
array_filtertype narrowing to support first-class callables and string literals - Fixed readonly property reinitialization in
clonefor PHP 8.3+ - Fixed incorrect type narrowing propagation in OR conditions
Codex
- Fixed type alias resolution in member reference expansion (e.g.,
self::TypeAliasin@extends) - Fixed parameter type inheritance when method has partial docblock
- Fixed asymmetric visibility handling for hooked properties
- Fixed native return type metadata population
Orchestrator
- Fixed analysis progress bar to use 4-byte emoji for better terminal compatibility (#866)
Internal
- Improved analyzer onboarding experience in CLI
- Added Pest and Tempest to the
initflow - Added support for
non-empty-mixedtype syntax - Added filename fallback for Tempest view detection in linter
New Contributors
- @Michael4d45 made their first contribution in #839
- @klausi made their first contribution in #853
Full Changelog: 1.0.3...1.1.0