Skip to content

Commit 3723d03

Browse files
Merge branch '4.3' into 4.4
* 4.3: [HttpClient] workaround curl_multi_select() issue [CI] fix building local packages Increase limits for flakey appveyor tests
2 parents 6253369 + 0c77296 commit 3723d03

File tree

6 files changed

+15
-5
lines changed

6 files changed

+15
-5
lines changed

.appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ install:
4747
- php composer.phar self-update
4848
- copy /Y .github\composer-config.json %APPDATA%\Composer\config.json
4949
- php composer.phar global require --no-progress --no-scripts --no-plugins symfony/flex dev-master
50+
- git config --global user.email ""
51+
- git config --global user.name "Symfony"
5052
- php .github/build-packages.php "HEAD^" src\Symfony\Bridge\PhpUnit src\Symfony\Contracts
5153
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
5254
- php composer.phar update --no-progress --no-suggest --ansi

.github/build-packages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
if (isset($preferredInstall[$package->name]) && 'source' === $preferredInstall[$package->name]) {
4848
passthru("cd $dir && tar -cf package.tar --exclude='package.tar' *");
4949
} else {
50-
passthru("cd $dir && git init && git add . && git commit --author \"Symfony <>\" -m - && git archive -o package.tar HEAD && rm .git/ -Rf");
50+
passthru("cd $dir && git init && git add . && git commit -q -m - && git archive -o package.tar HEAD && rm .git/ -Rf");
5151
}
5252

5353
if (!isset($package->extra->{'branch-alias'}->{'dev-master'})) {

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ install:
202202
203203
- |
204204
# Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
205+
git config --global user.email ""
206+
git config --global user.name "Symfony"
207+
205208
if [[ ! $deps ]]; then
206209
php .github/build-packages.php HEAD^ src/Symfony/Bridge/PhpUnit src/Symfony/Contracts
207210
else

src/Symfony/Component/HttpClient/Response/CurlResponse.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,11 @@ private static function perform(CurlClientState $multi, array &$responses = null
286286
*/
287287
private static function select(CurlClientState $multi, float $timeout): int
288288
{
289+
if (\PHP_VERSION_ID < 70123 || (70200 <= \PHP_VERSION_ID && \PHP_VERSION_ID < 70211)) {
290+
// workaround https://bugs.php.net/76480
291+
$timeout = min($timeout, 0.01);
292+
}
293+
289294
return curl_multi_select($multi->handle, $timeout);
290295
}
291296

src/Symfony/Component/VarDumper/Tests/Server/ConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testNoServer()
7272
$connection = new Connection(self::VAR_DUMPER_SERVER);
7373
$start = microtime(true);
7474
$this->assertFalse($connection->write($data));
75-
$this->assertLessThan(1, microtime(true) - $start);
75+
$this->assertLessThan(4, microtime(true) - $start);
7676
}
7777

7878
private function getServerProcess(): Process

src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,9 +597,9 @@ public function testNotATimeout()
597597
{
598598
$client = $this->getHttpClient(__FUNCTION__);
599599
$response = $client->request('GET', 'http://localhost:8057/timeout-header', [
600-
'timeout' => 0.5,
600+
'timeout' => 0.9,
601601
]);
602-
usleep(510000);
602+
sleep(1);
603603
$this->assertSame(200, $response->getStatusCode());
604604
}
605605

@@ -669,7 +669,7 @@ public function testDestruct()
669669
$duration = microtime(true) - $start;
670670

671671
$this->assertGreaterThan(1, $duration);
672-
$this->assertLessThan(3, $duration);
672+
$this->assertLessThan(4, $duration);
673673
}
674674

675675
public function testProxy()

0 commit comments

Comments
 (0)