Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mention of PHP 7.4 #1383

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
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: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
14 changes: 7 additions & 7 deletions SETUP/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
jchaffraix marked this conversation as resolved.
Show resolved Hide resolved
* Ubuntu 24.04, Noble
* RHEL / CentOS 8.x family (with PHP 8.1 upgrade)
* RHEL / CentOS 9.x family
Comment on lines +56 to +57
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are based on some Googling I did and I am not super confident about those...


## Browser support
The following are the lowest known supported browser versions for the code:
Expand Down
15 changes: 3 additions & 12 deletions SETUP/tests/unittests/ParamValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
8 changes: 0 additions & 8 deletions pinc/misc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down