Skip to content

Commit 7472c73

Browse files
authored
Additional Symfony 4 Deprecation warnings fixes (#202)
1 parent 8acdec8 commit 7472c73

8 files changed

+19
-4
lines changed

Command/GearmanCacheClearCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8484
$this
8585
->gearmanCacheWrapper
8686
->clear('');
87+
88+
return 0;
8789
}
8890
}

Command/GearmanCacheWarmupCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8888
$this
8989
->gearmanCacheWrapper
9090
->warmup('');
91+
92+
return 0;
9193
}
9294
}

Command/GearmanJobDescribeCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
103103
$this
104104
->gearmanDescriber
105105
->describeJob($output, $job);
106+
107+
return 0;
106108
}
107109
}

Command/GearmanJobExecuteCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
166166
new ConfirmationQuestion('This will execute asked job?')
167167
)
168168
) {
169-
return;
169+
return 0;
170170
}
171171

172172
if (!$input->getOption('quiet')) {
@@ -212,5 +212,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
212212
'minimum_execution_time' => $input->getOption('minimum-execution-time'),
213213
'timeout' => $input->getOption('timeout')
214214
));
215+
216+
return 0;
215217
}
216218
}

Command/GearmanWorkerDescribeCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
110110
$output,
111111
$worker
112112
);
113+
114+
return 0;
113115
}
114116
}

Command/GearmanWorkerExecuteCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
163163
new ConfirmationQuestion('This will execute asked worker with all its jobs?')
164164
)
165165
) {
166-
return;
166+
return 0;
167167
}
168168

169169
if (!$input->getOption('quiet')) {
@@ -209,5 +209,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
209209
'minimum_execution_time' => $input->getOption('minimum-execution-time'),
210210
'timeout' => $input->getOption('timeout')
211211
));
212+
213+
return 0;
212214
}
213215
}

Command/GearmanWorkerListCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected function configure()
7272
protected function execute(InputInterface $input, OutputInterface $output)
7373
{
7474
if ($input->getOption('quiet')) {
75-
return;
75+
return 0;
7676
}
7777

7878
$workers = $this->gearmanClient->getWorkers();
@@ -98,5 +98,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9898
}
9999
}
100100
}
101+
102+
return 0;
101103
}
102104
}

Dispatcher/Abstracts/AbstractGearmanDispatcher.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
namespace Mmoreram\GearmanBundle\Dispatcher\Abstracts;
1515

1616
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
17+
use Symfony\Component\EventDispatcher\LegacyEventDispatcherProxy;
1718

1819
/**
1920
* Gearman execute methods. All Worker methods
@@ -38,6 +39,6 @@ abstract class AbstractGearmanDispatcher
3839
*/
3940
public function __construct(EventDispatcherInterface $eventDispatcher)
4041
{
41-
$this->eventDispatcher = $eventDispatcher;
42+
$this->eventDispatcher = class_exists(LegacyEventDispatcherProxy::class) ? LegacyEventDispatcherProxy::decorate($eventDispatcher) : $eventDispatcher;
4243
}
4344
}

0 commit comments

Comments
 (0)