- Issue created by @maxilein
- 🇦🇹Austria maxilein
Changing to critical since my suggested fix did not work.
The message is still there. And blocks update.php - 🇦🇹Austria maxilein
Investigating further this is the message in extend list:
This module requires PHP version 8.30000000000000071054274.* and is incompatible with PHP version 8.3.6.
I have a precision of 24 set in php.ini, because we need large numbers.
- 🇦🇹Austria maxilein
changing php: 8.3 to 8.3.6 makes the error go away.
Where is that check done?
I'd like to make sure that other modules can handle it correctly. - 🇦🇹Austria maxilein
The same erroneous comparison is shown with 2.0beta.
- Status changed to Postponed: needs info
about 2 months ago 12:03am 22 July 2024 - 🇦🇺Australia acbramley
I cannot reproduce this on 8.3 with Diff 2.x.
Can you please try to reproduce this with a vanilla Drupal installation.
- 🇦🇹Austria maxilein
Hi,
this is the important difference: I have a precision = 24 (instead of default of 14) set in php.ini
You have to restart apache afterwards.Where is the code that checks the php version in diff? I could not find it.
- Status changed to Active
about 2 months ago 10:50pm 22 July 2024 - 🇦🇺Australia acbramley
All version comparison code is in drupal core
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/syste...
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/syste... - 🇦🇹Austria maxilein
// Ensure this module is compatible with the currently installed version of PHP. if (version_compare(phpversion(), $module->info['php']) < 0) { $compatible = FALSE; $required = $module->info['php'] . (substr_count($module->info['php'], '.') < 2 ? '.*' : ''); $reasons[] = $this->t('This module requires PHP version @php_required and is incompatible with PHP version @php_version.', [ '@php_required' => $required, '@php_version' => phpversion(), ]); }
- 🇦🇹Austria maxilein
Maybe this helps https://stackoverflow.com/questions/10997482/php-version-compare-returns...
and this https://www.php.net/manual/en/function.phpversion.phpBut I really don't understand where the extended float digits are coming from ...
- 🇦🇹Austria maxilein
Another good source that may help for formulating a guide for floats and decimals in code and projects.
https://stackoverflow.com/questions/14587290/can-i-rely-on-php-php-ini-p...