From 27a146bf73a5e77de4946dca2fead13265d146c7 Mon Sep 17 00:00:00 2001 From: Wim Date: Mon, 28 Nov 2022 16:41:14 +0100 Subject: [PATCH] upgrade module for 8.1 --- composer.json | 2 +- src/IndexerReindexCommandPreference.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 23489cb..5e289f7 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "reach-digital/magento2-betterindexers", "require": { - "php": "~7.1.3||~7.2.0||~7.3.0||~7.4.0", + "php": "~7.1.3||~7.2.0||~7.3.0||~7.4.0||~8.1.0", "magento/framework": "~102.0|~103.0" }, "type": "magento2-module", diff --git a/src/IndexerReindexCommandPreference.php b/src/IndexerReindexCommandPreference.php index 6e3da98..15b41f2 100644 --- a/src/IndexerReindexCommandPreference.php +++ b/src/IndexerReindexCommandPreference.php @@ -68,7 +68,7 @@ protected function execute(InputInterface $input, OutputInterface $output) foreach ($this->getIndexers($input) as $indexer) { try { $this->validateIndexerStatus($indexer); - $startTime = microtime(true); + $startTime = intval(microtime(true)); $output->writeln('Rebuilding ' . $indexer->getTitle() . ' index at ' . gmdate('H:i:s', $startTime)); $indexerConfig = $this->getConfig()->getIndexer($indexer->getId()); $sharedIndex = $indexerConfig['shared_index']; @@ -80,7 +80,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $this->validateSharedIndex($sharedIndex); } } - $resultTime = microtime(true) - $startTime; + $resultTime = intval(microtime(true) - $startTime); $output->writeln( ' > ' . $indexer->getTitle() .