Skip to content

Commit b5ba7f9

Browse files
committed
Merge uo 3.4.4 to 4.0.x
2 parents 4a05eb0 + dd3b4f8 commit b5ba7f9

File tree

619 files changed

+2557
-5539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

619 files changed

+2557
-5539
lines changed

.gitattributes

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
/.gitattributes export-ignore
99
/.gitignore export-ignore
1010
/.gitsplit.yml export-ignore
11+
/.mergify.yml export-ignore
1112
/monorepo-builder.php export-ignore
1213
/CODE_OF_CONDUCT.md export-ignore
14+
/castor.php export-ignore
1315
/deptrac.yaml export-ignore
1416
/ecs.php export-ignore
1517
/infection.json export-ignore
16-
/Makefile export-ignore
1718
/phpbench.json export-ignore
1819
/phpstan.neon export-ignore
1920
/phpstan-baseline.neon export-ignore

.github/PULL_REQUEST_TEMPLATE.md

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
| Q | A
2-
| ------------- | ---
3-
| Branch? | <!-- see below -->
4-
| Bug fix? | yes/no
5-
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
6-
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
7-
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
8-
| License | MIT
1+
Target branch:
2+
Resolves issue # <!-- #-prefixed issue number(s), if any -->
3+
4+
<!-- replace space with "x" in square brackets: [x] -->
5+
- [ ] It is a Bug fix
6+
- [ ] It is a New feature
7+
- [ ] It is related to dependencies
8+
9+
Includes:
10+
- [ ] Breaks BC
11+
- [ ] Deprecations
12+
913
<!--
10-
Replace this notice by a short README for your feature/bugfix. This will help people
11-
understand your PR and can be used as a start for the documentation.
14+
Fill in this template according to the PR you're about to submit.
15+
Replace this comment by a description of what your PR is solving.
1216
13-
Additionally:
14-
- Always add tests and ensure they pass.
15-
- Never break backward compatibility (unless you are working on the next major release branch).
16-
- Bug fixes must be submitted against the lowest maintained branch where they apply
17-
(lowest branches are regularly merged to upper ones so they get the fixes too.)
18-
- Features and deprecations must be submitted against the last major branch (e.g. 1.x).
17+
Please consider the following requirement:
18+
* Modification of existing tests should be avoided unless deemed necessary.
19+
* You MUST never open a PR related to a security issue. Contact Spomky in private at https://gitter.im/Spomky/
1920
-->
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: 'Dependency Review'
2+
on: [pull_request]
3+
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
dependency-review:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 'Checkout Repository'
12+
uses: actions/checkout@v4
13+
- name: 'Dependency Review'
14+
uses: actions/dependency-review-action@v4

.github/workflows/infection.yml

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
2-
3-
name: "Integrate"
1+
name: "Infection"
42

53
on:
64
push:
@@ -9,26 +7,24 @@ on:
97

108
jobs:
119
mutation_testing:
12-
name: "5️⃣ Mutation Testing"
10+
name: "0️⃣ Mutation Testing"
1311
runs-on: "ubuntu-latest"
1412
steps:
1513
- name: "Set up PHP"
1614
uses: "shivammathur/setup-php@v2"
1715
with:
18-
php-version: "8.1"
16+
php-version: "8.3"
1917
extensions: "json, mbstring, openssl, sqlite3, curl, uuid"
18+
tools: castor
2019

2120
- name: "Checkout code"
2221
uses: "actions/checkout@v4"
2322

24-
- name: "Fetch Git base reference"
25-
run: "git fetch --depth=1 origin ${GITHUB_BASE_REF}"
26-
2723
- name: "Install dependencies"
2824
uses: "ramsey/composer-install@v3"
2925
with:
3026
dependency-versions: "highest"
3127
composer-options: "--optimize-autoloader"
3228

3329
- name: "Execute Infection"
34-
run: "make ci-mu"
30+
run: "castor infect"

.github/workflows/integrate.yml

+56-28
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
2-
31
name: "Integrate"
42

53
on:
@@ -31,18 +29,34 @@ jobs:
3129
- name: "Set up PHP"
3230
uses: "shivammathur/setup-php@v2"
3331
with:
34-
php-version: "8.1"
32+
php-version: "8.3"
33+
extensions: "json, mbstring, openssl, sqlite3, curl, uuid"
34+
tools: castor
3535

3636
- name: "Checkout code"
3737
uses: "actions/checkout@v4"
3838

39+
- name: "Fetch Git base reference"
40+
run: "git fetch --depth=1 origin ${GITHUB_BASE_REF}"
41+
42+
- name: "Validate Composer configuration"
43+
run: "castor validate"
44+
3945
- name: "Install dependencies"
4046
uses: "ramsey/composer-install@v3"
4147
with:
42-
dependency-versions: "highest"
48+
dependency-versions: "${{ matrix.dependencies }}"
49+
composer-options: "--optimize-autoloader"
50+
51+
- name: "Cache dependencies"
52+
uses: "actions/cache@v4"
53+
id: "cache"
54+
with:
55+
path: "composer-cache"
56+
key: "${{ runner.os }}-${{ hashFiles('**/composer.json') }}"
4357

4458
- name: "Check source code for syntax errors"
45-
run: "composer exec -- parallel-lint src/ tests/"
59+
run: "castor lint"
4660

4761
unit_tests:
4862
name: "2️⃣ Unit and functional tests"
@@ -54,8 +68,6 @@ jobs:
5468
operating-system:
5569
- "ubuntu-latest"
5670
php-version:
57-
- "8.1"
58-
- "8.2"
5971
- "8.3"
6072
dependencies:
6173
- "lowest"
@@ -67,6 +79,7 @@ jobs:
6779
with:
6880
php-version: "${{ matrix.php-version }}"
6981
extensions: "json, mbstring, openssl, sqlite3, curl, uuid"
82+
tools: castor
7083
coverage: "xdebug"
7184

7285
- name: "Checkout code"
@@ -79,15 +92,7 @@ jobs:
7992
composer-options: "--optimize-autoloader"
8093

8194
- name: "Execute unit tests"
82-
run: "make ci-cc"
83-
84-
# - name: Send coverage to Coveralls
85-
# if: "matrix.php-version == '8.1' && matrix.dependencies == 'highest'"
86-
# env:
87-
# COVERALLS_REPO_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
88-
# run: |
89-
# wget "https://github.com/php-coveralls/php-coveralls/releases/download/v2.5.2/php-coveralls.phar"
90-
# php ./php-coveralls.phar -v
95+
run: "castor test --coverage-text"
9196

9297
static_analysis:
9398
name: "3️⃣ Static Analysis"
@@ -99,23 +104,21 @@ jobs:
99104
- name: "Set up PHP"
100105
uses: "shivammathur/setup-php@v2"
101106
with:
102-
php-version: "8.1"
107+
php-version: "8.3"
103108
extensions: "json, mbstring, openssl, sqlite3, curl, uuid"
109+
tools: castor
104110

105111
- name: "Checkout code"
106112
uses: "actions/checkout@v4"
107113

108-
- name: "Validate Composer configuration"
109-
run: "composer validate --strict"
110-
111114
- name: "Install dependencies"
112115
uses: "ramsey/composer-install@v3"
113116
with:
114117
dependency-versions: "highest"
115118
composer-options: "--optimize-autoloader"
116119

117120
- name: "Execute static analysis"
118-
run: "make st"
121+
run: "castor stan"
119122

120123
coding_standards:
121124
name: "4️⃣ Coding Standards"
@@ -127,23 +130,50 @@ jobs:
127130
- name: "Set up PHP"
128131
uses: "shivammathur/setup-php@v2"
129132
with:
130-
php-version: "8.1"
133+
php-version: "8.3"
131134
extensions: "json, mbstring, openssl, sqlite3, curl, uuid"
135+
tools: castor
132136

133137
- name: "Checkout code"
134138
uses: "actions/checkout@v4"
135139

140+
- name: "Install dependencies"
141+
uses: "ramsey/composer-install@v3"
142+
with:
143+
dependency-versions: "highest"
144+
composer-options: "--optimize-autoloader"
145+
136146
- name: "Check adherence to EditorConfig"
137147
uses: "greut/eclint-action@v0"
138148

149+
- name: "Check coding style"
150+
run: "castor cs"
151+
152+
check_licenses:
153+
name: "5️⃣ Check licenses"
154+
needs:
155+
- "byte_level"
156+
- "syntax_errors"
157+
runs-on: "ubuntu-latest"
158+
steps:
159+
- name: "Set up PHP"
160+
uses: "shivammathur/setup-php@v2"
161+
with:
162+
php-version: "8.3"
163+
extensions: "json, mbstring, openssl, sqlite3, curl, uuid"
164+
tools: castor
165+
166+
- name: "Checkout code"
167+
uses: "actions/checkout@v4"
168+
139169
- name: "Install dependencies"
140170
uses: "ramsey/composer-install@v3"
141171
with:
142172
dependency-versions: "highest"
143173
composer-options: "--optimize-autoloader"
144174

145175
- name: "Check coding style"
146-
run: "make ci-cs"
176+
run: "castor check-licenses"
147177

148178
rector_checkstyle:
149179
name: "6️⃣ Rector Checkstyle"
@@ -155,24 +185,22 @@ jobs:
155185
- name: "Set up PHP"
156186
uses: "shivammathur/setup-php@v2"
157187
with:
158-
php-version: "8.1"
188+
php-version: "8.3"
159189
extensions: "json, mbstring, openssl, sqlite3, curl, uuid"
190+
tools: castor
160191
coverage: "xdebug"
161192

162193
- name: "Checkout code"
163194
uses: "actions/checkout@v4"
164195

165-
- name: "Fetch Git base reference"
166-
run: "git fetch --depth=1 origin ${GITHUB_BASE_REF}"
167-
168196
- name: "Install dependencies"
169197
uses: "ramsey/composer-install@v3"
170198
with:
171199
dependency-versions: "highest"
172200
composer-options: "--optimize-autoloader"
173201

174202
- name: "Execute Rector"
175-
run: "make rector"
203+
run: "castor rector"
176204

177205
exported_files:
178206
name: "7️⃣ Exported files"
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: 'Lock Issues'
2+
3+
on:
4+
schedule:
5+
- cron: '28 4 * * *'
6+
7+
jobs:
8+
lock:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: dessant/lock-threads@v5
12+
with:
13+
github-token: ${{ github.token }}
14+
issue-inactive-days: '31'
15+
exclude-issue-created-before: ''
16+
exclude-any-issue-labels: ''
17+
add-issue-labels: ''
18+
issue-comment: >
19+
This thread has been automatically locked since there has not been
20+
any recent activity after it was closed. Please open a new issue for
21+
related bugs.
22+
issue-lock-reason: 'resolved'
23+
process-only: 'issues'

.github/workflows/release-on-milestone-closed.yml

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2-
31
name: "Automatic Releases"
42

53
on:

.github/workflows/scorecards.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Scorecards supply-chain security
2+
3+
on:
4+
schedule:
5+
- cron: '34 4 * * 6'
6+
push:
7+
branches: [ "*.*.x" ]
8+
9+
permissions: read-all
10+
11+
jobs:
12+
analysis:
13+
name: Scorecards analysis
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
id-token: write
18+
contents: read
19+
actions: read
20+
21+
steps:
22+
- name: "Checkout code"
23+
uses: actions/checkout@v4
24+
with:
25+
persist-credentials: false
26+
27+
- name: "Run analysis"
28+
uses: ossf/[email protected]
29+
with:
30+
results_file: results.sarif
31+
results_format: sarif
32+
publish_results: true
33+
34+
- name: "Upload artifact"
35+
uses: actions/[email protected]
36+
with:
37+
name: SARIF file
38+
path: results.sarif
39+
retention-days: 5
40+
41+
- name: "Upload to code-scanning"
42+
uses: github/codeql-action/upload-sarif@v3
43+
with:
44+
sarif_file: results.sarif

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ composer.lock
88
vendor/
99
src/Bundle/JoseFramework/var/
1010
infection.txt
11+
.castor.stub.php

.gitsplit.yml

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ splits:
5656
- prefix: "rc/Deprecated/Pack/Signature"
5757
target: "https://${GH_TOKEN}@github.com/web-token/signature-pack.git"
5858

59+
5960
origins:
6061
- ^\d+\.\d+\.x$
6162
- ^\d+\.\d+\.\d+$

.mergify.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
pull_request_rules:
2+
- name: Automatic merge
3+
description: Merge when PR passes all branch protection and has label automerge
4+
conditions:
5+
- label = automerge
6+
actions:
7+
merge:
8+
- name: Label conflicting pull requests
9+
description: Add a label to a pull request with conflict to spot it easily
10+
conditions:
11+
- conflict
12+
- '-closed'
13+
actions:
14+
label:
15+
toggle:
16+
- conflict

0 commit comments

Comments
 (0)