updater->version(...)), new TwigFunction('kant_update_version', $this->available(...))]; } public function available(): ?string { // The daily worker already checks releases. Rendering navigation never contacts Git. try { $message = $this->db->fetchOne('SELECT last_message FROM scheduled_task WHERE name = ?', ['update-check']); if (is_string($message) && 1 === preg_match('/^Fassung (\d+\.\d+\.\d+) ist verfügbar/', $message, $match) && version_compare($match[1], $this->updater->version(), '>')) { return $match[1]; } } catch (\Doctrine\DBAL\Exception) { // An installation still waiting for migrations has no task table yet. } return null; } }