Skip to content

Commit a2e2fd1

Browse files
committed
Update ci.yml
1 parent a5a7dfc commit a2e2fd1

File tree

3 files changed

+31
-41
lines changed

3 files changed

+31
-41
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,68 +14,59 @@ jobs:
1414
php: [ '8.3', '8.4', '8.5' ]
1515

1616
steps:
17-
- id: checkout
18-
name: Checkout
19-
uses: actions/checkout@v4
20-
21-
- id: setup_php
22-
name: Set up PHP version ${{ matrix.php }}
17+
- name: Set up PHP version ${{ matrix.php }}
2318
uses: shivammathur/setup-php@v2
2419
with:
2520
php-version: ${{ matrix.php }}
2621
tools: composer:v2, php-cs-fixer
2722

23+
- name: Checkout repository
24+
uses: actions/checkout@v6
25+
2826
- name: Validate composer.json and composer.lock
2927
run: composer validate
3028

31-
- id: composer-cache-vars
32-
name: Composer Cache Vars
29+
- name: Get composer cache directory
30+
id: composer-cache
3331
run: |
3432
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
35-
echo "timestamp=$(date +"%s")" >> $GITHUB_OUTPUT
36-
37-
- id: composer-cache-dependencies
38-
name: Cache Composer dependencies
33+
- name: Cache Composer dependencies
3934
uses: actions/cache@v4
4035
with:
41-
path: ${{ steps.composer-cache-vars.outputs.dir }}
42-
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ steps.composer-cache-vars.outputs.timestamp }}
36+
path: ${{ steps.composer-cache.outputs.dir }}
37+
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
4338
restore-keys: |
44-
${{ runner.os }}-composer-${{ matrix.php }}-
45-
${{ runner.os }}-composer-
39+
${{ runner.os }}-${{ matrix.php }}-composer-
4640
47-
- id: install
48-
name: Install dependencies
41+
- name: Install dependencies
4942
run: |
50-
composer validate
51-
composer install --no-progress
43+
composer install --prefer-dist --no-interaction --no-progress
5244
53-
- id: lint
54-
name: Lint
55-
if: ${{ always() && steps.install.conclusion == 'success' }}
45+
- name: Lint
46+
if: ${{ success() }}
5647
run: |
5748
composer ci:test:php:lint
5849
59-
- id: cgl
60-
name: CGL
61-
if: ${{ always() && steps.install.conclusion == 'success' }}
50+
- name: CGL
51+
if: ${{ success() }}
6252
run: |
63-
composer ci:cgl -- --dry-run
53+
composer ci:test:php:cgl
6454
65-
- id: phpstan
66-
name: PHPStan
67-
if: ${{ always() && steps.install.conclusion == 'success' }}
55+
- name: PHPStan
56+
if: ${{ success() }}
6857
run: |
6958
composer ci:test:php:phpstan -- --error-format=github
7059
71-
- id: rector
72-
name: Rector
73-
if: ${{ always() && steps.install.conclusion == 'success' }}
60+
- name: Rector
61+
if: ${{ success() }}
7462
run: |
7563
composer ci:test:php:rector
7664
77-
- id: tests_unit
78-
name: Unit Tests
79-
if: ${{ always() && steps.install.conclusion == 'success' }}
65+
- name: Unit Tests
66+
if: ${{ success() }}
8067
run: |
8168
composer ci:test:php:unit
69+
70+
- name: CPD
71+
if: ${{ success() }}
72+
run: composer ci:test:php:cpd

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"require": {
1717
"php": ">=8.3.0 <8.6.0",
1818
"ext-json": "*",
19-
"symfony/property-info": "^7.3",
20-
"symfony/property-access": "^7.3",
21-
"symfony/type-info": "^7.3",
19+
"symfony/property-info": "^7.3 || ^8.0",
20+
"symfony/property-access": "^7.3 || ^8.0",
21+
"symfony/type-info": "^7.3 || ^8.0",
2222
"doctrine/inflector": "^2.0"
2323
},
2424
"require-dev": {
@@ -29,7 +29,7 @@
2929
"phpstan/phpstan-deprecation-rules": "^2.0",
3030
"phpstan/phpstan-phpunit": "^2.0",
3131
"phpstan/phpstan-strict-rules": "^2.0",
32-
"phpunit/phpunit": "^11.0 || ^12.0",
32+
"phpunit/phpunit": "^12.0",
3333
"rector/rector": "^2.0"
3434
},
3535
"suggest": {

tests/JsonMapper/Resolver/ClassResolverTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public function itRejectsResolversReturningNonStrings(): void
6666
$resolver = new ClassResolver();
6767

6868
$classMap = new ReflectionProperty(ClassResolver::class, 'classMap');
69-
$classMap->setAccessible(true);
7069
$classMap->setValue($resolver, [
7170
DummyBaseClass::class => static fn (): int => 123,
7271
]);

0 commit comments

Comments
 (0)