Skip to content

Commit

Permalink
Update cache clearer service
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nicohery authored Dec 11, 2024
1 parent 945bdf2 commit bfe7cc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Commands/Environment/EnvironmentSetupDev.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int

//Clear all cache
$this->io->text('<info>Clear all cache</info>');
$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
Expand Down

0 comments on commit bfe7cc8

Please sign in to comment.