Skip to content

Commit cb8f6b3

Browse files
committed
Add Symfony 7 support
1 parent 7f9ac04 commit cb8f6b3

File tree

4 files changed

+29
-9
lines changed

4 files changed

+29
-9
lines changed

.github/workflows/tests.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ jobs:
3030
- php-version: '8.2'
3131
symfony-version: '6.3.*'
3232
description: 'with SF 6.3.*'
33+
- php-version: '8.2'
34+
symfony-version: '6.4.*@dev'
35+
description: 'with SF 6.4.* dev'
36+
- php-version: '8.2'
37+
symfony-version: '7.0.*@dev'
38+
description: 'with SF 7.0.* dev'
3339

3440
#PHP versions
3541
- php-version: '7.4'
@@ -80,6 +86,18 @@ jobs:
8086
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.*') }}-${{ matrix.composer-flags }}
8187
restore-keys: composer-${{ runner.os }}-${{ matrix.php-version }}-
8288

89+
- name: Configure minimum stability
90+
if: matrix.symfony-version && contains(matrix.symfony-version, '@dev')
91+
run: composer config minimum-stability dev
92+
93+
- name: Remove friendsofphp/php-cs-fixer
94+
if: matrix.coding-standards != true
95+
run: composer remove friendsofphp/php-cs-fixer --dev --no-update
96+
97+
- name: Remove vimeo/psalm
98+
if: matrix.static-analysis != true
99+
run: composer remove vimeo/psalm --dev --no-update
100+
83101
- name: Configure Symfony Flex
84102
if: matrix.symfony-version
85103
run: composer config extra.symfony.require ${{ matrix.symfony-version }}

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
"require": {
2525
"php": "^7.4|^8.0",
2626
"ext-mbstring": "*",
27-
"symfony/config": "^5.4|^6.3",
28-
"symfony/console": "^5.4|^6.3",
29-
"symfony/dependency-injection": "^5.4|^6.3",
30-
"symfony/framework-bundle": "^5.4|^6.3",
31-
"symfony/http-kernel": "^5.4|^6.3",
32-
"symfony/process": "^5.4|^6.3"
27+
"symfony/config": "^5.4|^6.3|^7.0",
28+
"symfony/console": "^5.4|^6.3|^7.0",
29+
"symfony/dependency-injection": "^5.4|^6.3|^7.0",
30+
"symfony/framework-bundle": "^5.4|^6.3|^7.0",
31+
"symfony/http-kernel": "^5.4|^6.3|^7.0",
32+
"symfony/process": "^5.4|^6.3|^7.0"
3333
},
3434
"require-dev": {
3535
"dg/bypass-finals": "^1.3",

src/Command/DeployRsyncCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
namespace Ecommit\DeployRsyncBundle\Command;
1515

16+
use Symfony\Component\Console\Attribute\AsCommand;
1617
use Symfony\Component\Console\Command\Command;
1718
use Symfony\Component\Console\Exception\RuntimeException;
1819
use Symfony\Component\Console\Input\InputArgument;
@@ -22,6 +23,7 @@
2223
use Symfony\Component\Console\Question\ConfirmationQuestion;
2324
use Symfony\Component\Process\Process;
2425

26+
#[AsCommand(name: 'ecommit:deploy-rsync', description: 'Deploy the application with RSYNC and SSH')]
2527
final class DeployRsyncCommand extends Command
2628
{
2729
/**
@@ -48,9 +50,9 @@ public function __construct(array $environments, array $rsyncConfig, string $pro
4850
parent::__construct();
4951
}
5052

51-
protected static $defaultName = 'ecommit:deploy-rsync';
53+
protected static $defaultName = 'ecommit:deploy-rsync'; // PHP < 8
5254

53-
protected static $defaultDescription = 'Deploy the application with RSYNC and SSH';
55+
protected static $defaultDescription = 'Deploy the application with RSYNC and SSH'; // PHP < 8
5456

5557
protected function configure(): void
5658
{

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Configuration implements ConfigurationInterface
2121
/**
2222
* @psalm-suppress UndefinedMethod
2323
*/
24-
public function getConfigTreeBuilder()
24+
public function getConfigTreeBuilder(): TreeBuilder
2525
{
2626
$treeBuilder = new TreeBuilder('ecommit_deploy_rsync');
2727
$rootNode = $treeBuilder->getRootNode();

0 commit comments

Comments
 (0)