php-http / httplug-stream-wrapper
A stream wrapper that injects a HTTPlug client for streams
Requires
- php: ^5.5 || ^7.0
- php-http/client-common: ^1.0
- php-http/discovery: ^1.0
- php-http/httplug: ^1.0
- psr/http-message: ^1.0
Requires (Dev)
- guzzlehttp/psr7: ^1.3
- php-http/message: ^1.0
- phpunit/phpunit: ^4.5 || ^5.4
This package is auto-updated.
Last update: 2020-09-21 11:49:22 UTC
README
To our knowledge, this repository is unused. We keep it here in case it is useful for anyone, but the code is not maintained.
Stream wrapper
Convert uses of fopen and file_get_contents to HTTPlug requests.
Disclaimer
Warning 1: There is an increased risk for problems because of how deeply the stream wrapper touches into the PHP core. Internally we use stream_wrapper_unregister
and stream_wrapper_register
.
Warning 2: Instead of using the stream wrapper you should should try to port libraries to use Httplug for a more robust solution.
Install
Via Composer
$ composer require php-http/httplug-stream-wrapper
Documentation
$httpClient = HttpClientDiscovery::find(); StreamWrapper::enable($httpClient);
Please see the official documentation.
Testing
Then the test suite:
$ composer test
Contributing
Please see our contributing guide.
Security
If you discover any security related issues, please contact us at security@php-http.org.
License
The MIT License (MIT). Please see License File for more information.