Skip to content

Commit 6707727

Browse files
committed
fix php deprecated functionality for PHP 8.x
1 parent 262aa7d commit 6707727

6 files changed

+17
-8
lines changed

Command/DownloadImages.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected function configure()
101101
* @param InputInterface $input
102102
* @param OutputInterface $output
103103
*
104-
* @return void
104+
* @return init
105105
*/
106106
protected function execute(InputInterface $input, OutputInterface $output)
107107
{
@@ -126,6 +126,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
126126

127127
} catch (\Exception $e) {
128128
$output->writeln($e->getMessage());
129+
return 0;
129130
}
130131
}
131132

Command/ProductGalleryApiQueueProcess.php

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ class ProductGalleryApiQueueProcess extends Command
2020
*/
2121
private $appState;
2222

23+
/**
24+
* @var $job
25+
*/
26+
protected $job;
27+
2328
/**
2429
* @method __construct
2530
* @param ObjectManagerInterface $objectManager

Command/ResetAll.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ protected function configure()
7575
* @param InputInterface $input
7676
* @param OutputInterface $output
7777
*
78-
* @return void
78+
* @return int
7979
*/
8080
protected function execute(InputInterface $input, OutputInterface $output)
8181
{
@@ -86,25 +86,26 @@ protected function execute(InputInterface $input, OutputInterface $output)
8686

8787
$helper = $this->getHelper('question');
8888
if (!$this->confirmActionStart($input, $output, $helper)) {
89-
return;
89+
return 0;
9090
}
9191

9292
$adminUser = $this->getAdminUser($this->readAdminName($input, $output, $helper));
9393
if (!$adminUser->getId()) {
9494
$output->writeln(self::ADMIN_USER_NOT_FOUND);
95-
return;
95+
return 0;
9696
}
9797

9898
$adminPassword = $this->readAdminPassword($input, $output, $helper);
9999
if (!$this->authenticate($adminUser, $adminPassword)) {
100100
$output->writeln(self::ADMIN_PASSWORD_INCORRECT);
101-
return;
101+
return 0;
102102
}
103103

104104
$this->resetHelper->resetModule();
105105

106106
$output->writeln(self::COMPLETE_MESSAGE1);
107107
$output->writeln(self::COMPLETE_MESSAGE2);
108+
return 1;
108109
}
109110

110111
/**

Command/StopMigration.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function configure()
4747
* @param InputInterface $input
4848
* @param OutputInterface $output
4949
*
50-
* @return void
50+
* @return int
5151
*/
5252
protected function execute(InputInterface $input, OutputInterface $output)
5353
{

Command/UploadImages.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ protected function configure()
8989
* @param InputInterface $input
9090
* @param OutputInterface $output
9191
*
92-
* @return void
92+
* @return int
9393
*/
9494
protected function execute(InputInterface $input, OutputInterface $output)
9595
{
@@ -108,6 +108,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
108108
return 1;
109109
} catch (\Exception $e) {
110110
$output->writeln($e->getMessage());
111+
return 0;
111112
}
112113
}
113114
}

Cron/ProductGalleryApiQueue.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public function __construct(
7979

8080
public function execute()
8181
{
82+
8283
if ($this->configuration->isEnabled() && $this->configuration->isEnabledProductgalleryApiQueue()) {
8384
try {
8485
$queuedItems = $this->productGalleryApiQueueFactory->create()->getCollection()
@@ -143,7 +144,7 @@ public function execute()
143144
}
144145
}
145146

146-
return $this;
147+
return 1;
147148
}
148149

149150
/**

0 commit comments

Comments
 (0)