-
Notifications
You must be signed in to change notification settings - Fork 1
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
Drop PHP 7 support #343
Comments
As long as it's not a major hassle to support PHP 7.x we can also continue to keep compatibility with it, though. |
It could be worthwhile dropping PHP < 7.4 for:
|
All PHP 8.0 features @ https://wiki.php.net/rfc#php_80 |
https://externals.io/message/122214 This would introduce the situation of not being able to write nullable parameters in a way that works for all PHP versions. PHP 7.0 needs One argument more to only keep support for PHP 7.4 |
Made XP 11 compatible by suppressing this specific error, see https://github.com/xp-framework/core/releases/tag/v11.9.0 |
The case for dropping 7.0 (but retaining 7.x)
We should safely be able to drop at least PHP 7.0 as even really old Ubuntu versions come with 7.2:
This would allow us to restore full compatibility with the implicit nullable types deprecation as we can use https://wiki.php.net/rfc/nullable_types syntax while still supporting the broadest possible range of PHP versions! Dropping 7.0 would also make these conditionals unnecessary: $ grep -Hrn PHP_VERSION src/main/php/ | grep 70100
src/main/php/lang/ClassLoader.class.php:231: $constraint= (PHP_VERSION_ID >= 70100 ? $t->getName() : $t->__toString());
src/main/php/lang/ClassLoader.class.php:233: $constraint= '\\'.(PHP_VERSION_ID >= 70100 ? $t->getName() : $t->__toString());
src/main/php/lang/ClassLoader.class.php:253: $decl.= ':'.(PHP_VERSION_ID >= 70100 ? $t->getName() : $t->__toString());
src/main/php/lang/ClassLoader.class.php:255: $decl.= ': \\'.(PHP_VERSION_ID >= 70100 ? $t->getName() : $t->__toString());
src/main/php/lang/ClassLoader.class.php:303: if (null !== $t && 'void' === (PHP_VERSION_ID >= 70100 ? $t->getName() : $t->__toString())) {
src/main/php/lang/Environment.class.php:17: foreach (PHP_VERSION_ID >= 70100 ? getenv() : $_SERVER as $name => $value) {
src/main/php/lang/Environment.class.php:32: $variables= PHP_VERSION_ID >= 70100 ? getenv() : $_SERVER;
src/main/php/lang/reflect/Field.class.php:99: $name= PHP_VERSION_ID >= 70100 ? $t->getName() : $t->__toString();
src/main/php/lang/reflect/Parameter.class.php:107: $name= PHP_VERSION_ID >= 70100 ? $t->getName() : $t->__toString();
src/main/php/lang/reflect/Routine.class.php:168: $name= PHP_VERSION_ID >= 70100 ? $t->getName() : $t->__toString();
src/main/php/lang/Type.class.php:256: $name= PHP_VERSION_ID >= 70100 ? $type->getName() : $type->__toString(); PHP 7.1 comes with a variety of syntactical features:
See https://wiki.php.net/rfc#php_71 PHP 7.2, 7.3 and 7.4 offer the following on top:
See https://wiki.php.net/rfc#php_72, https://wiki.php.net/rfc#php_73 and https://wiki.php.net/rfc#php_74 Our path forward could be as follows:
Alternatively, a more "agressive" (see above for how long PHP 7.4 has been EOL) path could be:
|
XP 12 is released! |
Following this path, quite a bit of libraries have been pushed to 7.4+ in the meantime
|
Scope of Change
This RFC suggests dropping PHP 7 support
Rationale
PHP 7.4 is EOL since November 28, 2022: https://twitter.com/official_php/status/1597203297537957888
Functionality
?->
nullsafe operatorSecurity considerations
n/a
Speed impact
Better
Dependencies
Major version
Related documents
https://www.php.net/releases/8.0/en.php
The text was updated successfully, but these errors were encountered: