diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b909f34e1..b1dbbf7db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,6 @@ jobs: strategy: matrix: cfg: - - { os: 'ubuntu-20.04', php: '7.4' } - { os: 'ubuntu-22.04', php: '8.1' } - { os: 'ubuntu-22.04', php: '8.3' } runs-on: ${{ matrix.cfg.os }} @@ -39,7 +38,6 @@ jobs: strategy: matrix: cfg: - - { os: 'ubuntu-20.04', php: '7.4' } - { os: 'ubuntu-22.04', php: '8.1' } - { os: 'ubuntu-22.04', php: '8.3' } runs-on: ${{ matrix.cfg.os }} @@ -106,7 +104,6 @@ jobs: strategy: matrix: cfg: - - { os: 'ubuntu-20.04', php: '7.4' } - { os: 'ubuntu-22.04', php: '8.1' } - { os: 'ubuntu-22.04', php: '8.3' } runs-on: ${{ matrix.cfg.os }} diff --git a/SETUP/INSTALL.md b/SETUP/INSTALL.md index 63a06f40a..7c67c54a7 100644 --- a/SETUP/INSTALL.md +++ b/SETUP/INSTALL.md @@ -16,8 +16,8 @@ The following lists supported versions for the four primary middleware components. ### PHP -PHP version 7.4 is the minimum supported version. Limited testing has been done -on PHP 8.1 and 8.3. +PHP version 8.1 is the minimum supported version although limited testing has been done +on PHP versions < 8.3. The following PHP extensions are required. They are listed below with their Ubuntu system package names. @@ -50,11 +50,11 @@ change `core.disable_super_globals` to `false`, and flush the phpbb cache. ## Distro support These middleware components match the following major distribution releases: -* Ubuntu 18.04, Bionic (with PHP 7.4 upgrade) -* Ubuntu 20.04, Focal -* Ubuntu 22.04, Jammy (with possible PHP 7.4 downgrade) -* RHEL / CentOS 7.x family (with PHP 7.4 and MariaDB 10.2 or later upgrade) -* RHEL / CentOS 8.x family +* Ubuntu 20.04, Focal (with PHP 8.1 upgrade) +* Ubuntu 22.04, Jammy +* Ubuntu 24.04, Noble +* RHEL / CentOS 8.x family (with PHP 8.1 upgrade) +* RHEL / CentOS 9.x family ## Browser support The following are the lowest known supported browser versions for the code: diff --git a/SETUP/tests/unittests/ParamValidatorTest.php b/SETUP/tests/unittests/ParamValidatorTest.php index 864d5e48a..279be0e2e 100644 --- a/SETUP/tests/unittests/ParamValidatorTest.php +++ b/SETUP/tests/unittests/ParamValidatorTest.php @@ -372,18 +372,9 @@ public function testBoolFalseVariants() $this->assertEquals(false, $result); } - public function testBoolDefaultNotBool() - { - // Shockingly, PHP 7.4 (at least) will not throw a TypeError if a - // non-boolean is passed into a function with a bool type. It instead - // coerces it into a bool. Maybe later versions will? - $this->markTestSkipped('PHP will not enforce a bool type'); - - $this->expectException(TypeError::class); - $this->expectExceptionMessage("must be of"); - $default = "string"; - get_bool_param($this->GET, 'none', $default); - } + // We don't test passing a non-boolean `$default` to `get_bool_param` as PHP will + // automatically coerce it to bool. Also there is no way to disable this behavior. + // If there is in the future, we should look at enabling it though. public function testBoolNotABool() { diff --git a/pinc/misc.inc b/pinc/misc.inc index 9594dc6c3..688d08c80 100644 --- a/pinc/misc.inc +++ b/pinc/misc.inc @@ -809,14 +809,6 @@ function endswith($subject, $suffix) return (substr($subject, -strlen($suffix)) == $suffix); } -if (!function_exists('str_contains')) { - // str_contains() now exists in PHP8 - function str_contains($haystack, $needle) - { - return (strpos($haystack, $needle) !== false); - } -} - function surround_and_join($strings, $L, $R, $joiner) { $parts = [];