Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ abstract class CacheWarmer implements CacheWarmerInterface
{
protected function writeCacheFile($file, $content)
{
$tmpFile = @tempnam(dirname($file), basename($file));
$tmpFile = @tempnam(\dirname($file), basename($file));
if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) {
@chmod($file, 0666 & ~umask());
@@ -15,17 +15,21 @@ namespace Symfony\Component\HttpKernel\CacheWarmer;
* Aggregates several cache warmers into a single one.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @final since version 3.4
*/
class CacheWarmerAggregate implements CacheWarmerInterface
{
protected $warmers = array();
protected $warmers = [];
protected $optionalsEnabled = false;
private $triggerDeprecation = false;
public function __construct(array $warmers = array())
public function __construct($warmers = [])
{
foreach ($warmers as $warmer) {
$this->add($warmer);
}
$this->triggerDeprecation = true;
}
public function enableOptionalWarmers()
@@ -59,16 +63,28 @@ class CacheWarmerAggregate implements CacheWarmerInterface
return false;
}
/**
* @deprecated since version 3.4, to be removed in 4.0, inject the list of clearers as a constructor argument instead.
*/
public function setWarmers(array $warmers)
{
$this->warmers = array();
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0, inject the list of clearers as a constructor argument instead.', __METHOD__), \E_USER_DEPRECATED);
$this->warmers = [];
foreach ($warmers as $warmer) {
$this->add($warmer);
}
}
/**
* @deprecated since version 3.4, to be removed in 4.0, inject the list of clearers as a constructor argument instead.
*/
public function add(CacheWarmerInterface $warmer)
{
if ($this->triggerDeprecation) {
@trigger_error(sprintf('The "%s()" method is deprecated since Symfony 3.4 and will be removed in 4.0, inject the list of clearers as a constructor argument instead.', __METHOD__), \E_USER_DEPRECATED);
}
$this->warmers[] = $warmer;
}
}