Issue #3258987 by phenaproxima, xjm, mrweiner, catch, cilefen, mfb,...
Issue #3258987 by phenaproxima, xjm, mrweiner, catch, cilefen, mfb, benjifisher, Berdir, szato: Status report should warn about OPcache bug in PHP 8.1.0 to 8.1.5
$requirements['php']['description']=t('It is recommended to upgrade to PHP version %recommended or higher for the best ongoing support. See <a href="http://php.net/supported-versions.php">PHP\'s version support documentation</a> and the <a href=":php_requirements">Drupal PHP requirements</a> page for more information.',['%recommended'=>\Drupal::RECOMMENDED_PHP,':php_requirements'=>'https://www.drupal.org/docs/system-requirements/php-requirements']);
$requirements['php']['description']=t('It is recommended to upgrade to PHP version %recommended or higher for the best ongoing support. See <a href="http://php.net/supported-versions.php">PHP\'s version support documentation</a> and the <a href=":php_requirements">Drupal PHP requirements</a> page for more information.',['%recommended'=>\Drupal::RECOMMENDED_PHP,':php_requirements'=>'https://www.drupal.org/docs/system-requirements/php-requirements']);
$requirements['php']['description']=t('PHP %version has <a href=":bug_url">an OPcache bug that can cause fatal errors with class autoloading</a>. This can be fixed by upgrading to PHP 8.1.6 or later. See <a href="http://php.net/supported-versions.php">PHP\'s version support documentation</a> and the <a href=":php_requirements">Drupal PHP requirements</a> page for more information.',[
$this->assertSession()->pageTextContains("PHP $phpversion has an OPcache bug that can cause fatal errors with class autoloading. This can be fixed by upgrading to PHP 8.1.6 or later.");
$this->assertSession()->linkExists('an OPcache bug that can cause fatal errors with class autoloading');
}
else{
$this->assertSession()->pageTextContains('It is recommended to upgrade to PHP version '.\Drupal::RECOMMENDED_PHP.' or higher');