From bfe7cc8914b6e3f45eadd8e170f8a580acefecfd Mon Sep 17 00:00:00 2001 From: Nico Date: Wed, 11 Dec 2024 15:30:34 +0100 Subject: [PATCH] Update cache clearer service Update deprecated prestashop.core.cache.clearer service The `prestashop.core.cache.clearer` service has been removed in PrestaShop 8.0 and replaced by `prestashop.core.cache.clearer.cache_clearer_chain`. Updated the code to handle cache clearing using new service. --- src/Commands/Environment/EnvironmentSetupDev.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Commands/Environment/EnvironmentSetupDev.php b/src/Commands/Environment/EnvironmentSetupDev.php index eeaad8ae..691b0d09 100644 --- a/src/Commands/Environment/EnvironmentSetupDev.php +++ b/src/Commands/Environment/EnvironmentSetupDev.php @@ -171,8 +171,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int //Clear all cache $this->io->text('Clear all cache'); - $cacheClearChain = $this->getContainer()->get('prestashop.adapter.cache_clearer'); - $cacheClearChain->clearAllCaches(); + $cacheClearChain = $this->getContainer()->get('prestashop.core.cache.clearer.cache_clearer_chain'); + $cacheClearChain->clear(); if (!$res) { //If error ROLLBACK sql update