Fassung 1.0.1: die laufende Fassung steht in der Verwaltung
CMS quality / php (8.2) (push) Canceled after 0s
CMS quality / php (8.4) (push) Canceled after 0s
CMS quality / browser (push) Canceled after 0s
CMS quality / mysql (push) Canceled after 0s

Eine kleine, von außen sichtbare Änderung - sie ist der Prüfstein für das
Update: nach dem Einspielen muss in der Seitenleiste 1.0.1 stehen, und der
Weg dorthin muss die Schritte gegangen sein, die der Updater verspricht.

Die Fassung kommt über eine Twig-Funktion in die Vorlage, nicht über einen
globalen Dienst: die Vorlagen bekommen genau diese eine lesende Antwort und
nicht einen Updater mit update() darauf.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kantarciandClaude Opus 5 committed 2026-09-12 20:11:21 +02:00
1 parent 52f0ab3807
commit 5a8d67a638
4 files changed
+28 -1

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Twig;
use App\Ops\Updater;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;
/**
* The running version, for the administration shell.
*
* A function rather than a global, so the templates get exactly this one read-only answer and not
* a whole updater with an update() method on it.
*/
final class VersionExtension extends AbstractExtension
{
public function __construct(private Updater $updater)
{
}
public function getFunctions(): array
{
return [new TwigFunction('kant_version', $this->updater->version(...))];
}
}