Skip to content

Commit b7008a5

Browse files
committed
Remove support for async extension
1 parent 7770fd3 commit b7008a5

File tree

5 files changed

+6
-54
lines changed

5 files changed

+6
-54
lines changed

.travis.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ cache:
77
- $HOME/.composer/cache
88

99
php:
10-
- 7.1
1110
- 7.2
1211
- 7.3
12+
- 7.4
13+
- 8.0
1314

1415
env:
1516
global:
@@ -26,14 +27,9 @@ matrix:
2627
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"
2728
- php: 7.2
2829
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
29-
- php: 7.3
30-
env: USE_ASYNC=true
3130

3231
before_install:
3332
- travis_retry composer self-update
34-
- if [[ "$USE_ASYNC" = true ]]; then git clone https://github.com/concurrent-php/ext-async.git /tmp/async; fi
35-
- if [[ "$USE_ASYNC" = true ]]; then cd /tmp/async && phpize && ./configure && sudo make install; fi
36-
- if [[ "$USE_ASYNC" = true ]]; then echo "extension = async.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini && php -m && cd $TRAVIS_BUILD_DIR; fi
3733

3834
install:
3935
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction --ignore-platform-reqs

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change Log
22

3-
## 2.0.0 (unreleased)
3+
## 2.0.0
44

55
* Remove response and stream factory, use direct implementation of nyholm/psr7
66
* Async support with ext-async extension: see https://github.com/concurrent-php/ext-async
@@ -20,7 +20,7 @@
2020
* `ConnectionException`
2121
* `InvalidRequestException`
2222
* `SSLConnectionException`
23-
23+
2424
## 1.2.0
2525

2626
* Dropped PHP 5.4 support

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"php-http/client-common": "^2.0"
2424
},
2525
"provide": {
26-
"php-http/client-implementation": "1.0"
26+
"php-http/client-implementation": "1.0",
27+
"psr/http-client": "1.0"
2728
},
2829
"autoload": {
2930
"psr-4": {

src/Client.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ class Client implements HttpClient
3434
'ssl_method' => STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT,
3535
];
3636

37-
private $hasAsync;
38-
3937
/**
4038
* Constructor.
4139
*
@@ -52,8 +50,6 @@ class Client implements HttpClient
5250
*/
5351
public function __construct($config1 = [], $config2 = null, array $config = [])
5452
{
55-
$this->hasAsync = PHP_VERSION_ID >= 70300 && \extension_loaded('async');
56-
5753
if (\is_array($config1)) {
5854
$this->config = $this->configure($config1);
5955

@@ -191,10 +187,6 @@ private function determineRemoteFromRequest(RequestInterface $request)
191187
$endpoint = $request->getHeaderLine('Host');
192188
}
193189

194-
if ($this->hasAsync) {
195-
return sprintf('async-tcp://%s', $endpoint);
196-
}
197-
198190
return sprintf('tcp://%s', $endpoint);
199191
}
200192
}

tests/AsyncTest.php

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)