mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-27 14:36:05 +00:00
Upgrade script: path exclusions for customization checks
This commit is contained in:
@@ -203,6 +203,10 @@ class BeforeUpgrade
|
||||
continue;
|
||||
}
|
||||
|
||||
if (self::toIgnoreFile($file)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($file->getExtension() !== 'php') {
|
||||
continue;
|
||||
}
|
||||
@@ -262,4 +266,20 @@ class BeforeUpgrade
|
||||
|
||||
return $classes;
|
||||
}
|
||||
|
||||
private static function toIgnoreFile(string $file): bool
|
||||
{
|
||||
$ignorePathRegexList = [
|
||||
'^custom\/Espo\/Modules\/[^\/]+\/vendor',
|
||||
'^custom\/Espo\/Custom\/vendor',
|
||||
];
|
||||
|
||||
foreach ($ignorePathRegexList as $pattern) {
|
||||
if (preg_match('/' . $pattern . '/', $file)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user