moduleDataSetup = $moduleDataSetup; $this->customerSetupFactory = $customerSetupFactory; } /** * @inheritDoc */ public function apply() { /** @var CustomerSetup $customerSetup */ $customerSetup = $this->customerSetupFactory->create(['setup' => $this->moduleDataSetup]); $this->update($customerSetup); return $this; } /** * @inheritDoc */ public function getAliases() { return []; } /** * @inheritDoc */ public static function getDependencies() { return [ DefaultCustomerGroupsAndAttributes::class, ]; } /** * Update customer address attributes sort order * * @param CustomerSetup $customerSetup * * @return void * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ private function update($customerSetup) { $entityAttributes = [ 'customer_address' => [ 'company' => [ 'is_required' => 0, ] ], ]; $customerSetup->upgradeAttributes($entityAttributes); } }