PHP 8.3+ modernization: native types, #[Override], quick wins - #72
Merged
Merged
Conversation
- PHP: ^8.2 -> ^8.3 (CI matrix: 8.3/8.4/8.5) - Laravel: drop 11.x, add 13.x (now 12+13) - Testbench: drop 9.x, add 11.x (now 10+11) - PHPUnit: drop ^10.0 constraint (now ^11.5 only) - Symfony Process: ^7.3.4 -> ^7.3.4|^8.0 (Laravel 13 compat) - Illuminate: drop ^11.0 constraint (now ^12.0|^13.0) - K8s CI matrix: 1.32.9/1.33.5/1.34.1 -> 1.33.10/1.34.6/1.35.3 - Remove Testbench 9.x compat property from TestCase - Run Pint to fix code style across src/ and tests/ - Update all docs, CLAUDE.md, AGENTS.md, agent config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add native type declarations, #[\Override] attributes, and modern PHP patterns throughout the codebase. Key changes: - Native typed properties and return types across all traits, kinds, instances, patches, auth providers, and cluster classes - #[\Override] attributes on all interface/parent implementations - Constructor promotion for PhpK8sException, JsonMergePatch, KubernetesCluster - Null-safe operator in AuthenticatesCluster::getAuthToken() - Replace call_user_func() with direct closure invocation - Static property types (?string, bool, string) in HasKind/HasNamespace/HasVersion and all 35+ Kind classes and test CRDs - Parameter types (mixed, union types) on previously untyped params - Update docs: PHP 8.2 -> 8.3 throughout, rename php-82-modernization.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cuppett
force-pushed
the
feat/update-version-matrix
branch
from
March 29, 2026 12:14
cba71e1 to
525cc6c
Compare
The deploy job already guards on push to main, so running the build on pull_requests was unnecessary CI overhead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
#[\Override]attributes to ~40+ methods that implement interfaces or override parent class methodsKubernetesCluster), null-safe operators, replacecall_user_funcwith direct closure invocationKey changes
Type safety:
?string,bool,string,array,?KubernetesCluster, etc.): staticreturn typesJsonPatch|array,string|array(exec/attach return real arrays for WebSocket responses)#[\Override]:RunsClusterOperationstrait methods implementingInteractsWithK8sClustertoArray()/toJson()across K8sResource, Instance, JsonPatch, JsonMergePatchTokenProviderInterfacesetUp(),getPackageProviders(),getEnvironmentSetUp()in TestCaseCorrectness fix:
exec()andattach()returnstring|array— HTTP path returns string, WebSocket upgrade path returns array; verified by integration testsTest plan
./vendor/bin/pint— cleanvendor/bin/psalm— cleanvendor/bin/phpunit— unit tests passCI=true vendor/bin/phpunit— 336 integration tests pass against minikube, 7 skipped (EKS/OpenShift)npm run docs:build— docs compile🤖 Generated with Claude Code