|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Backpack\CRUD\app\Console\Commands\Upgrade\v7; |
|
4
|
|
|
|
|
5
|
|
|
use Backpack\CRUD\app\Console\Commands\Upgrade\UpgradeCommand; |
|
6
|
|
|
use Backpack\CRUD\app\Console\Commands\Upgrade\UpgradeConfigInterface; |
|
7
|
|
|
use Backpack\CRUD\app\Console\Commands\Upgrade\UpgradeConfigSummaryInterface; |
|
8
|
|
|
use Backpack\CRUD\app\Console\Commands\Upgrade\v7\Steps as Step; |
|
9
|
|
|
|
|
10
|
|
|
class UpgradeCommandConfig implements UpgradeConfigInterface, UpgradeConfigSummaryInterface |
|
11
|
|
|
{ |
|
12
|
|
|
public function steps(): array |
|
13
|
|
|
{ |
|
14
|
|
|
return [ |
|
15
|
|
|
Step\EnsureLaravelVersionStep::class, |
|
16
|
|
|
Step\EnsureBackpackCrudRequirementStep::class, |
|
17
|
|
|
Step\EnsureFirstPartyAddonsAreCompatibleStep::class, |
|
18
|
|
|
Step\CheckOperationConfigFilesStep::class, |
|
19
|
|
|
Step\CheckThemeTablerConfigStep::class, |
|
20
|
|
|
Step\DetectDeprecatedWysiwygUsageStep::class, |
|
21
|
|
|
Step\DetectEditorAddonRequirementsStep::class, |
|
22
|
|
|
Step\CheckShowOperationViewPublishedStep::class, |
|
23
|
|
|
Step\CheckShowOperationComponentConfigStep::class, |
|
24
|
|
|
Step\CheckFileManagerPublishedViewsStep::class, |
|
25
|
|
|
Step\CheckListOperationViewPublishedStep::class, |
|
26
|
|
|
]; |
|
27
|
|
|
} |
|
28
|
|
|
|
|
29
|
|
|
public function addons(): array |
|
30
|
|
|
{ |
|
31
|
|
|
return [ |
|
32
|
|
|
'backpack/crud' => self::backpackCrudRequirement(), |
|
33
|
|
|
'backpack/filemanager' => '^4.0', |
|
34
|
|
|
'backpack/theme-coreuiv2' => '^2.0', |
|
35
|
|
|
'backpack/theme-coreuiv4' => '^1.2', |
|
36
|
|
|
'backpack/theme-tabler' => '^2.0', |
|
37
|
|
|
'backpack/logmanager' => '^5.1', |
|
38
|
|
|
'backpack/settings' => '^3.2', |
|
39
|
|
|
'backpack/newscrud' => '^5.2', |
|
40
|
|
|
'backpack/permissionmanager' => '^7.3', |
|
41
|
|
|
'backpack/pagemanager' => '^3.4', |
|
42
|
|
|
'backpack/menucrud' => '^4.1', |
|
43
|
|
|
'backpack/backupmanager' => '^5.1', |
|
44
|
|
|
'backpack/editable-columns' => '^3.1', |
|
45
|
|
|
'backpack/revise-operation' => '^2.1', |
|
46
|
|
|
'backpack/medialibrary-uploaders' => '^2.0', |
|
47
|
|
|
'backpack/devtools' => '^4.0', |
|
48
|
|
|
'backpack/generators' => '^4.1', |
|
49
|
|
|
'backpack/activity-log' => '^2.1', |
|
50
|
|
|
'backpack/calendar-operation' => '^1.1', |
|
51
|
|
|
'backpack/language-switcher' => '^2.1', |
|
52
|
|
|
'backpack/pan-panel' => '^1.1', |
|
53
|
|
|
'backpack/pro' => '^3.0', |
|
54
|
|
|
'backpack/translation-manager' => '^1.1', |
|
55
|
|
|
]; |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
public function upgradeCommandDescription(): ?callable |
|
59
|
|
|
{ |
|
60
|
|
|
return function (UpgradeCommand $command): void { |
|
61
|
|
|
$command->note( |
|
62
|
|
|
'Before you start, make sure you have a fresh <fg=red>FULL BACKUP</> of your project and database stored safely.', |
|
63
|
|
|
'yellow', |
|
64
|
|
|
'yellow' |
|
65
|
|
|
); |
|
66
|
|
|
}; |
|
67
|
|
|
} |
|
68
|
|
|
|
|
69
|
|
|
public function upgradeCommandSummary(): ?string |
|
70
|
|
|
{ |
|
71
|
|
|
return null; |
|
72
|
|
|
} |
|
73
|
|
|
|
|
74
|
|
|
public static function backpackCrudRequirement(): string |
|
75
|
|
|
{ |
|
76
|
|
|
return '^7.0'; |
|
77
|
|
|
} |
|
78
|
|
|
|
|
79
|
|
|
public static function postUpgradeCommands(): array |
|
80
|
|
|
{ |
|
81
|
|
|
return [ |
|
82
|
|
|
'php artisan basset:clear', |
|
83
|
|
|
'php artisan config:clear', |
|
84
|
|
|
'php artisan cache:clear', |
|
85
|
|
|
'php artisan view:clear', |
|
86
|
|
|
]; |
|
87
|
|
|
} |
|
88
|
|
|
} |
|
89
|
|
|
|