v7.0.0 release
This commit is contained in:
1 parent
0e7fa04b03
commit
c4ea9a6cd1
3582 files changed
+626189
-160151
No files matched your search
@@ -76,7 +76,8 @@ class ExtensionStatusCacheTest extends TestCase
|
||||
$this->cache->put('ext.modules.active_identifiers', ['mod-a']);
|
||||
$this->cache->put('ext.modules.installed_identifiers', ['mod-a']);
|
||||
|
||||
$stub = new class {
|
||||
$stub = new class
|
||||
{
|
||||
use CachesModuleStatus;
|
||||
};
|
||||
$stub::invalidateModuleStatusCache();
|
||||
@@ -113,7 +114,8 @@ class ExtensionStatusCacheTest extends TestCase
|
||||
$this->cache->put('ext.plugins.active_identifiers', ['plugin-a']);
|
||||
$this->cache->put('ext.plugins.installed_identifiers', ['plugin-a']);
|
||||
|
||||
$stub = new class {
|
||||
$stub = new class
|
||||
{
|
||||
use CachesPluginStatus;
|
||||
};
|
||||
$stub::invalidatePluginStatusCache();
|
||||
@@ -156,7 +158,8 @@ class ExtensionStatusCacheTest extends TestCase
|
||||
$this->cache->put('ext.templates.active_identifiers_user', ['t-user']);
|
||||
$this->cache->put('ext.templates.installed_identifiers', ['t-a']);
|
||||
|
||||
$stub = new class {
|
||||
$stub = new class
|
||||
{
|
||||
use CachesTemplateStatus;
|
||||
};
|
||||
$stub::invalidateTemplateStatusCache();
|
||||
@@ -179,7 +182,8 @@ class ExtensionStatusCacheTest extends TestCase
|
||||
{
|
||||
$this->cache->put('ext.cache_version', 1000);
|
||||
|
||||
$stub = new class {
|
||||
$stub = new class
|
||||
{
|
||||
use ClearsTemplateCaches {
|
||||
incrementExtensionCacheVersion as public callIncrement;
|
||||
}
|
||||
@@ -195,14 +199,27 @@ class ExtensionStatusCacheTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* A-4-3: 미설정 시 0 반환.
|
||||
* A-4-3: 미설정(키 부재) 시 0 대신 새 유효 버전을 재생성·저장·반환.
|
||||
*
|
||||
* 회귀 가드 (버그 ②): `cache:clear` 로 키 소실 시 0 을 반환하면 자원 URL 이
|
||||
* `?v=0` 으로 수렴해 immutable 에셋이 stale 고착된다. 키가 없으면 새 `time()`
|
||||
* 버전을 생성·저장·반환해야 한다.
|
||||
*/
|
||||
#[Test]
|
||||
public function a_4_3_get_extension_cache_version_returns_zero_when_unset(): void
|
||||
public function a_4_3_get_extension_cache_version_regenerates_when_unset(): void
|
||||
{
|
||||
$this->cache->forget('ext.cache_version');
|
||||
|
||||
$this->assertSame(0, ClearsTemplateCaches::getExtensionCacheVersion());
|
||||
$before = time();
|
||||
$version = ClearsTemplateCaches::getExtensionCacheVersion();
|
||||
|
||||
// 0 이 아닌 유효한 타임스탬프 (기존 결함이면 0 → 실패)
|
||||
$this->assertGreaterThanOrEqual($before, $version);
|
||||
$this->assertLessThanOrEqual(time(), $version);
|
||||
|
||||
// 저장되어 다음 호출이 같은 값 반환
|
||||
$this->assertSame($version, ClearsTemplateCaches::getExtensionCacheVersion());
|
||||
$this->assertSame($version, (int) $this->cache->get('ext.cache_version'));
|
||||
}
|
||||
|
||||
// ========================================================================
|
||||
@@ -245,7 +262,8 @@ class ExtensionStatusCacheTest extends TestCase
|
||||
{
|
||||
$this->cache->put('ext.modules.active_identifiers', ['mod-a', 'mod-b']);
|
||||
|
||||
$stub = new class {
|
||||
$stub = new class
|
||||
{
|
||||
use CachesModuleStatus;
|
||||
};
|
||||
$stub::invalidateModuleStatusCache();
|
||||
@@ -262,7 +280,8 @@ class ExtensionStatusCacheTest extends TestCase
|
||||
$this->cache->put('ext.modules.active_identifiers', ['mod-a']);
|
||||
$this->cache->put('ext.modules.installed_identifiers', ['mod-a', 'mod-b']);
|
||||
|
||||
$stub = new class {
|
||||
$stub = new class
|
||||
{
|
||||
use CachesModuleStatus;
|
||||
};
|
||||
$stub::invalidateModuleStatusCache();
|
||||
@@ -283,7 +302,8 @@ class ExtensionStatusCacheTest extends TestCase
|
||||
$this->assertSame([], $this->cache->get('ext.modules.active_identifiers'));
|
||||
|
||||
// 모듈 설치/활성화 시 invalidateModuleStatusCache 호출로 확실히 갱신
|
||||
$stub = new class {
|
||||
$stub = new class
|
||||
{
|
||||
use CachesModuleStatus;
|
||||
};
|
||||
$stub::invalidateModuleStatusCache();
|
||||
@@ -313,7 +333,8 @@ class ExtensionStatusCacheTest extends TestCase
|
||||
#[Test]
|
||||
public function a_2_4_plugin_lifecycle_invalidates_cache(): void
|
||||
{
|
||||
$stub = new class {
|
||||
$stub = new class
|
||||
{
|
||||
use CachesPluginStatus;
|
||||
};
|
||||
|
||||
@@ -362,7 +383,8 @@ class ExtensionStatusCacheTest extends TestCase
|
||||
{
|
||||
$this->cache->put('ext.cache_version', 1000);
|
||||
|
||||
$stub = new class {
|
||||
$stub = new class
|
||||
{
|
||||
use ClearsTemplateCaches {
|
||||
incrementExtensionCacheVersion as public callIncrement;
|
||||
}
|
||||
@@ -380,7 +402,8 @@ class ExtensionStatusCacheTest extends TestCase
|
||||
#[Test]
|
||||
public function a_4_3_lifecycle_increments_each_step(): void
|
||||
{
|
||||
$stub = new class {
|
||||
$stub = new class
|
||||
{
|
||||
use ClearsTemplateCaches {
|
||||
incrementExtensionCacheVersion as public callIncrement;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user