* @deprecated use migrations instead. See https://github.com/oat-sa/generis/wiki/Tao-Update-Process */ class Updater extends \common_ext_ExtensionUpdater { /** * Perform update from $currentVersion to $versionUpdatedTo. * * @param string $currentVersion * @return string $versionUpdatedTo */ public function update($initialVersion) { if ($this->isBetween('0.0.0', '1.1.3')) { throw new \common_exception_NotImplemented('Updates from versions prior to Tao 3.1 are not longer supported, please update to Tao 3.1 first'); } $this->skip('1.1.3', '1.6.2'); if ($this->isVersion('1.6.2')) { AclProxy::applyRule(new AccessRule( 'grant', TaoRoles::ANONYMOUS, ['ext' => 'taoCe', 'mod' => 'Main', 'act' => 'rootEntry'] )); $this->setVersion('1.7.0'); } $this->skip('1.7.0', '1.7.1'); // add guest login if ($this->isVersion('1.7.1')) { $entryPointService = $this->getServiceManager()->get(EntryPointService::SERVICE_ID); $entryPointService->addEntryPoint(new GuestAccess(), EntryPointService::OPTION_PRELOGIN); $this->getServiceManager()->register(EntryPointService::SERVICE_ID, $entryPointService); $this->setVersion('1.8.0'); } $this->skip('1.8.0', '8.4.1'); //Updater files are deprecated. Please use migrations. //See: https://github.com/oat-sa/generis/wiki/Tao-Update-Process $this->setVersion($this->getExtension()->getManifest()->getVersion()); } }