getServiceLocator()->get(TokenService::SERVICE_ID); if (!$service->hasOption(TokenService::VALIDATE_TOKENS_OPT)) { $service->setOption(TokenService::VALIDATE_TOKENS_OPT, true); $this->getServiceManager()->register(TokenService::SERVICE_ID, $service); } } public function down(Schema $schema): void { $service = $this->getServiceLocator()->get(TokenService::SERVICE_ID); if ($service->hasOption(TokenService::VALIDATE_TOKENS_OPT)) { $options = $service->getOptions(); unset($options[TokenService::VALIDATE_TOKENS_OPT]); $service->setOptions($options); $this->getServiceManager()->register(TokenService::SERVICE_ID, $service); } } }