Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
],
"require": {
"php": ">=8.3.36",
"php": ">=8.1.0",
"composer/installers": "^1.0 || ^2.0"
},
"extra": {
Expand Down
8 changes: 4 additions & 4 deletions docs/phpbb-4.0-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
}

/**
Expand Down
21 changes: 9 additions & 12 deletions tests/kb_declared_support_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}

Expand All @@ -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],
];
Expand Down Expand Up @@ -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);
}
}
6 changes: 3 additions & 3 deletions tests/kb_ext_enableable_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}

Expand Down
Loading