class ModifiedFiles in Automatic Updates 7
Modified code checker.
Hierarchy
- class \ModifiedFiles implements ReadinessCheckerInterface uses ProjectInfoTrait
Expanded class hierarchy of ModifiedFiles
1 string reference to 'ModifiedFiles'
- ReadinessCheckerManager::getCheckers in ReadinessCheckers/
ReadinessCheckerManager.php - Get checkers.
File
- ReadinessCheckers/
ModifiedFiles.php, line 6
View source
class ModifiedFiles implements ReadinessCheckerInterface {
use ProjectInfoTrait;
/**
* {@inheritdoc}
*/
public static function run() {
return static::modifiedFilesCheck();
}
/**
* Check if the site contains any modified code.
*
* @return array
* An array of translatable strings if any checks fail.
*/
protected static function modifiedFilesCheck() {
$messages = [];
$filtered_modified_files = new IgnoredPathsIteratorFilter(ModifiedFilesService::getModifiedFiles(static::getInfos()));
foreach ($filtered_modified_files as $file) {
$messages[] = t('The hash for @file does not match its original. Updates that include that file will fail and require manual intervention.', [
'@file' => $file,
]);
}
return $messages;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ModifiedFiles:: |
protected static | function | Check if the site contains any modified code. | |
ModifiedFiles:: |
public static | function |
Run check. Overrides ReadinessCheckerInterface:: |
|
ProjectInfoTrait:: |
protected static | function | Get the extension version. | |
ProjectInfoTrait:: |
protected static | function | Returns an array of info files information of available extensions. | |
ProjectInfoTrait:: |
protected static | function | Get the extension's project name. |