⬆️ N°4770 Update to latest Symfony 3.4

This commit is contained in:
Pierre Goiffon
2022-02-10 15:18:50 +01:00
parent b494ff2ce6
commit f29a8792af
401 changed files with 4329 additions and 2378 deletions

View File

@@ -30,7 +30,7 @@ trait PhpFilesTrait
public static function isSupported()
{
return \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN);
return \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN);
}
/**
@@ -40,7 +40,7 @@ trait PhpFilesTrait
{
$time = time();
$pruned = true;
$allowCompile = 'cli' !== \PHP_SAPI || filter_var(ini_get('opcache.enable_cli'), FILTER_VALIDATE_BOOLEAN);
$allowCompile = 'cli' !== \PHP_SAPI || filter_var(ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN);
set_error_handler($this->includeHandler);
try {
@@ -118,8 +118,8 @@ trait PhpFilesTrait
protected function doSave(array $values, $lifetime)
{
$ok = true;
$data = [$lifetime ? time() + $lifetime : PHP_INT_MAX, ''];
$allowCompile = 'cli' !== \PHP_SAPI || filter_var(ini_get('opcache.enable_cli'), FILTER_VALIDATE_BOOLEAN);
$data = [$lifetime ? time() + $lifetime : \PHP_INT_MAX, ''];
$allowCompile = 'cli' !== \PHP_SAPI || filter_var(ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOLEAN);
foreach ($values as $key => $value) {
if (null === $value || \is_object($value)) {
@@ -137,7 +137,7 @@ trait PhpFilesTrait
$value = serialize($value);
}
} elseif (!is_scalar($value)) {
throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable %s value.', $key, \gettype($value)));
throw new InvalidArgumentException(sprintf('Cache key "%s" has non-serializable "%s" value.', $key, \gettype($value)));
}
$data[1] = $value;
@@ -150,7 +150,7 @@ trait PhpFilesTrait
}
if (!$ok && !is_writable($this->directory)) {
throw new CacheException(sprintf('Cache directory is not writable (%s)', $this->directory));
throw new CacheException(sprintf('Cache directory is not writable (%s).', $this->directory));
}
return $ok;