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
3 changes: 2 additions & 1 deletion .harness.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"mode": "enforce",
"ratchet": {
"phpstan_level": 5,
"phpstan_baseline": 58
"phpstan_baseline": 58,
"coverage": 53
}
}
5 changes: 3 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Pollora is a Laravel & WordPress integration framework that creates a "sweet ble
ddev exec --dir /var/www/html/vendor/pollora/framework composer test

# Individual test commands
ddev exec --dir /var/www/html/vendor/pollora/framework composer test:unit # Run PHPUnit tests with coverage (requires 100% coverage)
ddev exec --dir /var/www/html/vendor/pollora/framework composer test:unit # Run the Pest tests
ddev exec --dir /var/www/html/vendor/pollora/framework composer test:types # Run PHPStan static analysis
ddev exec --dir /var/www/html/vendor/pollora/framework composer test:lint # Test code formatting with Pint
ddev exec --dir /var/www/html/vendor/pollora/framework composer test:refacto # Test refactoring rules with Rector (dry-run)
Expand All @@ -25,7 +25,8 @@ ddev exec --dir /var/www/html/vendor/pollora/framework composer refacto
```

### Key Quality Standards
- **Test Coverage**: 100% test coverage is required (`--min=100`)
- **Type Coverage**: at least 98% (`composer test:type-coverage`, enforced by the CI)
- **Line Coverage**: tracked, not a fixed target. The Harness ratchet (`coverage` in `.harness.json`) fails a change that lowers it, so a pull request that adds code adds the tests that keep the figure up
- **Static Analysis**: PHPStan level 5 with WordPress and Laravel extensions
- **Code Style**: Laravel Pint for PHP formatting, Prettier for JS/MD/YAML
- **Refactoring**: Rector with Laravel-specific rules
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ outlines our guidelines and conventions.
composer test
```
This executes Rector, Pint, PHPStan and the unit tests.
- Pull requests must pass the CI pipeline. Aim for 100% coverage as enforced by
the test configuration.
- Pull requests must pass the CI pipeline. A pull request must not lower
the line coverage recorded in `.harness.json`, and the type coverage stays at 98% or more.

## Commit Messages

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Learn more:

```bash
composer test # Run all checks (Rector, Pint, PHPStan, Pest, type coverage)
composer test:unit # Run Pest tests with 100% coverage requirement
composer test:unit # Run the Pest tests
composer test:types # Run PHPStan static analysis
composer test:lint # Check code style with Pint
composer test:refacto # Check refactoring rules with Rector
Expand Down
Loading