Skip to content

Commit 6cb63b4

Browse files
authored
Merge pull request #53 from patchlevel/housekeeping
Add PHP 8.4 support, Drop Psalm 5, Bump Psalm ^6.0.0 to Psalm ^6.13.0
2 parents b97f93a + 043d3fc commit 6cb63b4

14 files changed

Lines changed: 973 additions & 754 deletions

.github/workflows/coding-standard.yml

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Notify new release
2+
3+
on:
4+
release:
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 #Psalm #StaticAnalysis
11+
12+
jobs:
13+
twitter:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: eomm/why-don-t-you-tweet@v2
17+
if: ${{ !github.event.repository.private }}
18+
with:
19+
# GitHub event payload
20+
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
21+
tweet-message: ${{ env.NOTIFY_MESSAGE }}
22+
env:
23+
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
24+
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
25+
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
26+
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/psalm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- "lowest"
2222
- "locked"
2323
php-version:
24-
- "8.3"
24+
- "8.4"
2525
operating-system:
2626
- "ubuntu-latest"
2727

Makefile

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ phpcs-check: vendor
1212
phpcs-fix: vendor ## run phpcs fixer
1313
vendor/bin/phpcbf
1414

15-
.PHONY: phpstan
16-
phpstan: vendor ## run phpstan static code analyser
17-
vendor/bin/phpstan analyse
15+
.PHONY: cs
16+
cs: vendor ## run phpcs fixer
17+
vendor/bin/phpcbf || true
18+
vendor/bin/phpcs
1819

1920
.PHONY: psalm
2021
psalm: vendor ## run psalm static code analyser
@@ -24,14 +25,7 @@ psalm: vendor
2425
psalm-baseline: vendor ## run psalm static code analyser
2526
vendor/bin/psalm --update-baseline --set-baseline=baseline.xml
2627

27-
.PHONY: phpunit
28-
phpunit: vendor ## run phpunit tests
29-
vendor/bin/phpunit --testdox --colors=always -v $(OPTIONS)
30-
3128
.PHONY: static
32-
static: psalm phpstan phpcs-check ## run static analyser
33-
34-
test: phpunit ## run tests
29+
static: psalm phpcs-check ## run static analyser
3530

36-
.PHONY: dev
37-
dev: static test ## run dev tools
31+
test: psalm ## run tests

baseline.xml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="6.4.0@04f312ac6ea48ba1c3e5db4d815bf6d74641c0ee">
2+
<files psalm-version="6.13.1@1e3b7f0a8ab32b23197b91107adc0a7ed8a05b51">
33
<file src="src/Plugin.php">
4+
<ClassMustBeFinal>
5+
<code><![CDATA[Plugin]]></code>
6+
</ClassMustBeFinal>
47
<UnusedClass>
58
<code><![CDATA[Plugin]]></code>
69
</UnusedClass>
710
</file>
11+
<file src="src/SubscribeAttribute.php">
12+
<ClassMustBeFinal>
13+
<code><![CDATA[SubscribeAttribute]]></code>
14+
</ClassMustBeFinal>
15+
</file>
16+
<file src="src/SuppressAggregateRoot.php">
17+
<ClassMustBeFinal>
18+
<code><![CDATA[SuppressAggregateRoot]]></code>
19+
</ClassMustBeFinal>
20+
</file>
821
<file src="tests/Valid/NameChanged.php">
922
<PossiblyUnusedMethod>
1023
<code><![CDATA[__construct]]></code>
@@ -19,11 +32,11 @@
1932
</PossiblyUnusedMethod>
2033
</file>
2134
<file src="tests/Valid/ProfileProjection.php">
22-
<PossiblyUnusedParam>
23-
<code><![CDATA[$id]]></code>
24-
</PossiblyUnusedParam>
2535
<UnusedClass>
2636
<code><![CDATA[ProfileProjection]]></code>
2737
</UnusedClass>
38+
<UnusedParam>
39+
<code><![CDATA[$id]]></code>
40+
</UnusedParam>
2841
</file>
2942
</files>

composer.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,14 @@
1919
}
2020
],
2121
"require": {
22-
"php": "~8.1 || ~8.2 || ~8.3",
23-
"vimeo/psalm": "^5.14.0 || ^6.0.0",
22+
"php": "~8.2 || ~8.3 || ~8.4",
23+
"vimeo/psalm": "^6.13.0",
2424
"ext-simplexml": "*"
2525
},
2626
"require-dev": {
2727
"patchlevel/coding-standard": "^1.3.0",
2828
"patchlevel/event-sourcing": "^3.0.0",
29-
"roave/security-advisories": "dev-master",
30-
"symfony/var-dumper": "^7.0.0"
31-
},
32-
"conflict": {
33-
"netresearch/jsonmapper": "^1.0"
29+
"roave/security-advisories": "dev-master"
3430
},
3531
"config": {
3632
"preferred-install": {

0 commit comments

Comments
 (0)