f3-factory / fatfree-psr7
A fat-free PHP8 implementation of PSR-7 and PSR-17
2.0.1
2025-01-09 20:20 UTC
Requires
- php: >=8.0
- psr/http-factory: ^1.0
- psr/http-message: ^1.1 || ^2.0
Requires (Dev)
- http-interop/http-factory-tests: ^2.2.0
- php-http/psr7-integration-tests: 1.*
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.5
Provides
This package is auto-updated.
Last update: 2025-01-09 20:21:15 UTC
README
This is a lightweight PSR-7 implementation for PHP 8.0+.
Installation
composer require f3-factory/fatfree-psr7
Usage
The package includes a PSR-17 factory.
Use these factories according to specs to create Request, Response, Uri, Stream objects.
Tests
Run the test suite:
composer test
NB: Custom tests were mostly taken from Nyholm/psr7.
Benchmarks
Benchmarks done with devanych/psr-http-benchmark
on php 8.0+.
Checkout benchmark
branch, start docker composer, then run in container:
COMPOSER_ROOT_VERSION=1.0 composer update
Run benchmarks on php 8.0+:
cd benchmark/
php benchmark.php fatfree 50000