-
Notifications
You must be signed in to change notification settings - Fork 8k
Update minimum required PHP version in Autotools build system #20933
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
base: master
Are you sure you want to change the base?
Conversation
|
What was the issue with 7.4 for gen_stub? I had intentionally avoided using things that would require 8.0+ in my cleanups |
In PHP 8.4: and in PHP-8.5 and master: Fatal error: Uncaught TypeError: Typed property EvaluatedValue::$value must be an instance of mixed, string used in /opt/php-src/build/gen_stub.php:2357 |
|
@DanielEScherzer Yes, basically Nikita's request was not to increase the minimum required PHP version to a too recent version, but he told this a few ago already when PHP 8.0 was only a couple of years old. Now I think it's OK to make this change, especially because proper support for PHP 7.4 is broken for a while ^^ So at least the fact that no one complained confirms that we won't break too many workflows :) And then the next question: is it ok to increase the minimum version to PHP 8.1 so that readonly properties can be used? IMO it's also a viable option besides PHP 8.0. |
I think so, yes. Probably this version might be limited in cases when building PHP from source on systems that have some old PHP installed. And I don't see any reason why this would cause any issues out there. Edit: Another possible reason for very very old PHP version used here was that once this version was hardcoded in build/php.m4 file directly (in the |
At the time of writing, PHP found on host system must be at least 8.0 for build/gen_stub.php and Zend/zend_vm_gen.php scripts to work. Minimum required version is updated to 8.1 to still support building PHP from source on any possible old systems, and enabling new features in build/gen_stub.php, such as readonly properties.
a5838c0 to
69ec11f
Compare
|
LGTM on my part, but I don't know if this needs more discussion (at least among main contributors) 🤷 |
|
Please don't raise requirements for gen stub. In fact it should be fixed to actually work with all versions since 7.4. The reason is that it is an essential tool for building php itself, and 7.4 is the last version that does not require php to build itself. So you can build 7.4 to then build 8.x. Otherwise it forces to use binary 3rd party or distro packages, increasing the supply chain attack surface. |
Which version would be then suitable to update this requirement? PHP 9? PHP 10?
PHP isn't required to build PHP itself. This is only for development of php-src, when some stub.php file changes to regenerate its arginfo.h file. |
I would raise the requirement when needed. Do you need to raise the requirement? Like for enums or some kind of very important feature? |
At the time of writing, PHP found on host system must be at least 8.0 for build/gen_stub.php and Zend/zend_vm_gen.php scripts to work.