68
68
*/
69
69
class Installer
70
70
{
71
- /**#@+
71
+ /**
72
72
* Parameters for enabling/disabling modules
73
73
*/
74
- const ENABLE_MODULES = 'enable-modules ' ;
75
- const DISABLE_MODULES = 'disable-modules ' ;
76
- /**#@- */
74
+ public const ENABLE_MODULES = 'enable-modules ' ;
75
+ public const DISABLE_MODULES = 'disable-modules ' ;
77
76
78
- /**#@+
77
+ /**
79
78
* Formatting for progress log
80
79
*/
81
- const PROGRESS_LOG_RENDER = '[Progress: %d / %d] ' ;
82
- const PROGRESS_LOG_REGEX = '/\[Progress: (\d+) \/ (\d+)\]/s ' ;
83
- /**#@- */
80
+ public const PROGRESS_LOG_RENDER = '[Progress: %d / %d] ' ;
81
+ public const PROGRESS_LOG_REGEX = '/\[Progress: (\d+) \/ (\d+)\]/s ' ;
84
82
85
- /**#@+
83
+ /**
86
84
* Instance types for schema and data handler
87
85
*/
88
- const SCHEMA_INSTALL = \Magento \Framework \Setup \InstallSchemaInterface::class;
89
- const SCHEMA_UPGRADE = \Magento \Framework \Setup \UpgradeSchemaInterface::class;
90
- const DATA_INSTALL = \Magento \Framework \Setup \InstallDataInterface::class;
91
- const DATA_UPGRADE = \Magento \Framework \Setup \UpgradeDataInterface::class;
92
- /**#@- */
86
+ public const SCHEMA_INSTALL = \Magento \Framework \Setup \InstallSchemaInterface::class;
87
+ public const SCHEMA_UPGRADE = \Magento \Framework \Setup \UpgradeSchemaInterface::class;
88
+ public const DATA_INSTALL = \Magento \Framework \Setup \InstallDataInterface::class;
89
+ public const DATA_UPGRADE = \Magento \Framework \Setup \UpgradeDataInterface::class;
93
90
94
- const INFO_MESSAGE = 'message ' ;
91
+ public const INFO_MESSAGE = 'message ' ;
95
92
96
93
/**
97
94
* The lowest supported MySQL verion
98
95
*/
99
- const MYSQL_VERSION_REQUIRED = '5.6.0 ' ;
96
+ public const MYSQL_VERSION_REQUIRED = '5.6.0 ' ;
100
97
101
98
/**
102
99
* File permissions checker
@@ -106,22 +103,16 @@ class Installer
106
103
private $ filePermissions ;
107
104
108
105
/**
109
- * Deployment configuration repository
110
- *
111
106
* @var Writer
112
107
*/
113
108
private $ deploymentConfigWriter ;
114
109
115
110
/**
116
- * Deployment configuration reader
117
- *
118
111
* @var Reader
119
112
*/
120
113
private $ deploymentConfigReader ;
121
114
122
115
/**
123
- * Module list
124
- *
125
116
* @var ModuleListInterface
126
117
*/
127
118
private $ moduleList ;
@@ -134,8 +125,6 @@ class Installer
134
125
private $ moduleLoader ;
135
126
136
127
/**
137
- * Admin account factory
138
- *
139
128
* @var AdminAccountFactory
140
129
*/
141
130
private $ adminAccountFactory ;
@@ -232,8 +221,6 @@ class Installer
232
221
protected $ sampleDataState ;
233
222
234
223
/**
235
- * Component Registrar
236
- *
237
224
* @var ComponentRegistrar
238
225
*/
239
226
private $ componentRegistrar ;
@@ -1063,7 +1050,7 @@ private function handleDBSchemaData($setup, $type, array $request)
1063
1050
$ configVer = $ this ->moduleList ->getOne ($ moduleName )['setup_version ' ];
1064
1051
$ currentVersion = $ moduleContextList [$ moduleName ]->getVersion ();
1065
1052
// Schema/Data is installed
1066
- if ($ currentVersion !== '' ) {
1053
+ if ($ configVer !== null && $ currentVersion !== '' ) {
1067
1054
$ status = version_compare ($ configVer , $ currentVersion );
1068
1055
if ($ status == \Magento \Framework \Setup \ModuleDataSetupInterface::VERSION_COMPARE_GREATER ) {
1069
1056
$ upgrader = $ this ->getSchemaDataHandler ($ moduleName , $ upgradeType );
0 commit comments