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
4 changes: 1 addition & 3 deletions .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.4"
- "8.5"
operating-system:
- "ubuntu-latest"

Expand All @@ -31,10 +31,8 @@ jobs:
- name: "Install PHP"
uses: "shivammathur/setup-php@2.36.0"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: pdo_sqlite

- uses: ramsey/composer-install@3.1.1
with:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/mutation-tests-diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Mutation tests on diff"

on:
pull_request:

jobs:
mutation-tests-diff:
name: "Mutation tests on diff"

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

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "8.5"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: "Install PHP"
uses: "shivammathur/setup-php@2.36.0"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: pdo_sqlite

- uses: ramsey/composer-install@3.1.1
with:
dependency-versions: ${{ matrix.dependencies }}

- name: "Infection"
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"
46 changes: 46 additions & 0 deletions .github/workflows/mutation-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Mutation tests"

on:
pull_request:
push:
branches:
- "[0-9]+.[0-9]+.x"
- "renovate/*"

jobs:
mutation-tests:
name: "Mutation tests"

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

strategy:
matrix:
dependencies:
- "locked"
php-version:
- "8.5"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: actions/checkout@v6

- name: "Install PHP"
uses: "shivammathur/setup-php@2.36.0"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: pdo_sqlite

- uses: ramsey/composer-install@3.1.1
with:
dependency-versions: ${{ matrix.dependencies }}

- name: "Infection"
run: "vendor/bin/infection --threads=max"
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
4 changes: 1 addition & 3 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "8.4"
- "8.5"
operating-system:
- "ubuntu-latest"

Expand All @@ -31,10 +31,8 @@ jobs:
- name: "Install PHP"
uses: "shivammathur/setup-php@2.36.0"
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: pdo_sqlite

- uses: ramsey/composer-install@3.1.1
with:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
operating-system:
- "ubuntu-latest"
- "windows-latest"
include:
- dependencies: "locked"
php-version: "8.4"
php-version: "8.5"
operating-system: "ubuntu-latest"
- dependencies: "locked"
php-version: "8.4"
php-version: "8.5"
operating-system: "windows-latest"
steps:
- name: "Checkout"
Expand Down
44 changes: 0 additions & 44 deletions .github/workflows/psalm.yml

This file was deleted.

26 changes: 19 additions & 7 deletions .github/workflows/tweet-on-release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
name: Tweet new release
name: Notify new release

# More triggers
# https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#release
on:
release:
types: [ published ]
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 #Symfony #Dashboard #Admin

jobs:
tweet:
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: "New ${{ github.event.repository.name }} release ${{ github.event.release.tag_name }}! ${{ github.event.release.html_url }}"
tweet-message: ${{ env.NOTIFY_MESSAGE }}
env:
# Get your tokens from https://developer.twitter.com/apps
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ phpunit.xml
.phpcs-cache
phpstan.neon
node_modules/
infection.log
infection.html
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,26 @@ cs: vendor

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

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

.PHONY: psalm
psalm: vendor ## run psalm static code analyser
vendor/bin/psalm

.PHONY: psalm-baseline
psalm-baseline: vendor ## run psalm static code analyser
vendor/bin/psalm --update-baseline --set-baseline=baseline.xml
.PHONY: infection
infection: vendor ## run infection
php -d memory_limit=312M vendor/bin/infection --threads=5

.PHONY: infection-diff
infection-diff: vendor ## run infection on differences
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

.PHONY: phpunit
phpunit: vendor ## run phpunit tests
XDEBUG_MODE=coverage vendor/bin/phpunit

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

test: phpunit ## run tests

Expand Down
31 changes: 0 additions & 31 deletions baseline.xml

This file was deleted.

29 changes: 14 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,26 @@
}
],
"require": {
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
"patchlevel/event-sourcing": "^3.8.0",
"patchlevel/event-sourcing-bundle": "^3.7.0",
"symfony/asset": "^5.4.33|^6.4.1|^7.0.1",
"symfony/asset-mapper": "^6.4.1|^7.0.1",
"symfony/config": "^5.4.31|^6.4.0|^7.0.0",
"symfony/dependency-injection": "^5.4.33|^6.4.1|^7.0.1",
"symfony/expression-language": "^5.4.33|^6.4.1|^7.0.1",
"symfony/http-kernel": "^5.4.33|^6.4.1|^7.0.1",
"symfony/var-dumper": "^5.4.29|^6.4.0|^7.0.0",
"symfony/asset": "^5.4.33 || ^6.4.1 || ^7.0.1 || ^8.0.0",
"symfony/asset-mapper": "^6.4.1 || ^7.0.1 || ^8.0.0",
"symfony/config": "^5.4.31 || ^6.4.0 || ^7.0.0 || ^8.0.0",
"symfony/dependency-injection": "^5.4.33 || ^6.4.1 || ^7.0.1 || ^8.0.0",
"symfony/expression-language": "^5.4.33 || ^6.4.1 || ^7.0.1 || ^8.0.0",
"symfony/http-kernel": "^5.4.33 || ^6.4.1 || ^7.0.1 || ^8.0.0",
"symfony/routing": "^5.4.33 || ^6.4.1 || ^7.0.1 || ^8.0.0",
"symfony/var-dumper": "^5.4.29 || ^6.4.0 || ^7.0.0 || ^8.0.0",
"twig/twig": "^3.20.0"
},
"require-dev": {
"infection/infection": "^0.31.0",
"infection/infection": "^0.31.9",
"patchlevel/coding-standard": "^1.3.0",
"phpspec/prophecy-phpunit": "^2.1.0",
"phpstan/phpstan": "^2.1.0",
"phpunit/phpunit": "^10.5.2",
"psalm/plugin-symfony": "^5.2.7",
"roave/security-advisories": "dev-master",
"vimeo/psalm": "^6.8.4"
"phpstan/phpstan": "^2.1.32",
"phpstan/phpstan-symfony": "^2.0.8",
"phpunit/phpunit": "^11.5.45",
"roave/security-advisories": "dev-master"
},
"config": {
"preferred-install": {
Expand Down
Loading
Loading