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,20 @@ class Installer
106
103
private $ filePermissions ;
107
104
108
105
/**
109
- * Deployment configuration repository
106
+ * The deployment configuration repository
110
107
*
111
108
* @var Writer
112
109
*/
113
110
private $ deploymentConfigWriter ;
114
111
115
112
/**
116
- * Deployment configuration reader
113
+ * The deployment configuration reader
117
114
*
118
115
* @var Reader
119
116
*/
120
117
private $ deploymentConfigReader ;
121
118
122
119
/**
123
- * Module list
124
- *
125
120
* @var ModuleListInterface
126
121
*/
127
122
private $ moduleList ;
@@ -134,8 +129,6 @@ class Installer
134
129
private $ moduleLoader ;
135
130
136
131
/**
137
- * Admin account factory
138
- *
139
132
* @var AdminAccountFactory
140
133
*/
141
134
private $ adminAccountFactory ;
@@ -232,8 +225,6 @@ class Installer
232
225
protected $ sampleDataState ;
233
226
234
227
/**
235
- * Component Registrar
236
- *
237
228
* @var ComponentRegistrar
238
229
*/
239
230
private $ componentRegistrar ;
@@ -1063,7 +1054,7 @@ private function handleDBSchemaData($setup, $type, array $request)
1063
1054
$ configVer = $ this ->moduleList ->getOne ($ moduleName )['setup_version ' ];
1064
1055
$ currentVersion = $ moduleContextList [$ moduleName ]->getVersion ();
1065
1056
// Schema/Data is installed
1066
- if ($ currentVersion !== '' ) {
1057
+ if ($ configVer !== null && $ currentVersion !== '' ) {
1067
1058
$ status = version_compare ($ configVer , $ currentVersion );
1068
1059
if ($ status == \Magento \Framework \Setup \ModuleDataSetupInterface::VERSION_COMPARE_GREATER ) {
1069
1060
$ upgrader = $ this ->getSchemaDataHandler ($ moduleName , $ upgradeType );
0 commit comments