Recommend this page to a friend! |
This is a lightweight PSR-7 implementation for PHP 8.0+.
composer require f3-factory/fatfree-psr7
The package includes a PSR-17 factory and also supports HTTPlug.
Use these factories according to specs to create Request, Response, Uri, Stream objects.
Run the test suite:
composer test
NB: Custom tests were mostly taken from Nyholm/psr7.
Benchmarks done with devanych/psr-http-benchmark
on php 8.0+.
Test results (Intel Xeon Gold 6140 CPU @ 2.30GHz, 4 cores):
| Runs: 50,000 | Guzzle | HttpSoft | Laminas | Nyholm | Slim | Fatfree | |----------------------|-----------|-----------|-----------|-----------|-----------|-----------| | Runs per second | 18599 | 31938 | 22601 | 27999 | 18789 | 35200 | | Average time per run | 0.0538 ms | 0.0313 ms | 0.0442 ms | 0.0357 ms | 0.0532 ms | 0.0284 ms | | Total time | 2.6882 s | 1.5655 s | 2.2122 s | 1.7858 s | 2.6611 s | 1.4204 s |
Classes of Christian Knuth | > | How to Access Resources using HTTP Compliant with PHP PSR 17 Standard using Fatfree PSR 17 | > | Download .zip .tar.gz | > | Support forum | > | Blog | > | Latest changes |
|
Groups | Applications | Files |
Groups |
HTTP | HTTP protocol clients, headers and cookies | View top rated classes |
PSR | Packages that implement PHP Standard Recommendations by FIG | View top rated classes |
PHP 8 | Classes using PHP 8 specific features | View top rated classes |
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Files |
File | Role | Description | ||
---|---|---|---|---|
src (1 directory) | ||||
tests (6 files, 3 directories) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
phpunit.xml.dist | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files | / | src | / | Http |
File | Role | Description | ||
---|---|---|---|---|
Factory (2 files) | ||||
Message.php | Class | Class source | ||
Request.php | Class | Class source | ||
Response.php | Class | Class source | ||
ServerRequest.php | Class | Class source | ||
Stream.php | Class | Class source | ||
UploadedFile.php | Class | Class source | ||
Uri.php | Class | Class source |
Files | / | src | / | Http | / | Factory |
File | Role | Description |
---|---|---|
HTTPlug.php | Class | Class source |
Psr17Factory.php | Class | Class source |
Files | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Factory (2 files) | ||||
Integration (6 files) | ||||
Resources (1 file) | ||||
RequestTest.php | Class | Class source | ||
ResponseTest.php | Class | Class source | ||
ServerRequestTest.php | Class | Class source | ||
StreamTest.php | Class | Class source | ||
UploadedFileTest.php | Class | Class source | ||
UriTest.php | Class | Class source |
Files | / | tests | / | Factory |
File | Role | Description |
---|---|---|
HttplugFactoryTest.php | Class | Class source |
Psr17FactoryTest.php | Class | Class source |
Files | / | tests | / | Integration |
File | Role | Description |
---|---|---|
RequestTest.php | Class | Class source |
ResponseTest.php | Class | Class source |
ServerRequestTest.php | Class | Class source |
StreamTest.php | Class | Class source |
UploadedFileTest.php | Class | Class source |
UriTest.php | Class | Class source |
Download all files: fatfree-psr7.tar.gz fatfree-psr7.zip NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
|
Files |
File | Role | Description | ||
---|---|---|---|---|
src (1 directory) | ||||
tests (6 files, 3 directories) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
phpunit.xml.dist | Data | Auxiliary data | ||
README.md | Doc. | Documentation |
Files | / | src | / | Http |
File | Role | Description | ||
---|---|---|---|---|
Factory (2 files) | ||||
Message.php | Class | Class source | ||
Request.php | Class | Class source | ||
Response.php | Class | Class source | ||
ServerRequest.php | Class | Class source | ||
Stream.php | Class | Class source | ||
UploadedFile.php | Class | Class source | ||
Uri.php | Class | Class source |
Files | / | src | / | Http | / | Factory |
File | Role | Description |
---|---|---|
HTTPlug.php | Class | Class source |
Psr17Factory.php | Class | Class source |
Files | / | tests |
File | Role | Description | ||
---|---|---|---|---|
Factory (2 files) | ||||
Integration (6 files) | ||||
Resources (1 file) | ||||
RequestTest.php | Class | Class source | ||
ResponseTest.php | Class | Class source | ||
ServerRequestTest.php | Class | Class source | ||
StreamTest.php | Class | Class source | ||
UploadedFileTest.php | Class | Class source | ||
UriTest.php | Class | Class source |
Files | / | tests | / | Factory |
File | Role | Description |
---|---|---|
HttplugFactoryTest.php | Class | Class source |
Psr17FactoryTest.php | Class | Class source |
Files | / | tests | / | Integration |
File | Role | Description |
---|---|---|
RequestTest.php | Class | Class source |
ResponseTest.php | Class | Class source |
ServerRequestTest.php | Class | Class source |
StreamTest.php | Class | Class source |
UploadedFileTest.php | Class | Class source |
UriTest.php | Class | Class source |
Download all files: fatfree-psr7.tar.gz fatfree-psr7.zip NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
|