- Issue created by @nterbogt
- First commit to issue fork.
- Status changed to Needs review
over 1 year ago 5:16pm 9 November 2023 - πΈπ°Slovakia poker10
Thanks. Yes, after π Increase RECOMMENDED_PHP to 8.2 for Drupal 10.2 Fixed the condition is not working correctly, as it seems like that it evaluates to TRUE everytime. I have tested this and the warning is displayed on my 11.x-dev site on PHP 8.1, even if the PHP is 8.1.17.
Created a MR where I have switched from
version_compare(\Drupal::MINIMUM_PHP, '8.1.6')
toversion_compare($phpversion, '8.1.6')
. Minimum PHP version is still 8.1.0, so we do not need to worry about that$phpversion
is lower than 8.1.0 in this changed comparision. - Status changed to Needs work
over 1 year ago 6:10pm 9 November 2023 - π¬π§United Kingdom longwave UK
Nice find, effectively a duplicate of #3305726: When Drupal::MINIMUM_PHP is 8.1.6 or greater, don't warn about OPcache bug in 8.1.0 through 8.1.5 β so we should remove the @todo comments above as well.
- Status changed to RTBC
over 1 year ago 6:12pm 9 November 2023 - πΈπ°Slovakia poker10
@longwave I am not sure, but a slightly different fix was committed to 9.5.x + 9.4.x vs 10.1.x + 10.0.x. See: #3258987-135: Status report should warn about OPcache bug in PHP 8.1.0 to 8.1.5 β .
- π¬π§United Kingdom longwave UK
That difference is because the bug only affects 8.1.0 through 8.1.5 and Drupal 9 works on PHP 8.0, but Drupal 10 requires 8.1. Looks like a typo or copy/paste error in the 10.x patch where the constant was used instead of the variable. Static analysis should be able to figure out a constant expression like that but either PHPStan doesn't understand it, or our level is not high enough.
- π¬π§United Kingdom alexpott πͺπΊπ
Committed and pushed 6dfc925033 to 11.x and 6332d42f84 to 10.2.x and b4b19a7809 to 10.1.x. Thanks!
Backported to 10.1.x to fix it in all supported releases.
-
alexpott β
committed 6dfc9250 on 11.x
Issue #3400302 by poker10, longwave, nterbogt: PHP OPcache bug detection...
-
alexpott β
committed 6dfc9250 on 11.x
-
alexpott β
committed 6332d42f on 10.2.x
Issue #3400302 by poker10, longwave, nterbogt: PHP OPcache bug detection...
-
alexpott β
committed 6332d42f on 10.2.x
- Status changed to Fixed
over 1 year ago 9:32pm 20 November 2023 -
alexpott β
committed b4b19a78 on 10.1.x
Issue #3400302 by poker10, longwave, nterbogt: PHP OPcache bug detection...
-
alexpott β
committed b4b19a78 on 10.1.x
Automatically closed - issue fixed for 2 weeks with no activity.