Skip to content

Commit 6238054

Browse files
authored
Merge pull request #117 from localheinz/feature/synchronize
Enhancement: Synchronize with `ergebnis/php-package-template`
2 parents cbb9655 + 483da27 commit 6238054

File tree

17 files changed

+104
-48
lines changed

17 files changed

+104
-48
lines changed

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ root = true
22

33
[*]
44
charset = utf-8
5+
end_of_line = lf
56
indent_size = 4
67
indent_style = space
78
insert_final_newline = true

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-size
1+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
22

33
* @ergebnis-bot @localheinz

.github/SECURITY.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
The following versions of `localheinz/organizing-test-code-in-php` have active support:
6+
7+
- `x.y.z`
8+
9+
## Unsupported Versions
10+
11+
The following versions of `localheinz/organizing-test-code-in-php` have reached their end of life:
12+
13+
- `x.y.z`
14+
15+
## Reporting a Vulnerability
16+
17+
If you believe that you have found a security vulnerability, please send an email to `am@localheinz.com`. Ensure to include all details required to understand the severity of the issue.

.github/settings.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# https://github.com/probot/settings
1+
# https://github.com/repository-settings/app
22

33
branches:
44
- name: "main"
@@ -59,11 +59,13 @@ repository:
5959
description: ":bulb: Provides a companion repository for organizing test code in PHP."
6060
enable_automated_security_fixes: true
6161
enable_vulnerability_alerts: true
62+
has_discussions: false
6263
has_downloads: true
6364
has_issues: true
6465
has_pages: false
6566
has_projects: false
6667
has_wiki: false
68+
is_template: false
6769
name: "organizing-test-code-in-php"
6870
private: false
6971

.github/workflows/integrate.yaml

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414

1515
runs-on: "ubuntu-latest"
1616

17+
timeout-minutes: 5
18+
1719
strategy:
1820
matrix:
1921
php-version:
@@ -26,18 +28,11 @@ jobs:
2628
- name: "Checkout"
2729
uses: "actions/checkout@v4.0.0"
2830

29-
- name: "Lint YAML files"
30-
uses: "ibiqlik/action-yamllint@v3.1.1"
31-
with:
32-
config_file: ".yamllint.yaml"
33-
file_or_dir: "."
34-
strict: true
35-
3631
- name: "Set up PHP"
3732
uses: "shivammathur/setup-php@2.26.0"
3833
with:
3934
coverage: "none"
40-
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
35+
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
4136
php-version: "${{ matrix.php-version }}"
4237

4338
- name: "Set up problem matchers for PHP"
@@ -72,6 +67,8 @@ jobs:
7267

7368
runs-on: "ubuntu-latest"
7469

70+
timeout-minutes: 5
71+
7572
strategy:
7673
matrix:
7774
php-version:
@@ -95,7 +92,7 @@ jobs:
9592
uses: "shivammathur/setup-php@2.26.0"
9693
with:
9794
coverage: "none"
98-
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
95+
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
9996
php-version: "${{ matrix.php-version }}"
10097

10198
- name: "Set up problem matchers for PHP"
@@ -123,7 +120,7 @@ jobs:
123120
run: "composer normalize --ansi --dry-run"
124121

125122
- name: "Create cache directory for friendsofphp/php-cs-fixer"
126-
run: "mkdir -p .build/php-cs-fixer"
123+
run: "mkdir -p .build/php-cs-fixer/"
127124

128125
- name: "Cache cache directory for friendsofphp/php-cs-fixer"
129126
uses: "actions/cache@v3.3.2"
@@ -136,14 +133,14 @@ jobs:
136133
137134
- name: "Run friendsofphp/php-cs-fixer"
138135
run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --dry-run --verbose"
139-
env:
140-
PHP_CS_FIXER_IGNORE_ENV: 1
141136

142137
dependency-analysis:
143138
name: "Dependency Analysis"
144139

145140
runs-on: "ubuntu-latest"
146141

142+
timeout-minutes: 5
143+
147144
strategy:
148145
matrix:
149146
php-version:
@@ -160,13 +157,16 @@ jobs:
160157
uses: "shivammathur/setup-php@2.26.0"
161158
with:
162159
coverage: "none"
163-
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
160+
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
164161
php-version: "${{ matrix.php-version }}"
165162
tools: "phive"
166163

167164
- name: "Set up problem matchers for PHP"
168165
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""
169166

167+
- name: "Validate composer.json and composer.lock"
168+
run: "composer validate --ansi --strict"
169+
170170
- name: "Determine composer cache directory"
171171
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.8.0"
172172

@@ -188,13 +188,15 @@ jobs:
188188
trust-gpg-keys: "0x033E5F8D801A2F8D"
189189

190190
- name: "Run maglnet/composer-require-checker"
191-
run: ".phive/composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"
191+
run: ".phive/composer-require-checker check --ansi --config-file=$(pwd)/composer-require-checker.json"
192192

193193
refactoring:
194194
name: "Refactoring"
195195

196196
runs-on: "ubuntu-latest"
197197

198+
timeout-minutes: 5
199+
198200
strategy:
199201
matrix:
200202
php-version:
@@ -211,12 +213,15 @@ jobs:
211213
uses: "shivammathur/setup-php@2.26.0"
212214
with:
213215
coverage: "none"
214-
extensions: "none, ctype, dom, intl, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
216+
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
215217
php-version: "${{ matrix.php-version }}"
216218

217219
- name: "Set up problem matchers for PHP"
218220
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""
219221

222+
- name: "Validate composer.json and composer.lock"
223+
run: "composer validate --ansi --strict"
224+
220225
- name: "Determine composer cache directory"
221226
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.8.0"
222227

@@ -233,7 +238,7 @@ jobs:
233238
dependencies: "${{ matrix.dependencies }}"
234239

235240
- name: "Create cache directory for rector/rector"
236-
run: "mkdir -p .build/rector"
241+
run: "mkdir -p .build/rector/"
237242

238243
- name: "Cache cache directory for rector/rector"
239244
uses: "actions/cache@v3.3.2"
@@ -252,6 +257,8 @@ jobs:
252257

253258
runs-on: "ubuntu-latest"
254259

260+
timeout-minutes: 5
261+
255262
strategy:
256263
matrix:
257264
php-version:
@@ -268,7 +275,7 @@ jobs:
268275
uses: "shivammathur/setup-php@2.26.0"
269276
with:
270277
coverage: "none"
271-
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
278+
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
272279
php-version: "${{ matrix.php-version }}"
273280

274281
- name: "Set up problem matchers for PHP"
@@ -277,6 +284,21 @@ jobs:
277284
- name: "Validate composer.json and composer.lock"
278285
run: "composer validate --ansi --strict"
279286

287+
- name: "Determine composer cache directory"
288+
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.8.0"
289+
290+
- name: "Cache dependencies installed with composer"
291+
uses: "actions/cache@v3.3.2"
292+
with:
293+
path: "${{ env.COMPOSER_CACHE_DIR }}"
294+
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
295+
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"
296+
297+
- name: "Install ${{ matrix.dependencies }} dependencies with composer"
298+
uses: "ergebnis/.github/actions/composer/install@1.8.0"
299+
with:
300+
dependencies: "${{ matrix.dependencies }}"
301+
280302
- name: "Check installed packages for security vulnerability advisories"
281303
run: "composer audit --ansi"
282304

@@ -285,6 +307,8 @@ jobs:
285307

286308
runs-on: "ubuntu-latest"
287309

310+
timeout-minutes: 5
311+
288312
strategy:
289313
matrix:
290314
php-version:
@@ -301,12 +325,15 @@ jobs:
301325
uses: "shivammathur/setup-php@2.26.0"
302326
with:
303327
coverage: "none"
304-
extensions: "none, ctype, curl, dom, json, mbstring, pcntl, phar, posix, simplexml, tokenizer, xml, xmlwriter"
328+
extensions: "none, ctype, curl, dom, json, mbstring, opcache, pcntl, phar, posix, simplexml, tokenizer, xml, xmlwriter"
305329
php-version: "${{ matrix.php-version }}"
306330

307331
- name: "Set up problem matchers for PHP"
308332
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""
309333

334+
- name: "Validate composer.json and composer.lock"
335+
run: "composer validate --ansi --strict"
336+
310337
- name: "Determine composer cache directory"
311338
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.8.0"
312339

@@ -323,7 +350,7 @@ jobs:
323350
dependencies: "${{ matrix.dependencies }}"
324351

325352
- name: "Create cache directory for vimeo/psalm"
326-
run: "mkdir -p .build/psalm"
353+
run: "mkdir -p .build/psalm/"
327354

328355
- name: "Run vimeo/psalm"
329356
run: "vendor/bin/psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4"

.github/workflows/merge.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515

1616
runs-on: "ubuntu-latest"
1717

18+
timeout-minutes: 5
19+
1820
if: >
1921
github.event.workflow_run.event == 'pull_request' &&
2022
github.event.workflow_run.conclusion == 'success' &&

.github/workflows/release.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313

1414
runs-on: "ubuntu-latest"
1515

16+
timeout-minutes: 5
17+
1618
steps:
1719
- name: "Create release"
1820
uses: "ergebnis/.github/actions/github/release/create@1.8.0"

.github/workflows/renew.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212

1313
runs-on: "ubuntu-latest"
1414

15+
timeout-minutes: 5
16+
1517
strategy:
1618
matrix:
1719
php-version:
@@ -30,7 +32,7 @@ jobs:
3032
uses: "shivammathur/setup-php@2.26.0"
3133
with:
3234
coverage: "none"
33-
extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
35+
extensions: "none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter"
3436
php-version: "${{ matrix.php-version }}"
3537

3638
- name: "Set up problem matchers for PHP"
@@ -68,8 +70,6 @@ jobs:
6870
6971
- name: "Run friendsofphp/php-cs-fixer"
7072
run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --verbose"
71-
env:
72-
PHP_CS_FIXER_IGNORE_ENV: 1
7373

7474
- name: "Commit modified files"
7575
uses: "stefanzweifel/git-auto-commit-action@v4.16.0"

.github/workflows/triage.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313

1414
runs-on: "ubuntu-latest"
1515

16+
timeout-minutes: 5
17+
1618
steps:
1719
- name: "Add labels based on branch name"
1820
uses: "ergebnis/.github/actions/github/pull-request/add-label-based-on-branch-name@1.8.0"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/.build/
2-
/.notes/
2+
/.note/
33
/.phive/
44
/vendor/
55
!/.phive/phars.xml

0 commit comments

Comments
 (0)