Skip to content

Commit f6c5034

Browse files
authored
Update CI (#84)
Upgrade to ubuntu-22.04, update GitHub actions, PHP 8.2 for composer-normalize, replace deprecated set-output, apply composer-normalize recommendations, and CS fixes.
1 parent bb4962d commit f6c5034

File tree

5 files changed

+21
-27
lines changed

5 files changed

+21
-27
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [ pull_request ]
44
jobs:
55
tests:
66
name: PHPUnit PHP ${{ matrix.php }} ${{ matrix.dependency }} (Symfony ${{ matrix.symfony }})
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-22.04
88
strategy:
99
matrix:
1010
php:
@@ -58,7 +58,7 @@ jobs:
5858
fail-fast: false
5959
steps:
6060
- name: Checkout
61-
uses: actions/checkout@v2
61+
uses: actions/checkout@v4
6262

6363
- name: Setup PHP
6464
uses: shivammathur/setup-php@v2
@@ -76,10 +76,10 @@ jobs:
7676

7777
- name: Get Composer Cache Directory
7878
id: composer-cache
79-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
79+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
8080

8181
- name: Cache dependencies
82-
uses: actions/cache@v2
82+
uses: actions/cache@v3
8383
with:
8484
path: ${{ steps.composer-cache.outputs.dir }}
8585
key: ${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}

.github/workflows/static.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ name: Static analysis
44
jobs:
55
phpstan:
66
name: PHPStan
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-22.04
88

99
steps:
1010
- name: Checkout code
11-
uses: actions/checkout@v2
11+
uses: actions/checkout@v4
1212

1313
- name: Setup PHP
1414
uses: shivammathur/setup-php@v2
@@ -18,23 +18,23 @@ jobs:
1818
tools: phpstan:1.2.0, cs2pr
1919

2020
- name: Download dependencies
21-
uses: ramsey/composer-install@v1
21+
uses: ramsey/composer-install@v2
2222

2323
- name: PHPStan
2424
run: phpstan analyze --no-progress --error-format=checkstyle | cs2pr
2525

2626
php-cs-fixer:
2727
name: PHP-CS-Fixer
28-
runs-on: ubuntu-20.04
28+
runs-on: ubuntu-22.04
2929

3030
steps:
3131
- name: Checkout code
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@v4
3333

3434
- name: Setup PHP
3535
uses: shivammathur/setup-php@v2
3636
with:
37-
php-version: 8.0
37+
php-version: 8.2
3838
coverage: none
3939
tools: php-cs-fixer:3, cs2pr
4040

@@ -43,10 +43,10 @@ jobs:
4343

4444
psalm:
4545
name: Psalm
46-
runs-on: ubuntu-20.04
46+
runs-on: ubuntu-22.04
4747
steps:
4848
- name: Checkout code
49-
uses: actions/checkout@v2
49+
uses: actions/checkout@v4
5050

5151
- name: Setup PHP
5252
uses: shivammathur/setup-php@v2
@@ -56,25 +56,25 @@ jobs:
5656
tools: vimeo/psalm:4.8.1
5757

5858
- name: Download dependencies
59-
uses: ramsey/composer-install@v1
59+
uses: ramsey/composer-install@v2
6060

6161
- name: Psalm
6262
run: psalm --no-progress --output-format=github
6363

6464
composer-normalize:
6565
name: Composer Normalize
66-
runs-on: ubuntu-20.04
66+
runs-on: ubuntu-22.04
6767

6868
steps:
69+
- name: Checkout code
70+
uses: actions/checkout@v4
71+
6972
- name: Setup PHP
7073
uses: shivammathur/setup-php@v2
7174
with:
72-
php-version: 8.0
75+
php-version: 8.2
7376
coverage: none
7477
tools: composer-normalize
7578

76-
- name: Checkout code
77-
uses: actions/checkout@v2
78-
7979
- name: Normalize
8080
run: composer-normalize --dry-run

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
symfony: ['4.4.*', '5.3.*', '5.4.*', '6.0.*', '6.1.*']
107107

108108
steps:
109-
- uses: actions/checkout@master
109+
- uses: actions/checkout@v4
110110

111111
- name: Setup PHP ${{ matrix.php }}
112112
uses: shivammathur/setup-php@v2
@@ -117,7 +117,7 @@ jobs:
117117
- name: Download dependencies
118118
env:
119119
SYMFONY_REQUIRE: ${{ matrix.symfony }}
120-
uses: ramsey/composer-install@v1
120+
uses: ramsey/composer-install@v2
121121

122122
- name: Run test suite on PHP ${{ matrix.php }} and Symfony ${{ matrix.symfony }}
123123
run: ./vendor/bin/phpunit

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^7.2 || ^8.0 || ^8.1",
13+
"php": "^7.2 || ^8.0",
1414
"symfony/dependency-injection": "^4.4 || ^5.3 || ^6.0",
1515
"symfony/filesystem": "^4.4 || ^5.3 || ^6.0",
1616
"symfony/framework-bundle": "^4.4 || ^5.3 || ^6.0",

src/TestKernel.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ class TestKernel extends Kernel
5858
*/
5959
private $clearCache = true;
6060

61-
/**
62-
* {@inheritDoc}
63-
*/
6461
public function __construct(string $environment, bool $debug)
6562
{
6663
parent::__construct($environment, $debug);
@@ -130,9 +127,6 @@ public function registerBundles(): iterable
130127
}
131128
}
132129

133-
/**
134-
* {@inheritdoc}
135-
*/
136130
protected function buildContainer(): ContainerBuilder
137131
{
138132
$container = parent::buildContainer();

0 commit comments

Comments
 (0)