Navigation Menu

Skip to content

Commit

Permalink
Merge branch '4.3' into 4.4
Browse files Browse the repository at this point in the history
* 4.3:
  [HttpClient] workaround curl_multi_select() issue
  [CI] fix building local packages
  Increase limits for flakey appveyor tests
  • Loading branch information
nicolas-grekas committed Oct 15, 2019
2 parents 6253369 + 0c77296 commit 3723d03
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .appveyor.yml
Expand Up @@ -47,6 +47,8 @@ install:
- php composer.phar self-update
- copy /Y .github\composer-config.json %APPDATA%\Composer\config.json
- php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex dev-master
- git config --global user.email ""
- git config --global user.name "Symfony"
- php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit src\Symfony\Contracts
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
- php composer.phar update --no-progress --no-suggest --ansi
Expand Down
2 changes: 1 addition & 1 deletion .github/build-packages.php
Expand Up @@ -47,7 +47,7 @@
if (isset($preferredInstall[$package->name]) && 'source' === $preferredInstall[$package->name]) {
passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *");
} else {
passthru("cd $dir && git init && git add . && git commit --author \"Symfony <>\" -m - && git archive -o package.tar HEAD && rm .git/ -Rf");
passthru("cd $dir && git init && git add . && git commit -q -m - && git archive -o package.tar HEAD && rm .git/ -Rf");
}

if (!isset($package->extra->{'branch-alias'}->{'dev-master'})) {
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -202,6 +202,9 @@ install:
- |
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
git config --global user.email ""
git config --global user.name "Symfony"
if [[ ! $deps ]]; then
php .github/build-packages.php HEAD^ src/Symfony/Bridge/PhpUnit src/Symfony/Contracts
else
Expand Down
5 changes: 5 additions & 0 deletions src/Symfony/Component/HttpClient/Response/CurlResponse.php
Expand Up @@ -286,6 +286,11 @@ private static function perform(CurlClientState $multi, array &$responses = null
*/
private static function select(CurlClientState $multi, float $timeout): int
{
if (\PHP_VERSION_ID < 70123 || (70200 <= \PHP_VERSION_ID && \PHP_VERSION_ID < 70211)) {
// workaround https://bugs.php.net/76480
$timeout = min($timeout, 0.01);
}

return curl_multi_select($multi->handle, $timeout);
}

Expand Down
Expand Up @@ -72,7 +72,7 @@ public function testNoServer()
$connection = new Connection(self::VAR_DUMPER_SERVER);
$start = microtime(true);
$this->assertFalse($connection->write($data));
$this->assertLessThan(1, microtime(true) - $start);
$this->assertLessThan(4, microtime(true) - $start);
}

private function getServerProcess(): Process
Expand Down
6 changes: 3 additions & 3 deletions src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php
Expand Up @@ -597,9 +597,9 @@ public function testNotATimeout()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057/timeout-header', [
'timeout' => 0.5,
'timeout' => 0.9,
]);
usleep(510000);
sleep(1);
$this->assertSame(200, $response->getStatusCode());
}

Expand Down Expand Up @@ -669,7 +669,7 @@ public function testDestruct()
$duration = microtime(true) - $start;

$this->assertGreaterThan(1, $duration);
$this->assertLessThan(3, $duration);
$this->assertLessThan(4, $duration);
}

public function testProxy()
Expand Down

0 comments on commit 3723d03

Please sign in to comment.