Skip to content

Drop PHP 7.4/8.0 support, require PHP 8.1+#296

Merged
janedbal merged 3 commits intomasterfrom
php81plus
Mar 23, 2026
Merged

Drop PHP 7.4/8.0 support, require PHP 8.1+#296
janedbal merged 3 commits intomasterfrom
php81plus

Conversation

@janedbal
Copy link
Copy Markdown
Member

@janedbal janedbal commented Mar 2, 2026

Adopt native PHP 8.1 features throughout the codebase:

- Convert pseudo-enum interfaces (AccessType, ClassLikeKind, MemberType,
  NeverReportedReason) to native backed enums
- Use readonly constructor property promotion in many classes
- Replace strpos/substr idioms with str_starts_with/str_contains/str_ends_with
- Replace get_class() calls with ::class on objects
- Use match expressions instead of if/elseif/else chains
- Add named arguments for boolean/null literal parameters
- Allow trailing commas in function/method parameter lists
- Remove all PHP version guards and compatibility shims from tests and config
- Tighten PHPStan config (enforceReadonlyPublicProperty,
  enforceClosureParamNativeTypehint, remove ReflectionEnum ignore)
- Update CI matrices to PHP 8.1–8.5
Migrate code introduced in master after the branch was created:
- NetteTesterUsageProvider: readonly, trailing commas, str_contains
- FilterOutUnmatchedInlineIgnoresFormatter: readonly, trailing commas, str_contains, str_ends_with
- ReflectionUsageProvider: trailing commas
- ClassPropertyUsage: readonly on $callsHook
- Regenerate composer.lock

Co-Authored-By: Claude Code
@janedbal janedbal merged commit c40094d into master Mar 23, 2026
32 checks passed
@janedbal janedbal deleted the php81plus branch March 23, 2026 13:43
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