-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade package to Laravel 11 and PHP 8.3 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Update minimum PHP version from ^8.0 to ^8.3 - Update minimum Laravel version to 11.x (via orchestra/testbench ^9.0) - Update Pest from v1.x to v3.x and PHPUnit from v9 to v11 - Update all dev dependencies to latest compatible versions - Remove pestphp/pest-plugin-mock (now bundled in Pest 2.x+) Code changes: - Update AuthenticatedUser ArrayAccess method signatures for PHP 8.3 (add proper typed parameters: mixed $offset, mixed $value) - Remove deprecated LumenServiceProvider (Lumen is abandoned) - Fix typo in GetAttributesFromResponseAction ($respose -> $response) - Refactor MakeValidationRequestActionTest to use Http::fake() instead of Mockery alias mocking for better compatibility CI updates: - Update GitHub Actions to test PHP 8.3/8.4 with Laravel 11 - Update actions/checkout from v2 to v4 - Add PHPStan step to CI workflow - Remove legacy PHP 8.0-8.2 and Laravel 8-10 from test matrix BREAKING CHANGE: This version requires PHP 8.3+ and Laravel 11+
058d239 to
3efc0ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades the package to support Laravel 11.x and PHP 8.3+, dropping support for older versions. This is a breaking change that requires PHP 8.3+ and Laravel 11+.
Key Changes:
- Updated minimum PHP version from ^8.0 to ^8.3 and Laravel dependencies to version 11
- Modernized testing infrastructure with Pest 2.x/3.x, PHPUnit 10/11, and updated dev dependencies
- Enhanced PHP 8.3 type safety by updating ArrayAccess method signatures in
AuthenticatedUser - Removed
LumenServiceProvideras Lumen is no longer maintained
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| composer.json | Updated PHP to ^8.3, Laravel dependencies to v11, and modernized all dev dependencies (Pest, PHPUnit, PHPStan, Pint) |
| src/ValueObjects/AuthenticatedUser.php | Updated ArrayAccess method signatures for PHP 8.3 compatibility with proper mixed type hints; replaced trim() with mb_trim() |
| src/ValueObjects/AccessToken.php | Replaced trim() with mb_trim() for multibyte string support |
| src/Actions/GetAttributesFromResponseAction.php | Fixed typo in parameter name from $respose to $response |
| src/Providers/LumenServiceProvider.php | Removed entire file as Lumen is deprecated |
| tests/Unit/Actions/MakeValidationRequestActionTest.php | Refactored from Mockery alias mocking to Http::fake() for better testing practices |
| tests/Unit/AdapterTest.php | Added void return type hints to Mockery mock closures; removed leading backslash from Exception |
| tests/Unit/ValueObjects/AuthenticatedUserTest.php | Removed leading backslashes from class names (ArrayAccess, JsonSerializable) |
| tests/Unit/Actions/GetTokenFromRequestActionTest.php | Removed leading backslash from InvalidArgumentException |
| tests/Feature/RemoteTokenAuthGuardTest.php | Added strict types declaration, void return types, and modernized to arrow function syntax |
| .github/workflows/main.yml | Updated to PHP 8.3/8.4 with Laravel 11, upgraded actions/checkout to v4, added PHPStan step |
| CHANGELOG.md | Added comprehensive v1.0.0 release notes documenting all breaking changes and improvements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Revert mb_trim() to trim() for PHP 8.3 compatibility (mb_trim was introduced in PHP 8.4) - Add (string) cast in offsetUnset() for consistency with other ArrayAccess methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
This PR upgrades the package to support Laravel 11.x and PHP 8.3+ while dropping support for older versions.
What Changed
Composer Dependencies:
php: ^8.0 → ^8.3orchestra/testbench: ^6.0|^7.0|^8.0 → ^9.0pestphp/pest: ^1.22 → ^2.35|^3.0pestphp/pest-plugin-laravel: ^1.4 → ^2.4|^3.0phpstan/phpstan: ^1.10 → ^1.12phpunit/phpunit: ^9.0 → ^10.5|^11.0laravel/pint: ^1.5|^1.6 → ^1.18pestphp/pest-plugin-mock(bundled in Pest 2.x+)Code Updates:
AuthenticatedUserArrayAccess method signatures for PHP 8.3 compatibility (propermixedtype hints)LumenServiceProvider(Lumen is no longer maintained)GetAttributesFromResponseAction($respose→$response)MakeValidationRequestActionTestto useHttp::fake()instead of Mockery alias mockingCI Updates:
actions/checkoutfrom v2 to v4Why
How to Validate
Breaking Changes
This is a breaking change. Users must be on:
Consider tagging this as v3.0.0 to indicate the major version bump.