Download the PHP package trunk/core without Composer
On this page you can find all versions of the php package trunk/core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package core
Short Description An async, API-centric PHP framework built on ReactPHP
License MIT
Informations about the package core
Trunk
An async, API-centric PHP framework built on ReactPHP.
Trunk runs your API on a single, non-blocking event loop instead of PHP-FPM's one-process-per-request model. The router, middleware pipeline, ORM, sessions, and CLI all share that loop, so a slow database query doesn't tie up an entire worker - it ties up nothing, because nothing is blocked while it's in flight.
Features
- DI container with constructor autowiring by reflection, plus singleton/factory bindings.
- Router with path params, route model binding, and per-route middleware.
- Validation via
FormRequestclasses that short-circuit to a422before your handler runs. - Database layer for MySQL and PostgreSQL behind one API, with a migrations system (
Schema/BlueprintDSL) and a Data Mapper ORM. - JWT authentication and a CORS/JSON-body-parsing/logging/session middleware stack, on by default.
- Events, object-typed, with config-driven listener registration and a non-blocking
dispatchAsync(). - GraphQL endpoint (via
webonyx/graphql-php's async promise adapter) sharing the same ORM queries as REST. - gRPC client support via a child-process bridge - PHP can't run a gRPC server, so this lets you call one without blocking the loop.
- Console (
php trunk ...) for the dev server, code generation, and migrations.
Installation
Trunk is consumed through a skeleton application, not installed standalone. See the skeleton's README to get a project running, or Getting Started for the full walkthrough.
Documentation
The full guide lives in docs/ - run npm install && npm run docs:dev inside that directory for the local site, or just read the Markdown directly:
- Getting Started
- Validation
- Authentication
- gRPC Client
- Testing
Testing
License
MIT
All versions of core with dependencies
react/http Version ^1.9
react/promise Version ^3.0
firebase/php-jwt Version ^6.10 || ^7.0
react/child-process Version ^0.6.7
psr/http-message Version ^1.0 || ^2.0
psr/container Version ^1.0 || ^2.0
psr/log Version ^1.0 || ^2.0 || ^3.0
vlucas/phpdotenv Version ^5.5