ennerd / fubber-framework
Fubber Framework by Ennerd.com. Create web applications that share the same source hosted by Apache, Nginx or React PHP.
1.3.3
2025-08-24 21:15 UTC
Requires
- php: >=8.1.0
- composer/semver: ^3.3
- doctrine/inflector: ^2.0
- filp/whoops: ^2.14
- guzzlehttp/psr7: >=1
- monolog/monolog: >=1.27 <3.0
- nategood/commando: ^1.0
- nerd/glue: >=1
- nikic/fast-route: ^1.3
- psr/container: >=2
- psr/http-message: ^1.1
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
- psr/log: >=1
- swiftmailer/swiftmailer: ^6.3
- symfony/var-dumper: *
- vlucas/phpdotenv: >=3.4 <6.0
Requires (Dev)
- charm/testing: ^1.1
- ennerd/sourcedog: ^1.0
- robmorgan/phinx: ^0.12
Provides
This package is auto-updated.
Last update: 2025-08-24 21:16:04 UTC
README
Fubber is a modern PHP application framework designed around developer productivity, extensibility, and a clean separation of concerns. It provides powerful building blocks such as controllers, configuration, dependency injection, routing, and instrumentation for performance and debugging.
This README gives you an eagle’s‑eye view of the framework. For deeper dives, see the linked documents in the docs/
folder.
✨ Features
- Controller‑centric architecture – define routes, lifecycle hooks, and cron jobs in one place.
- Configuration system – layered config loading with environment awareness.
- Dependency injection container – flexible, annotation‑driven DI.
- Routing – expressive HTTP routing with middleware and exception mapping.
- Instrumentation – built‑in tools for profiling, benchmarking, and exception annotation.
- Bundles – modular extension system with manifests for reusable packages.
- Developer ergonomics – sensible defaults, modern helper methods, and PSR‑compatible interfaces.
🏗️ High-Level Architecture
┌────────────────────┐
│ Application │
│ (Your Code) │
└─────────┬──────────┘
│
┌─────────▼──────────┐
│ Kernel │
│ (phases, hooks) │
└─────────┬──────────┘
│
┌───────────────┬────────────┴─────────────┬───────────────┐
│ │ │ │
┌────▼────┐ ┌──────▼──────┐ ┌────────▼────────┐ ┌─────▼─────┐
│ Config │ │ Controllers │ │ Container │ │ Http │
│ Env │ │ Lifecycle │ │ (DI, Services) │ │ Router │
└────┬────┘ └──────┬──────┘ └────────┬────────┘ └─────┬─────┘
│ │ │ │
▼ ▼ ▼ ▼
.env + php Routes, init(), call() Services, scopes Middleware,
settings + Cron tasks Factories Exception handling
📂 Documentation
🚀 Quick Example
use Fubber\Kernel\AbstractController;
final class HelloController extends AbstractController
{
public function routes(): array {
return [
"GET /hello" => fn() => $this->json(["message" => "Hello, World!"]),
];
}
}
🔗 Next Steps
- Start with Getting Started to spin up a new project.
- Explore Controllers to learn how to handle routes and lifecycle hooks.
- Use Instrumentation to measure and debug your application.
Core Guides
Getting Started
- Installation & Requirements
- Directory Structure
- First Controller
Kernel & Phases
- Boot Process
- Phase Handlers
- Hooks & Triggers
Configuration
- Environment (
.env
) - Config files (
config/*.php
) - Adding config paths
- Environment (
Controllers
- Lifecycle (
load
,init
,call
) - Static vs Instance controllers
- Adding Routes
- Lifecycle (
HTTP Layer
- Router
- Middleware (PSR-15)
- Exception Handling
Dependency Injection
- Services & Scopes
- Autowiring
- Container API
Advanced Topics
- Cron Jobs
- Instrumentation (logging, metrics, debugging)
- Extending the Kernel (KernelExtension, custom phases)
- Microcache for lightweight caching
- FileSystem abstraction
Reference
- API Docs (autogenerated)
- Examples & Recipes
🗺️ Next Steps
- Getting Started Guide
- Controllers Overview
- Configuration Guide
- HTTP & Routing
- Dependency Injection
- Extending the Kernel
🚀 Philosophy
Fubber Framework embraces:
- Explicit over implicit — lifecycle and phases are visible and traceable.
- Convention with escape hatches — config drives the app, but you can override at will.
- Performance awareness — instrumentation and microcache are built in.
- Security by default — environment variables are scrubbed after import, and sensitive files stay outside the web root.