Skip to content

Commit ab80c28

Browse files
committed
Replace Psalm with PHPStan, add Infection, bump PHP to 8.2+
- Replace vimeo/psalm with phpstan/phpstan ^2.1 - Add infection/infection ^0.29 - Bump rector/rector to ^2.0 (required for PHPStan 2) - Bump PHP requirement to >=8.2 - Add bump-after-update config - Remove PHP 8.1 from CI matrix - Add CLAUDE.md
1 parent 8b1c51a commit ab80c28

File tree

3 files changed

+46
-6
lines changed

3 files changed

+46
-6
lines changed

.github/workflows/build.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
php-versions:
19-
- "8.1"
2019
- "8.2"
2120
- "8.3"
2221
- "8.4"

CLAUDE.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is a Composer meta-package (`setono/code-quality-pack`) that bundles PHP code quality tools into a single dev dependency. It contains no source code — only `composer.json` defining the bundled tools:
8+
9+
- **ergebnis/composer-normalize** — composer.json normalization
10+
- **rector/rector** — automated refactoring
11+
- **sylius-labs/coding-standard** — coding standards (PHP CodeSniffer based)
12+
- **vimeo/psalm** — static analysis
13+
14+
## Commands
15+
16+
```bash
17+
# Install dependencies
18+
composer install
19+
20+
# Validate composer.json
21+
composer validate --strict
22+
23+
# Check composer.json normalization
24+
composer normalize --dry-run
25+
26+
# Apply composer.json normalization
27+
composer normalize
28+
```
29+
30+
## CI
31+
32+
The GitHub Actions workflow (`.github/workflows/build.yaml`) runs on PHP 8.1–8.4 and validates `composer.json` (strict mode + normalization check). There are no tests to run.
33+
34+
## Notes
35+
36+
- `composer.lock` is committed to version control
37+
- The `dealerdirect/phpcodesniffer-composer-installer` plugin is explicitly disallowed in composer config
38+
- Psalm supports both v5 and v6 (`^5.26.1 || ^6.10.3`)

composer.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,20 @@
44
"license": "MIT",
55
"type": "library",
66
"require": {
7-
"php": ">=8.1",
7+
"php": ">=8.2",
88
"ergebnis/composer-normalize": "^2.47",
9-
"rector/rector": "^1.2.10",
10-
"sylius-labs/coding-standard": "^4.4",
11-
"vimeo/psalm": "^5.26.1 || ^6.10.3"
9+
"infection/infection": "^0.29",
10+
"phpstan/phpstan": "^2.1",
11+
"rector/rector": "^2.0",
12+
"sylius-labs/coding-standard": "^4.4"
1213
},
1314
"config": {
1415
"allow-plugins": {
1516
"dealerdirect/phpcodesniffer-composer-installer": false,
16-
"ergebnis/composer-normalize": true
17+
"ergebnis/composer-normalize": true,
18+
"infection/extension-installer": true
1719
},
20+
"bump-after-update": true,
1821
"sort-packages": true
1922
}
2023
}

0 commit comments

Comments
 (0)