larafony / core
Larafony is a modern PHP 8.5 framework combining the elegance of Laravel, the stability of Symfony, and the power of PSR standards - built for production, not tutorials. Minimal dependencies, full PSR support, custom middleware stack, and analytics without cookies or Google.
Installs: 16
Dependents: 1
Suggesters: 0
Security: 0
Stars: 66
Watchers: 1
Forks: 5
Open Issues: 2
pkg:composer/larafony/core
Requires
- php: >=8.5
- ext-curl: *
- ext-pdo: *
- ext-uri: *
- psr/cache: ^3.0
- psr/clock: ^1.0
- psr/container: ^2.0
- psr/event-dispatcher: ^1.0
- psr/http-client: ^1.0
- psr/http-factory: ^1.1
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: ^3.0
Requires (Dev)
- nunomaduro/phpinsights: dev-master
- phpstan/phpstan: ^2.1.30
- phpunit/phpunit: ^12.4.0
Suggests
- ext-memcached: For caching uing Memcached
- ext-redis: For caching using Redis
Provides
- psr/clock-implementation: 1.0
- psr/container-implementation: 2.0
- psr/event-dispatcher-implementation: 1.0
- psr/http-client-implementation: 1.0
- psr/http-factory-implementation: 1.1
- psr/http-message-implementation: 2.0
- psr/http-server-handler-implementation: 1.0
- psr/http-server-middleware-implementation: 1.0
- psr/log-implementation: 3.0
- dev-main
- 2.0.1
- 2.0.0
- v2.0.0-RC1
- dev-chapter27
- dev-chapter25
- dev-chapter24
- dev-chapter23
- dev-chapter22
- dev-chapter21
- dev-chapter20
- dev-chapter19
- dev-chapter18
- dev-chapter17
- dev-chapter16
- dev-chapter15
- dev-chapter14
- dev-chapter13
- dev-chapter12
- dev-chapter11
- dev-chapter10
- dev-chapter9
- dev-chapter8
- dev-chapter7
- dev-chapter6
- dev-chapter5
- dev-chapter4
- dev-chapter3
- dev-chapter2
- dev-chapter1
This package is auto-updated.
Last update: 2025-11-22 15:05:25 UTC
README
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.
✨ Key Features
-
⚙️ 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:- Inertia.js
- Vue.js
- Blade
- Twig
-
🪶 Minimal Dependencies
A minimalcomposer.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.
🚀 Philosophy
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.
- Production-ready from day one
- Framework-agnostic mindset
- Performance-first architecture
- Readable, modern PHP code
🧰 Requirements
- PHP ≥ 8.5
- Composer
- PSR-compliant HTTP and container packages (installed automatically)
🧭 Roadmap
Each chapter is developed in a separate branch and includes unit tests using PHPUnit.
🧩 Core Foundation
- Base framework configuration — Chapter 1
- Simple error handling — Chapter 2
- Simple timer using PSR-20 (Simple Carbon replacement) — Chapter 3
- HTTP requests with PSR-7/PSR-17 (Simple Web Kernel) — Chapter 4
- Dependency Injection using PSR-11 — Chapter 5
🌐 HTTP Layer
- Routing using PSR-15 — Chapter 6
- HTTP client using PSR-18 (Simple Guzzle replacement) — Chapter 7
- Environment variables and configuration — Chapter 8
⚙️ Console & Databasechap
- Console Kernel — Chapter 9
- MySQL Schema Builder — Chapter 10
- MySQL Query Builder — Chapter 11
- MySQL Migrations — Chapter 12
- ORM (ActiveRecord with Property Observers) — Chapter 13
🧱 Application Layer
- Logging System (PSR-3) — Chapter 14
- Middleware System (PSR-15) + Advanced routing — Chapter 15
- DTO-based Form Validation — Chapter 16
🎨 View Layer (simple)
- Custom Blade Parser — Chapter 17
🌐 Migrating to packagist
- Demo application as a separate project — Chapter 18
🎨 View Layer (SPA)
- Inertia.js Middleware (Vue.js) — Chapter 19
💥 Error Handling
- Advanced Web Error Handling — Chapter 20
- Advanced Console Error Handling — Chapter 21
🔐 Security & Communication
- Encrypted Cookies and Sessions — Chapter 22
- Sending Emails — Chapter 23
- Authorization System — Chapter 24
- Cache Optimization (PSR-6) — Chapter 25
- Event System (PSR-14) — Chapter 26
- Debugbar + Model Eager Loading— Chapter 27
- Jobs and Queues — Chapter 28
- Simple WebSockets (almost from scratch) — Chapter 29
- Model Context Protocol — A new way of communication — Chapter 30
🧭 Meta
- Why Larafony — Comparing with Laravel, Symfony, CodeIgniter — Chapter 31
🧩 The Philosophy of the Final Chaptersczy
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:
- elegance is a function of simplicity,
- performance is a side effect of clarity, and
- real mastery means knowing when to write less.
Welcome to the end of the framework —
and the beginning of your own.
⚙️ Extending with mature Libraries
- View Bridges (Twig & Smarty) — Chapter 32
- Use Carbon instead of ClockFactory — Chapter 33
- Use Monolog — Chapter 34
- Replace Container with Laravel Container — Chapter 35
🚀 Learn How It’s Built—From Scratch
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
Additional Resources
License The Larafony framework is open-sourced software licensed under the MIT license.
