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
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Lint

# PHP syntax check on the lowest PHP version this extension supports and the
# newest one phpBB 3.3 supports. tests.yml covers PHP 8.2 with phpBB's own
# newest one phpBB 3.3 supports. tests.yml covers PHP 8.3 with phpBB's own
# checks (code sniffer, EPV).
on:
push:
Expand All @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
php: ['8.2', '8.5']
php: ['8.3', '8.5']
steps:
- uses: actions/checkout@v4

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
EPV: 0
PHPBB_BRANCH: '3.3.x'
RUN_FUNCTIONAL_TESTS: 0
PRIMARY_PHP_VERSION: '8.2'
PHP_VERSION_MATRIX: '["8.2", "8.3", "8.4", "8.5"]'
PRIMARY_PHP_VERSION: '8.3'
PHP_VERSION_MATRIX: '["8.3", "8.4", "8.5"]'

# phpBB 4.0 (master) compatibility
call-tests-master:
Expand All @@ -35,8 +35,8 @@ jobs:
EPV: 0
PHPBB_BRANCH: 'master'
RUN_FUNCTIONAL_TESTS: 0
PRIMARY_PHP_VERSION: '8.2'
PHP_VERSION_MATRIX: '["8.2", "8.3", "8.4", "8.5"]'
PRIMARY_PHP_VERSION: '8.3'
PHP_VERSION_MATRIX: '["8.3", "8.4", "8.5"]'

# EPV (Extension Pre Validator), failing on any Fatal or Error finding not
# listed in .github/epv-allowed.txt
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Articles and posts written before this feature existed get their links the next
## Requirements

- phpBB 3.3.19 or later (also tested on phpBB 4.0)
- PHP 8.2 or later
- PHP 8.3.36 or later

Tested versions and compatibility notes: [docs/compatibility.md](docs/compatibility.md).

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
],
"require": {
"php": ">=8.2"
"php": ">=8.3.36"
},
"require-dev": {
"phpbb/epv": "dev-master"
Expand Down
4 changes: 2 additions & 2 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ notifications), on:
- phpBB 3.3.x (tested on 3.3.18-dev)
- phpBB 4.0.0-a3-dev

PHP 8.2 or later is required (the extension refuses to enable below it). CI runs PHP 8.2, 8.3, 8.4
and 8.5 on phpBB 3.3.x and on phpBB master; PHP 8.1 and older are past end of life.
PHP 8.3.36 or later is required due to security fixes; the extension refuses to enable below it.
CI runs PHP 8.3, 8.4 and 8.5 on phpBB 3.3.x and on phpBB master.

phpBB 3.2.x compatibility is **not independently verified by this fork** —
it's carried forward from Crizz0/phpBB.de's original claim for their branch.
Expand Down
6 changes: 3 additions & 3 deletions ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function is_enableable()
}

/**
* Require phpBB 3.3.19
* Require phpBB 3.3.19 due to several security fixes in the phpBB software.
*
* @return bool
*/
Expand All @@ -99,13 +99,13 @@ public function check_phpbb_version()
}

/**
* Require PHP 8.2
* Requires PHP 8.3.36 due to security fixes.
*
* @return bool
*/
public function check_php_version()
{
return PHP_VERSION_ID >= 80200;
return PHP_VERSION_ID >= 80336;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion language/en/install_wiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
//

$lang = array_merge($lang, [
'WIKI_NOT_ENABLEABLE' => 'phpBB Modders Wiki could not be enabled. It needs phpBB 3.3.19 or later and PHP 8.2.0 or later.',
'WIKI_NOT_ENABLEABLE' => 'phpBB Modders Wiki could not be enabled. It needs phpBB 3.3.19 or later and PHP 8.3.36 or later.',
'WIKI_DISABLE_OLD' => 'Disable the old “%s” extension first. Keep its data; do not delete it.',
]);
16 changes: 8 additions & 8 deletions tests/unit/declared_support_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,26 @@ private function read(string $path): string
return file_get_contents(self::ROOT . '/' . $path);
}

public function test_composer_requires_php_8_2_or_newer()
public function test_composer_requires_php_8_3_36_or_newer()
{
$composer = json_decode($this->read('composer.json'), true, 512, JSON_THROW_ON_ERROR);

$this->assertSame('>=8.2', $composer['require']['php']);
$this->assertSame('>=8.3.36', $composer['require']['php']);
}

public function test_the_extension_refuses_to_enable_below_the_same_version()
{
$this->assertMatchesRegularExpression('/return PHP_VERSION_ID >= 80200;/', $this->read('ext.php'));
$this->assertStringContainsString('PHP 8.2.0', $this->read('language/en/install_wiki.php'));
$this->assertMatchesRegularExpression('/return PHP_VERSION_ID >= 80336;/', $this->read('ext.php'));
$this->assertStringContainsString('PHP 8.3.36', $this->read('language/en/install_wiki.php'));
}

public function test_the_readme_states_the_same_requirement()
{
$this->assertStringContainsString('- PHP 8.2 or later', $this->read('README.md'));
$this->assertStringContainsString('- PHP 8.3.36 or later', $this->read('README.md'));
}

/** @dataProvider workflows_with_a_php_matrix */
public function test_every_ci_matrix_starts_at_8_2_and_includes_8_5(string $file)
public function test_every_ci_matrix_starts_at_8_3_and_includes_8_5(string $file)
{
$workflow = $this->read($file);

Expand All @@ -54,7 +54,7 @@ public function test_every_ci_matrix_starts_at_8_2_and_includes_8_5(string $file
{
$versions = json_decode(str_replace("'", '"', $matrix), true);
usort($versions, 'version_compare');
$this->assertSame('8.2', $versions[0], $file . ' ' . $matrix);
$this->assertSame('8.3', $versions[0], $file . ' ' . $matrix);
$this->assertContains('8.5', $versions, $file . ' ' . $matrix);
}
}
Expand All @@ -72,7 +72,7 @@ public function test_both_test_jobs_name_a_primary_php_inside_their_matrix()
$workflow = $this->read('.github/workflows/tests.yml');

$this->assertSame(2, preg_match_all("/PRIMARY_PHP_VERSION: '([0-9.]+)'/", $workflow, $primary));
$this->assertSame(['8.2', '8.2'], $primary[1]);
$this->assertSame(['8.3', '8.3'], $primary[1]);
$this->assertSame(2, substr_count($workflow, 'PHP_VERSION_MATRIX'));
}
}
Loading