Crates.io | mago |
lib.rs | mago |
version | |
source | src |
created_at | 2024-12-07 14:53:11.636659 |
updated_at | 2024-12-10 23:59:05.031823 |
description | A comprehensive suite of PHP tooling inspired by Rust’s approach, providing parsing, linting, formatting, and more through a unified CLI and library interface. |
homepage | https://github.com/carthage-software/mago |
repository | https://github.com/carthage-software/mago |
max_upload_size | |
id | 1475650 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Mago (derived from Mago (Punic: 𐤌𐤂𐤍, MGN), a renowned Carthaginian figure) is a toolchain for PHP that aims to provide a set of tools to help developers write better code. Mago draws inspiration from the Rust programming language and its ecosystem, striving to bring similar convenience, reliability, and a great developer experience to the PHP world.
Note: This project was previously named “Fennec” before being rebranded due to a naming conflict.
[!WARNING] Mago is in an early stage of development. Many features are not yet implemented, and existing functionality may change, break, or stop working without notice. While we are not actively promoting or advertising the project, we are working in public to share our progress with the community.
crates/interner
crates/lexer
crates/token
crates/ast
crates/parser
crates/source
crates/traverser
crates/walker
crates/names
crates/fixer
crates/reporting
crates/semantics
crates/symbol-table
crates/linter
crates/service
crates/casing
crates/reflection
crates/reflector
, crates/scanner
crates/typing
crates/formatter
crates/docblock
crates/cli
crates/wasm
You can find precompiled binaries for various platforms on our Releases page.
Simply download the archive for your platform, extract it, and place the mago binary somewhere in your PATH
.
If you have Rust installed, you can install Mago using Cargo:
cargo install mago
To install Mago from source, you can clone the repository and build the project using Cargo:
git clone https://github.com/carthage-software/mago
cd mago
cargo install --path .
For a quick start, you can refer to the example configuration files provided:
examples/mago.toml
examples/mago-full.toml
You can try Mago by navigating to the examples
directory and running the linter on the sample PHP files:
cd examples
mago lint
mago fmt
This will analyze the PHP files located in the examples/src/
directory and display any linting errors.
Mago is a community-driven project, and we’d love for you to join us! Here are some ways you can contribute:
Mago is inspired by several tools and projects that have significantly contributed to the development community:
These tools have inspired us and helped shape Mago's design and functionality.
We would like to acknowledge the following PHP tools that have greatly helped hundreds of thousands of PHP developers in their journey, ourselves included:
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.
Mago is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Mago by you shall be dual licensed as above, without any additional terms or conditions.
Thank you for your interest in Mago. We look forward to sharing our progress and collaborating with the community as the project evolves.