Skip to content

Commit b8c1b5e

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
2 parents 1562ba5 + db2d32f commit b8c1b5e

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

sapi/fpm/tests/bug77780-header-sent-error.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ echo str_repeat('asdfghjkl', 150000) . "\n";
2424
EOT;
2525

2626
$tester = new FPM\Tester($cfg, $code);
27-
$tester->start();
27+
$tester->start(extensions: ['session']);
2828
$tester->expectLogStartNotices();
2929
$tester
3030
->request(

sapi/fpm/tests/tester.inc

+15-2
Original file line numberDiff line numberDiff line change
@@ -379,12 +379,17 @@ class Tester
379379
* @param array $extraArgs Command extra arguments.
380380
* @param bool $forceStderr Whether to output to stderr so error log is used.
381381
* @param bool $daemonize Whether to start FPM daemonized
382+
* @param array $extensions List of extension to add if shared build used.
382383
*
383384
* @return bool
384385
* @throws \Exception
385386
*/
386-
public function start(array $extraArgs = [], bool $forceStderr = true, bool $daemonize = false)
387-
{
387+
public function start(
388+
array $extraArgs = [],
389+
bool $forceStderr = true,
390+
bool $daemonize = false,
391+
array $extensions = []
392+
) {
388393
$configFile = $this->createConfig();
389394
$desc = $this->outDesc ? [] : [1 => array('pipe', 'w'), 2 => array('redirect', 1)];
390395

@@ -399,6 +404,14 @@ class Tester
399404
$cmd[] = '-F';
400405
}
401406

407+
$extensionDir = getenv('TEST_FPM_EXTENSION_DIR');
408+
if ($extensionDir) {
409+
$cmd[] = '-dextension_dir=' . $extensionDir;
410+
foreach ($extensions as $extension) {
411+
$cmd[] = '-dextension=' . $extension;
412+
}
413+
}
414+
402415
if (getenv('TEST_FPM_RUN_AS_ROOT')) {
403416
$cmd[] = '--allow-to-run-as-root';
404417
}

0 commit comments

Comments
 (0)