Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coding-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "8.3"
- "8.4"
operating-system:
- "ubuntu-latest"

Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/notify-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Notify new release

on:
release:
types: [published]

env:
NOTIFY_MESSAGE: |
We released ${{ github.event.release.tag_name }} of ${{ github.event.repository.name }}! See here for the changelog: ${{ github.event.release.html_url }}
#PHP #DDD #EventSourcing #Psalm #StaticAnalysis

jobs:
twitter:
runs-on: ubuntu-latest
steps:
- uses: eomm/why-don-t-you-tweet@v2
if: ${{ !github.event.repository.private }}
with:
# GitHub event payload
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
tweet-message: ${{ env.NOTIFY_MESSAGE }}
env:
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

mastodon:
runs-on: ubuntu-latest
steps:
- uses: cbrgm/mastodon-github-action@v2
if: ${{ !github.event.repository.private }}
with:
message: ${{ env.NOTIFY_MESSAGE }}
access-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
url: ${{ secrets.MASTODON_URL }}
2 changes: 1 addition & 1 deletion .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- "lowest"
- "locked"
php-version:
- "8.3"
- "8.4"
operating-system:
- "ubuntu-latest"

Expand Down
18 changes: 6 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ phpcs-check: vendor
phpcs-fix: vendor ## run phpcs fixer
vendor/bin/phpcbf

.PHONY: phpstan
phpstan: vendor ## run phpstan static code analyser
vendor/bin/phpstan analyse
.PHONY: cs
cs: vendor ## run phpcs fixer
vendor/bin/phpcbf || true
vendor/bin/phpcs

.PHONY: psalm
psalm: vendor ## run psalm static code analyser
Expand All @@ -24,14 +25,7 @@ psalm: vendor
psalm-baseline: vendor ## run psalm static code analyser
vendor/bin/psalm --update-baseline --set-baseline=baseline.xml

.PHONY: phpunit
phpunit: vendor ## run phpunit tests
vendor/bin/phpunit --testdox --colors=always -v $(OPTIONS)

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

test: phpunit ## run tests
static: psalm phpcs-check ## run static analyser

.PHONY: dev
dev: static test ## run dev tools
test: psalm ## run tests
21 changes: 17 additions & 4 deletions baseline.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="6.4.0@04f312ac6ea48ba1c3e5db4d815bf6d74641c0ee">
<files psalm-version="6.13.1@1e3b7f0a8ab32b23197b91107adc0a7ed8a05b51">
<file src="src/Plugin.php">
<ClassMustBeFinal>
<code><![CDATA[Plugin]]></code>
</ClassMustBeFinal>
<UnusedClass>
<code><![CDATA[Plugin]]></code>
</UnusedClass>
</file>
<file src="src/SubscribeAttribute.php">
<ClassMustBeFinal>
<code><![CDATA[SubscribeAttribute]]></code>
</ClassMustBeFinal>
</file>
<file src="src/SuppressAggregateRoot.php">
<ClassMustBeFinal>
<code><![CDATA[SuppressAggregateRoot]]></code>
</ClassMustBeFinal>
</file>
<file src="tests/Valid/NameChanged.php">
<PossiblyUnusedMethod>
<code><![CDATA[__construct]]></code>
Expand All @@ -19,11 +32,11 @@
</PossiblyUnusedMethod>
</file>
<file src="tests/Valid/ProfileProjection.php">
<PossiblyUnusedParam>
<code><![CDATA[$id]]></code>
</PossiblyUnusedParam>
<UnusedClass>
<code><![CDATA[ProfileProjection]]></code>
</UnusedClass>
<UnusedParam>
<code><![CDATA[$id]]></code>
</UnusedParam>
</file>
</files>
10 changes: 3 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@
}
],
"require": {
"php": "~8.1 || ~8.2 || ~8.3",
"vimeo/psalm": "^5.14.0 || ^6.0.0",
"php": "~8.2 || ~8.3 || ~8.4",
"vimeo/psalm": "^6.13.0",
"ext-simplexml": "*"
},
"require-dev": {
"patchlevel/coding-standard": "^1.3.0",
"patchlevel/event-sourcing": "^3.0.0",
"roave/security-advisories": "dev-master",
"symfony/var-dumper": "^7.0.0"
},
"conflict": {
"netresearch/jsonmapper": "^1.0"
"roave/security-advisories": "dev-master"
},
"config": {
"preferred-install": {
Expand Down
Loading