Skip to content

Commit 339bd57

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
2 parents 79ae309 + b8c1b5e commit 339bd57

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
@@ -389,12 +389,17 @@ class Tester
389389
* @param array $extraArgs Command extra arguments.
390390
* @param bool $forceStderr Whether to output to stderr so error log is used.
391391
* @param bool $daemonize Whether to start FPM daemonized
392+
* @param array $extensions List of extension to add if shared build used.
392393
*
393394
* @return bool
394395
* @throws \Exception
395396
*/
396-
public function start(array $extraArgs = [], bool $forceStderr = true, bool $daemonize = false)
397-
{
397+
public function start(
398+
array $extraArgs = [],
399+
bool $forceStderr = true,
400+
bool $daemonize = false,
401+
array $extensions = []
402+
) {
398403
$configFile = $this->createConfig();
399404
$desc = $this->outDesc ? [] : [1 => array('pipe', 'w'), 2 => array('redirect', 1)];
400405

@@ -409,6 +414,14 @@ class Tester
409414
$cmd[] = '-F';
410415
}
411416

417+
$extensionDir = getenv('TEST_FPM_EXTENSION_DIR');
418+
if ($extensionDir) {
419+
$cmd[] = '-dextension_dir=' . $extensionDir;
420+
foreach ($extensions as $extension) {
421+
$cmd[] = '-dextension=' . $extension;
422+
}
423+
}
424+
412425
if (getenv('TEST_FPM_RUN_AS_ROOT')) {
413426
$cmd[] = '--allow-to-run-as-root';
414427
}

0 commit comments

Comments
 (0)