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,16 @@ class Installer
106103 private $ filePermissions ;
107104
108105 /**
109- * Deployment configuration repository
110- *
111106 * @var Writer
112107 */
113108 private $ deploymentConfigWriter ;
114109
115110 /**
116- * Deployment configuration reader
117- *
118111 * @var Reader
119112 */
120113 private $ deploymentConfigReader ;
121114
122115 /**
123- * Module list
124- *
125116 * @var ModuleListInterface
126117 */
127118 private $ moduleList ;
@@ -134,8 +125,6 @@ class Installer
134125 private $ moduleLoader ;
135126
136127 /**
137- * Admin account factory
138- *
139128 * @var AdminAccountFactory
140129 */
141130 private $ adminAccountFactory ;
@@ -232,8 +221,6 @@ class Installer
232221 protected $ sampleDataState ;
233222
234223 /**
235- * Component Registrar
236- *
237224 * @var ComponentRegistrar
238225 */
239226 private $ componentRegistrar ;
@@ -1063,7 +1050,7 @@ private function handleDBSchemaData($setup, $type, array $request)
10631050 $ configVer = $ this ->moduleList ->getOne ($ moduleName )['setup_version ' ];
10641051 $ currentVersion = $ moduleContextList [$ moduleName ]->getVersion ();
10651052 // Schema/Data is installed
1066- if ($ currentVersion !== '' ) {
1053+ if ($ configVer !== null && $ currentVersion !== '' ) {
10671054 $ status = version_compare ($ configVer , $ currentVersion );
10681055 if ($ status == \Magento \Framework \Setup \ModuleDataSetupInterface::VERSION_COMPARE_GREATER ) {
10691056 $ upgrader = $ this ->getSchemaDataHandler ($ moduleName , $ upgradeType );
0 commit comments