Skip to content

Releases: carthage-software/mago

Mago 0.0.13

21 Dec 02:25
b9aa4b7
Compare
Choose a tag to compare

Enhancements

  • Internal Refactoring

    • Various internal improvements to streamline performance and maintainability.
  • New Command: mago self-update

    • Easily update Mago to the latest version or check for updates without manual intervention.

Chores

  • Crates Removed

    • mago_cli and mago_services are no longer available.
  • Build Process Fixes

    • Resolved build issues across multiple targets, ensuring broader compatibility.

New Feature: One-Line Installation

Quickly install or update Mago with a simple script for macOS or Linux.

Installation Command

curl --proto '=https' --tlsv1.2 -sSf https://carthage.software/mago.sh | bash
# or
wget -qO- https://carthage.software/mago.sh | bash

Full Changelog: 0.0.12...0.0.13

Mago 0.0.12

19 Dec 21:24
8ce888d
Compare
Choose a tag to compare

Enhancements

  • Linter Rules:
    • no-unsafe-finally

      • What it does: Prevents the use of return, throw, break, and continue within finally blocks in try statements.
      • Why it matters: Ensures code predictability and avoids unintended control flow behavior when finally executes.
    • no-multi-assignments

      • What it does: Disallows chained assignments like $a = $b = $c.
      • Why it matters: Improves code clarity and reduces the risk of bugs caused by unintended assignments.

Chores

  • Refactor ast-utils crate:
    • Details: Comprehensive refactor of the ast-utils crate.
    • Impact: This change introduces breaking changes (BC breaks), so ensure to review and adapt your projects accordingly when updating.

Expanded Build Target Support

We now support a broader range of targets in our build process, ensuring compatibility across diverse systems. Below is the updated list of supported targets:

Windows

  • MinGW
    • x86_64-pc-windows-gnu
  • MSVC
    - i686-pc-windows-msvc (tested)
    - x86_64-pc-windows-msvc (tested)

macOS

  • aarch64-apple-darwin (tested)
  • x86_64-apple-darwin (tested)

FreeBSD

  • i686-unknown-freebsd
  • x86_64-unknown-freebsd

Linux

  • aarch64-unknown-linux-gnu (tested)
  • arm-unknown-linux-gnueabi
  • arm-unknown-linux-gnueabihf
  • armv7-unknown-linux-gnueabihf
  • arm-unknown-linux-musleabi
  • arm-unknown-linux-musleabihf
  • armv7-unknown-linux-musleabihf
  • i686-unknown-linux-gnu (tested)
  • i686-unknown-linux-musl (tested)
  • powerpc-unknown-linux-gnu
  • powerpc64-unknown-linux-gnu
  • powerpc64le-unknown-linux-gnu
  • s390x-unknown-linux-gnu
  • x86_64-unknown-linux-gnu (tested)
  • x86_64-unknown-linux-musl (tested)

Full Changelog: 0.0.11...0.0.12

Mago 0.0.11

18 Dec 22:33
224b9ed
Compare
Choose a tag to compare

Mago 0.0.10

18 Dec 19:56
fb3819b
Compare
Choose a tag to compare

Mago 0.0.9

15 Dec 15:26
986b587
Compare
Choose a tag to compare

New Features

  • Linter Command:

    --reporting-target:

    Allows specifying the output target for issue reports.

    • Default: stdout
    • Options:
      • stdout: Outputs to standard output.
      • stderr: Outputs to standard error.

    --reporting-format:

    Allows selecting the format for issue reports.

    • Default: rich
    • Options:
      • rich: Detailed output for terminal display.
      • medium: Compact, terminal-friendly format.
      • short: Minimal output, useful for quick overviews.
      • github: Tailored for GitHub Actions annotations.
      • json: Structured JSON output for machine-readable reports.

Full Changelog: 0.0.8...0.0.9

Mago 0.0.8

14 Dec 18:45
9e62819
Compare
Choose a tag to compare

Enhancements

  • Linter:

  • Introduce Laravel Plugin: Adds a new Laravel-specific plugin with an initial rule detecting Request::all() usage and suggesting Request::only(...) instead. Enable it with:

    [linter]
    plugins = ["laravel"]

    Future plans include adding more Laravel-specific rules.

  • Add Combine Consecutive Issets Rule: Transforms isset($a) && isset($b) into the more concise isset($a, $b).

  • Introduce Migration Plugin: Adds two migration rules:

    1. Convert strpos($a, $b) == 0 to str_starts_with($a, $b)
    2. Convert strpos($a, $b) != false to str_contains($a, $b)
      More PHP migration rules are planned for future releases.
  • Add Explicit Octal Notation Rule: Part of the migration plugin, converts old-style octal notation (e.g., 012) to the more explicit 0o12 for improved readability.

  • Add Readonly Class Promotion Rule: Transforms classes with only readonly properties into a readonly class, removing individual readonly modifiers for cleaner code.

  • Introduce Deprecation Plugin: Detects PHP deprecations with two initial rules:

    1. Convert implicitly nullable params string $a = null to explicitly nullable ?string $a = null (deprecated in PHP 8.4)
    2. Identify and suggest renaming class-like nodes named _ (deprecated in PHP 8.4)
  • Add PHP 8.0 and 8.2 Deprecation Rules:

    1. Detect optional parameters before required ones (deprecated in PHP 8.0)
    2. Identify return by reference from void functions/methods/closures (deprecated in PHP 8.2)

Fixes


Full Changelog: 0.0.7...0.0.8

Mago 0.0.7

10 Dec 23:50
12bdea4
Compare
Choose a tag to compare

Enhancements

  • Linter:
    • Added PHPUnit plugin: Introduces basic rules for improving PHPUnit usage. Enable it with:
      [linter]
      plugins = ["phpunit"]

Fixes


Special thanks to @bendavies for testing and reporting several issues!

Full Changelog: 0.0.6...0.0.7

Mago 0.0.6

10 Dec 04:58
976eb6c
Compare
Choose a tag to compare

Enhancements

Fixes


Full Changelog: 0.0.5...0.0.6

Mago 0.0.5

09 Dec 02:11
89bfe68
Compare
Choose a tag to compare

Enhancements

What's Next

We continue to work diligently towards achieving a stable 1.0.0 release. Future updates will include more robust features, enhanced performance, and further refinements based on user feedback.


Feel free to reach out with any feedback or issues you encounter. Your input helps us make Mago better for everyone!


Full Changelog: 0.0.4...0.0.5

Mago 0.0.4

08 Dec 21:27
2278069
Compare
Choose a tag to compare

Fixes

Overview

In this release, we've addressed a critical bug in the formatter that affected the parsing of closure creations in PHP code. Specifically, the formatter was removing parentheses around the left-hand side (lhs) of a closure creation node when it was necessary, leading to parse errors.

Bug Details:

Before the fix:

$a = (function(): void {})(...);

After the formatter incorrectly processed it:

$a = function(): void {}(...);

This removal of parentheses caused the PHP parser to throw an error, disrupting the intended functionality.

What’s Fixed:

  • The formatter now correctly preserves the parentheses around the lhs of closure creation nodes. This ensures that the following code is formatted correctly and parses without errors:
$a = (function(): void {})(...);

What's Next

We continue working diligently towards achieving a stable 1.0.0 release. Stay tuned for more updates, features, and fixes in upcoming versions!

We have skipped the release version 0.0.3 due to a minor issue.