Skip to content

Commit 591abb6

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: [FrameworkBundle] Add missing `not-compromised-password` entry in XSD [AssetMapper] Fix CssCompiler matches url in comments Add support for doctrine/persistence 4 Ensure TransportExceptionInterface populates stream debug data Fix typo in validators.sk.xlf [Mime] Fix body validity check in `Email` when using `Message::setBody()` Review Arabic translations for the validator Fixed mistakes in proper hebrew writing in the previous translation and confirmed the rest to be correct and in the same style. Review translation [Cache] Don't clear system caches on cache:clear [FrameworkBundle] Fix patching refs to the tmp warmup dir in files generated by optional cache warmers Mark Czech Validator translation as reviewed [PropertyInfo] Fix `TypeTest` duplicated assert [HtmlSanitizer] Avoid accessing non existent array key when checking for hosts validity Update validators.ar.xlf [DomCrawler] Make `ChoiceFormField::isDisabled` return `true` for unchecked disabled checkboxes
2 parents 6454a70 + 132ab27 commit 591abb6

File tree

5 files changed

+28
-27
lines changed

5 files changed

+28
-27
lines changed

Diff for: Command/CacheClearCommand.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,16 @@ protected function execute(InputInterface $input, OutputInterface $output): int
146146
}
147147
$this->warmupOptionals($useBuildDir ? $realCacheDir : $warmupDir, $warmupDir, $io);
148148
}
149+
150+
// fix references to cached files with the real cache directory name
151+
$search = [$warmupDir, str_replace('/', '\\/', $warmupDir), str_replace('\\', '\\\\', $warmupDir)];
152+
$replace = str_replace('\\', '/', $realBuildDir);
153+
foreach (Finder::create()->files()->in($warmupDir) as $file) {
154+
$content = str_replace($search, $replace, $this->filesystem->readFile($file), $count);
155+
if ($count) {
156+
file_put_contents($file, $content);
157+
}
158+
}
149159
}
150160

151161
if (!$fs->exists($warmupDir.'/'.$containerDir)) {
@@ -227,16 +237,6 @@ private function warmup(string $warmupDir, string $realBuildDir): void
227237
throw new \LogicException('Calling "cache:clear" with a kernel that does not implement "Symfony\Component\HttpKernel\RebootableInterface" is not supported.');
228238
}
229239
$kernel->reboot($warmupDir);
230-
231-
// fix references to cached files with the real cache directory name
232-
$search = [$warmupDir, str_replace('\\', '\\\\', $warmupDir)];
233-
$replace = str_replace('\\', '/', $realBuildDir);
234-
foreach (Finder::create()->files()->in($warmupDir) as $file) {
235-
$content = str_replace($search, $replace, $this->filesystem->readFile($file), $count);
236-
if ($count) {
237-
file_put_contents($file, $content);
238-
}
239-
}
240240
}
241241

242242
private function warmupOptionals(string $cacheDir, string $warmupDir, SymfonyStyle $io): void

Diff for: Resources/config/schema/symfony-1.0.xsd

+6
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@
265265
<xsd:element name="static-method" type="xsd:string" />
266266
<xsd:element name="mapping" type="file_mapping" />
267267
<xsd:element name="auto-mapping" type="auto_mapping" />
268+
<xsd:element name="not-compromised-password" type="not-compromised-password" />
268269
</xsd:choice>
269270

270271
<xsd:attribute name="enabled" type="xsd:boolean" />
@@ -297,6 +298,11 @@
297298
</xsd:restriction>
298299
</xsd:simpleType>
299300

301+
<xsd:complexType name="not-compromised-password">
302+
<xsd:attribute name="enabled" type="xsd:boolean" />
303+
<xsd:attribute name="endpoint" type="xsd:string" />
304+
</xsd:complexType>
305+
300306
<xsd:complexType name="annotations">
301307
<xsd:attribute name="cache" type="xsd:string" />
302308
<xsd:attribute name="debug" type="xsd:string" />

Diff for: Tests/Functional/CachePoolsTest.php

-4
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ private function doTestCachePools($options, $adapterClass)
8888
$pool2 = $container->get('cache.pool2');
8989
$pool2->save($item);
9090

91-
$container->get('cache_clearer.alias')->clear($container->getParameter('kernel.cache_dir'));
92-
$item = $pool1->getItem($key);
93-
$this->assertFalse($item->isHit());
94-
9591
$item = $pool2->getItem($key);
9692
$this->assertTrue($item->isHit());
9793

Diff for: Tests/Functional/ContainerDebugCommandTest.php

+12-8
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,18 @@ public function testTagsPartialSearch()
139139
$tester->setInputs(['0']);
140140
$tester->run(['command' => 'debug:container', '--tag' => 'kernel.'], ['decorated' => false]);
141141

142-
$this->assertStringContainsString('Select one of the following tags to display its information', $tester->getDisplay());
143-
$this->assertStringContainsString('[0] kernel.cache_clearer', $tester->getDisplay());
144-
$this->assertStringContainsString('[1] kernel.cache_warmer', $tester->getDisplay());
145-
$this->assertStringContainsString('[2] kernel.event_subscriber', $tester->getDisplay());
146-
$this->assertStringContainsString('[3] kernel.fragment_renderer', $tester->getDisplay());
147-
$this->assertStringContainsString('[4] kernel.locale_aware', $tester->getDisplay());
148-
$this->assertStringContainsString('[5] kernel.reset', $tester->getDisplay());
149-
$this->assertStringContainsString('Symfony Container Services Tagged with "kernel.cache_clearer" Tag', $tester->getDisplay());
142+
$this->assertStringMatchesFormat(<<<EOTXT
143+
144+
Select one of the following tags to display its information:
145+
%A
146+
[%d] kernel.reset
147+
%A
148+
149+
Symfony Container Services Tagged with "kernel.%a" Tag
150+
%A
151+
EOTXT,
152+
$tester->getDisplay()
153+
);
150154
}
151155

152156
public function testDescribeEnvVars()

Diff for: Tests/Functional/app/CachePools/default.yml

-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
11
imports:
22
- { resource: ../config/default.yml }
3-
4-
services:
5-
cache_clearer.alias:
6-
alias: cache_clearer
7-
public: true

0 commit comments

Comments
 (0)