phantom-php / framework
A minimalist but powerful PHP framework
Package info
github.com/Phantom-Framework-PHP/framework
Type:project
pkg:composer/phantom-php/framework
v1.19.6
2026-02-10 22:52 UTC
Requires
- php: ^8.1
Requires (Dev)
- phpunit/phpunit: ^10.0
README
Phantom is a minimalist, elegant, and fast PHP framework, designed for developers seeking Laravel's structure with the lightness of a micro-framework.
๐ Quick Installation
You can create a new Phantom project instantly using Composer:
composer create-project phantom-php/framework my-app
Or manually:
- Clone the repository.
- Run
composer install. - Copy
.env.exampleto.envand configure your credentials. - Start your server:
php phantom serve.
๐ Comprehensive Documentation
Our Documentation Manual covers everything you need to master Phantom:
- ๐๏ธ Core Architecture
- ๐ฃ๏ธ Advanced Routing & Method Injection
- ๐ก๏ธ Middlewares & Security
- โ Validation & Requests
- ๐จ Template Engine (Blade-like)
- ๐๏ธ ORM Relationships & Polymorphism
- ๐๏ธ Soft Deletes System
- ๐ฆ Fluent Collections
- ๐ API Resources (JSON)
- ๐งช HTTP Feature Testing
- ๐ป Phantom CLI & Tinker (REPL)
Main Features
- ๐ฆ IoC Container: Professional and powerful dependency management.
- ๐ฃ๏ธ Advanced Routing: Route Groups, Named Routes, Middlewares, and Method Injection.
- ๐จ View Engine: Blade-like template system with layouts, components, and caching.
- ๐๏ธ Phantom ORM: Active Record with Eager Loading, Relationships, Polymorphism, Soft Deletes, Attribute Casting, and Mass Assignment Protection.
- ๐ข Multi-Tenancy Core (v1.19.3): Native support for database and scope isolation (shared or separate DBs).
- โฑ๏ธ Rate Limiting Pro (v1.19.4): Distributed sliding window algorithm for precise request throttling.
- โก Distributed Cache (v1.19.5): High-performance caching with Redis Cluster support and automatic tenant isolation.
- ๐ค AI Native Integration: Built-in support for Gemini/OpenAI, Vector Embeddings, and AI-powered validation.
- ๐ Phantom Live: Build reactive, dynamic interfaces with PHP and Blade (Livewire-style).
- ๐ Phantom Pulse: Real-time telemetry dashboard for requests, DB queries, and security.
- ๐ก๏ธ Native Security: Zero-config Security Shield (IP Reputation), CSRF protection, and secure hashing.
- ๐ File Storage: Abstracted storage with Local, FTP, and S3 drivers.
- ๐ฆ Distributed Queues: Background job processing with Redis Cluster and Sentinel support.
- ๐ API Auto-Doc: Generate OpenAPI/Swagger documentation automatically using AI.
- ๐งช Testing Suite: Built-in system for HTTP Feature Testing and unit tests.
- ๐ป Phantom CLI: Professional toolkit including
serve,migrate,tinker, andai:generate.
Requirements
- PHP 8.1 or superior.
- Extensions: PDO, OpenSSL, Mbstring, Fileinfo, Readline (recommended).
Phantom CLI Quick Guide
# Start Server php phantom serve # Interactive REPL php phantom tinker # Run Migrations php phantom migrate # Generate Code php phantom make:model Post php phantom make:resource UserResource
License
This project is under the MIT License.
Designed with โค๏ธ for speed and elegance.