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

[Core] Raise minimum PHP requirement to 7.3 #5723

Merged
merged 5 commits into from
Jan 8, 2020
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
6 changes: 0 additions & 6 deletions .phan/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@
"exclude_analysis_directory_list" => [
"vendor",
],
// Required to fix an issue with PHP 7.2, PHPCS, and TravisCI. This can be
// removed once PHP 7.3 or higher is the minimum required version for LORIS
// and support for 7.2 is dropped.
"exclude_file_list" => [
"vendor/squizlabs/php_codesniffer/src/Standards/PSR2/Tests/Methods/MethodDeclarationUnitTest.inc"
],
'autoload_internal_extension_signatures' => [
// Xdebug stubs are bundled with Phan 0.10.1+/0.8.9+ for usage,
// because Phan disables xdebug by default.
Expand Down
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ language: php

matrix:
include:
- php: "7.2"
- php: "7.3"
- php: "7.4snapshot"
allow_failures:
- php: "7.4snapshot"
- php: "7.4"

services:
- docker
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Deploy and log in with username *admin* and the password that's set up during de

* Apache **2.4** or higher
* MySQL >= 5.7 (or MariaDB >= 10.3)
* PHP <b>7.2</b> or higher
* PHP <b>7.3</b> or higher
* [Composer](https://getcomposer.org/) <b>1.4</b> or higher
* NodeJS <b>8.0</b> or higher
* NPM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ For further details on the install process, please see the LORIS GitHub Wiki Cen
# System Requirements - Install dependencies

Default dependencies installed by CentOS 7.x may not meet the version requirements for LORIS deployment or development:
* MariaDB 10.3 is supported for LORIS 21.*
* PHP 7.2 is supported for LORIS 21.*
* MariaDB 10.3 is supported for LORIS 23.*
* PHP 7.3 is supported for LORIS 23.*

In addition to the above, the following packages should be installed with `yum` and may also differ from the packages referenced in the main (Ubuntu) [LORIS Readme](./README.md). Detailed command examples are provided below (`sudo` privilege may be required depending on your system).
* Apache 2.4 or higher
Expand All @@ -26,13 +26,13 @@ sudo yum install httpd
sudo systemctl enable httpd
sudo systemctl start httpd
```
## PHP 7.2
## PHP 7.3
```bash
sudo yum install epel-release
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum install yum-utils
sudo yum update
sudo yum --enablerepo=remi-php72 install php php-pdo php-pdo_mysql php72-php-fpm php72-php-gd php72-php-json php72-php-mbstring php72-php-mysqlnd php72-php-xml php72-php-xmlrpc php72-php-opcache php72-php-mysql
sudo yum --enablerepo=remi-php73 install php php-pdo php-pdo_mysql php73-php-fpm php73-php-gd php73-php-json php73-php-mbstring php73-php-mysqlnd php73-php-xml php73-php-xmlrpc php73-php-opcache php73-php-mysql
```
## MariaDB

Expand Down
1 change: 0 additions & 1 deletion modules/create_timepoint/php/create_timepoint.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ class Create_Timepoint extends \NDB_Form
$user_list_of_projects = $user->getProjectIDs();
if (count($user_list_of_projects) == 1) {
//if there is only one project, autoselect first project from array of 1
//TODO: change this to array_key_first() when support is only PHP 7.3+
$project = \Project::getProjectFromID(array_pop($user_list_of_projects));
} else if (count($user_list_of_projects) > 1) {
$project_id = intval($values['project']);
Expand Down
6 changes: 1 addition & 5 deletions php/libraries/NDB_Client.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,7 @@ class NDB_Client
);
// start php session
$sessionOptions = array('cookie_httponly' => true);
// TODO remove this if statement when 7.3 is the minimum required LORIS
// version. All session from then onward should have Same Site enabled.
if (PHP_MAJOR_VERSION === 7 && PHP_MINOR_VERSION >= 3) {
$sessionOptions['cookie_samesite'] = true;
}
$sessionOptions['cookie_samesite'] = true;

// API Detect
if (strpos(
Expand Down