Skip to content

Commit 383880f

Browse files
authored
fix: remove SignalableCommandInterface from the get command to be compatible with SF Console 4.x, 5.x; fix changelog and program version (#9)
1 parent 76d681d commit 383880f

File tree

3 files changed

+6
-26
lines changed

3 files changed

+6
-26
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## 0.2.1 (2024-07-20)
44

5+
## What's Changed
6+
* Fixed asset file extension detection by @roxblnfk
7+
* Updated min version of `yiisoft/injector` by @roxblnfk
8+
59
**Full Changelog**: https://github.com/php-internal/dload/compare/0.2.0...0.2.1
610

711
## 0.2.0 (2024-07-19)

Diff for: bin/dload

+1
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@ if ('cli' !== PHP_SAPI) {
5151
);
5252
$application->setDefaultCommand(Command\Get::getDefaultName(), false);
5353
$application->setVersion(Info::version());
54+
$application->setName(Info::NAME);
5455
$application->run();
5556
})();

Diff for: src/Command/Get.php

+1-26
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Internal\DLoad\Module\Common\Stability;
1313
use Symfony\Component\Console\Attribute\AsCommand;
1414
use Symfony\Component\Console\Command\Command;
15-
use Symfony\Component\Console\Command\SignalableCommandInterface;
1615
use Symfony\Component\Console\Input\InputArgument;
1716
use Symfony\Component\Console\Input\InputInterface;
1817
use Symfony\Component\Console\Input\InputOption;
@@ -25,7 +24,7 @@
2524
name: 'get',
2625
description: 'Download a binary',
2726
)]
28-
final class Get extends Base implements SignalableCommandInterface
27+
final class Get extends Base
2928
{
3029
private const ARG_SOFTWARE = 'software';
3130

@@ -39,30 +38,6 @@ public function configure(): void
3938
$this->addOption('stability', null, InputOption::VALUE_OPTIONAL, 'Stability, e.g. "stable", "beta" etc.');
4039
}
4140

42-
public function handleSignal(int $signal, int|false $previousExitCode = 0): int|false
43-
{
44-
if (\defined('SIGINT') && $signal === \SIGINT) {
45-
$this->cancelling = true;
46-
}
47-
48-
if (\defined('SIGTERM') && $signal === \SIGTERM) {
49-
return $signal;
50-
}
51-
52-
return false;
53-
}
54-
55-
public function getSubscribedSignals(): array
56-
{
57-
$result = [];
58-
/** @psalm-suppress MixedAssignment */
59-
\defined('SIGINT') and $result[] = \SIGINT;
60-
/** @psalm-suppress MixedAssignment */
61-
\defined('SIGTERM') and $result[] = \SIGTERM;
62-
63-
return $result;
64-
}
65-
6641
protected function execute(InputInterface $input, OutputInterface $output): int
6742
{
6843
parent::execute($input, $output);

0 commit comments

Comments
 (0)