heyjordanparker / mago-sharp
PHP#'s checker and toolchain: checks PHP and PHP# code, compiles PHP#, and lints and formats PHP.
Package info
github.com/heyJordanParker/mago-sharp
Language:Rust
pkg:composer/heyjordanparker/mago-sharp
Fund package maintenance!
Requires
- php: ~8.1 || ~8.2 || ~8.3 || ~8.4 || ~8.5 || ~8.6
- revolt/event-loop: ^1.0.9
Requires (Dev)
- phpunit/phpunit: ^10.5
Suggests
- ext-curl: To show binary download progress
Provides
None
Conflicts
None
Replaces
None
- dev-master
- 1.53.0-patch.2
- 1.53.0
- 1.52.0
- 1.51.0
- 0.2.0
- 0.1.0
- dev-fix/lean-library-cache-repair
- dev-feat/sharp-collection-literal-kinds
- dev-fix/sharp-message-leaks-3
- dev-feat/sharp-capitalized-namespaces
- dev-docs/mago-sharp-identity
- dev-fix/self-update-mago-sharp-only
- dev-feat/sharp-capitalized-types
- dev-fix/null-pattern-from-syntax
- dev-feat/slice-lean-proofs
- dev-feat/slice-generics
- dev-fix/sharp-message-leaks-2
- dev-refactor/sharp-call-target-callees
- dev-docs/mago-sharp-install
- dev-fix/sharp-message-leaks
- dev-feat/sharp-import-alias
- dev-fix/sharp-emptied-list
- dev-chore/release-0.2.0
- dev-fix/sharp-message-words
- dev-fix/sharp-key-arguments-receiver
- dev-fix/sharp-operators-review
- dev-feat/slice-lean-laws
- dev-feat/sharp-member-naming
- dev-feat/slice-operators
- dev-feat/slice-effects
- dev-fix/sharp-collection-method-keys
- dev-feat/sharp-token-constants
- dev-refactor/two-byte-node-kinds
- dev-fix/sharp-position-file
- dev-fix/sharp-map-key-type
- dev-feat/syntax-replacements
- dev-fix/sharp-list-index-int
- dev-fix/sdk-protocol-constants
- dev-feat/library-replaces
- dev-feat/type-comparator-reads
- dev-test/sharp-refused-fixtures
- dev-feat/sharp-unsuppressible-errors
- dev-feat/recorded-reads
- dev-fix/colors-never
- dev-feat/standard-library
- dev-test/sharp-engine-refusals
- dev-fix/sharp-string-join
- dev-feat/reporting-format-env
- dev-fix/compile-source-input
- dev-feat/typed-compilation-compile
- dev-fix/is-type-conditional
- dev-fix/cascade-type-hint-references
- dev-feat/slice-lazy-and-types
- dev-feat/typed-compilation-types
- dev-refactor/sharp-unit-abi-bridge-marks
- dev-fix/codex-inference-stack
- dev-feat/sharp-property-override
- dev-fix/nullable-type-arguments
- dev-test/when-guard-bare-name
- dev-feat/typed-compilation-format
- dev-feat/slice-php-forms
- dev-feat/typed-compilation-type-arguments
- dev-chore/release-0.1.0
- dev-fix/when-guard-name
- dev-feat/slice-any
- dev-feat/null-checks
- dev-fix/as-on-mixed
- dev-feat/analysis-daemon
- dev-feat/slice-property-accessors
- dev-feat/slice-pattern-matching
- dev-feat/collection-spread
- dev-feat/collection-enum-keys
- dev-feat/plain-property-override
- dev-feat/collection-keys
- dev-feat/slice-signatures
- dev-refactor/checked-program-parse
- dev-feat/slice-enums
- dev-feat/slice-lambdas
- dev-feat/slice-collections
- dev-refactor/checked-program
- dev-feat/slice-classes
- dev-refactor/generated-sharp-kind
- dev-ci/merge-gate
- dev-feat/slice-interop
- dev-fix/sdk-static-call
- dev-perf/scoped-plugin-hooks
- dev-feat/slice-expressions-2
- dev-fix/ci
- dev-dent
This package is auto-updated.
Last update: 2026-10-09 10:48:23 UTC
README
An extremely fast PHP linter, formatter, and static analyzer, written in Rust.
Mago is a comprehensive toolchain for PHP that helps developers write better code. Inspired by the Rust ecosystem, Mago brings speed, reliability, and an exceptional developer experience to PHP projects of all sizes.
Table of Contents
Installation
The most common way to install Mago on macOS and Linux is by using our shell script:
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/heyJordanParker/mago-sharp/master/scripts/install.sh | bash
To install a specific version:
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/heyJordanParker/mago-sharp/master/scripts/install.sh | bash -s -- --version=0.2.0
For all other installation methods, including Composer, please refer to the Installation Guide.
Getting Started
To get started with Mago and learn how to configure your project, please visit the Getting Started Guide.
Features
- β‘οΈ Extremely Fast: Built in Rust for maximum performance.
- π Lint: Identify issues in your codebase with customizable rules.
- π¬ Static Analysis: Perform deep analysis of your codebase to catch potential type errors and bugs.
- π οΈ Automated Fixes: Apply fixes for many lint issues automatically.
- π Formatting: Automatically format your code to adhere to best practices and style guides.
- π§ Semantic Checks: Ensure code correctness with robust semantic analysis.
- π³ CST Visualization: Explore your codeβs structure with Concrete Syntax Tree (CST) parsing.
Contributing
Contributions are welcome.
- See our Contributing Guide to get started.
Inspiration & Acknowledgements
Mago stands on the shoulders of giants. Our design and functionality are heavily inspired by pioneering tools in both the Rust and PHP ecosystems.
Inspirations:
- Clippy: For its comprehensive linting approach.
- OXC: A major inspiration for building a high-performance toolchain in Rust.
- Hakana: For its deep static analysis capabilities.
Acknowledgements:
We deeply respect the foundational work of tools like PHP-CS-Fixer, Psalm, PHPStan, and PHP_CodeSniffer. While Mago aims to offer a unified and faster alternative, these tools paved the way for modern PHP development.
License
Mago is dual-licensed under your choice of the following:
- MIT License (LICENSE-MIT)
- Apache License, Version 2.0 (LICENSE-APACHE)