carthage-software/mago
Composer 安装命令:
composer require --dev carthage-software/mago
包简介
Mago is a toolchain for PHP that aims to provide a set of tools to help developers write better code.
关键字:
README 文档
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
- Getting Started
- Features
- Our Sponsors
- Contributing
- Inspiration & Acknowledgements
- License
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://carthage.software/mago.sh | bash
To install a specific version:
curl --proto '=https' --tlsv1.2 -sSf https://carthage.software/mago.sh | bash -s -- --version=1.43.0
For all other installation methods, including Homebrew, Composer, and Cargo, please refer to our official Installation Guide.
Getting Started
To get started with Mago and learn how to configure your project, please visit our Getting Started Guide in the official documentation.
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.
- 🌳 AST Visualization: Explore your code’s structure with Abstract Syntax Tree (AST) parsing.
Our Sponsors
Contributing
Mago is a community-driven project, and we welcome contributions! Whether you're reporting bugs, suggesting features, writing documentation, or submitting code, your help is valued.
- See our Contributing Guide to get started.
- Join the discussion on Discord.
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)
carthage-software/mago 适用场景与选型建议
carthage-software/mago 是一款 基于 Rust 开发的 Composer 扩展包,目前已累计 1.24M 次下载、GitHub Stars 达 3.3k, 最近一次更新时间为 2025 年 01 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「dev」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 carthage-software/mago 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 carthage-software/mago 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 carthage-software/mago 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Monolog bridge for PHP Debugbar
Simple and fast methods to read private properties and call private methods
Analysis module for finding problematical shop data.
Analysis module for finding problematical shop data.
Enforce architecture by defining modules with allowed dependencies. Detects forbidden, uncovered, missing and unused module dependencies in PHP projects.
Analysis module for finding problematical shop data.
统计信息
- 总下载量: 1.24M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3299
- 点击次数: 26
- 依赖项目数: 195
- 推荐数: 2
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-24