github carthage-software/mago 1.1.0
Mago 1.1.0

8 hours ago

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-heredoc to false in your configuration.

Features

Formatter

  • Added formatter presets support for quick configuration (psr-12, per-cs, drupal, etc.) (#839)
  • Added following-clause-on-newline option to place else, catch, and finally on a new line (#860)
  • Added uppercase-literal-keyword option for uppercase TRUE, FALSE, NULL literals (Drupal style) (#857)
  • Added empty-line-before-class-like-close setting for empty line before closing brace (#855)
  • Added newline-after-class-like-opening-brace setting (#853)

Analyzer

  • Added support for @mixin docblock 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-param lint (#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-extend reporting when a readonly class extends a non-readonly class (#873)
  • Fixed static and $this type handling and expansion in template contexts
  • Fixed recursive template constraint inference
  • Fixed array_filter type narrowing to support first-class callables and string literals
  • Fixed readonly property reinitialization in clone for PHP 8.3+
  • Fixed incorrect type narrowing propagation in OR conditions

Codex

  • Fixed type alias resolution in member reference expansion (e.g., self::TypeAlias in @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 init flow
  • Added support for non-empty-mixed type syntax
  • Added filename fallback for Tempest view detection in linter

New Contributors


Full Changelog: 1.0.3...1.1.0

Don't miss a new mago release

NewReleases is sending notifications on new releases.