eavSetupFactory = $eavSetupFactory; } public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]); if (version_compare($context->getVersion(), '1.15.18') < 0) { $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $categorySetup = $objectManager->create('saws\sawsconnector\Setup\CategorySetup'); $categorySetup->installAttributes($eavSetup); } $setup->endSetup(); } }