Sulat.com / Writing on AIThursday, November 26, 2026
Developer Tools/26 November 2026

Pun is a one-binary PHP toolchain that wants to replace Pint, Rector, PHPStan and Composer

Pun, a Rust PHP toolchain from Laravel engineer Pushpak Chhajed, formats, lints, analyses and installs from one binary and one pun.toml. Here is what it does, what it borrows from Mago, the bug list and the peers.

Glossy 3D yellow bolt and black "pun" letters with five glass tool icons converging on glowing lines

At a glance

  • Pun is one Rust binary that formats, lints and analyses PHP 8.3+ projects and installs Composer packages, configured by a single pun.toml. Pushpak Chhajed put it into public beta on 24 November.
  • Pun builds on a couple of crates from the Mago project and mimics Pint, Rector, PHPStan and Composer. The author says 99.9% of the code was AI generated.
  • Seven releases landed between 23 and 25 November UTC, and GitHub showed 31 open issues on 25 November, 17 of them about the analyser. Some lint autofixes were reported to break valid code.
  • Release builds cover macOS and Linux only, and migrate skips custom PHPStan rules. We have not run Pun ourselves; the timings come from Nuno Maduro's demo video.

Pun is a single Rust binary that formats, lints and analyses PHP 8.3+ projects and installs their Composer packages, all driven by one pun.toml. Pushpak Chhajed, a software engineer at Laravel, put it into public beta on 24 November with the line “Try it and break it.” Nuno Maduro, who created Pint and Larastan, called it “bun, but for php” in a video that had 15,253 views when we read it.

We haven’t run Pun. Every timing below is from that video, not from our own test, and the bug counts come from the project’s public GitHub page on 25 November NZ. What follows is what the docs promise, what the code borrows, where it already breaks, and how it sits against the tools it wants to retire.

7

releases between 23 and 25 November UTC, v0.3.0 to v0.4.3

31

open issues on GitHub on 25 November, plus three open pull requests

193

GitHub stars for a repository created on 11 October

0

Windows builds among the v0.4.3 release files: macOS and Linux only

What shipped

PHP projects usually carry a stack: a formatter such as Pint or PHP-CS-Fixer, Rector for automated refactors, PHPStan or Larastan for type checks, and Composer for packages. Each has its own config file and its own runtime, and each starts a PHP process before it reads a line of your code. Pun replaces that stack with one native binary and one config.

Pushpak Chhajed’s beta announcement, 24 November 2026.
Hand-drawn infographic: formatter, Rector, PHPStan, Larastan and Composer arrows pointing into one box labelled pun, one config file pun.toml
Five tools, one binary. Illustration: Sulat. Source: punphp.com docs.

The package is on Packagist as shipfastlabs/pun, MIT licensed, and downloads the native binary on first run. Release files are also published on GitHub. The repository sits in the shipfastlabs organisation, not Laravel’s, and we found no Laravel announcement of it. Pushpak’s own profile says he works at Laravel and maintains Boost, MCP and the AI SDK, which we covered in Laravel MCP can now serve agent skills and our piece on Laravel’s A2A package.

What each command does

The docs list a dozen commands. Four do the main jobs, and pun check runs the first three together. It reports without editing files, exits 0 when clean, 1 on findings and 2 when Pun couldn’t run. pun check --fix applies fixes, and --dirty, --staged and --diff=main limit a run to changed files.

Hand-drawn card listing pun format, lint, analyse and install, each with the tools it replaces, and pun check running three in one pass
One job per command. Illustration: Sulat. Source: punphp.com docs.

The rest of the set is pun init to create a config, pun update, require and remove for packages, pun x to run a Composer package’s command without adding it to the project, and pun self-update. The unified config on the project’s homepage looks like this:

Code
[format]
preset = "laravel"

[lint]
sets = ["dead-code", "modernize"]

[analyse]
preset = "recommended"
paths = ["app", "tests"]
baseline = "pun-baseline.toml"

One detail aimed squarely at AI coding tools: when Claude Code, Cursor or Codex runs Pun, it prints one summary line and then one line per problem, to save tokens. Every docs page also has a Markdown copy and the site publishes an llms.txt.

Moving over from Pint, PHPStan and Rector

pun migrate reads your existing Pint, PHP-CS-Fixer, Rector and PHPStan configs and writes pun.toml. The docs tell you to start from a clean Git tree, because migration can rewrite ignore comments in PHP files, to preview with --dry-run, and to expect unsupported items to be skipped with a warning each.

Hand-drawn diagram: pint.json, phpstan.neon, rector.php and .php-cs-fixer.php feed pun.toml, with skipped items listed underneath
What migrate moves and what it skips. Illustration: Sulat. Source: punphp.com docs and GitHub issues 41 and 55.

The open issues show where the gaps are. Issue 41 reports that migrating from Pint loses notName and lint exclusions while the exit code is still 0. Issue 55 asks for project-specific PHPStan rules, including phpat architecture tests, which migrate can’t carry over. Issue 54 notes that pun lint has no baseline, so checks that migrate moves out of PHPStan have nowhere to record existing violations. A pull request adding a lint baseline (number 67) and another running phpat natively (number 68) were open on 25 November.

How it is built

Pun doesn’t parse PHP from scratch. In the video, Pushpak says it uses “a couple of crates” published by the Mago project, the Rust formatter, linter and analyser for PHP led by Seifeddine Gmati. Nuno said Mago had already done the heavy lifting on understanding PHP syntax, and summed Pun up as the Mago parser plus Rust ports of the behaviour people already know from PHPStan and Composer.

Gmati asked publicly why the Laravel analyser extension bundled in Pun wasn’t published as a regular Mago extension, which would help people already using Mago with Laravel. We asked Gmati for comment on 25 November and he declined. Pushpak replied on 25 November that he wasn’t sure the idea would work when he started, so he patched a few things directly in Mago’s analyser to get Laravel going, and hopes to contribute that back to Mago as an extension. So some Laravel analysis lives in Pun’s copy of Mago code today, and a hand-back to Mago is a stated hope, not a shipped change.

“Bun is coming for PHP”, Nuno Maduro’s interview with Pushpak Chhajed, 24 November 2026.

Asked whether Pun is “AI slop”, Pushpak answered in the video that most of the code was written by AI, that he had tested it on many projects, and that his own contribution is the developer experience. The video’s auto-generated transcript has him putting it at:

99.9% of the code has been AI generated

Pushpak Chhajed, in Nuno Maduro’s video

The repository is consistent with that. It carries a .claude/skills folder and an AGENTS.md file for coding agents. Future plans he named in the same interview were a language server, then possibly an optimised PHP runtime such as a FrankenPHP-style build. He said he hadn’t decided on either.

The speed claims

Nuno’s demo is the only timing evidence we found. He reported pun format finishing in about 0.28 seconds with no cache, and a warm-cache composer update at 3.5 seconds against 2.5 seconds for pun update. He also ran a type check on a deliberately wrong return and said it finished in under a second. These are one presenter’s runs on his own project, not a benchmark, and Composer’s gap is a second, not an order of magnitude. Mago publishes its own benchmark page, and those numbers are Mago’s claims about Mago.

Seven releases, 31 open issues

Packagist and GitHub show the pace. The first beta tag is dated 9 November, v0.2.x and v0.3.0 followed, and v0.3.0 to v0.4.3 came out in about 35 hours from 19:47 UTC on 23 November. Packagist shows v0.3.0 requiring PHP 8.4, and v0.4.3 requiring 8.3. Pushpak says older PHP is a deliberate omission, because matching every PHP-CS-Fixer, Rector and PHPStan rule for older code was too much catching up for a first version. Early releases also list github.com/punphp/pun as the homepage, before the move to shipfastlabs.

Hand-drawn infographic: a calendar with three ticks points to 7 versions from 23 to 25 November, a bug points to 31 open issues on GitHub
Seven releases in three days. Illustration: Sulat. Source: GitHub releases and issues, 25 Nov.
Hand-drawn bar chart of 31 open Pun issues: analyse 17, lint 7, requests 3, format 2, migrate 1, evaluation 1
Open issues by area. Illustration: Sulat. Source: GitHub, 25 Nov, grouped by Sulat from issue titles.

Most of the 31 open issues are analyser gaps: Laravel 13’s #[Table] model attribute, macros registered by vendor service providers, Pest higher-order expectations, and run time that grows with large constant arrays. The ones that matter for trust are the four where an autofix is reported to change behaviour. Issues 32 and 64 say no-useless-cast removes a required cast and causes a TypeError. Issues 34 and 65 say no-always-true-if deletes an if that was needed. Issues 39 and 40 report pun format hanging or failing on valid PHP. These are reports, and we haven’t reproduced any. They do bear out the docs’ own advice to use a clean tree and read the diff after --fix.

How it compares

Pun isn’t the first Rust tool for PHP. Mago got there first as a standalone formatter, linter and analyser, and Pun builds on its crates. The difference is scope: Pun also installs packages and migrates configs, and it targets the Laravel ecosystem’s habits directly.

ToolWritten inJobPun’s counterpart
Pint and PHP-CS-FixerPHPCode stylepun format
RectorPHPAutomated refactorspun lint --fix
PHPStan and LarastanPHPStatic analysis, Laravel-aware with Larastanpun analyse
ComposerPHPDependencies and autoloadingpun install and pun update
MagoRustFormat, lint and analyseSupplies parser crates and analyser code
PunRustAll of the aboveOne binary, one pun.toml
Per the Pun docs and project pages, 25 November 2026 NZ. Rector’s role maps to lint rules, per the docs’ wording that lint works “as Rector, Mago, and PHP-CS-Fixer’s risky fixers do”.

The pitch to a Laravel team is fewer config files and a single CI step. The risk is that the old tools have years of rule coverage and plugins, and Pun’s own issue list shows where it hasn’t caught up: custom rules, baselines and Laravel-specific types.

Limits and what isn’t known

It is a beta, in the author’s own word. The announcement says “the beta is how we find and fix the bugs”, and the version numbers are 0.x.

Platform and PHP coverage is narrow. The v0.4.3 release files cover Apple Silicon and Intel macOS and ARM64 and x64 Linux. There is no Windows build in them. Projects below PHP 8.3 are out.

Parity is unverified. We haven’t compared its output with Pint, PHPStan or Composer on the same codebase, and we found no independent benchmark or review besides Nuno’s video. The claim that format output matches Pint byte for byte is the project’s own.

The AI-generated share is self-reported. We can’t check the 99.9% figure. The tool’s value depends on its test coverage and the speed of fixes, and all 31 open issues were filed on 24 and 25 November, the first two days after the announcement.

How to try it yourself

The project’s homepage gives an install line, curl -fsSL https://punphp.com/install | sh. Read any script before you pipe it to a shell. On a clean Git branch, run pun migrate --dry-run to see what would move, then pun migrate, then pun check. Review git diff after any --fix run. These steps are from the docs; we haven’t run them.


Sources: @pushpak1300 and @azjezz on X; Nuno Maduro’s “Bun is coming for PHP” video and X post (24 November 2026); Pun documentation at punphp.com; GitHub releases, issues and pull requests for shipfastlabs/pun and Packagist, read 25 November 2026 NZ; Mago project site.


Discover more from Sulat AI & Tech News

Subscribe to get the latest posts sent to your email.