Download the PHP package ascetic-soft/psr7 without Composer
On this page you can find all versions of the php package ascetic-soft/psr7. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package psr7
AsceticSoft PSR-7
A lightweight, performance-optimized PSR-7 (HTTP Messages) and PSR-17 (HTTP Factories) implementation for PHP 8.4+.
Designed as a companion library for Waypoint router, but works with any PSR-7/PSR-15/PSR-17 compatible stack.
Features
- Full PSR-7 compliance — implements all 7 interfaces from
psr/http-messagev2.0 - Full PSR-17 compliance — implements all 6 factory interfaces from
psr/http-factoryv1.0 - Optimized headers — O(1) case-insensitive lookups via dual-array storage
- Lazy URI composition —
__toString()result cached, invalidated on mutation - Efficient immutability — shallow
clonewith shared stream references - Thin stream wrapper — minimal overhead over native PHP resources
- ServerRequestCreator — builds requests from
$_SERVER/$_GET/$_POST/$_COOKIE/$_FILES - PHPStan level 9 — fully statically analyzed
Requirements
- PHP >= 8.4
Installation
Quick Start
Usage
Creating HTTP Messages Directly
Using the HttpFactory (PSR-17)
The HttpFactory class implements all six PSR-17 factory interfaces in a single class:
Creating Server Requests from Globals
Using with Waypoint Router
Architecture
Optimization Details
| Component | Technique | Benefit |
|---|---|---|
| Headers | Dual-array: $headers (original case) + $headerNames (lowercase → original) |
O(1) case-insensitive lookup |
| Uri | Cached __toString(), invalidated on with*() |
Avoid recomposition on repeated access |
| Stream | Direct resource wrapper, pre-computed capabilities | Minimal overhead, no unnecessary wrapping |
| Immutability | Shallow clone, shared stream references |
Fast with*() operations |
| Response | const PHRASES array for status codes |
Zero-cost reason phrase lookup |
Development
License
MIT
All versions of psr7 with dependencies
PHP Build Version
Package Version
The package ascetic-soft/psr7 contains the following files
Loading the files please wait ...