Update composer dependencies

This commit is contained in:
Kijin Sung 2021-04-30 19:57:32 +09:00
parent f99b38192b
commit 49dde388fe
163 changed files with 1765 additions and 5676 deletions

View file

@ -1,13 +1,16 @@
Requests for PHP
================
[![Build Status](https://travis-ci.org/rmccue/Requests.svg?branch=master)](https://travis-ci.org/rmccue/Requests)
[![codecov.io](http://codecov.io/github/rmccue/Requests/coverage.svg?branch=master)](http://codecov.io/github/rmccue/Requests?branch=master)
[![CS](https://github.com/WordPress/Requests/actions/workflows/cs.yml/badge.svg)](https://github.com/WordPress/Requests/actions/workflows/cs.yml)
[![Lint](https://github.com/WordPress/Requests/actions/workflows/lint.yml/badge.svg)](https://github.com/WordPress/Requests/actions/workflows/lint.yml)
[![Test](https://github.com/WordPress/Requests/actions/workflows/test.yml/badge.svg)](https://github.com/WordPress/Requests/actions/workflows/test.yml)
[![CI PHP 5.2-5.4](https://travis-ci.org/WordPress/Requests.svg?branch=master)](https://travis-ci.org/WordPress/Requests)
[![codecov.io](http://codecov.io/github/WordPress/Requests/coverage.svg?branch=master)](http://codecov.io/github/WordPress/Requests?branch=master)
Requests is a HTTP library written in PHP, for human beings. It is roughly
based on the API from the excellent [Requests Python
library](http://python-requests.org/). Requests is [ISC
Licensed](https://github.com/rmccue/Requests/blob/master/LICENSE) (similar to
Licensed](https://github.com/WordPress/Requests/blob/master/LICENSE) (similar to
the new BSD license) and has no dependencies, except for PHP 5.2+.
Despite PHP's use as a language for the web, its tools for sending HTTP requests
@ -36,7 +39,7 @@ var_dump($request->body);
Requests allows you to send **HEAD**, **GET**, **POST**, **PUT**, **DELETE**,
and **PATCH** HTTP requests. You can add headers, form data, multipart files,
and parameters with simple arrays, and access the response data in the same way.
and parameters with basic arrays, and access the response data in the same way.
Requests uses cURL and fsockopen, depending on what your system has available,
but abstracts all the nasty stuff out of your way, providing a consistent API.
@ -63,43 +66,49 @@ composer require rmccue/requests
```
or
{
"require": {
"rmccue/requests": ">=1.0"
}
```json
{
"require": {
"rmccue/requests": ">=1.0"
}
}
```
### Install source from GitHub
To install the source code:
$ git clone git://github.com/rmccue/Requests.git
```bash
$ git clone git://github.com/WordPress/Requests.git
```
And include it in your scripts:
require_once '/path/to/Requests/library/Requests.php';
```php
require_once '/path/to/Requests/library/Requests.php';
```
You'll probably also want to register an autoloader:
Requests::register_autoloader();
```php
Requests::register_autoloader();
```
### Install source from zip/tarball
Alternatively, you can fetch a [tarball][] or [zipball][]:
$ curl -L https://github.com/rmccue/Requests/tarball/master | tar xzv
(or)
$ wget https://github.com/rmccue/Requests/tarball/master -O - | tar xzv
```bash
$ curl -L https://github.com/WordPress/Requests/tarball/master | tar xzv
(or)
$ wget https://github.com/WordPress/Requests/tarball/master -O - | tar xzv
```
[tarball]: https://github.com/rmccue/Requests/tarball/master
[zipball]: https://github.com/rmccue/Requests/zipball/master
[tarball]: https://github.com/WordPress/Requests/tarball/master
[zipball]: https://github.com/WordPress/Requests/zipball/master
### Using a Class Loader
If you're using a class loader (e.g., [Symfony Class Loader][]) for
[PSR-0][]-style class loading:
$loader->registerPrefix('Requests', 'path/to/vendor/Requests/library');
```php
$loader->registerPrefix('Requests', 'path/to/vendor/Requests/library');
```
[Symfony Class Loader]: https://github.com/symfony/ClassLoader
[PSR-0]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
@ -116,9 +125,9 @@ documented.
Requests is [100% documented with PHPDoc](http://requests.ryanmccue.info/api/).
If you find any problems with it, [create a new
issue](https://github.com/rmccue/Requests/issues/new)!
issue](https://github.com/WordPress/Requests/issues/new)!
[prose-based documentation]: https://github.com/rmccue/Requests/blob/master/docs/README.md
[prose-based documentation]: https://github.com/WordPress/Requests/blob/master/docs/README.md
[request_method]: http://requests.ryanmccue.info/api/class-Requests.html#_request
Testing
@ -127,18 +136,19 @@ Testing
Requests strives to have 100% code-coverage of the library with an extensive
set of tests. We're not quite there yet, but [we're getting close][codecov].
[codecov]: http://codecov.io/github/rmccue/Requests
[codecov]: http://codecov.io/github/WordPress/Requests
To run the test suite, first check that you have the [PHP
JSON extension ](http://php.net/manual/en/book.json.php) enabled. Then
simply:
$ cd tests
$ phpunit
```bash
$ phpunit
```
If you'd like to run a single set of tests, specify just the name:
$ phpunit Transport/cURL
```bash
$ phpunit Transport/cURL
```
Contribute
----------
@ -149,4 +159,4 @@ Contribute
3. Write a test which shows that the bug was fixed or that the feature works as expected
4. Send a pull request and bug me until I merge it
[the repository]: https://github.com/rmccue/Requests
[the repository]: https://github.com/WordPress/Requests