Skip to content

Commit 4e53a8d

Browse files
author
Greg Bowler
authored
Merge pull request #25 from PhpGt/16-psr7
16 psr7
2 parents 67165fe + 46ae8dc commit 4e53a8d

29 files changed

+1101
-1098
lines changed

.circleci/config.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: 2
2+
3+
jobs:
4+
build:
5+
docker:
6+
- image: circleci/php:7.1-cli
7+
8+
working_directory: ~/repo
9+
10+
steps:
11+
- checkout
12+
13+
- restore_cache:
14+
keys:
15+
- v1-dependencies-{{ checksum "composer.json" }}
16+
- v1-dependencies-
17+
18+
- run: composer install -n --prefer-dist
19+
20+
- save_cache:
21+
paths:
22+
- ./vendor
23+
key: v1-dependencies-{{ checksum "composer.json" }}
24+
25+
- run: mkdir test/unit/_junit
26+
- run: vendor/bin/phpunit -c test/unit/phpunit.xml --log-junit test/unit/_junit/junit.xml -d memory_limit=512M
27+
28+
- store_test_results:
29+
path: test/unit/_junit
30+
31+
- store_artifacts:
32+
path: test/unit/_coverage
33+
destination: TestCoverage

.scrutinizer.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
build:
22
environment:
33
php:
4-
version: 7.0.8
4+
version: 7.1.0
55
tests:
66
override:
7-
-
8-
command: 'vendor/bin/phpunit --coverage-clover=coverage'
9-
coverage:
10-
file: 'coverage'
11-
format: 'php-clover'
7+
-
8+
command: 'vendor/bin/phpunit test/unit --coverage-clover coverage --whitelist src'
9+
coverage:
10+
file: 'coverage'
11+
format: 'php-clover'
1212

1313
checks:
1414
php:
@@ -17,5 +17,5 @@ checks:
1717

1818
filter:
1919
excluded_paths:
20-
- test/*
21-
- vendor/*
20+
- test/*
21+
- vendor/*

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@ See also, the [JavaScript implementation][fetch-js] that ships as standard in al
77
***
88

99
<a href="https://circleci.com/gh/PhpGt/Fetch" target="_blank">
10-
<img src="https://img.shields.io/circleci/project/PhpGt/Fetch/master.svg?style=flat-square" alt="Build status" />
10+
<img src="https://badge.php.gt/fetch-build.svg" alt="Build status" />
1111
</a>
1212
<a href="https://scrutinizer-ci.com/g/PhpGt/Fetch" target="_blank">
13-
<img src="https://img.shields.io/scrutinizer/g/PhpGt/Fetch/master.svg?style=flat-square" alt="Code quality" />
13+
<img src="https://badge.php.gt/fetch-quality.svg" alt="Code quality" />
1414
</a>
1515
<a href="https://scrutinizer-ci.com/g/PhpGt/Fetch" target="_blank">
16-
<img src="https://img.shields.io/scrutinizer/coverage/g/PhpGt/Fetch/master.svg?style=flat-square" alt="Code coverage" />
16+
<img src="https://badge.php.gt/fetch-coverage.svg" alt="Code coverage" />
1717
</a>
1818
<a href="https://packagist.org/packages/PhpGt/Fetch" target="_blank">
19-
<img src="https://img.shields.io/packagist/v/PhpGt/Fetch.svg?style=flat-square" alt="Current version" />
19+
<img src="https://badge.php.gt/fetch-version.svg" alt="Current version" />
20+
</a>
21+
<a href="https://www.php.gt/fetch" target="_blank">
22+
<img src="https://badge.php.gt/fetch-docs.svg" alt="PHP.Gt/Fetch documentation" />
2023
</a>
2124

2225
## Example usage: compute multiple HTTP requests in parallel.

circle.yml

-11
This file was deleted.

composer.json

+62-42
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,64 @@
11
{
2-
"name": "phpgt/fetch",
3-
"description": "Asynchronous HTTP client with promises.",
4-
"type": "library",
5-
6-
"require": {
7-
"php": ">=7.1",
8-
"react/event-loop": "^1.0.0",
9-
"react/promise": "^2.4",
10-
"phpcurl/curlwrapper": "^2.1",
11-
"react/stream": "^0.4.4"
12-
},
13-
"require-dev": {
14-
"phpunit/phpunit": "5.*|7.*"
15-
},
16-
17-
"license": "MIT",
18-
19-
"authors": [
20-
{
21-
"name": "Greg Bowler",
22-
"email": "[email protected]"
23-
}
24-
],
25-
26-
"autoload": {
27-
"psr-4": {
28-
"Gt\\Fetch\\": "./src"
29-
}
30-
},
31-
32-
"keywords": [
33-
"http",
34-
"fetch",
35-
"async",
36-
"asynchronous",
37-
"xmlhttprequest",
38-
"ajax",
39-
"get",
40-
"post",
41-
"curl",
42-
"curl_multi"
43-
]
2+
"name": "phpgt/fetch",
3+
"description": "Asynchronous HTTP client with promises for PHP 7 applications.",
4+
"type": "library",
5+
"license": "MIT",
6+
7+
"minimum-stability": "dev",
8+
9+
"provide": {
10+
"php-http/client-implementation": "1.0",
11+
"php-http/async-client-implementation": "1.0"
12+
},
13+
14+
"require": {
15+
"php": ">=7.1.0",
16+
"ext-curl": "*",
17+
"ext-json": "*",
18+
"phpgt/http": "dev-master",
19+
"phpgt/curl": "dev-master",
20+
21+
"php-http/httplug": "^1.1",
22+
"php-http/promise": "^1.0.0",
23+
24+
"react/event-loop": "^1.0.0",
25+
"react/stream": "^1.0.0",
26+
"react/promise": "^2.7.0"
27+
},
28+
29+
"require-dev": {
30+
"phpunit/phpunit": "7.*"
31+
},
32+
33+
"autoload": {
34+
"psr-4": {
35+
"Gt\\Fetch\\": "./src"
36+
}
37+
},
38+
39+
"autoload-dev": {
40+
"psr-4": {
41+
"Gt\\Fetch\\Test\\": "./test/unit"
42+
}
43+
},
44+
45+
"authors": [
46+
{
47+
"name": "Greg Bowler",
48+
"email": "[email protected]"
49+
}
50+
],
51+
52+
"keywords": [
53+
"http",
54+
"fetch",
55+
"async",
56+
"asynchronous",
57+
"xmlhttprequest",
58+
"ajax",
59+
"get",
60+
"post",
61+
"curl",
62+
"curl_multi"
63+
]
4464
}

0 commit comments

Comments
 (0)