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: 36

Dependents: 18

Suggesters: 0

Stars: 0

Open Issues: 0

v0.5.0 2026-10-30 11:06 UTC

This package is auto-updated.

Last update: 2026-10-30 11:16:16 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. Documentation lives in the XPSR repository's docs/ directory.

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.

Tests

composer install
vendor/bin/phpunit

Requires PHP 8.4+.