From fc3d220eb3f3ad21e0ef5786116270613738b270 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Fri, 2 Oct 2026 11:34:23 -0700 Subject: [PATCH 1/5] Fix staleness issues where logging into new board triggers form invalid --- src/QuickInstall/Sandbox/DockerComposeWriter.php | 12 +++++++++--- tests/Unit/DockerComposeWriterTest.php | 4 ++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/QuickInstall/Sandbox/DockerComposeWriter.php b/src/QuickInstall/Sandbox/DockerComposeWriter.php index eb971454..ac100013 100644 --- a/src/QuickInstall/Sandbox/DockerComposeWriter.php +++ b/src/QuickInstall/Sandbox/DockerComposeWriter.php @@ -183,13 +183,18 @@ private function extensionVolumes(array $extensions): string return $volumes; } - /** Routes a scoped board URL to phpBB's unchanged document root. */ + /** Prevents stale sandbox responses and routes scoped URLs to phpBB. */ private function apacheConfig(string $name, array $config): string { $serverName = $config['server_name'] ?? 'localhost'; + $headers = << Date: Fri, 2 Oct 2026 11:34:55 -0700 Subject: [PATCH 2/5] Fix issue where extensions newly mounted get auto-enabled --- src/QuickInstall/Sandbox/DockerComposeWriter.php | 3 ++- tests/Unit/DockerComposeWriterTest.php | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/QuickInstall/Sandbox/DockerComposeWriter.php b/src/QuickInstall/Sandbox/DockerComposeWriter.php index ac100013..759affb4 100644 --- a/src/QuickInstall/Sandbox/DockerComposeWriter.php +++ b/src/QuickInstall/Sandbox/DockerComposeWriter.php @@ -110,7 +110,8 @@ private function installConfig(string $name, array $config): string server_name: $serverName server_port: {$config['port']} script_path: $scriptPath - extensions: [] + # phpBB treats an empty list as "enable all available extensions". + extensions: ["__quickinstall_none__"] YAML; } diff --git a/tests/Unit/DockerComposeWriterTest.php b/tests/Unit/DockerComposeWriterTest.php index 07885d42..ecf8e7f9 100644 --- a/tests/Unit/DockerComposeWriterTest.php +++ b/tests/Unit/DockerComposeWriterTest.php @@ -49,6 +49,16 @@ public function testWritesDatabaseRuntimeFiles(string $board, string $db, array } } + public function testInstallConfigDoesNotEnableMountedExtensions(): void + { + [, $paths] = $this->writeBoard('demo'); + $installConfig = file_get_contents($paths['install_config']); + + self::assertStringContainsString('phpBB treats an empty list as "enable all available extensions"', $installConfig); + self::assertStringContainsString('extensions: ["__quickinstall_none__"]', $installConfig); + self::assertStringNotContainsString('extensions: []', $installConfig); + } + public function testLegacyPhpMysqlRuntimeUsesNativePasswordAuth(): void { $root = $this->createTempProjectRoot(); From 84da8c85f007170c872b750ccb7ef5c6b88929c9 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 22 Oct 2026 08:09:46 -0700 Subject: [PATCH 3/5] Rely on PHP 8.2 as min version where supported --- README.md | 3 +- src/QuickInstall/Sandbox/VersionMatrix.php | 10 +++--- tests/Unit/SourceProviderTest.php | 11 ++++--- tests/Unit/VersionMatrixTest.php | 37 +++++++++++++++++++--- 4 files changed, 45 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index be2e8fec..064aed9a 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,8 @@ phpBB boards require a web server running PHP and one of the following database |----------------|---------------|--------|---------|------------|----------------|--------------| | 4.0.0 (alpha) | 8.2+ | 8.0+ | 10.2.7+ | 9.5+ | SQLite 3.8.3+ | Server 2012+ | | 3.3.11 - 3.3.x | 7.2.0 - 8.x | 4.1.3+ | 5.1+ | 8.3+ | SQLite 3.6.15+ | Server 2000+ | -| 3.3.0 - 3.3.10 | 7.1.3 - 8.x | 4.1.3+ | 5.1+ | 8.3+ | SQLite 3.6.15+ | Server 2000+ | +| 3.3.6 - 3.3.10 | 7.1.3 - 8.x | 4.1.3+ | 5.1+ | 8.3+ | SQLite 3.6.15+ | Server 2000+ | +| 3.3.0 - 3.3.5 | 7.1.3 - 7.4 | 4.1.3+ | 5.1+ | 8.3+ | SQLite 3.6.15+ | Server 2000+ | | 3.2.2 - 3.2.11 | 5.4.7 - 7.2.x | 3.23+ | 5.1+ | 8.3+ | SQLite 3.6.15+ | Server 2000+ | | 3.2.0 - 3.2.1 | 5.4.7 - 7.1.x | 3.23+ | 5.1+ | 8.3+ | SQLite 3.6.15+ | Server 2000+ | | 3.1.x | 5.4.7 - 5.6.x | 3.23+ | 5.1+ | 8.3+ | SQLite 2 or 3 | Server 2000+ | diff --git a/src/QuickInstall/Sandbox/VersionMatrix.php b/src/QuickInstall/Sandbox/VersionMatrix.php index e5536106..ff059213 100644 --- a/src/QuickInstall/Sandbox/VersionMatrix.php +++ b/src/QuickInstall/Sandbox/VersionMatrix.php @@ -18,8 +18,8 @@ class VersionMatrix public function list(): array { return [ - ['selector' => 'latest', 'resolves_to' => '3.3.*', 'status' => 'supported', 'php' => '8.1', 'notes' => 'Default supported stable line'], - ['selector' => '3.3 / 3.3.x', 'resolves_to' => '3.3.* or exact tag', 'status' => 'supported', 'php' => '8.1', 'notes' => 'Recommended; exact 3.3.0-3.3.4 use PHP 7.4'], + ['selector' => 'latest', 'resolves_to' => '3.3.*', 'status' => 'supported', 'php' => '8.2', 'notes' => 'Default supported stable line'], + ['selector' => '3.3 / 3.3.x', 'resolves_to' => '3.3.* or exact tag', 'status' => 'supported', 'php' => '8.2', 'notes' => 'Recommended; exact 3.3.0-3.3.5 use PHP 7.4'], ['selector' => '3.2 / 3.2.x', 'resolves_to' => '3.2.* or exact tag', 'status' => 'supported', 'php' => '7.1', 'notes' => 'Legacy-modern'], ['selector' => '4.0.x / master', 'resolves_to' => 'exact tag or dev-master', 'status' => 'experimental', 'php' => '8.2', 'notes' => 'Installer may change upstream'], ['selector' => '3.0.x / 3.1.x', 'resolves_to' => '-', 'status' => 'unsupported', 'php' => '-', 'notes' => 'Use legacy web app'], @@ -60,7 +60,7 @@ public function resolve(string $requested, bool $git = false): array 'constraint' => '3.3.*', 'branch' => '3.3', 'phpbb_branch' => '3.3', - 'php' => '8.1', + 'php' => '8.2', 'status' => 'supported', ]; } @@ -73,7 +73,7 @@ public function resolve(string $requested, bool $git = false): array 'constraint' => '3.3.*', 'branch' => '3.3', 'phpbb_branch' => '3.3', - 'php' => '8.1', + 'php' => '8.2', 'status' => 'supported', ]; } @@ -112,7 +112,7 @@ public function resolve(string $requested, bool $git = false): array 'constraint' => $requested, 'branch' => '3.3', 'phpbb_branch' => '3.3', - 'php' => version_compare($requested, '3.3.5', '<') ? '7.4' : '8.1', + 'php' => version_compare($requested, '3.3.6', '<') ? '7.4' : '8.2', 'status' => 'supported', ]; } diff --git a/tests/Unit/SourceProviderTest.php b/tests/Unit/SourceProviderTest.php index 6e95425c..4c4394cc 100644 --- a/tests/Unit/SourceProviderTest.php +++ b/tests/Unit/SourceProviderTest.php @@ -19,6 +19,7 @@ public function testAddComposerExactVersionRegistersSource(): void self::assertSame('3.3.14', $source['source_key']); self::assertSame('phpbb/phpbb', $source['package']); + self::assertSame('8.2', $source['php']); self::assertNull($source['url']); self::assertSame($source, $project->readJson('sources.json', [])['3.3.14']); } @@ -298,12 +299,12 @@ public function testFloatingStableSelectorDownloadsNewResolvedVersion(): void public function phpRequirementProvider(): array { return [ - 'default runtime satisfies lower minimum' => ['>=7.4', '8.1'], - 'default runtime satisfies caret minimum' => ['^8.1', '8.1'], + 'default runtime satisfies lower minimum' => ['>=7.4', '8.2'], + 'default runtime satisfies caret minimum' => ['^8.1', '8.2'], 'higher minimum bumps runtime' => ['>=8.2', '8.2'], - 'less-than constraint is ignored as minimum' => ['<8.0 || >=8.1', '8.1'], - 'not-equal constraint is ignored as minimum' => ['!=8.2 >=8.0', '8.1'], - 'malformed requirement keeps default' => ['dev-main', '8.1'], + 'less-than constraint is ignored as minimum' => ['<8.0 || >=8.1', '8.2'], + 'not-equal constraint is ignored as minimum' => ['!=8.2 >=8.0', '8.2'], + 'malformed requirement keeps default' => ['dev-main', '8.2'], ]; } diff --git a/tests/Unit/VersionMatrixTest.php b/tests/Unit/VersionMatrixTest.php index 4688b09f..8ceee7f4 100644 --- a/tests/Unit/VersionMatrixTest.php +++ b/tests/Unit/VersionMatrixTest.php @@ -8,6 +8,30 @@ class VersionMatrixTest extends TestCase { + public function testListReportsPhp82ForSupportedStableLine(): void + { + $versions = (new VersionMatrix())->list(); + + self::assertSame('8.2', $versions[0]['php']); + self::assertSame('8.2', $versions[1]['php']); + self::assertStringContainsString('3.3.0-3.3.5 use PHP 7.4', $versions[1]['notes']); + } + + public function testPhpbb33SelectorsDoNotUsePhp81(): void + { + $matrix = new VersionMatrix(); + $selectors = ['latest', '3.3', '3.3.x']; + for ($patch = 0; $patch <= 19; $patch++) + { + $selectors[] = "3.3.$patch"; + } + + foreach ($selectors as $selector) + { + self::assertNotSame('8.1', $matrix->resolve($selector)['php']); + } + } + /** * @dataProvider supportedSelectorProvider */ @@ -49,13 +73,16 @@ public function testGitSelectorUsesBranchAsSourceKey(string $selector, string $s public function supportedSelectorProvider(): array { return [ - 'latest' => ['latest', ['source_key' => '3.3', 'constraint' => '3.3.*', 'php' => '8.1']], + 'latest' => ['latest', ['source_key' => '3.3', 'constraint' => '3.3.*', 'php' => '8.2']], '3.3 shorthand' => ['3.3', ['source_key' => '3.3', 'constraint' => '3.3.*', 'phpbb_branch' => '3.3']], - '3.3.x shorthand' => ['3.3.x', ['source_key' => '3.3', 'constraint' => '3.3.*', 'php' => '8.1']], + '3.3.x shorthand' => ['3.3.x', ['source_key' => '3.3', 'constraint' => '3.3.*', 'php' => '8.2']], 'exact 3.3.0 release' => ['3.3.0', ['source_key' => '3.3.0', 'constraint' => '3.3.0', 'php' => '7.4']], - 'exact 3.3.4 release' => ['3.3.4', ['source_key' => '3.3.4', 'constraint' => '3.3.4', 'php' => '7.4']], - 'exact 3.3.5 release' => ['3.3.5', ['source_key' => '3.3.5', 'constraint' => '3.3.5', 'php' => '8.1']], - 'exact 3.3 release' => ['3.3.14', ['source_key' => '3.3.14', 'constraint' => '3.3.14', 'php' => '8.1']], + 'exact 3.3.3 release' => ['3.3.3', ['source_key' => '3.3.3', 'constraint' => '3.3.3', 'php' => '7.4']], + 'exact 3.3.5 release' => ['3.3.5', ['source_key' => '3.3.5', 'constraint' => '3.3.5', 'php' => '7.4']], + 'exact 3.3.6 release' => ['3.3.6', ['source_key' => '3.3.6', 'constraint' => '3.3.6', 'php' => '8.2']], + 'exact 3.3.9 release' => ['3.3.9', ['source_key' => '3.3.9', 'constraint' => '3.3.9', 'php' => '8.2']], + 'exact 3.3.10 release' => ['3.3.10', ['source_key' => '3.3.10', 'constraint' => '3.3.10', 'php' => '8.2']], + 'exact 3.3 release' => ['3.3.14', ['source_key' => '3.3.14', 'constraint' => '3.3.14', 'php' => '8.2']], '3.2 shorthand' => ['3.2', ['source_key' => '3.2', 'constraint' => '3.2.*', 'php' => '7.1']], 'exact 3.2 release' => ['3.2.11', ['source_key' => '3.2.11', 'constraint' => '3.2.11', 'php' => '7.1']], 'master' => ['master', ['source_key' => 'master', 'constraint' => 'dev-master', 'phpbb_branch' => '4.0']], From a0b5a637259c8d9143b2dbdba7023f8604fa2e4b Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 22 Oct 2026 10:07:58 -0700 Subject: [PATCH 4/5] Updated test fixtures to phpBB 3.3.19 with PHP 8.2 --- tests/Integration/ApplicationTest.php | 14 +++--- tests/Integration/WebApplicationTest.php | 48 +++++++++---------- tests/Unit/BoardServiceTest.php | 40 ++++++++-------- tests/Unit/CustomisationMountServiceTest.php | 6 +-- .../Unit/CustomisationUnmountServiceTest.php | 6 +-- tests/Unit/DockerComposeWriterTest.php | 6 +-- tests/Unit/ExtensionManagerTest.php | 6 +-- tests/Unit/LanguageManagerTest.php | 6 +-- tests/Unit/SourceProviderTest.php | 38 +++++++-------- tests/Unit/SourceServiceTest.php | 32 ++++++------- tests/Unit/StyleManagerTest.php | 6 +-- tests/Unit/VersionMatrixTest.php | 2 +- 12 files changed, 105 insertions(+), 105 deletions(-) diff --git a/tests/Integration/ApplicationTest.php b/tests/Integration/ApplicationTest.php index 0158f281..a6fe9912 100644 --- a/tests/Integration/ApplicationTest.php +++ b/tests/Integration/ApplicationTest.php @@ -118,10 +118,10 @@ public function testBoardCreateValidationRunsBeforeExternalFetch(): void public function testBoardCreateAllowsSupportedSqliteSeedPreset(): void { $root = $this->createTempProjectRoot(); - $this->addDownloadedSource($root, '3.3.14'); + $this->addDownloadedSource($root, '3.3.19'); $result = $this->runApplication($root, [ - 'qi', 'board:create', 'demo', '--phpbb', '3.3.14', '--db', 'sqlite', '--populate', 'development', + 'qi', 'board:create', 'demo', '--phpbb', '3.3.19', '--db', 'sqlite', '--populate', 'development', ], "n\n"); self::assertSame(0, $result['exit_code']); @@ -142,9 +142,9 @@ public function testBoardCreateRejectsHeavySqliteSeedPreset(): void public function testBoardCreatePromptsToStartBoardAfterNextStep(): void { $root = $this->createTempProjectRoot(); - $this->addDownloadedSource($root, '3.3.14'); + $this->addDownloadedSource($root, '3.3.19'); - $result = $this->runApplication($root, ['qi', 'board:create', 'demo', '--phpbb', '3.3.14', '--port', (string) $this->availablePort()], "n\n"); + $result = $this->runApplication($root, ['qi', 'board:create', 'demo', '--phpbb', '3.3.19', '--port', (string) $this->availablePort()], "n\n"); self::assertSame(0, $result['exit_code']); self::assertStringContainsString('NEXT:', $result['output']); @@ -162,9 +162,9 @@ public function testBoardCreateDefaultsStartPromptToYes(): void public function testBoardCreateRepeatsStartPromptUntilYesOrNo(): void { $root = $this->createTempProjectRoot(); - $this->addDownloadedSource($root, '3.3.14'); + $this->addDownloadedSource($root, '3.3.19'); - $result = $this->runApplication($root, ['qi', 'board:create', 'demo', '--phpbb', '3.3.14', '--port', (string) $this->availablePort()], "maybe\nn\n"); + $result = $this->runApplication($root, ['qi', 'board:create', 'demo', '--phpbb', '3.3.19', '--port', (string) $this->availablePort()], "maybe\nn\n"); self::assertSame(0, $result['exit_code']); self::assertMatchesRegularExpression('#URL after start: http://localhost:\d+/demo/#', $result['output']); @@ -286,7 +286,7 @@ private function addDownloadedSource(string $root, string $version): void 'constraint' => $version, 'branch' => $version, 'phpbb_branch' => '3.3', - 'php' => '8.1', + 'php' => '8.2', 'status' => 'supported', 'type' => 'composer', 'package' => 'phpbb/phpbb', diff --git a/tests/Integration/WebApplicationTest.php b/tests/Integration/WebApplicationTest.php index 03baea3c..917d89fc 100644 --- a/tests/Integration/WebApplicationTest.php +++ b/tests/Integration/WebApplicationTest.php @@ -38,13 +38,13 @@ public function testRenderShowsProjectState(): void $root = $this->createTempProjectRoot(); $project = new Project($root); $project->init(); - $this->addDownloadedSource($project, '3.3.14'); + $this->addDownloadedSource($project, '3.3.19'); $project->appendBoard([ 'name' => 'demo', - 'phpbb' => '3.3.14', - 'phpbb_source' => '3.3.14', + 'phpbb' => '3.3.19', + 'phpbb_source' => '3.3.19', 'phpbb_branch' => '3.3', - 'php' => '8.1', + 'php' => '8.2', 'db' => 'mariadb', 'port' => 8081, 'url' => 'http://localhost:8081/', @@ -69,7 +69,7 @@ public function testRenderShowsProjectState(): void self::assertStringContainsString('QuickInstall Dashboard', $text); self::assertStringContainsString('demo', $text); self::assertStringContainsString('http://localhost:8081/', $text); - self::assertStringContainsString('3.3.14', $text); + self::assertStringContainsString('3.3.19', $text); self::assertStringContainsString('vendor/one', $text); self::assertStringContainsString('vendor/four', $text); } @@ -83,9 +83,9 @@ public function testRenderListsEveryBoard(): void { $project->appendBoard([ 'name' => 'board-' . $index, - 'phpbb' => '3.3.17', - 'phpbb_source' => '3.3.17', - 'php' => '8.1', + 'phpbb' => '3.3.19', + 'phpbb_source' => '3.3.19', + 'php' => '8.2', 'db' => 'mariadb', 'port' => 8100 + $index, 'url' => 'http://localhost:' . (8100 + $index) . '/', @@ -110,8 +110,8 @@ public function testRunningBoardRendersOneStopAction(): void { $html = $this->renderDashboard([[ 'name' => 'demo', - 'phpbb' => '3.3.17', - 'php' => '8.1', + 'phpbb' => '3.3.19', + 'php' => '8.2', 'db' => 'mariadb', 'url' => 'http://localhost:8080/', 'populate' => 'none', @@ -131,8 +131,8 @@ public function testBoardUrlIsLinkedOnlyWhileRunning(): void { $board = [ 'name' => 'demo', - 'phpbb' => '3.3.17', - 'php' => '8.1', + 'phpbb' => '3.3.19', + 'php' => '8.2', 'db' => 'mariadb', 'url' => 'http://localhost:8080/', 'populate' => 'none', @@ -154,7 +154,7 @@ public function testBoardCreateRejectsHeavySqliteSeedPreset(): void $json = $this->runWebApplicationWithCsrf($root, [ 'action' => 'board_create', 'name' => 'demo', - 'phpbb' => '3.3.14', + 'phpbb' => '3.3.19', 'db' => 'sqlite', 'port' => '8080', 'populate' => 'load-test', @@ -310,17 +310,17 @@ public function testAjaxSourceRemoveDeletesSource(): void $root = $this->createTempProjectRoot(); $project = new Project($root); $project->init(); - $this->addDownloadedSource($project, '3.3.14'); + $this->addDownloadedSource($project, '3.3.19'); $json = $this->runWebApplicationWithCsrf($root, [ 'action' => 'source_remove', - 'source' => '3.3.14', + 'source' => '3.3.19', ], true); $data = json_decode($json, true); self::assertIsArray($data); self::assertTrue($data['ok']); - self::assertSame('Removed source: 3.3.14', $data['notice']); + self::assertSame('Removed source: 3.3.19', $data['notice']); self::assertSame([], $project->readJson('sources.json', [])); } @@ -329,13 +329,13 @@ public function testAjaxExtensionMountReturnsJsonError(): void $root = $this->createTempProjectRoot(); $project = new Project($root); $project->init(); - $this->addDownloadedSource($project, '3.3.14'); + $this->addDownloadedSource($project, '3.3.19'); $project->appendBoard([ 'name' => 'demo', - 'phpbb' => '3.3.14', - 'phpbb_source' => '3.3.14', + 'phpbb' => '3.3.19', + 'phpbb_source' => '3.3.19', 'phpbb_branch' => '3.3', - 'php' => '8.1', + 'php' => '8.2', 'db' => 'mariadb', 'port' => 8081, 'url' => 'http://localhost:8081/', @@ -379,13 +379,13 @@ public function testRenderShowsProjectRelativeSourcePaths(): void $root = $this->createTempProjectRoot(); $project = new Project($root); $project->init(); - $this->addDownloadedSource($project, '3.3.14'); + $this->addDownloadedSource($project, '3.3.19'); $html = $this->runWebApplication($root); $text = $this->visibleText($html); - self::assertStringContainsString('/' . basename($root) . '/.qi/sources/phpbb-3.3.14', $text); - self::assertStringNotContainsString($root . '/.qi/sources/phpbb-3.3.14', $text); + self::assertStringContainsString('/' . basename($root) . '/.qi/sources/phpbb-3.3.19', $text); + self::assertStringNotContainsString($root . '/.qi/sources/phpbb-3.3.19', $text); } public function testRenderShowsCachedUpdateBanner(): void @@ -576,7 +576,7 @@ private function addDownloadedSource(Project $project, string $key): void 'constraint' => $key, 'branch' => '3.3', 'phpbb_branch' => '3.3', - 'php' => '8.1', + 'php' => '8.2', 'status' => 'supported', 'type' => 'composer', 'package' => 'phpbb/phpbb', diff --git a/tests/Unit/BoardServiceTest.php b/tests/Unit/BoardServiceTest.php index 5ca07710..bea132c2 100644 --- a/tests/Unit/BoardServiceTest.php +++ b/tests/Unit/BoardServiceTest.php @@ -16,11 +16,11 @@ class BoardServiceTest extends TestCase public function testCreateWritesBoardAndRuntimeConfig(): void { - $project = $this->projectWithSource('3.3.14'); + $project = $this->projectWithSource('3.3.19'); $runner = new ServiceTestBoardRunner($project); $service = new TestBoardService($project, $runner); - $result = $service->create('demo', '3.3.14', 'postgres', 8090, 'tiny', true); + $result = $service->create('demo', '3.3.19', 'postgres', 8090, 'tiny', true); self::assertSame('demo', $result['board']['name']); self::assertSame('postgres', $result['board']['db']); @@ -47,7 +47,7 @@ public function testHostTimezoneUsesPhpCompatibleEnvironmentValue(): void try { - $project = $this->projectWithSource('3.3.14'); + $project = $this->projectWithSource('3.3.19'); self::assertSame('US/Pacific', (new HostTimezoneTestBoardService($project))->detectedHostTimezone()); } finally @@ -58,39 +58,39 @@ public function testHostTimezoneUsesPhpCompatibleEnvironmentValue(): void public function testCreateRejectsDuplicateWithoutReplace(): void { - $project = $this->projectWithSource('3.3.14'); + $project = $this->projectWithSource('3.3.19'); $project->appendBoard(['name' => 'demo', 'port' => 8090]); $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Board already exists'); - (new TestBoardService($project))->create('demo', '3.3.14', 'mariadb', 8090); + (new TestBoardService($project))->create('demo', '3.3.19', 'mariadb', 8090); } public function testRejectsBoardNamesThatDifferOnlyByCase(): void { - $project = $this->projectWithSource('3.3.14'); + $project = $this->projectWithSource('3.3.19'); $project->appendBoard(['name' => 'Demo', 'port' => 8090]); $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('case-insensitive'); - (new TestBoardService($project))->create('demo', '3.3.14', 'mariadb', 8091); + (new TestBoardService($project))->create('demo', '3.3.19', 'mariadb', 8091); } public function testCreateWithReplacePreservesExistingBoardUntilReplacementIsReady(): void { - $project = $this->projectWithSource('3.3.14'); + $project = $this->projectWithSource('3.3.19'); $project->appendBoard(['name' => 'demo', 'port' => 8090]); $runner = new ServiceTestBoardRunner($project); - (new TestBoardService($project, $runner))->create('demo', '3.3.14', 'mariadb', 8090, 'none', false, true); + (new TestBoardService($project, $runner))->create('demo', '3.3.19', 'mariadb', 8090, 'none', false, true); self::assertSame(['demo'], $runner->preparedForReplacement); } public function testFailedReplacementRestoresExistingBoardFiles(): void { - $project = $this->projectWithSource('3.3.14'); + $project = $this->projectWithSource('3.3.19'); $project->appendBoard(['name' => 'demo', 'port' => 8090]); mkdir($project->boardPath('demo'), 0775, true); file_put_contents($project->boardPath('demo') . '/existing.txt', 'preserved'); @@ -99,7 +99,7 @@ public function testFailedReplacementRestoresExistingBoardFiles(): void try { - (new TestBoardService($project, $runner, false, $writer))->create('demo', '3.3.14', 'mariadb', 8090, 'none', false, true); + (new TestBoardService($project, $runner, false, $writer))->create('demo', '3.3.19', 'mariadb', 8090, 'none', false, true); self::fail('Expected replacement failure.'); } catch (\RuntimeException $e) @@ -136,28 +136,28 @@ public function testCreateCanUseRegisteredCustomSourceKey(): void public function testCreateRejectsUsedPortAndHostPort(): void { - $project = $this->projectWithSource('3.3.14'); + $project = $this->projectWithSource('3.3.19'); $project->appendBoard(['name' => 'other', 'port' => 8090]); $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Port 8090 is already used by board: other'); - (new TestBoardService($project))->create('demo', '3.3.14', 'mariadb', 8090); + (new TestBoardService($project))->create('demo', '3.3.19', 'mariadb', 8090); } public function testCreateRejectsHostPortInUse(): void { - $project = $this->projectWithSource('3.3.14'); + $project = $this->projectWithSource('3.3.19'); $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Port 8090 is already in use on this host.'); - (new TestBoardService($project, null, true))->create('demo', '3.3.14', 'mariadb', 8090); + (new TestBoardService($project, null, true))->create('demo', '3.3.19', 'mariadb', 8090); } public function testListAddsRunnerStatusAndDefaults(): void { - $project = $this->projectWithSource('3.3.14'); + $project = $this->projectWithSource('3.3.19'); $project->appendBoard(['name' => 'demo']); $runner = new ServiceTestBoardRunner($project); $runner->statuses['demo'] = 'running'; @@ -171,7 +171,7 @@ public function testListAddsRunnerStatusAndDefaults(): void public function testStartStopDestroyAndSeedDelegateToRunner(): void { - $project = $this->projectWithSource('3.3.14'); + $project = $this->projectWithSource('3.3.19'); $project->appendBoard(['name' => 'demo', 'db' => 'mariadb']); $runner = new ServiceTestBoardRunner($project); $runner->statuses['demo'] = 'running'; @@ -190,7 +190,7 @@ public function testStartStopDestroyAndSeedDelegateToRunner(): void public function testSeedRequiresRunningBoard(): void { - $project = $this->projectWithSource('3.3.14'); + $project = $this->projectWithSource('3.3.19'); $project->appendBoard(['name' => 'demo', 'db' => 'mariadb']); $runner = new ServiceTestBoardRunner($project); $runner->statuses['demo'] = 'stopped'; @@ -206,7 +206,7 @@ public function testSeedRequiresRunningBoard(): void */ public function testSqliteSeedActionRules(string $preset, string $action, bool $allowed): void { - $project = $this->projectWithSource('3.3.14'); + $project = $this->projectWithSource('3.3.19'); $project->appendBoard(['name' => 'demo', 'db' => 'sqlite']); $runner = new ServiceTestBoardRunner($project); $runner->statuses['demo'] = 'running'; @@ -251,7 +251,7 @@ private function projectWithSource(string $version, ?string $osFamily = null): P 'constraint' => $version, 'branch' => '3.3', 'phpbb_branch' => '3.3', - 'php' => '8.1', + 'php' => '8.2', 'status' => 'supported', 'type' => 'composer', 'package' => 'phpbb/phpbb', diff --git a/tests/Unit/CustomisationMountServiceTest.php b/tests/Unit/CustomisationMountServiceTest.php index fbd91a2a..2c6cbc8b 100644 --- a/tests/Unit/CustomisationMountServiceTest.php +++ b/tests/Unit/CustomisationMountServiceTest.php @@ -19,10 +19,10 @@ public function testRecursiveMountCollectsPerItemErrors(): void $project->init(); $project->appendBoard([ 'name' => 'demo', - 'phpbb' => '3.3.14', - 'phpbb_source' => '3.3.14', + 'phpbb' => '3.3.19', + 'phpbb_source' => '3.3.19', 'phpbb_branch' => '3.3', - 'php' => '8.1', + 'php' => '8.2', 'db' => 'mariadb', 'port' => 8081, 'url' => 'http://localhost:8081/', diff --git a/tests/Unit/CustomisationUnmountServiceTest.php b/tests/Unit/CustomisationUnmountServiceTest.php index fecbc180..1afcdf15 100644 --- a/tests/Unit/CustomisationUnmountServiceTest.php +++ b/tests/Unit/CustomisationUnmountServiceTest.php @@ -80,9 +80,9 @@ private function projectWithBoard(): array file_put_contents($project->boardPath('demo') . '/config.php', 'appendBoard([ 'name' => 'demo', - 'phpbb' => '3.3.17', - 'phpbb_source' => '3.3.17', - 'php' => '8.1', + 'phpbb' => '3.3.19', + 'phpbb_source' => '3.3.19', + 'php' => '8.2', 'db' => 'mariadb', 'port' => 8080, 'url' => 'http://localhost:8080/', diff --git a/tests/Unit/DockerComposeWriterTest.php b/tests/Unit/DockerComposeWriterTest.php index ecf8e7f9..8b3ed63f 100644 --- a/tests/Unit/DockerComposeWriterTest.php +++ b/tests/Unit/DockerComposeWriterTest.php @@ -277,9 +277,9 @@ public function testEntrypointQuotesBindMountTargetsForPosixShell(): void private function config(array $overrides = []): array { return $overrides + [ - 'phpbb' => '3.3.14', - 'phpbb_source' => '3.3.14', - 'php' => '8.1', + 'phpbb' => '3.3.19', + 'phpbb_source' => '3.3.19', + 'php' => '8.2', 'db' => 'mariadb', 'port' => 8081, 'server_name' => 'localhost', diff --git a/tests/Unit/ExtensionManagerTest.php b/tests/Unit/ExtensionManagerTest.php index 61faa3e5..4dc413eb 100644 --- a/tests/Unit/ExtensionManagerTest.php +++ b/tests/Unit/ExtensionManagerTest.php @@ -181,9 +181,9 @@ private function projectWithBoard(string $name): array mkdir($project->boardPath($name), 0775, true); $project->appendBoard([ 'name' => $name, - 'phpbb' => '3.3.14', - 'phpbb_source' => '3.3.14', - 'php' => '8.1', + 'phpbb' => '3.3.19', + 'phpbb_source' => '3.3.19', + 'php' => '8.2', 'db' => 'mariadb', 'port' => 8081, 'url' => 'http://localhost:8081/', diff --git a/tests/Unit/LanguageManagerTest.php b/tests/Unit/LanguageManagerTest.php index d257d7d3..623766ca 100644 --- a/tests/Unit/LanguageManagerTest.php +++ b/tests/Unit/LanguageManagerTest.php @@ -152,9 +152,9 @@ private function projectWithBoard(): array mkdir($project->boardPath('demo'), 0775, true); $project->appendBoard([ 'name' => 'demo', - 'phpbb' => '3.3.17', - 'phpbb_source' => '3.3.17', - 'php' => '8.1', + 'phpbb' => '3.3.19', + 'phpbb_source' => '3.3.19', + 'php' => '8.2', 'db' => 'mariadb', 'port' => 8081, 'url' => 'http://localhost:8081/', diff --git a/tests/Unit/SourceProviderTest.php b/tests/Unit/SourceProviderTest.php index 4c4394cc..0cda4451 100644 --- a/tests/Unit/SourceProviderTest.php +++ b/tests/Unit/SourceProviderTest.php @@ -15,13 +15,13 @@ public function testAddComposerExactVersionRegistersSource(): void { $project = $this->project(); - $source = (new TestSourceProvider($project))->add('3.3.14', 'composer', null); + $source = (new TestSourceProvider($project))->add('3.3.19', 'composer', null); - self::assertSame('3.3.14', $source['source_key']); + self::assertSame('3.3.19', $source['source_key']); self::assertSame('phpbb/phpbb', $source['package']); self::assertSame('8.2', $source['php']); self::assertNull($source['url']); - self::assertSame($source, $project->readJson('sources.json', [])['3.3.14']); + self::assertSame($source, $project->readJson('sources.json', [])['3.3.19']); } /** @@ -30,13 +30,13 @@ public function testAddComposerExactVersionRegistersSource(): void public function testEnsureDownloadedSourceAddsPhpRequirementMetadata(string $requirement, string $expectedRuntime): void { $project = $this->project(); - $this->addDownloadedSource($project, '3.3.14', $requirement); + $this->addDownloadedSource($project, '3.3.19', $requirement); - $source = (new TestSourceProvider($project))->ensure('3.3.14'); + $source = (new TestSourceProvider($project))->ensure('3.3.19'); self::assertSame($requirement, $source['php_requirement']); self::assertSame($expectedRuntime, $source['php']); - self::assertSame($expectedRuntime, $project->readJson('sources.json', [])['3.3.14']['php']); + self::assertSame($expectedRuntime, $project->readJson('sources.json', [])['3.3.19']['php']); } public function testEnsureRegisteredCustomSourceByKey(): void @@ -96,15 +96,15 @@ public function testFetchComposerBuildsCreateProjectCommand(): void $provider->fetch([ 'type' => 'composer', - 'constraint' => '3.3.14', - 'path' => $project->sourcePath('3.3.14'), + 'constraint' => '3.3.19', + 'path' => $project->sourcePath('3.3.19'), ]); self::assertSame('composer-bin', $provider->runs[0]['command'][0]); self::assertContains('create-project', $provider->runs[0]['command']); self::assertContains('phpbb/phpbb', $provider->runs[0]['command']); - self::assertContains('3.3.14', $provider->runs[0]['command']); - self::assertSame(dirname($project->sourcePath('3.3.14')), $provider->runs[0]['cwd']); + self::assertContains('3.3.19', $provider->runs[0]['command']); + self::assertSame(dirname($project->sourcePath('3.3.19')), $provider->runs[0]['cwd']); } public function testFetchComposerNormalizesLegacyPackageVersionsMetadata(): void @@ -263,12 +263,12 @@ public function testRejectsSourceKeysThatDifferOnlyByCase(): void public function testEnsureFloatingComposerReusesExistingResolvedSource(): void { $project = $this->project(); - $this->addDownloadedSource($project, '3.3.15'); + $this->addDownloadedSource($project, '3.3.19'); $provider = new TestSourceProvider($project); $provider->captures = [ [ 'status' => 0, - 'output' => json_encode(['versions' => ['3.3.14', '3.3.15', 'dev-master']]), + 'output' => json_encode(['versions' => ['3.3.18', '3.3.19', 'dev-master']]), ], ]; @@ -277,23 +277,23 @@ public function testEnsureFloatingComposerReusesExistingResolvedSource(): void $output = ob_get_clean(); self::assertSame('', $output); - self::assertSame('3.3.15', $source['source_key']); - self::assertSame('3.3.15', $source['constraint']); + self::assertSame('3.3.19', $source['source_key']); + self::assertSame('3.3.19', $source['constraint']); } public function testFloatingStableSelectorDownloadsNewResolvedVersion(): void { $project = $this->project(); - $provider = new AdvancingReleaseSourceProvider($project, ['3.3.17', '3.3.18']); + $provider = new AdvancingReleaseSourceProvider($project, ['3.3.18', '3.3.19']); $first = $provider->ensure('3.3'); $second = $provider->ensure('3.3'); - self::assertSame('3.3.17', $first['source_key']); - self::assertSame('3.3.18', $second['source_key']); + self::assertSame('3.3.18', $first['source_key']); + self::assertSame('3.3.19', $second['source_key']); self::assertSame(2, $provider->fetches); - self::assertFileExists($project->sourcePath('3.3.17') . '/common.php'); self::assertFileExists($project->sourcePath('3.3.18') . '/common.php'); + self::assertFileExists($project->sourcePath('3.3.19') . '/common.php'); } public function phpRequirementProvider(): array @@ -334,7 +334,7 @@ private function addDownloadedSource(Project $project, string $key, string $phpR 'constraint' => $key, 'branch' => '3.3', 'phpbb_branch' => '3.3', - 'php' => '8.1', + 'php' => '8.2', 'status' => 'supported', 'type' => 'composer', 'package' => 'phpbb/phpbb', diff --git a/tests/Unit/SourceServiceTest.php b/tests/Unit/SourceServiceTest.php index b9399fcc..8208b7c1 100644 --- a/tests/Unit/SourceServiceTest.php +++ b/tests/Unit/SourceServiceTest.php @@ -15,15 +15,15 @@ class SourceServiceTest extends TestCase public function testListsSourcesWithDownloadedAndUsageStatus(): void { - [$project, $sourcePath] = $this->projectWithSource('3.3.14'); + [$project, $sourcePath] = $this->projectWithSource('3.3.19'); $project->appendBoard([ 'name' => 'demo', - 'phpbb_source' => '3.3.14', + 'phpbb_source' => '3.3.19', ]); $list = (new SourceService($project))->list(); - self::assertSame('3.3.14', $list[0]['source_key']); + self::assertSame('3.3.19', $list[0]['source_key']); self::assertTrue($list[0]['downloaded']); self::assertSame(['demo'], $list[0]['used_by']); self::assertSame($sourcePath, $list[0]['path']); @@ -31,16 +31,16 @@ public function testListsSourcesWithDownloadedAndUsageStatus(): void public function testRemoveBlocksUsedSourceWithoutForce(): void { - [$project] = $this->projectWithSource('3.3.14'); + [$project] = $this->projectWithSource('3.3.19'); $project->appendBoard([ 'name' => 'demo', - 'phpbb_source' => '3.3.14', + 'phpbb_source' => '3.3.19', ]); $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Source 3.3.14 is used by board(s): demo'); + $this->expectExceptionMessage('Source 3.3.19 is used by board(s): demo'); - (new SourceService($project))->remove('3.3.14'); + (new SourceService($project))->remove('3.3.19'); } public function testRemoveCanResolveSourceBySelectorAlias(): void @@ -61,20 +61,20 @@ public function testRemoveRejectsUnknownSource(): void $project->init(); $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Unknown source: 3.3.14'); + $this->expectExceptionMessage('Unknown source: 3.3.19'); - (new SourceService($project))->remove('3.3.14'); + (new SourceService($project))->remove('3.3.19'); } public function testRemoveWithForceDeletesRecordAndFiles(): void { - [$project, $sourcePath] = $this->projectWithSource('3.3.14'); + [$project, $sourcePath] = $this->projectWithSource('3.3.19'); $project->appendBoard([ 'name' => 'demo', - 'phpbb_source' => '3.3.14', + 'phpbb_source' => '3.3.19', ]); - $result = (new SourceService($project))->remove('3.3.14', true); + $result = (new SourceService($project))->remove('3.3.19', true); self::assertSame(['demo'], $result['used_by']); self::assertDirectoryDoesNotExist($sourcePath); @@ -83,16 +83,16 @@ public function testRemoveWithForceDeletesRecordAndFiles(): void public function testPruneRemovesOnlyUnusedSources(): void { - [$project, $unusedPath] = $this->projectWithSource('3.3.14'); - $usedPath = $this->addSource($project, '3.3.15'); + [$project, $unusedPath] = $this->projectWithSource('3.3.18'); + $usedPath = $this->addSource($project, '3.3.19'); $project->appendBoard([ 'name' => 'demo', - 'phpbb_source' => '3.3.15', + 'phpbb_source' => '3.3.19', ]); $removed = (new SourceService($project))->prune(); - self::assertSame('3.3.14', $removed[0]['source_key']); + self::assertSame('3.3.18', $removed[0]['source_key']); self::assertDirectoryDoesNotExist($unusedPath); self::assertDirectoryExists($usedPath); } diff --git a/tests/Unit/StyleManagerTest.php b/tests/Unit/StyleManagerTest.php index 933882a3..30ecf42c 100644 --- a/tests/Unit/StyleManagerTest.php +++ b/tests/Unit/StyleManagerTest.php @@ -156,9 +156,9 @@ private function projectWithBoard(string $name): array mkdir($project->boardPath($name), 0775, true); $project->appendBoard([ 'name' => $name, - 'phpbb' => '3.3.14', - 'phpbb_source' => '3.3.14', - 'php' => '8.1', + 'phpbb' => '3.3.19', + 'phpbb_source' => '3.3.19', + 'php' => '8.2', 'db' => 'mariadb', 'port' => 8081, 'url' => 'http://localhost:8081/', diff --git a/tests/Unit/VersionMatrixTest.php b/tests/Unit/VersionMatrixTest.php index 8ceee7f4..d6501244 100644 --- a/tests/Unit/VersionMatrixTest.php +++ b/tests/Unit/VersionMatrixTest.php @@ -82,7 +82,7 @@ public function supportedSelectorProvider(): array 'exact 3.3.6 release' => ['3.3.6', ['source_key' => '3.3.6', 'constraint' => '3.3.6', 'php' => '8.2']], 'exact 3.3.9 release' => ['3.3.9', ['source_key' => '3.3.9', 'constraint' => '3.3.9', 'php' => '8.2']], 'exact 3.3.10 release' => ['3.3.10', ['source_key' => '3.3.10', 'constraint' => '3.3.10', 'php' => '8.2']], - 'exact 3.3 release' => ['3.3.14', ['source_key' => '3.3.14', 'constraint' => '3.3.14', 'php' => '8.2']], + 'exact 3.3 release' => ['3.3.19', ['source_key' => '3.3.19', 'constraint' => '3.3.19', 'php' => '8.2']], '3.2 shorthand' => ['3.2', ['source_key' => '3.2', 'constraint' => '3.2.*', 'php' => '7.1']], 'exact 3.2 release' => ['3.2.11', ['source_key' => '3.2.11', 'constraint' => '3.2.11', 'php' => '7.1']], 'master' => ['master', ['source_key' => 'master', 'constraint' => 'dev-master', 'phpbb_branch' => '4.0']], From 3299ccd71b31145622a8de94ecc2183e27cb692b Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 22 Oct 2026 10:17:25 -0700 Subject: [PATCH 5/5] Revert fc3d220eb3f3ad21e0ef5786116270613738b270 --- src/QuickInstall/Sandbox/DockerComposeWriter.php | 12 +++--------- tests/Unit/DockerComposeWriterTest.php | 4 ---- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/QuickInstall/Sandbox/DockerComposeWriter.php b/src/QuickInstall/Sandbox/DockerComposeWriter.php index 759affb4..594514dd 100644 --- a/src/QuickInstall/Sandbox/DockerComposeWriter.php +++ b/src/QuickInstall/Sandbox/DockerComposeWriter.php @@ -184,18 +184,13 @@ private function extensionVolumes(array $extensions): string return $volumes; } - /** Prevents stale sandbox responses and routes scoped URLs to phpBB. */ + /** Routes a scoped board URL to phpBB's unchanged document root. */ private function apacheConfig(string $name, array $config): string { $serverName = $config['server_name'] ?? 'localhost'; - $headers = <<