8000 Merge branch '4.4' into 5.3 · symfony/cache@b7f8b91 · GitHub
[go: up one dir, main page]

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

Appearance settings
8000

Commit b7f8b91

Browse files
committed
Merge branch '4.4' into 5.3
* 4.4: Throw exception if incompatible version of psr/simple-cache is used [DependencyInjection] copy synthetic status when resolving child definitions [HttpClient] Fix Failed to open stream: Too many open files [Console] use STDOUT/ERR in ConsoleOutput to save opening too many file descriptors [Cache] Set mtime of cache files 1 year into future if they do not expire [DependencyInjection] remove arbitratry limitation to exclude inline services from bindings
2 parents beebb65 + 547378f commit b7f8b91

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Psr16Cache.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
use Symfony\Component\Cache\Exception\InvalidArgumentException;
2020
use Symfony\Component\Cache\Traits\ProxyTrait;
2121

22+
if (null !== (new \ReflectionMethod(CacheInterface::class, 'get'))->getReturnType()) {
23+
throw new \LogicException('psr/simple-cache 3.0+ is not compatible with this version of symfony/cache. Please upgrade symfony/cache to 6.0+ or downgrade psr/simple-cache to 1.x or 2.x.');
24+
}
25+
2226
/**
2327
* Turns a PSR-6 cache into a PSR-16 one.
2428
*

Traits/FilesystemCommonTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ private function write(string $file, string $data, int $expiresAt = null)
109109
fclose($h);
110110

111111
if (null !== $expiresAt) {
112-
touch($this->tmp, $expiresAt);
112+
touch($this->tmp, $expiresAt ?: time() + 31556952); // 1 year in seconds
113113
}
114114

115115
return rename($this->tmp, $file);

0 commit comments

Comments
 (0)
0