Update: ersetzten Plugin-Ordner ignorieren; Uploads trotz open_basedir
All checks were successful
CI / PHP 8.3 / mariadb:10.6 (pull_request) Successful in 3m14s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Successful in 3m17s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Successful in 3m35s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Successful in 3m43s
CI / PHP 8.3 / mysql:8.0 (pull_request) Successful in 5m14s
CI / PHP 8.4 / mysql:8.0 (pull_request) Successful in 5m18s
CI / PHP 8.3 / mysql:8.4 (pull_request) Successful in 5m16s
CI / PHP 8.4 / mysql:8.4 (pull_request) Successful in 5m11s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m40s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-09-26 18:45:09 +00:00
parent 30d2e42ee3
commit 6bede3e2ee
103 changed files with 477 additions and 397 deletions

View file

@ -77,6 +77,16 @@ class PluginManager
}
}
// Der Updater löscht nie (docs/specs/self-updater.md): Der Ordner eines
// umbenannten mitgelieferten Plugins bleibt liegen und wird hier ignoriert.
foreach ($this->manifests as $manifest) {
foreach ($manifest->core ? $manifest->replaces : [] as $old) {
if (($this->manifests[$old] ?? null)?->core) {
unset($this->manifests[$old]);
}
}
}
ksort($this->manifests);
return $this->manifests;

View file

@ -40,6 +40,8 @@ final class PluginManifest
public readonly array $requires,
public readonly ?string $updateUrl,
public readonly bool $enabledByDefault = true,
/** Frühere Kürzel, die dieses Plugin ersetzt (deren Ordner bleiben nach Updates liegen). */
public readonly array $replaces = [],
) {}
public static function fromDirectory(string $path, bool $core): self
@ -92,6 +94,7 @@ final class PluginManifest
requires: is_array($data['requires'] ?? null) ? $data['requires'] : [],
updateUrl: is_string($data['update_url'] ?? null) ? $data['update_url'] : null,
enabledByDefault: (bool) ($data['enabled_by_default'] ?? true),
replaces: array_values(array_filter((array) ($data['replaces'] ?? []), 'is_string')),
);
}