Skip to content

Commit 4de637a

Browse files
authored
Update workflow configurations and dependencies (#66)
* Update workflow configurations and dependencies This commit updates the GitHub Actions workflow configurations, downgrading versions in codeql.yml, integrate.yml, and dependency-review.yml. It also deletes merge-me.yml, introduces infection.yml, and makes minor syntax corrections in Decoder.php. The commit also updates certain dependencies in the composer.json file.
1 parent 1833806 commit 4de637a

File tree

7 files changed

+61
-83
lines changed

7 files changed

+61
-83
lines changed

.github/workflows/codeql.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v3
47+
uses: github/codeql-action/init@v2
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -58,7 +58,7 @@ jobs:
5858
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
5959
# If this step fails, then you should remove it and run the build manually (see below)
6060
- name: Autobuild
61-
uses: github/codeql-action/autobuild@v3
61+
uses: github/codeql-action/autobuild@v2
6262

6363
# ℹ️ Command-line programs to run using the OS shell.
6464
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -71,6 +71,6 @@ jobs:
7171
# ./location_of_script_within_repo/buildscript.sh
7272

7373
- name: Perform CodeQL Analysis
74-
uses: github/codeql-action/analyze@v3
74+
uses: github/codeql-action/analyze@v2
7575
with:
7676
category: "/language:${{matrix.language}}"

.github/workflows/dependency-review.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
- name: 'Checkout Repository'
1818
uses: actions/checkout@v4
1919
- name: 'Dependency Review'
20-
uses: actions/dependency-review-action@v4
20+
uses: actions/dependency-review-action@v3

.github/workflows/infection.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
2+
3+
name: "Integrate"
4+
5+
on:
6+
push:
7+
branches:
8+
- "*.x"
9+
10+
jobs:
11+
mutation_testing:
12+
name: "5️⃣ Mutation Testing"
13+
runs-on: "ubuntu-latest"
14+
steps:
15+
- name: "Set up PHP"
16+
uses: "shivammathur/setup-php@v2"
17+
with:
18+
php-version: "8.3"
19+
extensions: "ctype, dom, json, libxml, mbstring, openssl, phar, simplexml, tokenizer, xml, xmlwriter"
20+
coverage: "xdebug"
21+
22+
- name: "Checkout code"
23+
uses: "actions/checkout@v3"
24+
25+
- name: "Fetch Git base reference"
26+
run: "git fetch --depth=1 origin ${GITHUB_BASE_REF}"
27+
28+
- name: "Install dependencies"
29+
uses: "ramsey/composer-install@v3"
30+
with:
31+
dependency-versions: "highest"
32+
composer-options: "--optimize-autoloader"
33+
34+
- name: "Execute Infection"
35+
run: "make ci-mu"

.github/workflows/integrate.yml

+12-41
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: "ubuntu-latest"
1515
steps:
1616
- name: "Checkout code"
17-
uses: "actions/checkout@v4"
17+
uses: "actions/checkout@v3"
1818

1919
- name: "Check file permissions"
2020
run: |
@@ -35,10 +35,10 @@ jobs:
3535
coverage: "none"
3636

3737
- name: "Checkout code"
38-
uses: "actions/checkout@v4"
38+
uses: "actions/checkout@v3"
3939

4040
- name: "Install dependencies"
41-
uses: "ramsey/composer-install@v2"
41+
uses: "ramsey/composer-install@v3"
4242
with:
4343
dependency-versions: "highest"
4444

@@ -71,10 +71,10 @@ jobs:
7171
coverage: "xdebug"
7272

7373
- name: "Checkout code"
74-
uses: "actions/checkout@v4"
74+
uses: "actions/checkout@v3"
7575

7676
- name: "Install dependencies"
77-
uses: "ramsey/composer-install@v2"
77+
uses: "ramsey/composer-install@v3"
7878
with:
7979
dependency-versions: "${{ matrix.dependencies }}"
8080
composer-options: "--optimize-autoloader"
@@ -105,13 +105,13 @@ jobs:
105105
coverage: "none"
106106

107107
- name: "Checkout code"
108-
uses: "actions/checkout@v4"
108+
uses: "actions/checkout@v3"
109109

110110
- name: "Validate Composer configuration"
111111
run: "composer validate --strict"
112112

113113
- name: "Install dependencies"
114-
uses: "ramsey/composer-install@v2"
114+
uses: "ramsey/composer-install@v3"
115115
with:
116116
dependency-versions: "highest"
117117
composer-options: "--optimize-autoloader"
@@ -137,10 +137,10 @@ jobs:
137137
coverage: "none"
138138

139139
- name: "Checkout code"
140-
uses: "actions/checkout@v4"
140+
uses: "actions/checkout@v3"
141141

142142
- name: "Install dependencies"
143-
uses: "ramsey/composer-install@v2"
143+
uses: "ramsey/composer-install@v3"
144144
with:
145145
dependency-versions: "highest"
146146
composer-options: "--optimize-autoloader"
@@ -152,35 +152,6 @@ jobs:
152152
run: |
153153
vendor/bin/deptrac analyse --fail-on-uncovered --no-cache
154154
155-
mutation_testing:
156-
name: "5️⃣ Mutation Testing"
157-
needs:
158-
- "byte_level"
159-
- "syntax_errors"
160-
runs-on: "ubuntu-latest"
161-
steps:
162-
- name: "Set up PHP"
163-
uses: "shivammathur/setup-php@v2"
164-
with:
165-
php-version: "8.3"
166-
extensions: "ctype, dom, json, libxml, mbstring, openssl, phar, simplexml, tokenizer, xml, xmlwriter"
167-
coverage: "xdebug"
168-
169-
- name: "Checkout code"
170-
uses: "actions/checkout@v4"
171-
172-
- name: "Fetch Git base reference"
173-
run: "git fetch --depth=1 origin ${GITHUB_BASE_REF}"
174-
175-
- name: "Install dependencies"
176-
uses: "ramsey/composer-install@v2"
177-
with:
178-
dependency-versions: "highest"
179-
composer-options: "--optimize-autoloader"
180-
181-
- name: "Execute Infection"
182-
run: "make ci-mu"
183-
184155
rector_checkstyle:
185156
name: "6️⃣ Rector Checkstyle"
186157
needs:
@@ -196,13 +167,13 @@ jobs:
196167
coverage: "xdebug"
197168

198169
- name: "Checkout code"
199-
uses: "actions/checkout@v4"
170+
uses: "actions/checkout@v3"
200171

201172
- name: "Fetch Git base reference"
202173
run: "git fetch --depth=1 origin ${GITHUB_BASE_REF}"
203174

204175
- name: "Install dependencies"
205-
uses: "ramsey/composer-install@v2"
176+
uses: "ramsey/composer-install@v3"
206177
with:
207178
dependency-versions: "highest"
208179
composer-options: "--optimize-autoloader"
@@ -218,7 +189,7 @@ jobs:
218189
runs-on: "ubuntu-20.04"
219190
steps:
220191
- name: "Checkout code"
221-
uses: "actions/checkout@v4"
192+
uses: "actions/checkout@v3"
222193

223194
- name: "Check exported files"
224195
run: |

.github/workflows/merge-me.yml

-28
This file was deleted.

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
"require-dev": {
3232
"ext-json": "*",
3333
"ekino/phpstan-banned-code": "^1.0",
34-
"infection/infection": "^0.27",
34+
"infection/infection": "^0.28",
3535
"phpstan/extension-installer": "^1.1",
3636
"phpstan/phpstan": "^1.0",
3737
"phpstan/phpstan-beberlei-assert": "^1.0",
3838
"phpstan/phpstan-deprecation-rules": "^1.0",
3939
"phpstan/phpstan-phpunit": "^1.0",
4040
"phpstan/phpstan-strict-rules": "^1.0",
4141
"phpunit/phpunit": "^10.1",
42-
"rector/rector": "^0.19",
42+
"rector/rector": "^1.0",
4343
"roave/security-advisories": "dev-latest",
4444
"symfony/var-dumper": "^6.0|^7.0",
4545
"symplify/easy-coding-standard": "^12.0",

src/Decoder.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ private function processInfinite(Stream $stream, int $mt, bool $breakable): CBOR
150150
}
151151

152152
return $object;
153-
case CBORObject::MAJOR_TYPE_TEXT_STRING : //3
153+
case CBORObject::MAJOR_TYPE_TEXT_STRING: //3
154154
$object = IndefiniteLengthTextStringObject::create();
155155
while (! ($it = $this->process($stream, true)) instanceof BreakObject) {
156156
if (! $it instanceof TextStringObject) {
@@ -162,7 +162,7 @@ private function processInfinite(Stream $stream, int $mt, bool $breakable): CBOR
162162
}
163163

164164
return $object;
165-
case CBORObject::MAJOR_TYPE_LIST : //4
165+
case CBORObject::MAJOR_TYPE_LIST: //4
166166
$object = IndefiniteLengthListObject::create();
167167
$it = $this->process($stream, true);
168168
while (! $it instanceof BreakObject) {
@@ -171,23 +171,23 @@ private function processInfinite(Stream $stream, int $mt, bool $breakable): CBOR
171171
}
172172

173173
return $object;
174-
case CBORObject::MAJOR_TYPE_MAP : //5
174+
case CBORObject::MAJOR_TYPE_MAP: //5
175175
$object = IndefiniteLengthMapObject::create();
176176
while (! ($it = $this->process($stream, true)) instanceof BreakObject) {
177177
$object->add($it, $this->process($stream, false));
178178
}
179179

180180
return $object;
181-
case CBORObject::MAJOR_TYPE_OTHER_TYPE : //7
181+
case CBORObject::MAJOR_TYPE_OTHER_TYPE: //7
182182
if (! $breakable) {
183183
throw new InvalidArgumentException('Cannot parse the data. No enclosing indefinite.');
184184
}
185185

186186
return BreakObject::create();
187-
case CBORObject::MAJOR_TYPE_UNSIGNED_INTEGER : //0
188-
case CBORObject::MAJOR_TYPE_NEGATIVE_INTEGER : //1
189-
case CBORObject::MAJOR_TYPE_TAG : //6
190-
default :
187+
case CBORObject::MAJOR_TYPE_UNSIGNED_INTEGER: //0
188+
case CBORObject::MAJOR_TYPE_NEGATIVE_INTEGER: //1
189+
case CBORObject::MAJOR_TYPE_TAG: //6
190+
default:
191191
throw new InvalidArgumentException(sprintf(
192192
'Cannot parse the data. Found infinite length for Major Type "%s" (%d).',
193193
str_pad(decbin($mt), 5, '0', STR_PAD_LEFT),

0 commit comments

Comments
 (0)