Skip to content

Commit 0288d74

Browse files
authored
Merge pull request #35 from patchlevel/housekeeping
Add: PHP 8.5, Symfony 8, phpat, infection+phpstan; Removed: Psalm, Prophecy; Adjusted: Workflows, Readme
2 parents f5027b2 + 66d0c01 commit 0288d74

26 files changed

+1943
-3270
lines changed

.github/workflows/backward-compatibility-check.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
dependencies:
1717
- "locked"
1818
php-version:
19-
- "8.3"
19+
- "8.5"
2020
operating-system:
2121
- "ubuntu-latest"
2222

@@ -29,10 +29,8 @@ jobs:
2929
- name: "Install PHP"
3030
uses: "shivammathur/[email protected]"
3131
with:
32-
coverage: "pcov"
3332
php-version: "${{ matrix.php-version }}"
3433
ini-values: memory_limit=-1
35-
extensions: pdo_sqlite, bcmath, intl, sodium
3634

3735
- uses: ramsey/[email protected]
3836
with:

.github/workflows/coding-standard.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ jobs:
3131
- name: "Install PHP"
3232
uses: "shivammathur/[email protected]"
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/[email protected]
4038
with:
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
22

3-
name: "Static Analysis by Psalm"
3+
name: "Mutation tests on diff"
44

55
on:
66
pull_request:
7-
push:
8-
branches:
9-
- "[0-9]+.[0-9]+.x"
10-
- "renovate/*"
117

128
jobs:
13-
static-analysis-psalm:
14-
name: "Static Analysis by Psalm"
9+
mutation-tests-diff:
10+
name: "Mutation tests on diff"
1511

1612
runs-on: ${{ matrix.operating-system }}
1713

@@ -27,18 +23,19 @@ jobs:
2723
steps:
2824
- name: "Checkout"
2925
uses: actions/checkout@v6
26+
with:
27+
fetch-depth: 0
3028

3129
- name: "Install PHP"
3230
uses: "shivammathur/[email protected]"
3331
with:
3432
coverage: "pcov"
3533
php-version: "${{ matrix.php-version }}"
3634
ini-values: memory_limit=-1
37-
extensions: pdo_sqlite
3835

3936
- uses: ramsey/[email protected]
4037
with:
4138
dependency-versions: ${{ matrix.dependencies }}
4239

43-
- name: "psalm"
44-
run: "vendor/bin/psalm --shepherd --stats"
40+
- name: "Infection"
41+
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=100 --min-covered-msi=100"

.github/workflows/mutation-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,12 @@ jobs:
3434
coverage: "pcov"
3535
php-version: "${{ matrix.php-version }}"
3636
ini-values: memory_limit=-1
37-
extensions: pdo_sqlite
3837

3938
- uses: ramsey/[email protected]
4039
with:
4140
dependency-versions: ${{ matrix.dependencies }}
4241

4342
- name: "Infection"
44-
run: "vendor/bin/roave-infection-static-analysis-plugin"
43+
run: "vendor/bin/infection --threads=max"
4544
env:
4645
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,36 @@
1+
name: Notify new release
12

2-
name: Tweet new release
3-
4-
# More triggers
5-
# https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#release
63
on:
74
release:
85
types: [published]
96

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 #Worker
11+
1012
jobs:
11-
tweet:
13+
twitter:
1214
runs-on: ubuntu-latest
1315
steps:
1416
- uses: eomm/why-don-t-you-tweet@v2
1517
if: ${{ !github.event.repository.private }}
1618
with:
1719
# GitHub event payload
1820
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
19-
tweet-message: "New ${{ github.event.repository.name }} release ${{ github.event.release.tag_name }}! ${{ github.event.release.html_url }}"
21+
tweet-message: ${{ env.NOTIFY_MESSAGE }}
2022
env:
21-
# Get your tokens from https://developer.twitter.com/apps
2223
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
2324
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
2425
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
2526
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 }}

.github/workflows/phpstan.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ jobs:
3131
- name: "Install PHP"
3232
uses: "shivammathur/[email protected]"
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/[email protected]
4038
with:

.github/workflows/unit.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ jobs:
2424
- "8.2"
2525
- "8.3"
2626
- "8.4"
27+
- "8.5"
2728
operating-system:
2829
- "ubuntu-latest"
2930
include:
3031
- dependencies: "locked"
31-
php-version: "8.4"
32+
php-version: "8.5"
3233
operating-system: "ubuntu-latest"
3334
- dependencies: "locked"
34-
php-version: "8.4"
35+
php-version: "8.5"
3536
operating-system: "windows-latest"
3637

3738
steps:
@@ -44,11 +45,10 @@ jobs:
4445
coverage: "pcov"
4546
php-version: "${{ matrix.php-version }}"
4647
ini-values: memory_limit=-1
47-
extensions: pdo_sqlite
4848

4949
- uses: ramsey/[email protected]
5050
with:
5151
dependency-versions: ${{ matrix.dependencies }}
5252

5353
- name: "Tests"
54-
run: "vendor/bin/phpunit --testsuite=unit --coverage-clover=clover.xml --coverage-text"
54+
run: "vendor/bin/phpunit --testsuite=unit"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ phpunit.xml
55
.phpcs-cache
66
phpstan.neon
77
infection.log
8+
infection.html
89
.phpbench/

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ phpunit: vendor
3434

3535
.PHONY: infection
3636
infection: vendor ## run infection
37-
vendor/bin/infection
37+
XDEBUG_MODE=coverage vendor/bin/infection --threads=max
3838

3939
.PHONY: static
4040
static: psalm phpstan phpcs-check ## run static analyser

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fpatchlevel%2Fhydrator%2F2.0.x)](https://dashboard.stryker-mutator.io/reports/github.com/patchlevel/hydrator/2.0.x)
2-
[![Type Coverage](https://shepherd.dev/github/patchlevel/hydrator/coverage.svg)](https://shepherd.dev/github/patchlevel/hydrator)
3-
[![Latest Stable Version](https://poser.pugx.org/patchlevel/hydrator/v)](//packagist.org/packages/patchlevel/hydrator)
4-
[![License](https://poser.pugx.org/patchlevel/hydrator/license)](//packagist.org/packages/patchlevel/hydrator)
1+
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fpatchlevel%2Fworker%2F1.5.x)](https://dashboard.stryker-mutator.io/reports/github.com/patchlevel/worker/1.5.x)
2+
[![Latest Stable Version](https://poser.pugx.org/patchlevel/worker/v)](//packagist.org/packages/patchlevel/worker)
3+
[![License](https://poser.pugx.org/patchlevel/worker/license)](//packagist.org/packages/patchlevel/worker)
54

65
# Worker
76

0 commit comments

Comments
 (0)