Skip to content

Commit

Permalink
[TASK] Check maximum PHP version in entrypoints
Browse files Browse the repository at this point in the history
This adds another safeguard to prevent running TYPO3 on unsupported PHP
versions.

Resolves: #93246
Releases: master, 10.4
Change-Id: I9069c2a125a9950fe679b742759b5a59086bcb21
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67365
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
mbrodala authored and lolli42 committed Mar 26, 2021
1 parent 9c67aba commit 22c7cd6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions typo3/sysext/backend/Resources/Private/Php/backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/

// Exit early if php requirement is not satisfied.
if (PHP_VERSION_ID < 70400) {
die('This version of TYPO3 CMS requires PHP 7.4 or above');
if (PHP_VERSION_ID < 70400 || PHP_VERSION_ID >= 90000) {
die('This version of TYPO3 CMS requires PHP >= 7.4 and < 9.0');
}

// Set up the application for the backend
Expand Down
5 changes: 5 additions & 0 deletions typo3/sysext/core/Resources/Private/Php/cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
* The TYPO3 project - inspiring people to share!
*/

// Exit early if php requirement is not satisfied.
if (PHP_VERSION_ID < 70400 || PHP_VERSION_ID >= 90000) {
die('This version of TYPO3 CMS requires PHP >= 7.4 and < 9.0');
}

/**
* Command Line Interface module dispatcher
* that executes commands
Expand Down
4 changes: 2 additions & 2 deletions typo3/sysext/frontend/Resources/Private/Php/frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*/

// Exit early if php requirement is not satisfied.
if (PHP_VERSION_ID < 70400) {
die('This version of TYPO3 CMS requires PHP 7.4 or above');
if (PHP_VERSION_ID < 70400 || PHP_VERSION_ID >= 90000) {
die('This version of TYPO3 CMS requires PHP >= 7.4 and < 9.0');
}

// Set up the application for the frontend
Expand Down
4 changes: 2 additions & 2 deletions typo3/sysext/install/Resources/Private/Php/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
*/

// Exit early if php requirement is not satisfied.
if (PHP_VERSION_ID < 70400) {
die('This version of TYPO3 CMS requires PHP 7.4 or above');
if (PHP_VERSION_ID < 70400 || PHP_VERSION_ID >= 90000) {
die('This version of TYPO3 CMS requires PHP >= 7.4 and < 9.0');
}

call_user_func(function () {
Expand Down

0 comments on commit 22c7cd6

Please sign in to comment.