23 $scriptPattern[] = $moduleDir .
'/sql';
24 $scriptPattern[] = $moduleDir .
'/data';
25 $scriptPattern[] = $moduleDir .
'/Setup';
33 $this->assertStringStartsNotWith(
36 'Install scripts are obsolete. ' 37 .
'Please use declarative schema approach in module\'s etc/db_schema.xml file' 39 $this->assertStringStartsNotWith(
42 'InstallSchema objects are obsolete. ' 43 .
'Please use declarative schema approach in module\'s etc/db_schema.xml file' 45 $this->assertStringStartsNotWith(
48 'InstallData objects are obsolete. ' 49 .
'Please use data patches approach in module\'s Setup/Patch/Data dir' 51 $this->assertStringStartsNotWith(
54 'Install scripts are obsolete. Please create class InstallData in module\'s Setup folder' 56 $this->assertStringStartsNotWith(
59 'Upgrade scripts are obsolete. ' 60 .
'Please use declarative schema approach in module\'s etc/db_schema.xml file' 62 $this->assertStringStartsNotWith(
65 'UpgradeSchema scripts are obsolete. ' 66 .
'Please use declarative schema approach in module\'s etc/db_schema.xml file' 68 $this->assertStringStartsNotWith(
71 'UpgradeSchema scripts are obsolete. ' 72 .
'Please use data patches approach in module\'s Setup/Patch/Data dir' 74 $this->assertStringStartsNotWith(
77 'Upgrade scripts are obsolete. ' 78 .
'Please use data patches approach in module\'s Setup/Patch/Data dir' 80 $this->assertStringStartsNotWith(
83 'Recurring scripts are obsolete. Please create class Recurring in module\'s Setup folder' 85 if (preg_match(
'/.*\/(sql\/|data\/)/', dirname($file))) {
87 "Invalid directory:\n" 88 .
"- Create an data patch within module's Setup/Patch/Data folder for data upgrades.\n" 89 .
"- Use declarative schema approach in module's etc/db_schema.xml file for schema changes." 105 private function convertArray($stringArray)
108 foreach ($stringArray as
$item) {
testForOldInstallUpgradeScripts()