punphp / pun
Pun formats, lints, and analyses PHP 8.4+ projects in one Rust binary. Downloads the native binary on first run.
Requires
- php: >=8.4
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-11-16 19:34:44 UTC
README
Introduction
Pun is an ultrafast, unified toolchain for PHP 8.4+ projects. One native binary formats, lints and analyses your code and installs your Composer packages from composer.json and composer.lock, with its own settings in a single pun.toml. It formats code byte for byte like Laravel Pint, and pun migrate converts your existing Pint, PHP-CS-Fixer, Rector and PHPStan configs.
Install the binary for Linux or macOS (x86_64 or arm64):
curl -fsSL https://pun.laravel.cloud/install | sh
Or add it to a project with Composer:
composer require --dev punphp/pun
vendor/bin/pun migrate # or: vendor/bin/pun init
vendor/bin/pun check --fix
Official Documentation
Documentation for Pun can be found on the Pun website.
Contributing
Thank you for considering contributing to Pun! Read AGENTS.md for how to build Pun (Rust 1.99 or later), the checks to run, and the upstream tools it is tested against. If Pun is missing a rule you rely on, please open an issue or send a pull request.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
Pun would not be possible without Mago, PHP-CS-Fixer, Laravel Pint, PHPStan, Larastan, Rector and Composer. Pun uses Mago's parser and analysis libraries directly and ports behaviour, rules and test fixtures from these projects. Thank you to everyone behind them.
License
Pun is open-sourced software licensed under the MIT license. The licences of ported code are in licenses/THIRD_PARTY_NOTICES.md, and those of the bundled Rust crates in licenses/THIRD_PARTY_LICENSES.md.
