Skip to content

#27091 Removed array print while setup upgrade #27567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions setup/src/Magento/Setup/Model/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
use Magento\Setup\Module\SetupFactory;
use Magento\Setup\Validator\DbValidator;
use Magento\Store\Model\Store;
use Magento\Framework\App\Cache\Manager;

/**
* Class Installer contains the logic to install Magento application.
Expand Down Expand Up @@ -1288,8 +1289,8 @@ public function uninstall()
*/
private function updateCaches($isEnabled, $types = [])
{
/** @var \Magento\Framework\App\Cache\Manager $cacheManager */
$cacheManager = $this->objectManagerProvider->get()->create(\Magento\Framework\App\Cache\Manager::class);
/** @var Manager $cacheManager */
$cacheManager = $this->objectManagerProvider->get()->create(Manager::class);

$availableTypes = $cacheManager->getAvailableTypes();
$types = empty($types) ? $availableTypes : array_intersect($availableTypes, $types);
Expand All @@ -1308,8 +1309,9 @@ function (string $key) use ($types) {
);

$this->log->log('Current status:');
// phpcs:ignore Magento2.Functions.DiscouragedFunction
$this->log->log(print_r($cacheStatus, true));
foreach ($cacheStatus as $cache => $status) {
$this->log->log(sprintf('%s: %d', $cache, $status));
}
}

/**
Expand All @@ -1321,8 +1323,8 @@ function (string $key) use ($types) {
*/
private function cleanCaches()
{
/** @var \Magento\Framework\App\Cache\Manager $cacheManager */
$cacheManager = $this->objectManagerProvider->get()->get(\Magento\Framework\App\Cache\Manager::class);
/** @var Manager $cacheManager */
$cacheManager = $this->objectManagerProvider->get()->get(Manager::class);
$types = $cacheManager->getAvailableTypes();
$cacheManager->clean($types);
$this->log->log('Cache cleared successfully');
Expand Down
Loading