[TASK] Raise PHP requirement to 7.2.0 35/55035/10
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 11 Dec 2017 20:25:42 +0000 (21:25 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 12 Dec 2017 13:00:50 +0000 (14:00 +0100)
As decided by core team leader, PHP minimum version
requirement for core version 9.0 is 7.2.0.

The patch sets this in root composer.json, together
with config.platform.php, and adapts sysext/core/composer.json.

Resolves: #83290
Related: #83289
Releases: master
Change-Id: I813d0a2b69005c84ba5dedb45b3d4bd0388e43d8
Reviewed-on: https://review.typo3.org/55035
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
14 files changed:
Build/bamboo/src/main/java/core/AbstractCoreSpec.java
Build/bamboo/src/main/java/core/NightlySpec.java
Build/bamboo/src/main/java/core/PreMergeSpec.java
INSTALL.md
composer.json
composer.lock
typo3/install/index.php
typo3/sysext/backend/Resources/Private/Php/backend.php
typo3/sysext/core/Documentation/Changelog/9.0/Breaking-83289-CoreVersion90NeedsPHP720.rst [new file with mode: 0644]
typo3/sysext/core/composer.json
typo3/sysext/frontend/Resources/Private/Php/frontend.php
typo3/sysext/frontend/Tests/Unit/ContentObject/ContentObjectRendererTest.php
typo3/sysext/install/Classes/SystemEnvironment/Check.php
typo3/sysext/install/Resources/Private/Php/install.php

index b40d512..d6b04f1 100644 (file)
@@ -487,7 +487,7 @@ abstract public class AbstractCoreSpec {
                     )
             )
             .requirements(
-                this.getRequirementPhpVersion70Or71Or72()
+                this.getRequirementPhpVersion72()
             )
             .cleanWorkingDirectory(true);
     }
@@ -521,7 +521,7 @@ abstract public class AbstractCoreSpec {
                     .resultDirectories("typo3temp/var/tests/*")
             )
             .requirements(
-                this.getRequirementPhpVersion70Or71Or72()
+                this.getRequirementPhpVersion72()
             )
             .artifacts(
                 new Artifact()
index 19aeef1..2fc7b93 100644 (file)
@@ -42,7 +42,7 @@ public class NightlySpec extends AbstractCoreSpec {
     protected int numberOfFunctionalMysqlJobs = 6;
     protected int numberOfFunctionalMssqlJobs = 6;
     protected int numberOfFunctionalPgsqlJobs = 6;
-    protected int numberOfUnitRandomOrderJobs = 2;
+    protected int numberOfUnitRandomOrderJobs = 4;
 
     /**
      * Run main to publish plan on Bamboo
@@ -77,52 +77,32 @@ public class NightlySpec extends AbstractCoreSpec {
         // MAIN stage
         ArrayList<Job> jobsMainStage = new ArrayList<Job>();
 
-        jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(this.getRequirementPhpVersion72(), "PHP72"));
 
-        jobsMainStage.add(this.getJobAcceptanceTestInstallPgsql(this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.add(this.getJobAcceptanceTestInstallPgsql(this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.add(this.getJobAcceptanceTestInstallPgsql(this.getRequirementPhpVersion72(), "PHP72"));
 
-        jobsMainStage.addAll(this.getJobsAcceptanceTestsMysql(this.numberOfAcceptanceTestJobs, this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.addAll(this.getJobsAcceptanceTestsMysql(this.numberOfAcceptanceTestJobs, this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.addAll(this.getJobsAcceptanceTestsMysql(this.numberOfAcceptanceTestJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.add(this.getJobCglCheckFullCore());
 
         jobsMainStage.add(this.getJobIntegrationVarious());
 
-        jobsMainStage.addAll(this.getJobsFunctionalTestsMysql(this.numberOfFunctionalMysqlJobs, this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.addAll(this.getJobsFunctionalTestsMysql(this.numberOfFunctionalMysqlJobs, this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.addAll(this.getJobsFunctionalTestsMysql(this.numberOfFunctionalMysqlJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
-        jobsMainStage.addAll(this.getJobsFunctionalTestsMssql(this.numberOfFunctionalMssqlJobs, this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.addAll(this.getJobsFunctionalTestsMssql(this.numberOfFunctionalMssqlJobs, this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.addAll(this.getJobsFunctionalTestsMssql(this.numberOfFunctionalMssqlJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
-        jobsMainStage.addAll(this.getJobsFunctionalTestsPgsql(this.numberOfFunctionalPgsqlJobs, this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.addAll(this.getJobsFunctionalTestsPgsql(this.numberOfFunctionalPgsqlJobs, this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.addAll(this.getJobsFunctionalTestsPgsql(this.numberOfFunctionalPgsqlJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.add(this.getJobUnitJavaScript());
 
-        jobsMainStage.add(this.getJobLintPhp(this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.add(this.getJobLintPhp(this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.add(this.getJobLintPhp(this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.add(this.getJobLintScssTs());
 
-        jobsMainStage.add(this.getJobUnitPhp(this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.add(this.getJobUnitPhp(this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.add(this.getJobUnitPhp(this.getRequirementPhpVersion72(), "PHP72"));
 
-        jobsMainStage.add(this.getJobUnitDeprecatedPhp(this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.add(this.getJobUnitDeprecatedPhp(this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.add(this.getJobUnitDeprecatedPhp(this.getRequirementPhpVersion72(), "PHP72"));
 
-        jobsMainStage.addAll(this.getJobUnitPhpRandom(this.numberOfUnitRandomOrderJobs, this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.addAll(this.getJobUnitPhpRandom(this.numberOfUnitRandomOrderJobs, this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.addAll(this.getJobUnitPhpRandom(this.numberOfUnitRandomOrderJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
         Stage stageMainStage = new Stage("Main stage")
@@ -178,7 +158,7 @@ public class NightlySpec extends AbstractCoreSpec {
                     )
             )
             .requirements(
-                this.getRequirementPhpVersion70Or71Or72()
+                this.getRequirementPhpVersion72()
             )
             .cleanWorkingDirectory(true);
     }
index d69d598..59807d3 100644 (file)
@@ -50,7 +50,7 @@ public class PreMergeSpec extends AbstractCoreSpec {
     protected int numberOfFunctionalMysqlJobs = 10;
     protected int numberOfFunctionalMssqlJobs = 10;
     protected int numberOfFunctionalPgsqlJobs = 10;
-    protected int numberOfUnitRandomOrderJobs = 1;
+    protected int numberOfUnitRandomOrderJobs = 2;
 
     /**
      * Run main to publish plan on Bamboo
@@ -88,37 +88,29 @@ public class PreMergeSpec extends AbstractCoreSpec {
         // MAIN stage
         ArrayList<Job> jobsMainStage = new ArrayList<Job>();
 
-        jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(this.getRequirementPhpVersion70Or71Or72(), "PHP707172"));
-        jobsMainStage.add(this.getJobAcceptanceTestInstallPgsql(this.getRequirementPhpVersion70Or71Or72(), "PHP707172"));
+        jobsMainStage.add(this.getJobAcceptanceTestInstallMysql(this.getRequirementPhpVersion72(), "PHP72"));
+        jobsMainStage.add(this.getJobAcceptanceTestInstallPgsql(this.getRequirementPhpVersion72(), "PHP72"));
 
-        jobsMainStage.addAll(this.getJobsAcceptanceTestsMysql(this.numberOfAcceptanceTestJobs, this.getRequirementPhpVersion70Or71Or72(), "PHP707172"));
+        jobsMainStage.addAll(this.getJobsAcceptanceTestsMysql(this.numberOfAcceptanceTestJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.add(this.getJobIntegrationVarious());
 
-        jobsMainStage.addAll(this.getJobsFunctionalTestsMysql(this.numberOfFunctionalMysqlJobs, this.getRequirementPhpVersion70Or71Or72(), "PHP707172"));
+        jobsMainStage.addAll(this.getJobsFunctionalTestsMysql(this.numberOfFunctionalMysqlJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
-        jobsMainStage.addAll(this.getJobsFunctionalTestsMssql(this.numberOfFunctionalMssqlJobs, this.getRequirementPhpVersion70Or71Or72(), "PHP707172"));
+        jobsMainStage.addAll(this.getJobsFunctionalTestsMssql(this.numberOfFunctionalMssqlJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
-        jobsMainStage.addAll(this.getJobsFunctionalTestsPgsql(this.numberOfFunctionalPgsqlJobs, this.getRequirementPhpVersion70Or71Or72(), "PHP707172"));
+        jobsMainStage.addAll(this.getJobsFunctionalTestsPgsql(this.numberOfFunctionalPgsqlJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.add(this.getJobUnitJavaScript());
 
-        jobsMainStage.add(this.getJobLintPhp(this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.add(this.getJobLintPhp(this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.add(this.getJobLintPhp(this.getRequirementPhpVersion72(), "PHP72"));
 
         jobsMainStage.add(this.getJobLintScssTs());
 
-        jobsMainStage.add(this.getJobUnitPhp(this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.add(this.getJobUnitPhp(this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.add(this.getJobUnitPhp(this.getRequirementPhpVersion72(), "PHP72"));
 
-        jobsMainStage.add(this.getJobUnitDeprecatedPhp(this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.add(this.getJobUnitDeprecatedPhp(this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.add(this.getJobUnitDeprecatedPhp(this.getRequirementPhpVersion72(), "PHP72"));
 
-        jobsMainStage.addAll(this.getJobUnitPhpRandom(this.numberOfUnitRandomOrderJobs, this.getRequirementPhpVersion70(), "PHP70"));
-        jobsMainStage.addAll(this.getJobUnitPhpRandom(this.numberOfUnitRandomOrderJobs, this.getRequirementPhpVersion71(), "PHP71"));
         jobsMainStage.addAll(this.getJobUnitPhpRandom(this.numberOfUnitRandomOrderJobs, this.getRequirementPhpVersion72(), "PHP72"));
 
         Stage stageMainStage = new Stage("Main stage")
@@ -213,7 +205,7 @@ public class PreMergeSpec extends AbstractCoreSpec {
                     )
             )
             .requirements(
-                this.getRequirementPhpVersion70Or71Or72()
+                this.getRequirementPhpVersion72()
             )
             .cleanWorkingDirectory(true);
     }
index 4a731ff..00f6edb 100644 (file)
@@ -30,7 +30,7 @@ TYPO3 requires a web server with a PHP environment and a database. The minimum
 system requirements for running TYPO3 v8 are:
 
 * Webserver capable of running PHP applications (Apache, Nginx, IIS or other)
-* PHP 7
+* PHP 7.2
 * MySQL 5.5 up to 5.7 or compatible
 * more than 200 MB of disk space
 
@@ -102,7 +102,7 @@ functionality:
 * GraphicsMagick or ImageMagick v6 or newer installed on the server
 
 * PHP
-  * version 7.0 or later
+  * version 7.2 or later
   * memory_limit set to at least 128M
   * max_execution_time set to at least 240
   * max_input_vars set to at least 1500
index 4c26f4f..d20aa6f 100644 (file)
                "news": "nntp://lists.typo3.org"
        },
        "config": {
-               "bin-dir": "bin"
+               "bin-dir": "bin",
+               "platform": {
+                       "php": "7.2.0"
+               }
        },
        "require": {
-               "php": "^7.0",
+               "php": "^7.2",
                "ext-json": "*",
                "ext-pcre": "*",
                "ext-session": "*",
index 5a39eec..bab1413 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "content-hash": "6bfd48ad0d09e9afc82cdda67074218b",
+    "content-hash": "c6293769cc8fc178257d4c92ea37491d",
     "packages": [
         {
             "name": "cogpowered/finediff",
     "prefer-stable": false,
     "prefer-lowest": false,
     "platform": {
-        "php": "^7.0",
+        "php": "^7.2",
         "ext-json": "*",
         "ext-pcre": "*",
         "ext-session": "*",
         "ext-xml": "*"
     },
-    "platform-dev": []
+    "platform-dev": [],
+    "platform-overrides": {
+        "php": "7.2.0"
+    }
 }
index 805af49..25b996a 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
 // Exit early if php requirement is not satisfied.
-if (version_compare(PHP_VERSION, '7.0.0', '<')) {
-    die('This version of TYPO3 CMS requires PHP 7.0 or above');
+if (version_compare(PHP_VERSION, '7.2.0', '<')) {
+    die('This version of TYPO3 CMS requires PHP 7.2 or above');
 }
 
 // This is a stub file for redirecting the user to the proper Install Tool URL
index ca1dee2..83abb22 100644 (file)
@@ -13,8 +13,8 @@
  */
 
 // Exit early if php requirement is not satisfied.
-if (version_compare(PHP_VERSION, '7.0.0', '<')) {
-    die('This version of TYPO3 CMS requires PHP 7.0 or above');
+if (version_compare(PHP_VERSION, '7.2.0', '<')) {
+    die('This version of TYPO3 CMS requires PHP 7.2 or above');
 }
 
 // Set up the application for the backend
diff --git a/typo3/sysext/core/Documentation/Changelog/9.0/Breaking-83289-CoreVersion90NeedsPHP720.rst b/typo3/sysext/core/Documentation/Changelog/9.0/Breaking-83289-CoreVersion90NeedsPHP720.rst
new file mode 100644 (file)
index 0000000..7a59f65
--- /dev/null
@@ -0,0 +1,35 @@
+.. include:: ../../Includes.txt
+
+===================================================
+Breaking: #83289 - Core version 9.0 needs PHP 7.2.0
+===================================================
+
+See :issue:`83289`
+
+Description
+===========
+
+The minimum PHP version required to run core version 9.0 has been raised from 7.0.0 to 7.2.0.
+
+
+Impact
+======
+
+Version constructs of PHP 7.2 and library versions requiring this PHP platform can be used.
+Hosting on platforms lower than PHP 7.2.0 is not supported.
+The PHP entry points to TYPO3 will throw fatal errors if the PHP version constraint is not fulfilled.
+
+
+Affected Installations
+======================
+
+Hosting a TYPO3 instance based on core version 9 may require an update of the PHP platform.
+
+
+Migration
+=========
+
+Youngest TYPO3 core v7 and v8 releases support PHP 7.2. This allows upgrading the platform
+in a first step and upgrading to core v9 in a second step
+
+.. index:: PHP-API, NotScanned
\ No newline at end of file
index a2fc3c5..f555d97 100644 (file)
@@ -11,7 +11,7 @@
                }],
 
        "require": {
-               "php": "^7.0",
+               "php": "^7.2",
                "ext-json": "*",
                "ext-pcre": "*",
                "ext-session": "*",
index 00b9bcf..0719d2b 100644 (file)
@@ -13,8 +13,8 @@
  */
 
 // Exit early if php requirement is not satisfied.
-if (version_compare(PHP_VERSION, '7.0.0', '<')) {
-    die('This version of TYPO3 CMS requires PHP 7.0 or above');
+if (version_compare(PHP_VERSION, '7.2.0', '<')) {
+    die('This version of TYPO3 CMS requires PHP 7.2 or above');
 }
 
 // Set up the application for the Frontend
index d3c15a5..8155bbf 100644 (file)
@@ -3510,12 +3510,7 @@ class ContentObjectRendererTest extends \TYPO3\TestingFramework\Core\Unit\UnitTe
      */
     public function notAllStdWrapProcessorsAreCallableWithEmptyConfiguration()
     {
-        $expectExceptions = ['numRows', 'split'];
-        if (!version_compare(PHP_VERSION, '7.1', '<')) {
-            // PHP >= 7.1 throws "A non-numeric value encountered" in GeneralUtility::formatSize()
-            // @todo: If that is sanitized in a better way in formatSize(), this call needs adaption
-            $expectExceptions[] = 'bytes';
-        }
+        $expectExceptions = ['numRows', 'split', 'bytes'];
         $count = 0;
         $processors = [];
         $exceptions = [];
index fcadf6d..7a2a909 100644 (file)
@@ -249,7 +249,7 @@ class Check implements CheckInterface
      */
     protected function checkPhpVersion()
     {
-        $minimumPhpVersion = '7.0.0';
+        $minimumPhpVersion = '7.2.0';
         $currentPhpVersion = phpversion();
         if (version_compare($currentPhpVersion, $minimumPhpVersion) < 0) {
             $this->messageQueue->enqueue(new FlashMessage(
index e175d1b..3267741 100644 (file)
@@ -94,8 +94,8 @@
  */
 
 // Exit early if php requirement is not satisfied.
-if (version_compare(PHP_VERSION, '7.0.0', '<')) {
-    die('This version of TYPO3 CMS requires PHP 7.0 or above');
+if (version_compare(PHP_VERSION, '7.2.0', '<')) {
+    die('This version of TYPO3 CMS requires PHP 7.2 or above');
 }
 
 call_user_func(function () {