Skip to content

Commit d1a8538

Browse files
authored
Merge pull request #281 from patchlevel/housekeeping
2 parents ca73dbc + 0d7f340 commit d1a8538

21 files changed

Lines changed: 1389 additions & 3429 deletions

.gitattributes

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.php text eol=lf
2+
*.phpt text eol=lf
3+
/.gitattributes export-ignore
4+
/.github/ export-ignore
5+
/.gitignore export-ignore
6+
/composer.lock export-ignore
7+
/docs/ export-ignore
8+
/phpcs.xml.dist export-ignore
9+
/phpstan.neon export-ignore
10+
/phpstan-baseline.neon export-ignore
11+
/phpunit.xml.dist export-ignore
12+
/renovate.json export-ignore
13+
/infection.json.dist export-ignore
14+
/tests/ export-ignore
15+
/bin/ export-ignore

.github/workflows/coding-standard.yml

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

@@ -34,7 +34,6 @@ jobs:
3434
coverage: "pcov"
3535
php-version: "${{ matrix.php-version }}"
3636
ini-values: memory_limit=-1
37-
extensions: pdo_sqlite
3837

3938
- uses: ramsey/composer-install@3.1.1
4039
with:

.github/workflows/docs-check.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
coverage: none
3434
php-version: "${{ matrix.php-version }}"
3535
ini-values: memory_limit=-1, opcache.enable_cli=1
36-
extensions: pdo_sqlite
3736

3837
- uses: ramsey/composer-install@3.1.1
3938
with:
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Mutation tests on diff"
4+
5+
on:
6+
pull_request:
7+
8+
jobs:
9+
mutation-tests-diff:
10+
name: "Mutation tests on diff"
11+
12+
runs-on: ${{ matrix.operating-system }}
13+
14+
strategy:
15+
matrix:
16+
dependencies:
17+
- "locked"
18+
php-version:
19+
- "8.5"
20+
operating-system:
21+
- "ubuntu-latest"
22+
23+
steps:
24+
- name: "Checkout"
25+
uses: actions/checkout@v6
26+
with:
27+
fetch-depth: 0
28+
29+
- name: "Install PHP"
30+
uses: "shivammathur/setup-php@2.36.0"
31+
with:
32+
coverage: "pcov"
33+
php-version: "${{ matrix.php-version }}"
34+
ini-values: memory_limit=-1
35+
extensions: pdo_sqlite
36+
37+
- uses: ramsey/composer-install@3.1.1
38+
with:
39+
dependency-versions: ${{ matrix.dependencies }}
40+
41+
- name: "Infection"
42+
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"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Mutation tests"
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- "[0-9]+.[0-9]+.x"
10+
- "renovate/*"
11+
12+
jobs:
13+
mutation-tests:
14+
name: "Mutation tests"
15+
16+
runs-on: ${{ matrix.operating-system }}
17+
18+
strategy:
19+
matrix:
20+
dependencies:
21+
- "locked"
22+
php-version:
23+
- "8.5"
24+
operating-system:
25+
- "ubuntu-latest"
26+
27+
steps:
28+
- name: "Checkout"
29+
uses: actions/checkout@v6
30+
31+
- name: "Install PHP"
32+
uses: "shivammathur/setup-php@2.36.0"
33+
with:
34+
coverage: "pcov"
35+
php-version: "${{ matrix.php-version }}"
36+
ini-values: memory_limit=-1
37+
extensions: pdo_sqlite
38+
39+
- uses: ramsey/composer-install@3.1.1
40+
with:
41+
dependency-versions: ${{ matrix.dependencies }}
42+
43+
- name: "Infection"
44+
run: "vendor/bin/infection --threads=max"
45+
env:
46+
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

.github/workflows/phpstan.yml

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

@@ -34,7 +34,6 @@ jobs:
3434
coverage: "pcov"
3535
php-version: "${{ matrix.php-version }}"
3636
ini-values: memory_limit=-1
37-
extensions: pdo_sqlite
3837

3938
- uses: ramsey/composer-install@3.1.1
4039
with:

.github/workflows/phpunit.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ jobs:
2424
- "8.2"
2525
- "8.3"
2626
- "8.4"
27+
- "8.5"
2728
operating-system:
2829
- "ubuntu-latest"
2930
- "windows-latest"
3031
include:
3132
- dependencies: "locked"
32-
php-version: "8.4"
33+
php-version: "8.5"
3334
operating-system: "ubuntu-latest"
3435
- dependencies: "locked"
35-
php-version: "8.4"
36+
php-version: "8.5"
3637
operating-system: "windows-latest"
3738
steps:
3839
- name: "Checkout"

.github/workflows/psalm.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ phpunit.xml
44
.phpunit.cache
55
.phpcs-cache
66
phpstan.neon
7+
infection.html
8+
infection.log

Makefile

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,20 @@ phpstan: vendor
2020
phpstan-baseline: vendor ## run phpstan static code analyser
2121
php -d memory_limit=312M vendor/bin/phpstan analyse --generate-baseline
2222

23-
.PHONY: psalm
24-
psalm: vendor ## run psalm static code analyser
25-
vendor/bin/psalm
26-
27-
.PHONY: psalm-baseline
28-
psalm-baseline: vendor ## run psalm static code analyser
29-
vendor/bin/psalm --update-baseline --set-baseline=baseline.xml
30-
31-
3223
.PHONY: phpunit
3324
phpunit: vendor ## run phpunit tests
3425
XDEBUG_MODE=coverage vendor/bin/phpunit
3526

27+
.PHONY: infection
28+
infection: vendor ## run infection
29+
php -d memory_limit=312M vendor/bin/infection --threads=5
30+
31+
.PHONY: infection-diff
32+
infection-diff: vendor ## run infection on differences
33+
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
34+
3635
.PHONY: static
37-
static: psalm phpstan phpcs-check ## run static analyser
36+
static: phpstan phpcs-check ## run static analyser
3837

3938
test: phpunit ## run tests
4039

@@ -67,7 +66,3 @@ docs-php-lint: docs-extract-php
6766
.PHONY: docs-phpcs
6867
docs-phpcs: docs-extract-php
6968
vendor/bin/phpcbf docs_php --exclude=SlevomatCodingStandard.TypeHints.DeclareStrictTypes || true
70-
71-
.PHONY: docs-psalm
72-
docs-psalm: docs-extract-php
73-
vendor/bin/psalm --config=psalm_docs.xml

0 commit comments

Comments
 (0)