Skip to content

Mago 0.5.0

Compare
Choose a tag to compare
@github-actions github-actions released this 27 Jan 22:42
· 250 commits to main since this release
89c29c6

🚀 New Features

Enhanced Linting Targets

Run linting on specific files/directories or file descriptors:

# Lint single file
mago lint example.php

# Lint multiple files/directories
mago lint src/ tests/ example.php

# Lint via process substitution (Unix-like systems)
mago lint <(echo '<?php while(true) { break; }')

Type Checking Flexibility

Added ignore_closure_types option to skip parameter/return type checks for:

  • Arrow functions
  • Closures

For more information, use mago lint --explain strictness/require-parameter-type and mago lint --explain strictness/require-return-type

🐞 Bug Fixes

Critical Rule Fixes:

  • Fixed best-practices/loop-does-not-iterate to detect loops with unconditional continue (Resolves #55)
  • Fixed filtering behavior when using MAGO_LOG environment variable

Compatibility Improvements:

  • Made Composer plugin fully compatible with PHP 8.1 environments

🔧 Improvements

Diagnostics & Logging:

  • Revamped logging messages for clearer debugging sessions

⚙️ Internal Changes

  • Updated default Composer configuration templates
  • Optimized rule initialization sequence

What's Changed

  • Make composer plugin compatible with PHP 8.1 by @veewee in #56

Full Changelog: 0.4.1...0.5.0