Commit 4ab93f35 authored by Helmut Hummel's avatar Helmut Hummel
Browse files

[TASK] Use Composer runtime platform check instead of our own

Several benefits come (basically for free) with this change.

1. We only maintain platform dependencies in composer.json
2. Advanced users can omit the runtime check from being generated
3. Relying on canonical functionality instead of our own

For this to work, Composer 2.0 must be required not only for
development, but also for any production install of the packages.

With doing so, eventually other runtime functionality like installed
package versions can be used as well.

composer req composer-runtime-api:^2.0

This also remove the upper version check for PHP <9
because Composer runtime API does not provide upper bound checks,
to allow future compatiblity of software installs, in case it isn't
updated any more, but would run with later PHP versions.

Upper PHP version check and failing with an appropriate error message
is useful for cases when users accidentally use a PHP version
higher than TYPO3 is capable of running on. However not only isn't
there a PHP version 9 on the horizon, it isn't even remotely clear,
whether this PHP version would have a compatiblity impact on TYPO3.

Therefore an upper version check at this point in time provides zero
value and can be safely omitted.

Besides that, also from a maintainer perspective it will be much easier
to check the impact on PHP 9 release candidates, because tests could be run
automatically against this version, without modifying the code, so that
compatiblity with this future PHP version can be provided ahead of time,
making the upper bound check obsolete as well.

Resolves: #93257
Releases: master
Change-Id: I55c0c17088f222736afa99d929fe8646a483a5ee
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/67371

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Simon Gilli's avatarSimon Gilli <typo3@gilbertsoft.org>
Tested-by: Helmut Hummel's avatarHelmut Hummel <typo3@helhum.io>
Reviewed-by: Xavier Perseguers's avatarXavier Perseguers <xavier@typo3.org>
Reviewed-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Mathias Brodala's avatarMathias Brodala <mbrodala@pagemachine.de>
Reviewed-by: Simon Gilli's avatarSimon Gilli <typo3@gilbertsoft.org>
Reviewed-by: Helmut Hummel's avatarHelmut Hummel <typo3@helhum.io>
parent 6aa3ebe0
......@@ -38,6 +38,7 @@
"ext-pcre": "*",
"ext-session": "*",
"ext-xml": "*",
"composer-runtime-api": "^2.0",
"bacon/bacon-qr-code": "^2.0",
"christian-riesen/base32": "^1.5",
"cogpowered/finediff": "~0.3.1",
......@@ -86,7 +87,6 @@
"typo3fluid/fluid": "^2.7.0"
},
"require-dev": {
"composer-runtime-api": "^2.0",
"codeception/codeception": "^4.1.12",
"codeception/lib-asserts": "^1.13.2",
"codeception/module-asserts": "^1.3.1",
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a70533ee459c70ce82ff5d2ff9965a20",
"content-hash": "085bf86c7060c81baf59d5e709b59b7b",
"packages": [
{
"name": "bacon/bacon-qr-code",
......@@ -7929,13 +7929,12 @@
"ext-libxml": "*",
"ext-pcre": "*",
"ext-session": "*",
"ext-xml": "*"
},
"platform-dev": {
"ext-xml": "*",
"composer-runtime-api": "^2.0"
},
"platform-dev": [],
"platform-overrides": {
"php": "7.4.1"
},
"plugin-api-version": "2.0.0"
"plugin-api-version": "2.1.0"
}
......@@ -13,11 +13,6 @@
* 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');
}
// Set up the application for the backend
call_user_func(function () {
$classLoader = require __DIR__ . '/../../../../../../vendor/autoload.php';
......
......@@ -13,11 +13,6 @@
* 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
......
......@@ -29,6 +29,7 @@
"bacon/bacon-qr-code": "^2.0",
"christian-riesen/base32": "^1.5",
"cogpowered/finediff": "~0.3.1",
"composer-runtime-api": "^2.0",
"doctrine/annotations": "^1.11",
"doctrine/dbal": "^2.13",
"doctrine/instantiator": "^1.4",
......
......@@ -13,11 +13,6 @@
* 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');
}
// Set up the application for the frontend
call_user_func(function () {
$classLoader = require __DIR__ . '/../../../../../../vendor/autoload.php';
......
......@@ -94,11 +94,6 @@
* can exist yet.
*/
// 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');
}
call_user_func(function () {
$classLoader = require __DIR__ . '/../../../../../../vendor/autoload.php';
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_INSTALL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment