Skip to content

Commit d95a65a

Browse files
committed
#27091 removed array print while setup upgrade
1 parent 562644f commit d95a65a

File tree

2 files changed

+754
-673
lines changed

2 files changed

+754
-673
lines changed

setup/src/Magento/Setup/Model/Installer.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
use Magento\Setup\Module\SetupFactory;
4747
use Magento\Setup\Validator\DbValidator;
4848
use Magento\Store\Model\Store;
49+
use Magento\Framework\App\Cache\Manager;
4950

5051
/**
5152
* Class Installer contains the logic to install Magento application.
@@ -1272,8 +1273,8 @@ public function uninstall()
12721273
*/
12731274
private function updateCaches($isEnabled, $types = [])
12741275
{
1275-
/** @var \Magento\Framework\App\Cache\Manager $cacheManager */
1276-
$cacheManager = $this->objectManagerProvider->get()->create(\Magento\Framework\App\Cache\Manager::class);
1276+
/** @var Manager $cacheManager */
1277+
$cacheManager = $this->objectManagerProvider->get()->create(Manager::class);
12771278

12781279
$availableTypes = $cacheManager->getAvailableTypes();
12791280
$types = empty($types) ? $availableTypes : array_intersect($availableTypes, $types);
@@ -1292,8 +1293,9 @@ function (string $key) use ($types) {
12921293
);
12931294

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

12991301
/**
@@ -1305,8 +1307,8 @@ function (string $key) use ($types) {
13051307
*/
13061308
private function cleanCaches()
13071309
{
1308-
/** @var \Magento\Framework\App\Cache\Manager $cacheManager */
1309-
$cacheManager = $this->objectManagerProvider->get()->get(\Magento\Framework\App\Cache\Manager::class);
1310+
/** @var Manager $cacheManager */
1311+
$cacheManager = $this->objectManagerProvider->get()->get(Manager::class);
13101312
$types = $cacheManager->getAvailableTypes();
13111313
$cacheManager->clean($types);
13121314
$this->log->log('Cache cleared successfully');

0 commit comments

Comments
 (0)