Next-Gen Leaf PHP: Re-architecting for the Future
- Authors

- Name
- Michael Darko
- @mychidarko
When we shipped Leaf PHP 4, we celebrated a leap forward: sharper APIs, cleaner structure, and a developer experience that felt more intuitive than ever. But as both PHP and Leaf keep evolving at breakneck speed, we realised that “good enough” isn’t good enough anymore. The world has changed — app complexity has grown, developer expectations have soared, and frameworks must keep up. With that in mind, we’re thrilled to present a fresh chapter in the Leaf story — one built on purpose, precision and performance.
1. Switching Our Console 🎛️
The console: our unsung hero. It’s where you create models, run migrations, scaffold controllers, and jam out your workflow.
For years we leaned on Symfony Console, the battle-tested, ubiquitous choice in the PHP ecosystem. It’s proven, reliable, and widely adopted.
But at Leaf we ask ourselves one simple question: does this tool serve our vision, or does our vision serve the tool?
Symfony Console was complete in features way beyond what we needed. Customising it to lean into Leaf’s simplicity became a slower, more fragile process. When you build for generality you lose some of the sharpness.
So we decided: let’s build something tailored.
Enter: Leaf Sprout — our new, purpose-built command engine, designed to mirror exactly the lean, modular spirit of Leaf.
Why this shift now
- Clearer footprint: No extra baggage of features you’ll never use.
- Clean extensibility: Extensions plug into Sprout easily, no wrestling with layers of generic abstractions.
- Bolder evolution: With full control of the console layer, we can iterate faster, innovate smarter.
- Performance-first: Less overhead means snappier commands, leaner CLI startup, happier devs.
What’s different for you
Most of your workflow will feel the same — you’ll still scaffold, migrate, create. But behind the scenes things are tidier and sharper. Here’s what to look out for:
- Command structure updates: Same intention, different verbs. Defining and registering commands will follow a refined syntax.
- Config streamlined: Console config options are re-aligned with Sprout’s architecture.
- Extension possibilities: Sprout includes hooks you didn’t ask for (but you’ll love) — more flexibility, less boilerplate.
- Faster execution: Commands execute with fewer cycles, lower latency — especially noticeable on larger CLI projects.
2. Merging Aloe with MVC Core 🧩
In the Leaf ecosystem, two players long held adjacent spaces:
Aloe — the super-console that served Leaf MVC developers, offering scaffolding, migrations, model generation, and more.
MVC Core — the bridge between Leaf Core and MVC apps, wiring up structure, lifecycle, modules.
Each did their job. But two adjacent systems meant two sets of concepts, and two version-tracks. We felt this redundancy biting us.
By merging Aloe into MVC Core, we unify the CLI + core runtime experience into one elegant package: console commands, scaffolding, module-loading, all in one place.
What’s changing
- Instead of Aloe and MVC Core as separate pieces, you now have a singular module where MVC structure and CLI commands live side by side.
- Command scaffolding (
g:controller,g:template) is now executed within MVC Core directly. - Module loading, registration, and versioning are simplified — fewer dependencies, clearer lifecycle, faster onboarding.
Why this matters
- Fewer moving parts: Developers install and upgrade one module rather than two.
- Better version cohesion: CLI changes and MVC runtime changes move in lock-step, reducing mismatch bugs and confusion.
- Cleaner mental model: One module = one experience. Less cognitive overhead for onboarding.
- Sharper maintenance: Internal code becomes leaner, fewer lines of glue, more clarity.
3. Syncing Leaf CLI with MVC CLI 🔄
Here’s a little trick we love: unify your CLI.
If you’re working in an MVC context with Leaf, you now don’t have to jump between “Leaf CLI” and “MVC CLI”. Commands that were previously geofenced to MVC are now accessible directly from Leaf CLI.
For example:
# Before
php leaf g:controller UserController
# Now
leaf g:controller UserController
Yes, it’s a small change on paper — but it dramatically lowers friction, improves flow, and gives a more seamless experience.
Important note: MVC-specific commands appear only in MVC contexts. If you open a pure Leaf project (no MVC module loaded), you’ll see only the Leaf core commands.
4. Launch of Seedling 🌱
We believe major architectural changes earn side-projects. Meet Seedling: a new framework built for CLI-first apps using Leaf Sprout. It’s basically Leaf MVC without the HTTP/views layers — lean, focussed, perfect for tools, scripts, bots, backend tasks.
When you run:
leaf create
You’ll now see a new option:
? Select a preset: ›
Basic Leaf app
Full-stack MVC app
Leaf MVC API app
❯ Console app via Seedling
Seedling comes with the minimal command set by default (g:command, d:command) — and you can add modules like schema, db, queue only when you need them:
leaf install schema
leaf g:schema users
leaf db:migrate
5. Modularized Commands 🧩
With these shifts, we’re moving toward a more modular command ecosystem. Instead of bundling everything in one monolithic command set, we’re breaking it into fit-for-purpose packages that you install only when you need them.
Need database migrations? leaf install schema
Working on queues? leaf install queue
Commands from these modules then automatically become available in your CLI. This means your project stays lean, dependencies stay minimal, and upgrades become smoother.
Looking Ahead
All of this — Sprout, the merge of Aloe + MVC Core, Seedling, modular CLI packages — isn’t just about architecture. It’s about what you feel when you build with Leaf. We want less friction. More joy. Tools that disappear when you don’t need them and jump in when you do. We want you to “build clean, ship fast, scale smart.”
Now we’re doubling down: fewer moving parts, more focus, better flow.
Sprout may be tiny, but it’s mighty. Seedling may be simple, but it’s sharp. And Leaf? Well, it’s just getting started.
You Made This Happen ❤️
Every line of code, every bug report, every suggestion on Discord has shaped this journey. Whether you’re a Leaf newcomer or longtime user, your voice matters. Stay connected:
Thank you for being part of it. Stay tuned — the best is yet to come.