Skip to content

Commit 9838486

Browse files
Merge branch '11.0'
* 11.0: Also upload test results to codecov.io Cache Composer's cache directory Do not fetch tags Introduce PHP_VERSION variable Test with PHP 8.5 Remove superfluous double-quotes Update tools
2 parents b129b36 + c46078b commit 9838486

File tree

20 files changed

+186
-105
lines changed

20 files changed

+186
-105
lines changed

.github/workflows/ci.yml

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ name: CI
88

99
env:
1010
COMPOSER_ROOT_VERSION: 12.4.x-dev
11+
PHP_VERSION: 8.4
1112

1213
jobs:
1314
coding-guidelines:
@@ -17,12 +18,23 @@ jobs:
1718

1819
steps:
1920
- name: Checkout
20-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
22+
with:
23+
fetch-depth: 1
24+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
25+
26+
- name: Use local branch
27+
shell: bash
28+
run: |
29+
BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
30+
git branch -D $BRANCH 2>/dev/null || true
31+
git branch $BRANCH HEAD
32+
git checkout $BRANCH
2133
2234
- name: Install PHP
2335
uses: shivammathur/setup-php@v2
2436
with:
25-
php-version: 8.3
37+
php-version: ${{ env.PHP_VERSION }}
2638
extensions: none, iconv, json, phar, tokenizer
2739
coverage: none
2840
tools: none
@@ -37,17 +49,41 @@ jobs:
3749

3850
steps:
3951
- name: Checkout
40-
uses: actions/checkout@v4
52+
uses: actions/checkout@v5
53+
with:
54+
fetch-depth: 1
55+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
56+
57+
- name: Use local branch
58+
shell: bash
59+
run: |
60+
BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
61+
git branch -D $BRANCH 2>/dev/null || true
62+
git branch $BRANCH HEAD
63+
git checkout $BRANCH
4164
4265
- name: Install PHP
4366
uses: shivammathur/setup-php@v2
4467
with:
45-
php-version: 8.4
68+
php-version: ${{ env.PHP_VERSION }}
4669
extensions: none, ctype, curl, dom, iconv, mbstring, opcache, simplexml, tokenizer, xml, xmlwriter
4770
coverage: none
4871
tools: none
4972

50-
- name: Install dependencies with Composer
73+
- name: Get Composer cache directory
74+
id: composer-cache
75+
shell: bash
76+
run: |
77+
echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
78+
79+
- name: Cache Composer cache directory
80+
uses: actions/cache@v4
81+
with:
82+
path: ${{ steps.composer-cache.outputs.dir }}
83+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
84+
restore-keys: ${{ runner.os }}-composer-
85+
86+
- name: Update dependencies with composer
5187
run: ./tools/composer update --no-interaction --no-ansi --no-progress
5288

5389
- name: Run PHPStan
@@ -84,7 +120,18 @@ jobs:
84120
run: git config --global core.autocrlf false
85121

86122
- name: Checkout
87-
uses: actions/checkout@v4
123+
uses: actions/checkout@v5
124+
with:
125+
fetch-depth: 1
126+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
127+
128+
- name: Use local branch
129+
shell: bash
130+
run: |
131+
BRANCH=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
132+
git branch -D $BRANCH 2>/dev/null || true
133+
git branch $BRANCH HEAD
134+
git checkout $BRANCH
88135
89136
- name: Install PHP with extensions
90137
uses: shivammathur/setup-php@v2
@@ -95,11 +142,24 @@ jobs:
95142
ini-values: ${{ env.PHP_INI_VALUES }}
96143
tools: none
97144

145+
- name: Get Composer cache directory
146+
id: composer-cache
147+
shell: bash
148+
run: |
149+
echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
150+
151+
- name: Cache Composer cache directory
152+
uses: actions/cache@v4
153+
with:
154+
path: ${{ steps.composer-cache.outputs.dir }}
155+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
156+
restore-keys: ${{ runner.os }}-composer-
157+
98158
- name: Install dependencies with Composer
99159
run: php ./tools/composer update --no-ansi --no-interaction --no-progress
100160

101161
- name: Run tests with PHPUnit
102-
run: ./vendor/bin/phpunit --log-junit test-results.xml --coverage-openclover=code-coverage.xml
162+
run: vendor/bin/phpunit --log-junit test-results.xml --coverage-clover=code-coverage.xml
103163

104164
- name: Upload test results to Codecov.io
105165
if: ${{ !cancelled() }}

.phive/phars.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="php-cs-fixer" version="^3.86" installed="3.86.0" location="./tools/php-cs-fixer" copy="true"/>
4-
<phar name="composer" version="^2.8" installed="2.8.11" location="./tools/composer" copy="true"/>
3+
<phar name="php-cs-fixer" version="^3.86" installed="3.88.0" location="./tools/php-cs-fixer" copy="true"/>
4+
<phar name="composer" version="^2.8" installed="2.8.12" location="./tools/composer" copy="true"/>
55
</phive>

tools/.phpstan/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"require-dev": {
3-
"phpstan/phpstan": "^2.1.22",
3+
"phpstan/phpstan": "^2.1.29",
44
"phpstan/extension-installer": "^1.4.3",
5-
"phpstan/phpstan-strict-rules": "^2.0.6",
5+
"phpstan/phpstan-strict-rules": "^2.0.7",
66
"tomasvotruba/type-coverage": "^2.0.2",
7-
"ergebnis/phpstan-rules": "^2.11.0"
7+
"ergebnis/phpstan-rules": "^2.12.0"
88
},
99
"config": {
1010
"allow-plugins": {

tools/.phpstan/composer.lock

Lines changed: 21 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/.phpstan/vendor/composer/installed.json

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
"packages": [
33
{
44
"name": "ergebnis/phpstan-rules",
5-
"version": "2.11.0",
6-
"version_normalized": "2.11.0.0",
5+
"version": "2.12.0",
6+
"version_normalized": "2.12.0.0",
77
"source": {
88
"type": "git",
99
"url": "https://github.com/ergebnis/phpstan-rules.git",
10-
"reference": "505fead92d89daeb6aa045e92a3e77b55f4ca6a5"
10+
"reference": "c4e0121a937b3b551f800a86e7d78794da2783ea"
1111
},
1212
"dist": {
1313
"type": "zip",
14-
"url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/505fead92d89daeb6aa045e92a3e77b55f4ca6a5",
15-
"reference": "505fead92d89daeb6aa045e92a3e77b55f4ca6a5",
14+
"url": "https://api.github.com/repos/ergebnis/phpstan-rules/zipball/c4e0121a937b3b551f800a86e7d78794da2783ea",
15+
"reference": "c4e0121a937b3b551f800a86e7d78794da2783ea",
1616
"shasum": ""
1717
},
1818
"require": {
@@ -25,10 +25,9 @@
2525
"doctrine/orm": "^2.20.0 || ^3.3.0",
2626
"ergebnis/composer-normalize": "^2.47.0",
2727
"ergebnis/license": "^2.6.0",
28-
"ergebnis/php-cs-fixer-config": "^6.52.0",
29-
"ergebnis/phpunit-slow-test-detector": "^2.19.1",
28+
"ergebnis/php-cs-fixer-config": "^6.54.0",
29+
"ergebnis/phpunit-slow-test-detector": "^2.20.0",
3030
"fakerphp/faker": "^1.24.1",
31-
"nette/di": "^3.1.10",
3231
"phpstan/extension-installer": "^1.4.3",
3332
"phpstan/phpstan-deprecation-rules": "^2.0.3",
3433
"phpstan/phpstan-phpunit": "^2.0.7",
@@ -38,7 +37,7 @@
3837
"symfony/finder": "^5.4.45",
3938
"symfony/process": "^5.4.47"
4039
},
41-
"time": "2025-08-19T07:58:25+00:00",
40+
"time": "2025-09-07T13:31:33+00:00",
4241
"type": "phpstan-extension",
4342
"extra": {
4443
"phpstan": {
@@ -222,17 +221,17 @@
222221
},
223222
{
224223
"name": "phpstan/phpstan",
225-
"version": "2.1.22",
226-
"version_normalized": "2.1.22.0",
224+
"version": "2.1.29",
225+
"version_normalized": "2.1.29.0",
227226
"source": {
228227
"type": "git",
229-
"url": "https://github.com/phpstan/phpstan.git",
230-
"reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4"
228+
"url": "https://github.com/phpstan/phpstan-phar-composer-source.git",
229+
"reference": "git"
231230
},
232231
"dist": {
233232
"type": "zip",
234-
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/41600c8379eb5aee63e9413fe9e97273e25d57e4",
235-
"reference": "41600c8379eb5aee63e9413fe9e97273e25d57e4",
233+
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/d618573eed4a1b6b75e37b2e0b65ac65c885d88e",
234+
"reference": "d618573eed4a1b6b75e37b2e0b65ac65c885d88e",
236235
"shasum": ""
237236
},
238237
"require": {
@@ -241,7 +240,7 @@
241240
"conflict": {
242241
"phpstan/phpstan-shim": "*"
243242
},
244-
"time": "2025-08-04T19:17:37+00:00",
243+
"time": "2025-09-25T06:58:18+00:00",
245244
"bin": [
246245
"phpstan",
247246
"phpstan.phar"
@@ -283,30 +282,30 @@
283282
},
284283
{
285284
"name": "phpstan/phpstan-strict-rules",
286-
"version": "2.0.6",
287-
"version_normalized": "2.0.6.0",
285+
"version": "2.0.7",
286+
"version_normalized": "2.0.7.0",
288287
"source": {
289288
"type": "git",
290289
"url": "https://github.com/phpstan/phpstan-strict-rules.git",
291-
"reference": "f9f77efa9de31992a832ff77ea52eb42d675b094"
290+
"reference": "d6211c46213d4181054b3d77b10a5c5cb0d59538"
292291
},
293292
"dist": {
294293
"type": "zip",
295-
"url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/f9f77efa9de31992a832ff77ea52eb42d675b094",
296-
"reference": "f9f77efa9de31992a832ff77ea52eb42d675b094",
294+
"url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/d6211c46213d4181054b3d77b10a5c5cb0d59538",
295+
"reference": "d6211c46213d4181054b3d77b10a5c5cb0d59538",
297296
"shasum": ""
298297
},
299298
"require": {
300299
"php": "^7.4 || ^8.0",
301-
"phpstan/phpstan": "^2.0.4"
300+
"phpstan/phpstan": "^2.1.29"
302301
},
303302
"require-dev": {
304303
"php-parallel-lint/php-parallel-lint": "^1.2",
305304
"phpstan/phpstan-deprecation-rules": "^2.0",
306305
"phpstan/phpstan-phpunit": "^2.0",
307306
"phpunit/phpunit": "^9.6"
308307
},
309-
"time": "2025-07-21T12:19:29+00:00",
308+
"time": "2025-09-26T11:19:08+00:00",
310309
"type": "phpstan-extension",
311310
"extra": {
312311
"phpstan": {
@@ -328,7 +327,7 @@
328327
"description": "Extra strict and opinionated rules for PHPStan",
329328
"support": {
330329
"issues": "https://github.com/phpstan/phpstan-strict-rules/issues",
331-
"source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.6"
330+
"source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.7"
332331
},
333332
"install-path": "../phpstan/phpstan-strict-rules"
334333
},

0 commit comments

Comments
 (0)