EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Upgrade script: path exclusions for customization checks
Taras Machyshynb9ee50347c1e
diff --git a/upgrades/10.0/scripts/BeforeUpgrade.php b/upgrades/10.0/scripts/BeforeUpgrade.phpindex 37be09a4a2..4625fab059 100644--- a/upgrades/10.0/scripts/BeforeUpgrade.php+++ b/upgrades/10.0/scripts/BeforeUpgrade.php@@ -203,6 +203,10 @@ class BeforeUpgradecontinue;}+ if (self::toIgnoreFile($file)) {+ continue;+ }+if ($file->getExtension() !== 'php') {continue;}@@ -262,4 +266,20 @@ class BeforeUpgradereturn $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;+ }}