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: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

`bitapps/wp-validator` — a Composer library (PSR-4: `BitApps\WPValidator\` → [src/](src/)) providing Laravel-style validation and sanitization for WordPress. Public API and the full rule list are documented in [README.md](README.md); update it when adding a rule or sanitizer.

**PHP 7.2 is the floor.** No typed properties, no arrow functions, no null coalescing assignment, no union types. Return types on methods are used and fine. [rector.php](rector.php) pins `PhpVersion::PHP_72` and skips the typed-property rectors for this reason.
**PHP 7.4 is the floor.** No union types or other PHP 8+ syntax. Return types on methods are used and fine. [rector.php](rector.php) pins `PhpVersion::PHP_74` and skips the typed-property rectors.

## Commands

```bash
composer test:unit # full suite (Pest, --testdox, excludes group 'db')
./vendor/bin/pest tests/Rules/BetweenTest.php # single file
./vendor/bin/pest --filter='between accepts a length of zero' # single test by name
composer compat # PHPCompatibility check against PHP 7.2
composer compat # PHPCompatibility check against PHP 7.4
composer rector # Rector dry-run (never auto-applies)
```

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
},

"require": {
"php": ">=7.2"
"php": ">=7.4"
},
"require-dev": {
"pestphp/pest": "^2.18",
Expand Down
4 changes: 2 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
->withPaths([
__DIR__ . '/src',
])
->withPhpVersion(PhpVersion::PHP_72)
->withPhpVersion(PhpVersion::PHP_74)
->withSkip([
UnwrapFutureCompatibleIfPhpVersionRector::class,
TypedPropertyFromStrictConstructorRector::class,
Expand All @@ -29,4 +29,4 @@
// strictBooleans: true,
// naming: true,
)
->withSets([SetList::PHP_72]);
->withSets([SetList::PHP_74]);
Loading