Skip to content

Commit cfa07e3

Browse files
committed
Did some housekeeping chores here including:
* Add PHP 8.5 support * Add Symfony 8 support, add missing router dependency * Drop Psalm internally * Add mutation tests, using phpstan for them * drop prophecy (was unused) * Update phpunit to v11
1 parent bcf6988 commit cfa07e3

20 files changed

Lines changed: 1753 additions & 3952 deletions

.github/workflows/coding-standard.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
dependencies:
2121
- "locked"
2222
php-version:
23-
- "8.4"
23+
- "8.5"
2424
operating-system:
2525
- "ubuntu-latest"
2626

@@ -31,10 +31,8 @@ jobs:
3131
- name: "Install PHP"
3232
uses: "shivammathur/setup-php@2.36.0"
3333
with:
34-
coverage: "pcov"
3534
php-version: "${{ matrix.php-version }}"
3635
ini-values: memory_limit=-1
37-
extensions: pdo_sqlite
3836

3937
- uses: ramsey/composer-install@3.1.1
4038
with:
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Mutation tests on diff"
4+
5+
on:
6+
pull_request:
7+
8+
jobs:
9+
mutation-tests-diff:
10+
name: "Mutation tests on diff"
11+
12+
runs-on: ${{ matrix.operating-system }}
13+
14+
strategy:
15+
matrix:
16+
dependencies:
17+
- "locked"
18+
php-version:
19+
- "8.5"
20+
operating-system:
21+
- "ubuntu-latest"
22+
23+
steps:
24+
- name: "Checkout"
25+
uses: actions/checkout@v6
26+
with:
27+
fetch-depth: 0
28+
29+
- name: "Install PHP"
30+
uses: "shivammathur/setup-php@2.36.0"
31+
with:
32+
coverage: "pcov"
33+
php-version: "${{ matrix.php-version }}"
34+
ini-values: memory_limit=-1
35+
extensions: pdo_sqlite
36+
37+
- uses: ramsey/composer-install@3.1.1
38+
with:
39+
dependency-versions: ${{ matrix.dependencies }}
40+
41+
- name: "Infection"
42+
run: "vendor/bin/infection --threads=max --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --ignore-msi-with-no-mutations --with-uncovered --min-msi=90 --min-covered-msi=95"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Mutation tests"
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- "[0-9]+.[0-9]+.x"
10+
- "renovate/*"
11+
12+
jobs:
13+
mutation-tests:
14+
name: "Mutation tests"
15+
16+
runs-on: ${{ matrix.operating-system }}
17+
18+
strategy:
19+
matrix:
20+
dependencies:
21+
- "locked"
22+
php-version:
23+
- "8.5"
24+
operating-system:
25+
- "ubuntu-latest"
26+
27+
steps:
28+
- name: "Checkout"
29+
uses: actions/checkout@v6
30+
31+
- name: "Install PHP"
32+
uses: "shivammathur/setup-php@2.36.0"
33+
with:
34+
coverage: "pcov"
35+
php-version: "${{ matrix.php-version }}"
36+
ini-values: memory_limit=-1
37+
extensions: pdo_sqlite
38+
39+
- uses: ramsey/composer-install@3.1.1
40+
with:
41+
dependency-versions: ${{ matrix.dependencies }}
42+
43+
- name: "Infection"
44+
run: "vendor/bin/infection --threads=max"
45+
env:
46+
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

.github/workflows/phpstan.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
dependencies:
2121
- "locked"
2222
php-version:
23-
- "8.4"
23+
- "8.5"
2424
operating-system:
2525
- "ubuntu-latest"
2626

@@ -31,10 +31,8 @@ jobs:
3131
- name: "Install PHP"
3232
uses: "shivammathur/setup-php@2.36.0"
3333
with:
34-
coverage: "pcov"
3534
php-version: "${{ matrix.php-version }}"
3635
ini-values: memory_limit=-1
37-
extensions: pdo_sqlite
3836

3937
- uses: ramsey/composer-install@3.1.1
4038
with:

.github/workflows/phpunit.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ jobs:
2424
- "8.2"
2525
- "8.3"
2626
- "8.4"
27+
- "8.5"
2728
operating-system:
2829
- "ubuntu-latest"
2930
- "windows-latest"
3031
include:
3132
- dependencies: "locked"
32-
php-version: "8.4"
33+
php-version: "8.5"
3334
operating-system: "ubuntu-latest"
3435
- dependencies: "locked"
35-
php-version: "8.4"
36+
php-version: "8.5"
3637
operating-system: "windows-latest"
3738
steps:
3839
- name: "Checkout"

.github/workflows/psalm.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,36 @@
1-
name: Tweet new release
1+
name: Notify new release
22

3-
# More triggers
4-
# https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#release
53
on:
64
release:
7-
types: [ published ]
5+
types: [published]
6+
7+
env:
8+
NOTIFY_MESSAGE: |
9+
We released ${{ github.event.release.tag_name }} of ${{ github.event.repository.name }}! See here for the changelog: ${{ github.event.release.html_url }}
10+
#PHP #DDD #EventSourcing #Symfony #Dashboard #Admin
811
912
jobs:
10-
tweet:
13+
twitter:
1114
runs-on: ubuntu-latest
1215
steps:
1316
- uses: eomm/why-don-t-you-tweet@v2
1417
if: ${{ !github.event.repository.private }}
1518
with:
1619
# GitHub event payload
1720
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
18-
tweet-message: "New ${{ github.event.repository.name }} release ${{ github.event.release.tag_name }}! ${{ github.event.release.html_url }}"
21+
tweet-message: ${{ env.NOTIFY_MESSAGE }}
1922
env:
20-
# Get your tokens from https://developer.twitter.com/apps
2123
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
2224
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
2325
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
2426
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
27+
28+
mastodon:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: cbrgm/mastodon-github-action@v2
32+
if: ${{ !github.event.repository.private }}
33+
with:
34+
message: ${{ env.NOTIFY_MESSAGE }}
35+
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
36+
url: ${{ secrets.MASTODON_URL }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ phpunit.xml
55
.phpcs-cache
66
phpstan.neon
77
node_modules/
8+
infection.log
9+
infection.html

Makefile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,26 @@ cs: vendor
1414

1515
.PHONY: phpstan
1616
phpstan: vendor ## run phpstan static code analyser
17-
vendor/bin/phpstan analyse
17+
php -d memory_limit=312M vendor/bin/phpstan analyse
1818

1919
.PHONY: phpstan-baseline
2020
phpstan-baseline: vendor ## run phpstan static code analyser
21-
vendor/bin/phpstan analyse --generate-baseline
21+
php -d memory_limit=312M vendor/bin/phpstan analyse --generate-baseline
2222

23-
.PHONY: psalm
24-
psalm: vendor ## run psalm static code analyser
25-
vendor/bin/psalm
26-
27-
.PHONY: psalm-baseline
28-
psalm-baseline: vendor ## run psalm static code analyser
29-
vendor/bin/psalm --update-baseline --set-baseline=baseline.xml
23+
.PHONY: infection
24+
infection: vendor ## run infection
25+
php -d memory_limit=312M vendor/bin/infection --threads=5
3026

27+
.PHONY: infection-diff
28+
infection-diff: vendor ## run infection on differences
29+
php -d memory_limit=312M vendor/bin/infection --threads=max --git-diff-lines --git-diff-base=origin/HEAD --ignore-msi-with-no-mutations --only-covered --min-msi=80 --min-covered-msi=95
3130

3231
.PHONY: phpunit
3332
phpunit: vendor ## run phpunit tests
3433
XDEBUG_MODE=coverage vendor/bin/phpunit
3534

3635
.PHONY: static
37-
static: psalm phpstan phpcs-check ## run static analyser
36+
static: phpstan phpcs-check ## run static analyser
3837

3938
test: phpunit ## run tests
4039

baseline.xml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)