Search by

crystoline / xpsr-framework

crystoline

XPSR framework library: application lifecycle, PSR-11 container, PSR-15 HTTP kernel, routing contracts, providers, and console

Package info

github.com/crystoline/xpsr-framework

Homepage

pkg:composer/crystoline/xpsr-framework

Statistics

Installs: 95

Dependents: 29

Suggesters: 0

Stars: 0

Open Issues: 0

v0.8.0 2026-11-04 16:07 UTC

This package is auto-updated.

Last update: 2026-11-05 12:43:28 UTC


README

The XPSR framework library: application lifecycle and configuration, the PSR-11 container and provider lifecycle, the PSR-15 HTTP kernel and middleware, portable route definitions and the router contract, error rendering and PSR-3 logging, the response emitter, the PSR-14 event dispatcher, sessions with CSRF protection and their file store, authentication (session sign-in, guards, password hashing) and policies, encryption with APP_KEY in Laravel's format, and the xpsr console with its generators and setup command.

It does not include a router implementation. Install an adapter alongside it:

Adapter Package ROUTER_ADAPTER
FastRoute (default) crystoline/xpsr-router-fastroute fastroute
Sunrise crystoline/xpsr-router-sunrise sunrise

Most applications start from the crystoline/xpsr skeleton instead of requiring this package directly. The guides are at xpsr.crysto.name.ng.

Writing a router adapter

Implement Crystoline\Xpsr\Contracts\Routing\RouterInterface, usually by extending Crystoline\Xpsr\Routing\AbstractRouter. Then prove it with the shared contract suite: extend Crystoline\Xpsr\Testing\RouterContractTestCase in your tests and return your router from createRouter(). The suite needs phpunit/phpunit and nyholm/psr7 as development dependencies.

Requires PHP 8.4+.