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/backward-compatibility-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
dependencies:
- "locked"
php-version:
- "8.3"
- "8.5"
operating-system:
- "ubuntu-latest"

Expand All @@ -29,10 +29,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, bcmath, intl, sodium

- uses: ramsey/composer-install@3.1.1
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/coding-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Static Analysis by Psalm"
name: "Mutation tests on diff"

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

jobs:
static-analysis-psalm:
name: "Static Analysis by Psalm"
mutation-tests-diff:
name: "Mutation tests on diff"

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

Expand All @@ -27,18 +23,19 @@ jobs:
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: "psalm"
run: "vendor/bin/psalm --shepherd --stats"
- 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=100 --min-covered-msi=100"
3 changes: 1 addition & 2 deletions .github/workflows/mutation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ jobs:
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/roave-infection-static-analysis-plugin"
run: "vendor/bin/infection --threads=max"
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
name: Notify new release

name: Tweet new release

# More triggers
# https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#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 #Worker

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: 0 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
operating-system:
- "ubuntu-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:
Expand All @@ -44,11 +45,10 @@ jobs:
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: "Tests"
run: "vendor/bin/phpunit --testsuite=unit --coverage-clover=clover.xml --coverage-text"
run: "vendor/bin/phpunit --testsuite=unit"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ phpunit.xml
.phpcs-cache
phpstan.neon
infection.log
infection.html
.phpbench/
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ phpunit: vendor

.PHONY: infection
infection: vendor ## run infection
vendor/bin/infection
XDEBUG_MODE=coverage vendor/bin/infection --threads=max

.PHONY: static
static: psalm phpstan phpcs-check ## run static analyser
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[![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)
[![Type Coverage](https://shepherd.dev/github/patchlevel/hydrator/coverage.svg)](https://shepherd.dev/github/patchlevel/hydrator)
[![Latest Stable Version](https://poser.pugx.org/patchlevel/hydrator/v)](//packagist.org/packages/patchlevel/hydrator)
[![License](https://poser.pugx.org/patchlevel/hydrator/license)](//packagist.org/packages/patchlevel/hydrator)
[![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)
[![Latest Stable Version](https://poser.pugx.org/patchlevel/worker/v)](//packagist.org/packages/patchlevel/worker)
[![License](https://poser.pugx.org/patchlevel/worker/license)](//packagist.org/packages/patchlevel/worker)

# Worker

Expand Down
16 changes: 7 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,18 @@
}
],
"require": {
"php": "~8.2.0 || ~8.3.0 || ~8.4.0",
"symfony/event-dispatcher": "^5.4.26|^6.4.0|^7.0.0"
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
"symfony/event-dispatcher": "^5.4.26 || ^6.4.0 || ^7.0.0 || ^8.0.0"
},
"require-dev": {
"infection/infection": "^0.29.10",
"infection/infection": "^0.31.9",
"patchlevel/coding-standard": "^1.3.0",
"phpat/phpat": "^0.12.0",
"phpbench/phpbench": "^1.2.15",
"phpspec/prophecy-phpunit": "^2.1.0",
"phpstan/phpstan": "^2.1.2",
"phpstan/phpstan": "^2.1.32",
"phpstan/phpstan-phpunit": "^2.0.8",
"phpunit/phpunit": "^11.5.3",
"psalm/plugin-phpunit": "^0.19.0",
"roave/infection-static-analysis-plugin": "^1.34.0",
"symfony/var-dumper": "^5.4.29|^6.4.0|^7.0.0",
"vimeo/psalm": "^6.0.0"
"symfony/var-dumper": "^5.4.29 || ^6.4.0 || ^7.0.0 || ^8.0.0"
},
"config": {
"preferred-install": {
Expand Down
Loading
Loading