Skip to content

Require PHP 8.1+ and modernize codebase#18

Open
janedbal wants to merge 2 commits into
masterfrom
require-php-8.1
Open

Require PHP 8.1+ and modernize codebase#18
janedbal wants to merge 2 commits into
masterfrom
require-php-8.1

Conversation

@janedbal

@janedbal janedbal commented Jun 23, 2026

Copy link
Copy Markdown
Member

Drops PHP 7.4/8.0 support and aligns the project with the recent upgrades of sibling shipmonk OS libs (dead-code-detector, input-mapper, composer-dependency-analyser).

Changes

  • composer: require php: ^8.1, bump phpunit/phpunit to ^10.5, shipmonk/dead-code-detector to ^1.0; add editorconfig-checker/editorconfig-checker with a check:ec step wired into composer check. Dropped the now-invalid -vvv flag from check:tests (removed in PHPUnit 10).
  • phpunit.xml.dist: migrated to the PHPUnit 10 schema — removed dropped options (beStrictAboutCoversAnnotation, beStrictAboutTodoAnnotatedTests, cacheResultFile), switched to cacheDirectory, added <testsuites>/<source> and the modern failOn*/displayDetailsOn* strictness flags.
  • phpcs: php_version80100; removed the two PHP-7.4-era workarounds (the @dataProvider/AnnotationForbidden exclusion and the DisallowTrailingCommaInDeclaration onlySingleLine=false override) so the standard's defaults apply.
  • phpstan: phpVersion range → 8010080599.
  • RuleTestCase: use str_starts_with() instead of strpos(...) === 0; add the trailing commas now required in multi-line declarations.
  • CI: dropped 7.4/8.0. Full composer check runs across the Linux × PHP 8.1–8.5 matrix; a separate Windows job runs the test suite (Windows keeps coverage of the DIRECTORY_SEPARATOR path logic but cannot run editorconfig-checker, whose release ships no installable Windows binary — same reason sibling libs only lint on Linux).

composer check passes locally (also enforced by the pre-commit hook).

Co-Authored-By: Claude Code

janedbal added 2 commits June 23, 2026 09:54
Drop PHP 7.4/8.0 support and align with recent shipmonk OS lib upgrades
(dead-code-detector, input-mapper, composer-dependency-analyser):

- composer: require php ^8.1, phpunit ^10.5, dead-code-detector ^1.0;
  add editorconfig-checker with a check:ec step in `composer check`
- phpunit.xml.dist: migrate to the PHPUnit 10 schema
- phpcs: php_version 80100; drop PHP 7.4-era trailing-comma and
  @dataProvider workarounds so the standard's defaults apply
- phpstan: phpVersion range 80100-80599
- RuleTestCase: use str_starts_with(); add now-required trailing commas
- CI: drop 7.4/8.0 from the matrix

Co-Authored-By: Claude Code
Claude-Session: https://claude.ai/code/session_01PC9VQVcZV1UEDBSUusQ79g
editorconfig-checker has no installable Windows binary (its release
asset 404s), so the full `composer check` cannot run on Windows — same
reason sibling libs only lint on Linux. Keep Windows coverage for the
DIRECTORY_SEPARATOR path logic by running the test suite there.

Co-Authored-By: Claude Code
Claude-Session: https://claude.ai/code/session_01PC9VQVcZV1UEDBSUusQ79g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant