Download the PHP package omniphp/framework without Composer
On this page you can find all versions of the php package omniphp/framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download omniphp/framework
More information about omniphp/framework
Files in omniphp/framework
Package framework
Short Description OmniPHP — The universal PHP framework. Lightweight, Workerman-based: HTTP router & middleware, query builder & migrations, Redis Stream queue, template engine, cache, i18n and structured logging.
License MIT
Homepage https://github.com/owner888/omniphp
Informations about the package framework
OmniPHP
The universal PHP framework. A lightweight, long-running application core built on Workerman: the process model of a daemon, the ergonomics of a classic web framework.
Status: extracted from a production Workerman application and published as a standalone package. The API is stable in practice but not yet frozen — expect
0.xreleases.
What's inside
| Namespace | Purpose |
|---|---|
OmniPHP\Application / CrashHandler |
One-call bootstrap (paths, .env, timezone, log level, i18n) and a three-tier fatal/uncaught handler for long-running processes |
OmniPHP\Http |
Kernel (Workerman onMessage entry), Router (static, grouped, typed params), Context (request/response helper), onion Middleware pipeline, Session, ExceptionHandler, ApiCode error-code envelope, built-in CORS / rate-limit / JSON-response middlewares |
OmniPHP\Database |
PDO DB facade, fluent QueryBuilder, Schema blueprint + MigrationRunner, SoftDeletes, per-worker connection bootstrap |
OmniPHP\Model |
Thin active-record style base class on top of QueryBuilder |
OmniPHP\Queue |
Redis Stream job queue: Producer / Consumer / RedisQueue with priorities, delayed jobs, retries, dead-letter queue |
OmniPHP\View |
Compiled template engine with plugins, attribute parser and output caching |
OmniPHP\Cache |
Redis and FileCache drivers behind one Cache facade |
OmniPHP\Config / Lang |
PHP-array config loader; .ini based i18n with locale fallback |
OmniPHP\Logger |
Level-based logger with pluggable engines (FileEngine, ElasticsearchEngine, TelegramEngine) and LogRotator |
OmniPHP\Requests |
Minimal cURL HTTP client, requests-style |
A ready-made project layout lives in omniphp/omniphp
(composer create-project omniphp/omniphp myapp).
Everything runs inside Workerman worker processes: code is loaded once, connections are opened once per worker, and nothing assumes PHP-FPM's request-scoped lifecycle.
Requirements
- PHP 8.4+
- ext-curl, ext-json, ext-mbstring, ext-pdo
- ext-redis (for the Redis cache driver, the queue and the rate limiter)
- workerman/workerman ^5.1
Install
Minimal server
Conventions the framework expects from the application
Application::boot($basePath)runs first in every entry point; it definesBASE_PATH,CONFIG_PATHandRUNTIME_PATH, whichConfig,Logger,LogRotator,FileCacheandViewEnginerequire (they throw if a constant is missing).Lang::init(['lang_dir' => ...])must be given the language directory explicitly (pass it asboot()'slangoption).- Queue job handlers implement
OmniPHP\Queue\HandlerInterfaceand are registered by job name inconfig/queue.phpunderhandlers. - Application-level hooks are registered at bootstrap rather than discovered:
Logger::registerEngine()for extra log sinks,RedisQueue::setDlqListener()for dead-letter notifications,Router::setExceptionHandler()for error rendering.
Development
CI runs composer validate, php -l and PHPUnit on PHP 8.4 for every push and tag.
License
MIT — see docs/database.md.
All versions of framework with dependencies
ext-curl Version *
ext-json Version *
ext-mbstring Version *
ext-pdo Version *
workerman/workerman Version ^5.1