diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a0ec90a..eeb1281 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,7 +30,7 @@ jobs: RUN_WINDOWS_JOBS: 0 PRIMARY_PHP_VERSION: '8.3' - PHP_VERSION_MATRIX: '["8.3", "8.4", "8.5"]' + PHP_VERSION_MATRIX: '["8.1", "8.3", "8.4", "8.5"]' # phpBB 4.0 (master): the same tests with the framework's master branch call-tests-master: diff --git a/composer.json b/composer.json index 4e2f230..75a9534 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ } ], "require": { - "php": ">=8.3.36", + "php": ">=8.1.0", "composer/installers": "^1.0 || ^2.0" }, "extra": { diff --git a/docs/phpbb-4.0-compatibility.md b/docs/phpbb-4.0-compatibility.md index 46fd862..1e39e59 100644 --- a/docs/phpbb-4.0-compatibility.md +++ b/docs/phpbb-4.0-compatibility.md @@ -11,8 +11,8 @@ From `composer.json`: - `require.phpbb/phpbb`: `>=3.3.19 <4.1.0` - `extra.soft-require.phpbb/phpbb`: `>=3.3.19,<4.1.0@dev` — phpBB 3.3.x and 4.0.x, including 4.0 development builds. (Until 10/12/2026 both said `<4.0.0`.) -- `require.php`: `>=8.3.36` (also enforced when the extension is enabled, by `ext.php`, - due to security fixes; CI uses the latest PHP 8.3 patch release) +- `require.php`: `>=8.1.0` (also enforced when the extension is enabled, by `ext.php`; + phpBB 4.0 itself needs PHP 8.2 or later) phpBB 4.0.x is still in development, so specifics below are marked verified vs. pending as they're confirmed against real code/changelog @@ -162,8 +162,8 @@ rendered, and an article submitted through the posting form was saved without er 3.3.x test board give the same result as before. **Declared support.** The PHP floor was raised from 8.0 to 8.2 on 10/12/2026, then to 8.3.36 -on 10/22/2026 due to security fixes. The CI matrix lists PHP 8.3 through 8.5 and uses PHP 8.3 -as its primary version. Boards running PHP below 8.3.36 cannot enable this extension. +on 10/22/2026 due to security fixes, and lowered to 8.1 on 11/10/2026. The CI matrix lists PHP 8.3 through 8.5 and uses PHP 8.3 +as its primary version. The phpBB 3.3 jobs also run PHP 8.1. Boards running PHP below 8.1 cannot enable this extension. The phpBB constraints were widened to `<4.1.0`, so the extension can be enabled on 4.0.x; it was enabled on a 4.0.0-a3-dev board with the constraints as shipped. 4.0 is still a development release, so "supported" here means "checked as below", not a diff --git a/ext.php b/ext.php index 9655c9a..e13b514 100644 --- a/ext.php +++ b/ext.php @@ -19,8 +19,8 @@ class ext extends \phpbb\extension\base /** Minimum phpBB version - 3.3.19 carries the security fixes from 3.3.17-3.3.19 */ public const MIN_PHPBB_VERSION = '3.3.19'; - /** Minimum PHP version - 8.3.36 includes security fixes. */ - public const MIN_PHP_VERSION = '8.3.36'; + /** Minimum PHP version. */ + public const MIN_PHP_VERSION = '8.1.0'; /** The original package this extension can take over from; it must be disabled first. */ public const ORIGINAL_EXTENSION = 'sheer/knowledgebase'; @@ -67,13 +67,13 @@ public function check_phpbb_version() } /** - * Requires PHP 8.3.36 due to security fixes. + * Requires PHP 8.1.0 or later. * * @return bool */ public function check_php_version() { - return PHP_VERSION_ID >= 80336; + return PHP_VERSION_ID >= 80100; } /** diff --git a/tests/kb_declared_support_test.php b/tests/kb_declared_support_test.php index e2ad419..6e5f540 100644 --- a/tests/kb_declared_support_test.php +++ b/tests/kb_declared_support_test.php @@ -30,14 +30,14 @@ private function composer(): array return json_decode(file_get_contents(self::ROOT . '/composer.json'), true, 512, JSON_THROW_ON_ERROR); } - public function test_composer_requires_php_8_3_36_or_newer() + public function test_composer_requires_php_8_1_or_newer() { - $this->assertSame('>=8.3.36', $this->composer()['require']['php']); + $this->assertSame('>=8.1.0', $this->composer()['require']['php']); } public function test_the_extension_refuses_to_enable_below_the_same_minimum() { - $this->assertSame('8.3.36', ext::MIN_PHP_VERSION); + $this->assertSame('8.1.0', ext::MIN_PHP_VERSION); $this->assertSame('>=' . ext::MIN_PHP_VERSION, $this->composer()['require']['php']); } @@ -51,14 +51,11 @@ public function php_versions(): array { return [ '8.0 is too old' => ['8.0.30', false], - '8.1 is too old' => ['8.1.31', false], - '8.2 development build' => ['8.2.0-dev', false], - 'first 8.2 release' => ['8.2.0', false], - '8.2 patch release' => ['8.2.27', false], - 'first 8.3 release' => ['8.3.0', false], - 'below security minimum' => ['8.3.35', false], - 'security minimum' => ['8.3.36', true], - 'later 8.3 patch release' => ['8.3.37', true], + '8.1 development build' => ['8.1.0-dev', false], + 'minimum' => ['8.1.0', true], + 'later 8.1 patch release' => ['8.1.31', true], + '8.2' => ['8.2.27', true], + '8.3' => ['8.3.36', true], '8.4' => ['8.4.26', true], 'a future major version' => ['9.0.0', true], ]; @@ -103,7 +100,7 @@ public function test_the_compatibility_notes_state_the_same_php_floor() { $notes = file_get_contents(self::ROOT . '/docs/phpbb-4.0-compatibility.md'); - $this->assertStringContainsString('`require.php`: `>=8.3.36`', $notes); + $this->assertStringContainsString('`require.php`: `>=8.1.0`', $notes); $this->assertStringNotContainsString('`>=8.0`', $notes); } } diff --git a/tests/kb_ext_enableable_test.php b/tests/kb_ext_enableable_test.php index 3c40a69..07516ad 100644 --- a/tests/kb_ext_enableable_test.php +++ b/tests/kb_ext_enableable_test.php @@ -35,10 +35,10 @@ private function ext(bool $original_enabled): ext return $ext; } - public function test_php_security_minimum() + public function test_php_minimum() { - $this->assertFalse(ext::php_version_meets_minimum('8.3.35')); - $this->assertTrue(ext::php_version_meets_minimum('8.3.36')); + $this->assertFalse(ext::php_version_meets_minimum('8.0.30')); + $this->assertTrue(ext::php_version_meets_minimum('8.1.0')); $this->assertTrue(ext::php_version_meets_minimum('8.4.0')); }