Skip to content

Commit e148434

Browse files
author
Jeroen van Leusden
committed
[WD2-262] Use Proxy class in CLI command
Prevent issues setting up integration tests.
1 parent 7e66838 commit e148434

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Console/Command/CronScheduleCommand.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66
namespace Ho\Import\Console\Command;
77

8-
use Ho\Import\Api\ImportProfileListInterface;
98
use Magento\Cron\Model\Schedule;
109
use Magento\Framework\Phrase;
1110
use Symfony\Component\Console\Command\Command;
@@ -42,14 +41,12 @@ class CronScheduleCommand extends Command
4241
private $timezone;
4342

4443
/**
45-
* HoImportRunCommand constructor.
46-
*
47-
* @param \Magento\Cron\Model\ConfigInterface $config
44+
* @param \Magento\Cron\Model\ConfigInterface\Proxy $config
4845
* @param \Magento\Cron\Model\ScheduleFactory $scheduleFactory
4946
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezone
5047
*/
5148
public function __construct(
52-
\Magento\Cron\Model\ConfigInterface $config,
49+
\Magento\Cron\Model\ConfigInterface\Proxy $config,
5350
\Magento\Cron\Model\ScheduleFactory $scheduleFactory,
5451
\Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezone
5552
) {
@@ -89,6 +86,8 @@ public function configure()
8986
* @param InputInterface $input
9087
* @param OutputInterface $output
9188
*
89+
* @throws \Magento\Framework\Exception\AlreadyExistsException
90+
*
9291
* @return void
9392
*/
9493
protected function execute(InputInterface $input, OutputInterface $output)
@@ -156,6 +155,8 @@ protected function getJobFromName($jobName)
156155
* @param string[] $job
157156
* @param \DateInterval $ahead
158157
*
158+
* @throws \Magento\Framework\Exception\CronException
159+
*
159160
* @return Schedule
160161
*/
161162
private function generateSchedule($job, \DateInterval $ahead)

0 commit comments

Comments
 (0)