Skip to content

Drop PHP 7.4 and 8.0 support, modernize to PHP 8.1+#59

Merged
janedbal merged 3 commits into
masterfrom
drop-php-8-support
May 18, 2026
Merged

Drop PHP 7.4 and 8.0 support, modernize to PHP 8.1+#59
janedbal merged 3 commits into
masterfrom
drop-php-8-support

Conversation

@janedbal
Copy link
Copy Markdown
Member

@janedbal janedbal commented May 18, 2026

Summary

  • Bump composer.json php constraint from ^7.4 || ^8.0 to ^8.1
  • Drop 7.4 and 8.0 from CI test matrix
  • Bump phpcs php_version to 80100 (and drop the now-default DisallowTrailingCommaInDeclaration override)
  • Bump phpstan phpVersion to 80100
  • Modernize source code:
    • Promote constructor properties to readonly
    • Trailing commas in multi-line function declarations
    • switchmatch in HandlerFactory
    • Native mixed type in NeonHelper::encode()
    • Simplify BaselineSplitter::groupErrorsByIdentifier() — drop unreachable branch now that PHPStan correctly infers the union shape
    • Drop now-redundant @phpstan-ignore offsetAccess.notFound

Inspired by shipmonk-rnd/phpstan-rules#361 and shipmonk-rnd/dead-code-detector#296.

Test plan

  • composer check is green (composer-normalize, phpcs, phpstan, phpunit, collision detector, dep analyser)
  • CI matrix passes on 8.1 – 8.5

Co-Authored-By: Claude Code

- Bump composer.json php constraint to ^8.1
- Drop 7.4/8.0 from CI matrix
- Bump phpcs/phpstan php_version to 80100
- Promote constructor properties to readonly
- Add trailing commas in multi-line declarations
- Replace switch with match in HandlerFactory
- Use native mixed type in NeonHelper

Co-Authored-By: Claude Code
@janedbal janedbal changed the title Drop PHP 8.0 support, modernize to PHP 8.1+ Drop PHP 7.4 and 8.0 support, modernize to PHP 8.1+ May 18, 2026
@janedbal janedbal marked this pull request as ready for review May 18, 2026 12:09
janedbal added 2 commits May 18, 2026 14:18
Restore runtime guard against malformed input; suppress the now-stricter
phpstan warnings (isset.offset, throws.unusedType) inline.

Co-Authored-By: Claude Code
The presence of message or rawMessage is guaranteed both by phpstan-src's
baseline writers and by BaselineHandler::decodeBaseline(), so the else
throw is truly unreachable.

Co-Authored-By: Claude Code
@janedbal janedbal merged commit ce267ce into master May 18, 2026
11 checks passed
@janedbal janedbal deleted the drop-php-8-support branch May 18, 2026 13:19
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