Skip to content

Commit f6ea741

Browse files
authored
Merge pull request #191 from povils/symfony-8-support
Add Symfony 8 support
2 parents 1c45028 + 30ec80e commit f6ea741

File tree

6 files changed

+35
-15
lines changed

6 files changed

+35
-15
lines changed

.github/workflows/autoreview.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout code
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v5
2525

2626
- name: Setup PHP
2727
uses: shivammathur/setup-php@v2
@@ -34,7 +34,7 @@ jobs:
3434
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
3535

3636
- name: Cache dependencies
37-
uses: actions/cache@v2
37+
uses: actions/cache@v4
3838
with:
3939
path: ${{ steps.composer-cache.outputs.dir }}
4040
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}

.github/workflows/ci.yaml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
matrix:
2020
operating-system: [ ubuntu-latest ]
2121
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
22-
symfony-require: ['^4', '^5', '^6', '^7']
22+
symfony-require: ['^4', '^5', '^6', '^7', '^8']
2323
composer-flags: [ '' ]
2424
exclude:
2525
- symfony-require: "^6"
@@ -30,6 +30,17 @@ jobs:
3030
php-version: "8.0"
3131
- symfony-require: "^7"
3232
php-version: "8.1"
33+
- symfony-require: '^8'
34+
php-version: '7.4'
35+
- symfony-require: '^8'
36+
php-version: '8.0'
37+
- symfony-require: '^8'
38+
php-version: '8.1'
39+
- symfony-require: '^8'
40+
php-version: '8.2'
41+
- symfony-require: '^8'
42+
php-version: '8.3'
43+
3344
include:
3445
- { operating-system: 'ubuntu-latest', php-version: '7.4', symfony-require: '^5', composer-flags: '--prefer-lowest' }
3546
- { operating-system: 'windows-latest', php-version: '8.0', symfony-require: '^5' }
@@ -38,7 +49,7 @@ jobs:
3849

3950
steps:
4051
- name: Checkout code
41-
uses: actions/checkout@v4
52+
uses: actions/checkout@v5
4253

4354
- name: Setup PHP
4455
uses: shivammathur/setup-php@v2
@@ -51,7 +62,7 @@ jobs:
5162
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
5263

5364
- name: Cache dependencies
54-
uses: actions/cache@v3
65+
uses: actions/cache@v4
5566
with:
5667
path: ${{ steps.composer-cache.outputs.dir }}
5768
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}-${{ matrix.dependencies }}
@@ -64,10 +75,6 @@ jobs:
6475
- name: Configure Symfony Flex
6576
run: composer config extra.symfony.require ${{ matrix.symfony-require }}
6677

67-
- name: Set minimum-stability dev
68-
if: matrix.symfony-require == '^7'
69-
run: composer config minimum-stability dev
70-
7178
- name: Install dependencies
7279
run: composer update --optimize-autoloader --no-interaction --no-progress --prefer-dist ${{ matrix.composer-flags }}
7380

.github/workflows/cs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v5
2626

2727
- name: Setup PHP
2828
uses: shivammathur/setup-php@v2
@@ -35,7 +35,7 @@ jobs:
3535
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
3636

3737
- name: Cache dependencies
38-
uses: actions/cache@v2
38+
uses: actions/cache@v4
3939
with:
4040
path: ${{ steps.composer-cache.outputs.dir }}
4141
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
55

6+
## [v3.7.0]
7+
- Support Symfony 8
8+
9+
## [v3.6.0]
10+
- Test against PHP 8.4
11+
- Support phpunit/php-timer 8
12+
613
## [v3.5.0]
714
- Support `phpunit/php-timer` 7.0
815
- Add `composer-runtime-api:"^2.0"` dependency to be able to get application version automatically

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
"nikic/php-parser": "^4.18 || ^5.0",
1919
"php-parallel-lint/php-console-highlighter": "^1.0",
2020
"phpunit/php-timer": "^2.0 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0",
21-
"symfony/console": "^4.4 || ^5.0 || ^6.0 || ^7.0",
22-
"symfony/finder": "^4.4 || ^5.0 || ^6.0 || ^7.0"
21+
"symfony/console": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0",
22+
"symfony/finder": "^4.4 || ^5.0 || ^6.0 || ^7.0 || ^8.0"
2323
},
2424
"require-dev": {
2525
"phpunit/phpunit": "^9.6",
26-
"squizlabs/php_codesniffer": "^2.8.1||^3.5"
26+
"squizlabs/php_codesniffer": "^2.8.1 || ^3.5"
2727
},
2828
"autoload": {
2929
"psr-4": {

tests/Command/RunCommandTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Povils\PHPMND\Tests\Command;
66

7+
use Composer\InstalledVersions;
78
use PHPUnit\Framework\TestCase;
89
use Povils\PHPMND\Command\RunCommand;
910
use Povils\PHPMND\Console\Application;
@@ -18,7 +19,12 @@ protected function setUp(): void
1819
{
1920
$application = new Application(Container::create());
2021
$command = new RunCommand();
21-
$application->add($command);
22+
23+
if (version_compare((string)InstalledVersions::getPrettyVersion('symfony/console'), 'v7.4', '<')) {
24+
$application->add($command);
25+
} else {
26+
$application->addCommand($command);
27+
}
2228

2329
$this->commandTester = new CommandTester($application->find($command->getName()));
2430
}

0 commit comments

Comments
 (0)