Update.php in Production check & Production monitor 8
File
src/Plugin/ProdCheck/Modules/Update.php
View source
<?php
namespace Drupal\prod_check\Plugin\ProdCheck\Modules;
use Drupal\prod_check\Plugin\ProdCheck\ProdCheckBase;
class Update extends ProdCheckBase {
public function state() {
return !$this->moduleHandler
->moduleExists('update');
}
public function severity() {
return $this->processor
->warning();
}
public function successMessages() {
return [
'value' => $this
->t('Disabled'),
'description' => $this
->t('Your settings are OK for production use.'),
];
}
public function failMessages() {
return [
'value' => $this
->t('Enabled'),
'description' => $this
->generateDescription($this
->title(), 'update.status', 'You have enabled the %link module. It would be better to turn this off on production, contrary to what Drupal core claims, and keep it running on development. Updating and testing should happen on development before deploying to production anyway.'),
];
}
}