Skip to content

Commit 106a8cb

Browse files
committed
Migrate minimum php 7.4 to 8.0.
1 parent 1e6cbc1 commit 106a8cb

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/composer.lock
55
/phpunit.xml
66
/vendor/
7+
.idea

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
}
1212
],
1313
"require": {
14-
"php": ">=7.4",
14+
"php": ">=8.0",
1515
"ext-redis": "*",
16-
"symfony/dependency-injection": "^4.0|^5.0|^6.0|^7.0",
17-
"symfony/framework-bundle": "^4.0|^5.0|^6.0|^7.0",
18-
"symfony/cache": "^4.0|^5.0|^6.0|^7.0",
19-
"symfony/console": "^4.0|^5.0|^6.0|^7.0"
16+
"symfony/dependency-injection": "^6.0|^7.0",
17+
"symfony/framework-bundle": "^6.0|^7.0",
18+
"symfony/cache": "^6.0|^7.0",
19+
"symfony/console": "^6.0|^7.0"
2020
},
2121
"prefer-stable": true,
2222
"autoload": {

src/Command/RedisFlushCommand.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace Bigoen\RedisBundle\Command;
66

77
use Bigoen\RedisBundle\Utils\RedisClientHelper;
8+
use Symfony\Component\Console\Attribute\AsCommand;
89
use Symfony\Component\Console\Command\Command;
910
use Symfony\Component\Console\Input\InputArgument;
1011
use Symfony\Component\Console\Input\InputInterface;
@@ -14,6 +15,10 @@
1415
/**
1516
* @author Şafak Saylam <safak@bigoen.com>
1617
*/
18+
#[AsCommand(
19+
name: 'redis:flush',
20+
description: 'Flush redis client.',
21+
)]
1722
class RedisFlushCommand extends Command
1823
{
1924
private RedisClientHelper $clientHelper;
@@ -24,14 +29,10 @@ public function __construct(RedisClientHelper $clientHelper)
2429
$this->clientHelper = $clientHelper;
2530
}
2631

27-
protected static $defaultName = 'redis:flush';
2832

2933
protected function configure(): void
3034
{
31-
$this
32-
->setDescription('Flush redis client.')
33-
->addArgument('client', InputArgument::OPTIONAL, 'Flush client name')
34-
;
35+
$this->addArgument('client', InputArgument::OPTIONAL, 'Flush client name');
3536
}
3637

3738
protected function execute(InputInterface $input, OutputInterface $output): int

0 commit comments

Comments
 (0)