Skip to content

Commit 6e0a672

Browse files
Merge branch '5.0' into 5.1
* 5.0: Fix abstract method name in PHP doc block Various cleanups [HttpClient] fix issues in tests Fixes sprintf(): Too few arguments in form transformer [Console] Fix QuestionHelper::disableStty() [Validator] Use Mime component to determine mime type for file validator validate subforms in all validation groups Update Hungarian translations Add meaningful message when Process is not installed (ProcessHelper) [PropertyAccess] Fix TypeError parsing again. [TwigBridge] fix fallback html-to-txt body converter [Security/Http] fix merge [ErrorHandler] fix setting $trace to null in FatalError [Form] add missing Czech validators translation [Validator] add missing Czech translations never directly validate Existence (Required/Optional) constraints
2 parents f8bed25 + 724b90a commit 6e0a672

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Test/TestHttpServer.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,23 @@
1616

1717
class TestHttpServer
1818
{
19-
private static $started;
19+
private static $process;
2020

2121
public static function start()
2222
{
23-
if (self::$started) {
24-
return;
23+
if (self::$process) {
24+
self::$process->stop();
2525
}
2626

2727
$finder = new PhpExecutableFinder();
2828
$process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', '127.0.0.1:8057']));
2929
$process->setWorkingDirectory(__DIR__.'/Fixtures/web');
3030
$process->start();
3131

32-
register_shutdown_function([$process, 'stop']);
33-
sleep('\\' === \DIRECTORY_SEPARATOR ? 10 : 1);
32+
do {
33+
usleep(50000);
34+
} while (!@fopen('http://127.0.0.1:8057/', 'r'));
3435

35-
self::$started = true;
36+
self::$process = $process;
3637
}
3738
}

0 commit comments

Comments
 (0)