Require PHP 8.1+, modernize toolchain#18
Merged
Merged
Conversation
…ling commas) Raise the PHP floor to ^8.1 and modernize the project along the lines of the recently-migrated ShipMonk OSS packages (name-collision-detector, composer-dependency-analyser): - composer.json: php ^7.4 || ^8.0 -> ^8.1; phpunit ^9.6 -> ^10.5.62 - phpunit.xml.dist: migrate to PHPUnit 10 schema (coverage metadata, failOnAllIssues, cacheDirectory) - phpstan.neon.dist: phpVersion min 80100, max 80599 - phpcs.xml.dist: php_version 80100 (enables PHP 8.0+ trailing-comma sniff) - CI: drop 7.4/8.0, split into checks (8.5) + tests matrix (8.1-8.5, prefer-lowest/prefer-stable) - source: strpos() === false -> str_contains(); add trailing commas to multi-line declarations (auto-fixed) Co-Authored-By: Claude Code Claude-Session: https://claude.ai/code/session_01CZwdB4QFe6kdiZQufEXhGN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raises the PHP floor to
^8.1and modernizes the project, following the recently-migrated ShipMonk OSS packages (name-collision-detector,composer-dependency-analyser).Changes
Version floor & dependencies
composer.json:php^7.4 || ^8.0→^8.1;phpunit/phpunit^9.6→^10.5.62phpstan.neon.dist:phpVersion.min70400→80100,max80499→80599phpcs.xml.dist:php_version70400→80100PHPUnit 10 config migration (
phpunit.xml.dist)beStrictAboutCoversAnnotation→beStrictAboutCoverageMetadatabeStrictAboutTodoAnnotatedTests/failOnRisky/failOnWarning→failOnAllIssues+displayDetailsOnAllIssuescacheResultFile→cacheDirectoryCI (
.github/workflows/checks.yml)checksjob (fullcomposer checkon PHP 8.5) and atestsmatrix over PHP 8.1–8.5 ×prefer-lowest/prefer-stable(Linux-only —DocCommentSpacingTestexecsvendor/bin/phpcsdirectly, which won't work on Windows)Source modernization
strpos(…) === false→!str_contains(…)inDoubleArrowSpacingSniffandDocCommentSpacingTestphp_versionbump activates slevomat'sRequireTrailingCommaInDeclaration(a PHP 8.0+ feature previously suppressed); auto-fixed across 9 filesThe sniffs were already modern (strict_types, typed signatures,
final, generics) and are stateless, so there were no properties/constructors to promote.process(File, $pointer)keeps$pointeruntyped because theSniffinterface declares it untyped.Verification
Full
composer checkpasses (cs, phpstan level max, 22 tests, normalize/validate, dependency analyser, collision detector) on bothprefer-stable(PHPUnit 10.5.63) andprefer-lowest(PHPUnit 10.5.62, slevomat 8.28.0).Note
Backward-incompatible (raised PHP floor) — should be released as
0.3.0.Co-Authored-By: Claude Code