| Install | |
|---|---|
composer require larafony/core |
|
| Latest Version: | 2.2.0 |
| PHP: | >=8.5 |

Larafony is a modern, lightweight PHP framework that combines the developer experience of Laravel, the robustness of Symfony, and the power of PHP 8.5 — all without compromise.
It’s designed for production-grade applications, not tutorials or demos.
⚙️ Built on PSR Standards
Full support for PSR-7 (HTTP), PSR-11 (Container), PSR-15 (Middleware), and PSR-3 (Logger).
Interoperability at its core — use any compliant library or component you prefer.
🧩 Attribute-Based Design
Fully powered by PHP Attributes, bringing clean syntax and native reflection instead of verbose annotations or configuration files.
🔓 Not Locked into One Ecosystem
You’re free to choose your tools. Larafony works seamlessly with:
🪶 Minimal Dependencies
A minimal composer.json — PSR packages only. No unnecessary framework bloat.
🧱 Custom Middleware Stack
A powerful yet simple middleware pipeline, inspired by PSR-15 and fine-tuned for performance.
📊 Built-in Backend Analytics
Privacy-friendly, cookie-free analytics, with no dependence on Google or external trackers.
Larafony exists for developers who love the elegance of Laravel, the discipline of Symfony, and the freedom of pure PHP.
It’s opinionated where it matters — and unopinionated everywhere else.
curl, mbstring,pdo, uri, xml⚠️ If you see deprecation warnings during composer create-project,
run:
composer self-update
❗Running Larafony on older PHP / Composer versions is not supported and issues caused by outdated environments will be closed without investigation.
For a containerized development environment:
See DOCKER.md for complete Docker setup and usage instructions.
Each chapter is developed in a separate branch and includes unit tests using PHPUnit.
This will be updated while following packages reach FULL php8.5 support.
Larafony’s journey doesn’t end with writing code — it ends with understanding.
The last chapters are not about adding features, but about liberating the developer.
They show that every component — clock, container, logger, cache, or view — is optional, replaceable, and interchangeable.
Each replacement (Carbon, Monolog, Laravel Container, Twig, etc.) isn’t a “plugin”, but a lesson:
how professional PHP code achieves the same result through different abstractions.
By the time you reach the end, you won’t just use a framework —
you’ll understand the architecture behind every framework.
"The best framework is the one you can replace piece by piece — because you understand it completely."
🧠 Larafony is not just a framework.
It’s an open architecture, a teaching tool, and a manifesto of modern PHP.
Every line of code exists to remind you that:
Welcome to the end of the framework —
and the beginning of your own.
# Quick start - all in one script
./docker-test.sh # Run tests without coverage
./docker-test.sh --coverage # Run tests with HTML coverage report
# Or step by step
./docker.sh build # Build Docker images
./docker.sh up # Start MySQL service
./docker.sh test # Run tests
./docker.sh quality # Run all quality checks
Coverage reports:
coverage/index.html in your browser./docker-test.sh --textSee DOCKER.md for complete Docker documentation and all available commands.
# Install dependencies
composer install
# Run tests
composer test
# Run quality checks
composer quality
Interested in how Larafony is built step by step?
Check out my full PHP 8.5 course, where I explain everything from architecture to implementation — no magic, just clean code.
👉 Get it now at masterphp.eu
License
The Larafony framework is open-sourced software licensed under the MIT license.