Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb5278c6

Browse files
committed
[Config] Fix check cache for non existing meta file
1 parent04595dc commitb5278c6

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

‎src/Symfony/Component/Config/ResourceCheckerConfigCache.php‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ public function isFresh()
7272
returntrue;// shortcut - if we don't have any checkers we don't need to bother with the meta file at all
7373
}
7474

75-
$metadata =$this->getMetaFile();
76-
if (!is_file($metadata)) {
77-
returntrue;
78-
}
79-
8075
$metadata =$this->getMetaFile();
8176
if (!is_file($metadata)) {
8277
returnfalse;

‎src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,16 @@ public function testCacheKeepsContent()
128128

129129
$this->assertSame('FOOBAR',file_get_contents($cache->getPath()));
130130
}
131+
132+
publicfunctiontestCacheIsNotFreshIfNotExistMetaFile()
133+
{
134+
$checker =$this->getMock('\Symfony\Component\Config\ResourceCheckerInterface');
135+
$cache =newResourceCheckerConfigCache($this->cacheFile,array($checker));
136+
$cache->write('foo',array(newFileResource(__FILE__)));
137+
138+
$metaFile ="{$this->cacheFile}.meta";
139+
unlink($metaFile);
140+
141+
$this->assertFalse($cache->isFresh());
142+
}
131143
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp