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
@@ -29,6 +29,10 @@ class HttpCacheTestCase extends TestCase
protected $responses;
protected $catch;
protected $esi;
/**
* @var Store
*/
protected $store;
protected function setUp()
@@ -37,12 +41,12 @@ class HttpCacheTestCase extends TestCase
$this->cache = null;
$this->esi = null;
$this->caches = array();
$this->cacheConfig = array();
$this->caches = [];
$this->cacheConfig = [];
$this->request = null;
$this->response = null;
$this->responses = array();
$this->responses = [];
$this->catch = false;
@@ -87,7 +91,7 @@ class HttpCacheTestCase extends TestCase
$traces = $this->cache->getTraces();
$traces = current($traces);
$this->assertRegExp('/'.$trace.'/', implode(', ', $traces));
$this->assertMatchesRegularExpression('/'.$trace.'/', implode(', ', $traces));
}
public function assertTraceNotContains($trace)
@@ -95,7 +99,7 @@ class HttpCacheTestCase extends TestCase
$traces = $this->cache->getTraces();
$traces = current($traces);
$this->assertNotRegExp('/'.$trace.'/', implode(', ', $traces));
$this->assertDoesNotMatchRegularExpression('/'.$trace.'/', implode(', ', $traces));
}
public function assertExceptionsAreCaught()
@@ -108,7 +112,7 @@ class HttpCacheTestCase extends TestCase
$this->assertFalse($this->kernel->isCatchingExceptions());
}
public function request($method, $uri = '/', $server = array(), $cookies = array(), $esi = false, $headers = array())
public function request($method, $uri = '/', $server = [], $cookies = [], $esi = false, $headers = [])
{
if (null === $this->kernel) {
throw new \LogicException('You must call setNextResponse() before calling request().');
@@ -122,7 +126,7 @@ class HttpCacheTestCase extends TestCase
$this->esi = $esi ? new Esi() : null;
$this->cache = new HttpCache($this->kernel, $this->store, $this->esi, $this->cacheConfig);
$this->request = Request::create($uri, $method, array(), $cookies, array(), $server);
$this->request = Request::create($uri, $method, [], $cookies, [], $server);
$this->request->headers->add($headers);
$this->response = $this->cache->handle($this->request, HttpKernelInterface::MASTER_REQUEST, $this->catch);
@@ -132,7 +136,7 @@ class HttpCacheTestCase extends TestCase
public function getMetaStorageValues()
{
$values = array();
$values = [];
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(sys_get_temp_dir().'/http_cache/md', \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
$values[] = file_get_contents($file);
}
@@ -141,7 +145,7 @@ class HttpCacheTestCase extends TestCase
}
// A basic response with 200 status code and a tiny body.
public function setNextResponse($statusCode = 200, array $headers = array(), $body = 'Hello World', \Closure $customizer = null)
public function setNextResponse($statusCode = 200, array $headers = [], $body = 'Hello World', \Closure $customizer = null)
{
$this->kernel = new TestHttpKernel($body, $statusCode, $headers, $customizer);
}
@@ -164,7 +168,7 @@ class HttpCacheTestCase extends TestCase
$fp = opendir($directory);
while (false !== $file = readdir($fp)) {
if (!in_array($file, array('.', '..'))) {
if (!\in_array($file, ['.', '..'])) {
if (is_link($directory.'/'.$file)) {
unlink($directory.'/'.$file);
} elseif (is_dir($directory.'/'.$file)) {