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.