6868 */
6969class Installer
7070{
71- /**#@+
71+ /**
7272 * Parameters for enabling/disabling modules
7373 */
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 ' ;
7776
78- /**#@+
77+ /**
7978 * Formatting for progress log
8079 */
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 ' ;
8482
85- /**#@+
83+ /**
8684 * Instance types for schema and data handler
8785 */
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;
9390
94- const INFO_MESSAGE = 'message ' ;
91+ public const INFO_MESSAGE = 'message ' ;
9592
9693 /**
9794 * The lowest supported MySQL verion
9895 */
99- const MYSQL_VERSION_REQUIRED = '5.6.0 ' ;
96+ public const MYSQL_VERSION_REQUIRED = '5.6.0 ' ;
10097
10198 /**
10299 * File permissions checker
@@ -106,22 +103,20 @@ class Installer
106103 private $ filePermissions ;
107104
108105 /**
109- * Deployment configuration repository
106+ * The deployment configuration repository
110107 *
111108 * @var Writer
112109 */
113110 private $ deploymentConfigWriter ;
114111
115112 /**
116- * Deployment configuration reader
113+ * The deployment configuration reader
117114 *
118115 * @var Reader
119116 */
120117 private $ deploymentConfigReader ;
121118
122119 /**
123- * Module list
124- *
125120 * @var ModuleListInterface
126121 */
127122 private $ moduleList ;
@@ -134,8 +129,6 @@ class Installer
134129 private $ moduleLoader ;
135130
136131 /**
137- * Admin account factory
138- *
139132 * @var AdminAccountFactory
140133 */
141134 private $ adminAccountFactory ;
@@ -232,8 +225,6 @@ class Installer
232225 protected $ sampleDataState ;
233226
234227 /**
235- * Component Registrar
236- *
237228 * @var ComponentRegistrar
238229 */
239230 private $ componentRegistrar ;
@@ -1063,7 +1054,7 @@ private function handleDBSchemaData($setup, $type, array $request)
10631054 $ configVer = $ this ->moduleList ->getOne ($ moduleName )['setup_version ' ];
10641055 $ currentVersion = $ moduleContextList [$ moduleName ]->getVersion ();
10651056 // Schema/Data is installed
1066- if ($ currentVersion !== '' ) {
1057+ if ($ configVer !== null && $ currentVersion !== '' ) {
10671058 $ status = version_compare ($ configVer , $ currentVersion );
10681059 if ($ status == \Magento \Framework \Setup \ModuleDataSetupInterface::VERSION_COMPARE_GREATER ) {
10691060 $ upgrader = $ this ->getSchemaDataHandler ($ moduleName , $ upgradeType );
0 commit comments