News for hackers. Stuff that matters.
Re:Mago: A fast PHP toolchain written in Rust by cynicalsecurity on Saturday September 13, 2025 @01:19PM (#45233703)
All of this already exists and each separate product is actively developed, keeping up with all of the changes in PHP. This toolset looks too ambitious.
Re:Mago: A fast PHP toolchain written in Rust by lucideer on Saturday September 13, 2025 @01:27PM (#45233769)
Astral did something similar for the Python ecosystem (Rust-inspired tooling built in Rust, replacing a lot of pre-existing - bad - tooling) & the impact has been revolutionary. Python had some of the worst tooling of any popular language & now has some of the best.

Composer is one of the best package managers in any language ecosystem but beyond that, other PHP tooling, while technically well maintained, aren't particularly great at what they do. It's an ideal starting point for positive disruption.

Re:Mago: A fast PHP toolchain written in Rust by SXX on Saturday September 13, 2025 @02:30PM (#45234267)
I really wasn't using Composer for last couple of years. Did it already stopped eating 2GB RAM for any project that use framework like Laravel?

Composer is a good tool, but it's resource usage was abysmal.

Re:Mago: A fast PHP toolchain written in Rust by gocartStatue on Saturday September 13, 2025 @03:14PM (#45234553)
2G of ram at build is not that outrageous, however yes, with composer2 (released like 7 years ago?) it uses less ram. Also the frameworks got less bloated and more modular
Re:Mago: A fast PHP toolchain written in Rust by 10us on Saturday September 13, 2025 @03:14PM (#45234550)
Yes it did. Composer 2 is way lighter and faster
Re:Mago: A fast PHP toolchain written in Rust by CR007 on Saturday September 13, 2025 @05:42PM (#45235575)
BS, compare projects like Infection vs whatever you have to fax to a guy running Ruby.
Re:Mago: A fast PHP toolchain written in Rust by bornfreddy on Sunday September 14, 2025 @12:12PM (#45240957)
What is wrong with phpstan?
Re:Mago: A fast PHP toolchain written in Rust by azjezz2 on Saturday September 13, 2025 @09:04PM (#45236591)
That's a great point, and you've touched on what might seem like a paradox: while the toolset is ambitious, keeping up with new PHP features is actually one of Mago's biggest strengths.

The traditional PHP tooling ecosystem relies on a dependency chain. A new syntax feature has to be implemented in a core library like nikic/PHP-Parser, then released, then adopted by tools like Psalm or PHPStan, and then finally those tools make a new release. This process can take weeks or months.

Because Mago is a single, cohesive toolchain, we control the entire stack. We can add support for new syntax across the lexer, parser, formatter, linter, and analyzer in one go.

For example:

- Mago's formatter and analyzer already have full support for the Pipe Operator (`|>`) and `clone with` from the upcoming PHP 8.5. The pipe operator was implemented across the entire toolchain in about 30 minutes, just hours after its RFC was approved. - For comparison, many existing tools are still catching up with PHP 8.4 features like Property Hooks.

This agility is a core part of the project's value proposition.