Skip to content

Commit

Permalink
Merge pull request #31 from mmenozzi/update-amp-socket
Browse files Browse the repository at this point in the history
Update amphp/socket
  • Loading branch information
mmenozzi committed May 18, 2020
2 parents 03ca15b + f3831a2 commit f1fd873
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -3,9 +3,10 @@ sudo: required
language: php

php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- nightly

matrix:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -15,7 +15,7 @@
},
"require": {
"amphp/amp": "^2",
"amphp/socket": "^0.10",
"amphp/socket": "^1.0",
"amphp/uri": "^0.1",
"symfony/yaml": "^3.3"
},
Expand All @@ -26,7 +26,7 @@
},
"config": {
"platform": {
"php": "7.0.0"
"php": "7.1.0"
}
}
}
2 changes: 1 addition & 1 deletion src/BeanstalkClient.php
Expand Up @@ -5,12 +5,12 @@
use Amp\Beanstalk\Stats\Job;
use Amp\Beanstalk\Stats\System;
use Amp\Beanstalk\Stats\Tube;
use function Amp\call;
use Amp\Deferred;
use Amp\Promise;
use Amp\Uri\Uri;
use Symfony\Component\Yaml\Yaml;
use Throwable;
use function Amp\call;

class BeanstalkClient {
/** @var Deferred[] */
Expand Down
10 changes: 5 additions & 5 deletions src/Connection.php
Expand Up @@ -2,14 +2,14 @@

namespace Amp\Beanstalk;

use function Amp\asyncCall;
use function Amp\call;
use Amp\Deferred;
use Amp\Socket\ClientConnectContext;
use function Amp\Socket\connect;
use Amp\Socket\ConnectContext;
use Amp\Socket\Socket;
use Amp\Success;
use Amp\Uri\Uri;
use function Amp\asyncCall;
use function Amp\call;
use function Amp\Socket\connect;

class Connection {
/** @var Deferred */
Expand Down Expand Up @@ -88,7 +88,7 @@ private function connect() {
}

$this->connectPromisor = new Deferred;
$socketPromise = connect($this->uri, (new ClientConnectContext)->withConnectTimeout($this->timeout));
$socketPromise = connect($this->uri, (new ConnectContext)->withConnectTimeout($this->timeout));

$socketPromise->onResolve(function ($error, $socket) {
$connectPromisor = $this->connectPromisor;
Expand Down
2 changes: 1 addition & 1 deletion test/IntegrationTest.php
Expand Up @@ -5,9 +5,9 @@
use Amp\Beanstalk\BeanstalkClient;
use Amp\Beanstalk\Stats\Job;
use Amp\Beanstalk\Stats\System;
use PHPUnit\Framework\TestCase;
use function Amp\call;
use function Amp\Promise\wait;
use PHPUnit\Framework\TestCase;

class IntegrationTest extends TestCase {
/** @var BeanstalkClient */
Expand Down

0 comments on commit f1fd873

Please sign in to comment.