mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[ThemeBundle] Fix warmup process to not to miss theme templates
This commit is contained in:
parent
19b7990335
commit
63c30c352a
2 changed files with 4 additions and 6 deletions
|
|
@ -153,6 +153,7 @@
|
|||
"sylius/taxation-bundle": "self.version",
|
||||
"sylius/taxonomy": "self.version",
|
||||
"sylius/taxonomy-bundle": "self.version",
|
||||
"sylius/theme-bundle": "self.version",
|
||||
"sylius/translation": "self.version",
|
||||
"sylius/translation-bundle": "self.version",
|
||||
"sylius/user": "self.version",
|
||||
|
|
|
|||
|
|
@ -73,18 +73,15 @@ class TemplatePathsCacheWarmer extends CacheWarmer
|
|||
/** @var TemplateReferenceInterface $template */
|
||||
foreach ($this->finder->findAllTemplates() as $template) {
|
||||
$this->themeContext->clear();
|
||||
|
||||
$templates[$template->getLogicalName()] = $this->locator->locate($template);
|
||||
|
||||
foreach ($themes as $theme) {
|
||||
$this->themeContext->setTheme($theme);
|
||||
|
||||
$path = $this->locator->locate($template);
|
||||
|
||||
if ($path !== $templates[$template->getLogicalName()]) {
|
||||
$templates[$template->getLogicalName() . "|" . $theme->getLogicalName()] = $path;
|
||||
}
|
||||
$templates[$template->getLogicalName() . "|" . $theme->getLogicalName()] = $path;
|
||||
}
|
||||
|
||||
$templates[$template->getLogicalName()] = $this->locator->locate($template);
|
||||
}
|
||||
|
||||
$this->writeCacheFile($cacheDir . '/templates.php', sprintf('<?php return %s;', var_export($templates, true)));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue