carthage-software / mago
Mago is a toolchain for PHP that aims to provide a set of tools to help developers write better code.
Fund package maintenance!
azjezz
Installs: 65
Dependents: 0
Suggesters: 0
Security: 0
Stars: 265
Watchers: 7
Forks: 11
Open Issues: 6
Language:Rust
Type:composer-plugin
Requires
- php: ~8.1 || ~8.2 || ~8.3 || ~8.4
- composer-plugin-api: ^2.6
Requires (Dev)
- composer/composer: ^2.8
README
Mago is a comprehensive toolchain for PHP that helps developers write better code. Inspired by the Rust ecosystem, Mago brings convenience, reliability, and an exceptional developer experience to PHP projects of all sizes.
Features
- Analyze and Lint: Identify issues in your codebase with customizable rules and plugins.
- Automated Fixes: Apply fixes for lint issues to maintain a clean codebase.
- Consistent Formatting: Standardize your code style with powerful formatting tools.
- Semantic Checks: Ensure code correctness with robust semantic analysis.
- AST Visualization: Explore your code’s structure with abstract syntax tree (AST) parsing.
Get Started
Ready to dive in? Visit the Mago Documentation for everything you need to know, including:
Contributing
Mago is a community-driven project, and we’d love for you to get involved! Whether you're reporting bugs, suggesting features, writing documentation, or submitting code, every contribution makes a difference.
To learn more, see our CONTRIBUTING.md.
Join the discussion, ask questions, and connect with the Mago community on Discord.
Inspiration
Mago is inspired by several tools and projects that have significantly contributed to the development community:
- Clippy: A collection of lints to catch common mistakes and improve your Rust code.
- OXC: A JavaScript toolchain written in Rust.
- php-rust-tools/parser: A PHP parser written in Rust, which influenced our parsing approach.
- slackhq/hakana: A static analysis tool for HackLang written in Rust, by the creator of Psalm.
These tools have inspired us and helped shape Mago's design and functionality.
Acknowledgements
We would like to acknowledge the following PHP tools that have greatly helped hundreds of thousands of PHP developers in their journey, ourselves included:
- PHP CS Fixer: A tool to automatically fix PHP Coding Standards issues.
- Psalm: A static analysis tool for finding errors in PHP applications.
- PHPStan: PHP Static Analysis Tool.
- PHP_CodeSniffer: Detects violations of a defined set of coding standards.
While Mago is intended to be a comprehensive toolchain that may eventually replace some of these tools, we deeply appreciate their contributions and the foundation they have built for the PHP community.
License
Mago is licensed under either of
- MIT License (MIT) - see LICENSE-MIT file for details
- Apache License, Version 2.0 (Apache-2.0) - see LICENSE-APACHE file for details
at your option.
Thank you for your interest in Mago. We look forward to sharing our progress and collaborating with the community as the project evolves.