Skip to content
Open
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
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
],
"require": {
"php": ">=8.3.36",
"phpbb/phpbb": ">=3.3.19 <4.1.0",
"composer/installers": "~2.0"
"composer/installers": "^1.0 || ^2.0"
},
"extra": {
"display-name": "Knowledge Base",
Expand Down
10 changes: 5 additions & 5 deletions tests/kb_declared_support_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ public function test_the_ci_matrix_starts_at_the_declared_minimum()
$this->assertContains($primary[1], $versions);
}

public function test_the_phpbb_requirement_and_soft_requirement_agree_and_state_the_same_minimum_as_ext_php()
public function test_phpbb_is_only_a_soft_requirement_stating_the_same_minimum_as_ext_php()
{
$composer = $this->composer();
$hard = $composer['require']['phpbb/phpbb'];
$soft = $composer['extra']['soft-require']['phpbb/phpbb'];

$this->assertSame('>=' . ext::MIN_PHPBB_VERSION, explode(' ', $hard)[0]);
// phpBB belongs only in extra.soft-require, which Composer ignores; under require, Composer would
// try to resolve phpBB itself.
$this->assertArrayNotHasKey('phpbb/phpbb', $composer['require']);
$this->assertSame('>=' . ext::MIN_PHPBB_VERSION, explode(',', $soft)[0]);
// Both caps allow phpBB 3.3.x and 4.0.x and stop at the same bound, so one cannot be changed without the other.
$this->assertSame('<4.1.0', explode(' ', $hard)[1]);
// The cap allows phpBB 3.3.x and 4.0.x.
$this->assertSame('<4.1.0@dev', explode(',', $soft)[1]);
}

Expand Down
Loading