Skip to content

Commit 7ac57e9

Browse files
authored
Merge pull request #1138 from ergebnis/feature/synchronize
Enhancement: Synchronize with `ergebnis/php-cs-fixer-config-template`
2 parents c7849a9 + baac61c commit 7ac57e9

12 files changed

+294
-2015
lines changed

.gitattributes

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
/composer-require-checker.json export-ignore
1010
/composer.lock export-ignore
1111
/Makefile export-ignore
12-
/psalm-baseline.xml export-ignore
13-
/psalm.xml export-ignore
12+
/phpstan-baseline.neon export-ignore
13+
/phpstan.neon export-ignore
1414
/rector.php export-ignore

.github/CONTRIBUTING.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CONTRIBUTING
1+
# Contributing
22

33
We use [GitHub Actions](https://github.com/features/actions) as a continuous integration system.
44

@@ -72,7 +72,7 @@ to run a security analysis.
7272

7373
## Static Code Analysis
7474

75-
We use [`phpstan/phpstan`](https://github.com/phpstan/phpstan) and [`vimeo/psalm`](https://github.com/vimeo/psalm) to statically analyze the code.
75+
We use [`phpstan/phpstan`](https://github.com/phpstan/phpstan) to statically analyze the code.
7676

7777
Run
7878

@@ -82,15 +82,15 @@ make static-code-analysis
8282

8383
to run a static code analysis.
8484

85-
We also use the baseline feature of [`vimeo/psalm`](https://psalm.dev/docs/running_psalm/dealing_with_code_issues/#using-a-baseline-file).
85+
We also use the baseline feature of [`phpstan/phpstan`](https://phpstan.org/user-guide/baseline).
8686

8787
Run
8888

8989
```sh
9090
make static-code-analysis-baseline
9191
```
9292

93-
to regenerate the baseline in [`../psalm-baseline.xml`](../psalm-baseline.xml).
93+
to regenerate the baseline in [`../phpstan-baseline.neon`](../phpstan-baseline.neon).
9494

9595
:exclamation: Ideally, the baseline should shrink over time.
9696

.github/dependabot.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 2
44

55
updates:
66
- allow:
7-
- dependency-type: "direct"
7+
- dependency-type: "development"
88
commit-message:
99
include: "scope"
1010
prefix: "composer"
@@ -14,7 +14,7 @@ updates:
1414
open-pull-requests-limit: 10
1515
package-ecosystem: "composer"
1616
schedule:
17-
interval: "daily"
17+
interval: "weekly"
1818
versioning-strategy: "increase"
1919

2020
- commit-message:
@@ -26,4 +26,4 @@ updates:
2626
open-pull-requests-limit: 10
2727
package-ecosystem: "github-actions"
2828
schedule:
29-
interval: "daily"
29+
interval: "weekly"

.github/workflows/integrate.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ jobs:
327327
uses: "shivammathur/[email protected]"
328328
with:
329329
coverage: "none"
330-
extensions: "none, ctype, curl, dom, json, mbstring, opcache, pcntl, phar, posix, simplexml, tokenizer, xml, xmlwriter"
330+
extensions: "none, bcmath, ctype, curl, dom, intl, json, mbstring, opcache, pcntl, phar, posix, simplexml, tokenizer, xml, xmlwriter"
331331
php-version: "${{ matrix.php-version }}"
332332

333333
- name: "Set up problem matchers for PHP"
@@ -351,8 +351,8 @@ jobs:
351351
with:
352352
dependencies: "${{ matrix.dependencies }}"
353353

354-
- name: "Run vimeo/psalm"
355-
run: "vendor/bin/psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4"
354+
- name: "Run phpstan/phpstan"
355+
run: "vendor/bin/phpstan --ansi --configuration=phpstan.neon --memory-limit=-1"
356356

357357
tests:
358358
name: "Tests"

Makefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
it: refactoring coding-standards security-analysis static-code-analysis tests ## Runs the refactoring, coding-standards, security-analysis, static-code-analysis, and tests targets
33

44
.PHONY: code-coverage
5-
code-coverage: vendor ## Collects coverage from running unit tests with phpunit/phpunit
5+
code-coverage: vendor ## Collects code coverage from running unit tests with phpunit/phpunit
66
vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-text
77

88
.PHONY: coding-standards
@@ -32,14 +32,14 @@ security-analysis: vendor ## Runs a security analysis with composer
3232
composer audit
3333

3434
.PHONY: static-code-analysis
35-
static-code-analysis: vendor ## Runs a static code analysis with vimeo/psalm
36-
vendor/bin/psalm --config=psalm.xml --clear-cache
37-
vendor/bin/psalm --config=psalm.xml --show-info=false --stats --threads=4
35+
static-code-analysis: vendor ## Runs a static code analysis with phpstan/phpstan
36+
vendor/bin/phpstan clear-result-cache --configuration=phpstan.neon
37+
vendor/bin/phpstan --configuration=phpstan.neon --memory-limit=-1
3838

3939
.PHONY: static-code-analysis-baseline
40-
static-code-analysis-baseline: vendor ## Generates a baseline for static code analysis with vimeo/psalm
41-
vendor/bin/psalm --config=psalm.xml --clear-cache
42-
vendor/bin/psalm --config=psalm.xml --set-baseline=psalm-baseline.xml
40+
static-code-analysis-baseline: vendor ## Generates a baseline for static code analysis with phpstan/phpstan
41+
vendor/bin/phpstan clear-result-cache --configuration=phpstan.neon
42+
vendor/bin/phpstan --allow-empty-baseline --configuration=phpstan.neon --generate-baseline=phpstan-baseline.neon --memory-limit=-1
4343

4444
.PHONY: tests
4545
tests: vendor ## Runs unit and end-to-end tests with phpunit/phpunit

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
[![Renew](https://github.com/ergebnis/php-cs-fixer-config/workflows/Renew/badge.svg)](https://github.com/ergebnis/php-cs-fixer-config/actions)
77

88
[![Code Coverage](https://codecov.io/gh/ergebnis/php-cs-fixer-config/branch/main/graph/badge.svg)](https://codecov.io/gh/ergebnis/php-cs-fixer-config)
9-
[![Type Coverage](https://shepherd.dev/github/ergebnis/php-cs-fixer-config/coverage.svg)](https://shepherd.dev/github/ergebnis/php-cs-fixer-config)
109

1110
[![Latest Stable Version](https://poser.pugx.org/ergebnis/php-cs-fixer-config/v/stable)](https://packagist.org/packages/ergebnis/php-cs-fixer-config)
1211
[![Total Downloads](https://poser.pugx.org/ergebnis/php-cs-fixer-config/downloads)](https://packagist.org/packages/ergebnis/php-cs-fixer-config)

composer.json

+8-5
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@
3030
"ergebnis/phpunit-slow-test-detector": "^2.16.1",
3131
"ergebnis/rector-rules": "~1.2.0",
3232
"fakerphp/faker": "^1.24.1",
33-
"infection/infection": "~0.26.6",
33+
"phpstan/extension-installer": "^1.4.3",
34+
"phpstan/phpstan": "^1.12.10",
35+
"phpstan/phpstan-deprecation-rules": "^1.2.1",
36+
"phpstan/phpstan-phpunit": "^1.4.0",
37+
"phpstan/phpstan-strict-rules": "^1.6.1",
3438
"phpunit/phpunit": "^9.6.19",
35-
"psalm/plugin-phpunit": "~0.19.0",
3639
"rector/rector": "^1.2.10",
3740
"symfony/filesystem": "^5.0.0 || ^6.0.0",
38-
"symfony/process": "^5.0.0 || ^6.0.0",
39-
"vimeo/psalm": "^5.26.1"
41+
"symfony/process": "^5.0.0 || ^6.0.0"
4042
},
4143
"autoload": {
4244
"psr-4": {
@@ -52,7 +54,8 @@
5254
"allow-plugins": {
5355
"composer/package-versions-deprecated": true,
5456
"ergebnis/composer-normalize": true,
55-
"infection/extension-installer": true
57+
"infection/extension-installer": true,
58+
"phpstan/extension-installer": true
5659
},
5760
"audit": {
5861
"abandoned": "report"

0 commit comments

Comments
 (0)