refactor: ReleaseGate::invalidate() als einzige Stelle zum Zurücksetzen des Freigabe-Zustands; CompatibilityMatrix::locked() und ReleaseGate::lockOf() ersetzen die drei Kopien der Sperrprüfung

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jan-Niclas Loosen
2026-10-18 22:57:35 +02:00
co-authored by Claude Opus 5.5
parent 7f9a087b8b
commit 63389f35a8
12 changed files with 129 additions and 68 deletions
@@ -317,19 +317,6 @@ final class DiviFeatureGateTest extends TestCase
);
}
public function testLockForIsNullForUsableFeaturesAndNamesTheUnusableOnesOtherwise(): void
{
self::assertNull(DiviFeatureGate::lockFor([]));
self::assertNull(DiviFeatureGate::lockFor([DiviFeature::PageWrite]));
DiviFeatureFixtures::lock(DiviFeature::Catalog);
$lock = DiviFeatureGate::lockFor([DiviFeature::PageWrite, DiviFeature::Catalog, DiviFeature::Catalog]);
self::assertNotNull($lock);
self::assertSame([DiviFeature::Catalog], $lock->features);
self::assertSame('5.3.0', $lock->status->version);
}
/**
* The real tools of the three Divi groups: locking one capability refuses exactly the tools that declare it
* (reading and writing alike) and no other.