feat(cache): Verhaltensprobe und Smoke für WP Super Cache

SuperCacheProbe prüft beim Prüfen, ob wp_cache_post_edit die Cache-Datei einer Testseite entfernt; während der Probe ist nur der Einzelseiten-Purge erlaubt, der Pfad kommt aus home und es werden nur feste Dateinamen gelöscht. ProbeStep bündelt die Schrittlogik von Pods und WP Super Cache; ThrowawayPost hält Marker und Titel zentral und räumt auch private Probe-Seiten auf (WP Super Cache wie Pods beim Laden des Reiters). super-cache-smoke.sh prüft gegen das echte Plugin; lib.sh sperrt parallele Smoke-Läufe per flock, wp-config.php wird atomar wiederhergestellt. Doku: Host-Abhängigkeit des Einzel-Purges, WP-Cron für den Nachlauf, Komplett-Purge durch Divi beim Prüfen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jan-Niclas Loosen
2026-11-06 17:25:37 +01:00
co-authored by Claude Opus 5.5
parent 05bf890481
commit 661d3945fd
22 changed files with 1432 additions and 49 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
namespace LIT\MCP\Compatibility;
use Closure;
defined('ABSPATH') || exit;
/** The one check step a profile's behaviour probe makes (Profile::$extraSteps), shared by Pods and WP Super Cache. */
final class ProbeStep
{
/**
* Skipped while the manifest is red (the probe would fail anyway). A probe with nothing to probe (null) is a
* green step that says so, not a skipped one: a skipped step makes the report red and would lock the plugin on a
* site that simply has nothing to probe yet.
*
* @param Closure(): (list<string>|null) $probe Problems, [] = green, null = nothing to probe.
* @return Closure(bool): list<CheckStep>
*/
public static function extra(string $key, string $label, string $labelNothingToProbe, Closure $probe): Closure
{
return static function (bool $manifestClean) use ($key, $label, $labelNothingToProbe, $probe): array {
if (! $manifestClean) {
return [new CheckStep($key, [], true, $label)];
}
$none = false;
$problems = CompatibilityCheck::guarded(static function () use ($probe, &$none): array {
$result = $probe();
$none = $result === null;
return $result ?? [];
});
return [new CheckStep($key, $problems, false, $none ? $labelNothingToProbe : $label)];
};
}
}