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

Commit c2181b0

Browse filesBrowse files
Merge branch '5.0'
* 5.0: [Validator] Fix auto-mapping constraints should not be validated [Debug] Updated the README to deprecate the component [Cache] fix memory leak when using PhpFilesAdapter [Yaml] Implement multiline string as scalar block for tagged values [HttpFoundation] Use `Cache-Control: must-revalidate` only if explicit lifetime has been given [FrameworkBundle] Use UserInterface to @return in getUser method [CI] Replace php7.4snapshot with php7.4 in Travis configuration [ExpressionLanguage][Node][BinaryNode] Process division by zero Fixing bad order of operations with null coalescing operator forward caught exception [Validator][ConstraintValidator] Stop passing unnecessary timezone argument to \DateTime add tags before processing them [FrameworkBundle][ContainerLintCommand] Reinitialize bundles when the container is reprepared [Process] change the syntax of portable prepared command lines [MonologBridge] Fix debug processor datetime type
2 parents ae00ff4 + 5f50769 commit c2181b0
Copy full SHA for c2181b0

30 files changed

+292
-87
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ matrix:
2929
env: php_extra="7.4snapshot"
3030
- php: 7.3
3131
env: deps=high
32-
- php: 7.4snapshot
32+
- php: 7.4
3333
env: deps=low
3434
fast_finish: true
3535

‎src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Tests/Validator/DoctrineLoaderTest.php
+10-6Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@
2121
use Symfony\Bridge\Doctrine\Tests\Fixtures\DoctrineLoaderParentEntity;
2222
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
2323
use Symfony\Bridge\Doctrine\Validator\DoctrineLoader;
24-
use Symfony\Component\Validator\Constraints\DisableAutoMapping;
2524
use Symfony\Component\Validator\Constraints\Length;
25+
use Symfony\Component\Validator\Mapping\AutoMappingStrategy;
2626
use Symfony\Component\Validator\Mapping\CascadingStrategy;
2727
use Symfony\Component\Validator\Mapping\ClassMetadata;
2828
use Symfony\Component\Validator\Mapping\Loader\AutoMappingTrait;
29+
use Symfony\Component\Validator\Mapping\PropertyMetadata;
2930
use Symfony\Component\Validator\Mapping\TraversalStrategy;
3031
use Symfony\Component\Validator\Tests\Fixtures\Entity;
3132
use Symfony\Component\Validator\Validation;
@@ -140,11 +141,12 @@ public function testLoadClassMetadata()
140141
$this->assertInstanceOf(Length::class, $textFieldConstraints[0]);
141142
$this->assertSame(1000, $textFieldConstraints[0]->max);
142143

144+
/** @var PropertyMetadata[] $noAutoMappingMetadata */
143145
$noAutoMappingMetadata = $classMetadata->getPropertyMetadata('noAutoMapping');
144146
$this->assertCount(1, $noAutoMappingMetadata);
145147
$noAutoMappingConstraints = $noAutoMappingMetadata[0]->getConstraints();
146-
$this->assertCount(1, $noAutoMappingConstraints);
147-
$this->assertInstanceOf(DisableAutoMapping::class, $noAutoMappingConstraints[0]);
148+
$this->assertCount(0, $noAutoMappingConstraints);
149+
$this->assertSame(AutoMappingStrategy::DISABLED, $noAutoMappingMetadata[0]->getAutoMappingStrategy());
148150
}
149151

150152
public function testFieldMappingsConfiguration()
@@ -205,13 +207,15 @@ public function testClassNoAutoMapping()
205207
$classMetadata = $validator->getMetadataFor(new DoctrineLoaderNoAutoMappingEntity());
206208

207209
$classConstraints = $classMetadata->getConstraints();
208-
$this->assertCount(1, $classConstraints);
209-
$this->assertInstanceOf(DisableAutoMapping::class, $classConstraints[0]);
210+
$this->assertCount(0, $classConstraints);
211+
$this->assertSame(AutoMappingStrategy::DISABLED, $classMetadata->getAutoMappingStrategy());
210212

211213
$maxLengthMetadata = $classMetadata->getPropertyMetadata('maxLength');
212214
$this->assertEmpty($maxLengthMetadata);
213215

216+
/** @var PropertyMetadata[] $autoMappingExplicitlyEnabledMetadata */
214217
$autoMappingExplicitlyEnabledMetadata = $classMetadata->getPropertyMetadata('autoMappingExplicitlyEnabled');
215-
$this->assertCount(2, $autoMappingExplicitlyEnabledMetadata[0]->constraints);
218+
$this->assertCount(1, $autoMappingExplicitlyEnabledMetadata[0]->constraints);
219+
$this->assertSame(AutoMappingStrategy::ENABLED, $autoMappingExplicitlyEnabledMetadata[0]->getAutoMappingStrategy());
216220
}
217221
}

‎src/Symfony/Bridge/Doctrine/Validator/DoctrineLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Validator/DoctrineLoader.php
+10-8Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
use Doctrine\ORM\Mapping\ClassMetadataInfo;
1717
use Doctrine\ORM\Mapping\MappingException as OrmMappingException;
1818
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
19-
use Symfony\Component\Validator\Constraints\DisableAutoMapping;
20-
use Symfony\Component\Validator\Constraints\EnableAutoMapping;
2119
use Symfony\Component\Validator\Constraints\Length;
2220
use Symfony\Component\Validator\Constraints\Valid;
21+
use Symfony\Component\Validator\Mapping\AutoMappingStrategy;
2322
use Symfony\Component\Validator\Mapping\ClassMetadata;
2423
use Symfony\Component\Validator\Mapping\Loader\AutoMappingTrait;
2524
use Symfony\Component\Validator\Mapping\Loader\LoaderInterface;
@@ -76,13 +75,16 @@ public function loadClassMetadata(ClassMetadata $metadata): bool
7675
$enabledForProperty = $enabledForClass;
7776
$lengthConstraint = null;
7877
foreach ($metadata->getPropertyMetadata($mapping['fieldName']) as $propertyMetadata) {
78+
// Enabling or disabling auto-mapping explicitly always takes precedence
79+
if (AutoMappingStrategy::DISABLED === $propertyMetadata->getAutoMappingStrategy()) {
80+
continue 2;
81+
}
82+
if (AutoMappingStrategy::ENABLED === $propertyMetadata->getAutoMappingStrategy()) {
83+
$enabledForProperty = true;
84+
}
85+
7986
foreach ($propertyMetadata->getConstraints() as $constraint) {
80-
// Enabling or disabling auto-mapping explicitly always takes precedence
81-
if ($constraint instanceof DisableAutoMapping) {
82-
continue 3;
83-
} elseif ($constraint instanceof EnableAutoMapping) {
84-
$enabledForProperty = true;
85-
} elseif ($constraint instanceof Length) {
87+
if ($constraint instanceof Length) {
8688
$lengthConstraint = $constraint;
8789
}
8890
}

‎src/Symfony/Bridge/Doctrine/composer.json

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/composer.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"symfony/proxy-manager-bridge": "^4.4|^5.0",
3636
"symfony/security-core": "^5.0",
3737
"symfony/expression-language": "^4.4|^5.0",
38-
"symfony/validator": "^5.0",
38+
"symfony/validator": "^5.0.1",
3939
"symfony/translation": "^4.4|^5.0",
4040
"symfony/var-dumper": "^4.4|^5.0",
4141
"doctrine/annotations": "~1.7",
@@ -55,7 +55,7 @@
5555
"symfony/property-info": "<5",
5656
"symfony/security-bundle": "<5",
5757
"symfony/security-core": "<5",
58-
"symfony/validator": "<5"
58+
"symfony/validator": "<5.0.1"
5959
},
6060
"suggest": {
6161
"symfony/form": "",

‎src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Processor/DebugProcessor.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __invoke(array $record)
3333
$hash = $this->requestStack && ($request = $this->requestStack->getCurrentRequest()) ? spl_object_hash($request) : '';
3434

3535
$this->records[$hash][] = [
36-
'timestamp' => $record['datetime']->getTimestamp(),
36+
'timestamp' => $record['datetime'] instanceof \DateTimeInterface ? $record['datetime']->getTimestamp() : strtotime($record['datetime']),
3737
'message' => $record['message'],
3838
'priority' => $record['level'],
3939
'priorityName' => $record['level_name'],

‎src/Symfony/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Tests/Processor/DebugProcessorTest.php
+25-1Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,30 @@
1919

2020
class DebugProcessorTest extends TestCase
2121
{
22+
/**
23+
* @dataProvider providerDatetimeFormatTests
24+
*/
25+
public function testDatetimeFormat(array $record, $expectedTimestamp)
26+
{
27+
$processor = new DebugProcessor();
28+
$processor($record);
29+
30+
$records = $processor->getLogs();
31+
self::assertCount(1, $records);
32+
self::assertSame($expectedTimestamp, $records[0]['timestamp']);
33+
}
34+
35+
public function providerDatetimeFormatTests(): array
36+
{
37+
$record = $this->getRecord();
38+
39+
return [
40+
[array_merge($record, ['datetime' => new \DateTime('2019-01-01T00:01:00+00:00')]), 1546300860],
41+
[array_merge($record, ['datetime' => '2019-01-01T00:01:00+00:00']), 1546300860],
42+
[array_merge($record, ['datetime' => 'foo']), false],
43+
];
44+
}
45+
2246
public function testDebugProcessor()
2347
{
2448
$processor = new DebugProcessor();
@@ -75,7 +99,7 @@ public function testInheritedClassCallCountErrorsWithoutArgument()
7599
$this->assertEquals(0, $debugProcessorChild->countErrors());
76100
}
77101

78-
private function getRecord($level = Logger::WARNING, $message = 'test')
102+
private function getRecord($level = Logger::WARNING, $message = 'test'): array
79103
{
80104
return [
81105
'message' => $message,

‎src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ private function getContainerBuilder(): ContainerBuilder
6969
$kernel = $this->getApplication()->getKernel();
7070

7171
if (!$kernel->isDebug() || !(new ConfigCache($kernel->getContainer()->getParameter('debug.container.dump'), true))->isFresh()) {
72-
$buildContainer = \Closure::bind(function () { return $this->buildContainer(); }, $kernel, \get_class($kernel));
72+
$buildContainer = \Closure::bind(function (): ContainerBuilder {
73+
$this->initializeBundles();
74+
75+
return $this->buildContainer();
76+
}, $kernel, \get_class($kernel));
7377
$container = $buildContainer();
7478
} else {
7579
(new XmlFileLoader($container = new ContainerBuilder($parameterBag = new EnvPlaceholderParameterBag()), new FileLocator()))->load($kernel->getContainer()->getParameter('debug.container.dump'));

‎src/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ protected function getDoctrine(): ManagerRegistry
351351
/**
352352
* Get a user from the Security Token Storage.
353353
*
354-
* @return mixed
354+
* @return UserInterface|object|null
355355
*
356356
* @throws \LogicException If SecurityBundle is not available
357357
*

‎src/Symfony/Bundle/TwigBundle/TwigBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/TwigBundle.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public function build(ContainerBuilder $container)
3131
{
3232
parent::build($container);
3333

34-
$container->addCompilerPass(new ExtensionPass());
34+
// ExtensionPass must be run before the FragmentRendererPass as it adds tags that are processed later
35+
$container->addCompilerPass(new ExtensionPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 10);
3536
$container->addCompilerPass(new TwigEnvironmentPass());
3637
$container->addCompilerPass(new TwigLoaderPass());
3738
$container->addCompilerPass(new RuntimeLoaderPass(), PassConfig::TYPE_BEFORE_REMOVING);

‎src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Cache/Adapter/PhpFilesAdapter.php
+26-7Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static function isSupported()
5757
{
5858
self::$startTime = self::$startTime ?? $_SERVER['REQUEST_TIME'] ?? time();
5959

60-
return \function_exists('opcache_invalidate') && ('cli' !== \PHP_SAPI || filter_var(ini_get('opcache.enable_cli'), FILTER_VALIDATE_BOOLEAN)) && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN);
60+
return \function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN) && (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) || filter_var(ini_get('opcache.enable_cli'), FILTER_VALIDATE_BOOLEAN));
6161
}
6262

6363
/**
@@ -116,6 +116,8 @@ protected function doFetch(array $ids)
116116
$values[$id] = null;
117117
} elseif (!\is_object($value)) {
118118
$values[$id] = $value;
119+
} elseif (!$value instanceof LazyValue) {
120+
$values[$id] = $value();
119121
} elseif (false === $values[$id] = include $value->file) {
120122
unset($values[$id], $this->values[$id]);
121123
$missingIds[] = $id;
@@ -137,14 +139,20 @@ protected function doFetch(array $ids)
137139
try {
138140
$file = $this->files[$id] ?? $this->files[$id] = $this->getFile($id);
139141

140-
if (\is_array($expiresAt = include $file)) {
142+
if (isset(self::$valuesCache[$file])) {
143+
[$expiresAt, $this->values[$id]] = self::$valuesCache[$file];
144+
} elseif (\is_array($expiresAt = include $file)) {
145+
if ($this->appendOnly) {
146+
self::$valuesCache[$file] = $expiresAt;
147+
}
148+
141149
[$expiresAt, $this->values[$id]] = $expiresAt;
142150
} elseif ($now < $expiresAt) {
143151
$this->values[$id] = new LazyValue($file);
144152
}
145153

146154
if ($now >= $expiresAt) {
147-
unset($this->values[$id], $missingIds[$k]);
155+
unset($this->values[$id], $missingIds[$k], self::$valuesCache[$file]);
148156
}
149157
} catch (\ErrorException $e) {
150158
unset($missingIds[$k]);
@@ -173,7 +181,13 @@ protected function doHave(string $id)
173181
$file = $this->files[$id] ?? $this->files[$id] = $this->getFile($id);
174182
$getExpiry = true;
175183

176-
if (\is_array($expiresAt = include $file)) {
184+
if (isset(self::$valuesCache[$file])) {
185+
[$expiresAt, $value] = self::$valuesCache[$file];
186+
} elseif (\is_array($expiresAt = include $file)) {
187+
if ($this->appendOnly) {
188+
self::$valuesCache[$file] = $expiresAt;
189+
}
190+
177191
[$expiresAt, $value] = $expiresAt;
178192
} elseif ($this->appendOnly) {
179193
$value = new LazyValue($file);
@@ -227,12 +241,14 @@ protected function doSave(array $values, int $lifetime)
227241

228242
$encodedKey = rawurlencode($key);
229243

230-
if (!$isStaticValue) {
244+
if ($isStaticValue) {
245+
$value = "return [{$expiry}, {$value}];";
246+
} elseif ($this->appendOnly) {
247+
$value = "return [{$expiry}, static function () { return {$value}; }];";
248+
} else {
231249
// We cannot use a closure here because of https://bugs.php.net/76982
232250
$value = str_replace('\Symfony\Component\VarExporter\Internal\\', '', $value);
233251
$value = "namespace Symfony\Component\VarExporter\Internal;\n\nreturn \$getExpiry ? {$expiry} : {$value};";
234-
} else {
235-
$value = "return [{$expiry}, {$value}];";
236252
}
237253

238254
$file = $this->files[$key] = $this->getFile($key, true);
@@ -243,6 +259,7 @@ protected function doSave(array $values, int $lifetime)
243259
@opcache_invalidate($file, true);
244260
@opcache_compile_file($file);
245261
}
262+
unset(self::$valuesCache[$file]);
246263
}
247264

248265
if (!$ok && !is_writable($this->directory)) {
@@ -276,6 +293,8 @@ protected function doDelete(array $ids)
276293

277294
protected function doUnlink($file)
278295
{
296+
unset(self::$valuesCache[$file]);
297+
279298
if (self::isSupported()) {
280299
@opcache_invalidate($file, true);
281300
}
+31Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Cache\Tests\Adapter;
13+
14+
use Psr\Cache\CacheItemPoolInterface;
15+
use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
16+
17+
/**
18+
* @group time-sensitive
19+
*/
20+
class PhpFilesAdapterAppendOnlyTest extends PhpFilesAdapterTest
21+
{
22+
protected $skippedTests = [
23+
'testDefaultLifeTime' => 'PhpFilesAdapter does not allow configuring a default lifetime.',
24+
'testExpiration' => 'PhpFilesAdapter in append-only mode does not expiration.',
25+
];
26+
27+
public function createCachePool(): CacheItemPoolInterface
28+
{
29+
return new PhpFilesAdapter('sf-cache', 0, null, true);
30+
}
31+
}

‎src/Symfony/Component/ExpressionLanguage/Node/BinaryNode.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/ExpressionLanguage/Node/BinaryNode.php
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,16 @@ public function evaluate(array $functions, array $values)
147147
case '*':
148148
return $left * $right;
149149
case '/':
150+
if (0 == $right) {
151+
throw new \DivisionByZeroError('Division by zero');
152+
}
153+
150154
return $left / $right;
151155
case '%':
156+
if (0 == $right) {
157+
throw new \DivisionByZeroError('Modulo by zero');
158+
}
159+
152160
return $left % $right;
153161
case 'matches':
154162
return preg_match($right, $left);

‎src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,13 @@ public function makeDisposition(string $disposition, string $filename, string $f
262262
*/
263263
protected function computeCacheControlValue()
264264
{
265-
if (!$this->cacheControl && !$this->has('ETag') && !$this->has('Last-Modified') && !$this->has('Expires')) {
266-
return 'no-cache, private';
267-
}
268-
269265
if (!$this->cacheControl) {
266+
if ($this->has('Last-Modified') || $this->has('Expires')) {
267+
return 'private, must-revalidate'; // allows for heuristic expiration (RFC 7234 Section 4.2.2) in the case of "Last-Modified"
268+
}
269+
270270
// conservative by default
271-
return 'private, must-revalidate';
271+
return 'no-cache, private';
272272
}
273273

274274
$header = $this->getCacheControlHeader();

‎src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/ResponseHeaderBagTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ public function testCacheControlHeader()
5151
$this->assertTrue($bag->hasCacheControlDirective('public'));
5252

5353
$bag = new ResponseHeaderBag(['ETag' => 'abcde']);
54-
$this->assertEquals('private, must-revalidate', $bag->get('Cache-Control'));
54+
$this->assertEquals('no-cache, private', $bag->get('Cache-Control'));
5555
$this->assertTrue($bag->hasCacheControlDirective('private'));
56-
$this->assertTrue($bag->hasCacheControlDirective('must-revalidate'));
56+
$this->assertTrue($bag->hasCacheControlDirective('no-cache'));
5757
$this->assertFalse($bag->hasCacheControlDirective('max-age'));
5858

5959
$bag = new ResponseHeaderBag(['Expires' => 'Wed, 16 Feb 2011 14:17:43 GMT']);

‎src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ public function update(Response $response)
110110
$response->headers->set('Age', $this->age);
111111

112112
if ($this->isNotCacheableResponseEmbedded) {
113-
$response->setExpires($response->getDate());
114-
115113
if ($this->flagDirectives['no-store']) {
116114
$response->headers->set('Cache-Control', 'no-cache, no-store, must-revalidate');
117115
} else {

‎src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Tests/HttpCache/HttpCacheTest.php
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,6 @@ public function testEsiCacheForceValidation()
12401240
$this->request('GET', '/', [], [], true);
12411241
$this->assertEquals('Hello World! My name is Bobby.', $this->response->getContent());
12421242
$this->assertNull($this->response->getTtl());
1243-
$this->assertTrue($this->response->mustRevalidate());
12441243
$this->assertTrue($this->response->headers->hasCacheControlDirective('private'));
12451244
$this->assertTrue($this->response->headers->hasCacheControlDirective('no-cache'));
12461245
}
@@ -1271,7 +1270,6 @@ public function testEsiCacheForceValidationForHeadRequests()
12711270
// This can neither be cached nor revalidated, so it should be private/no cache
12721271
$this->assertEmpty($this->response->getContent());
12731272
$this->assertNull($this->response->getTtl());
1274-
$this->assertTrue($this->response->mustRevalidate());
12751273
$this->assertTrue($this->response->headers->hasCacheControlDirective('private'));
12761274
$this->assertTrue($this->response->headers->hasCacheControlDirective('no-cache'));
12771275
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.