Skip to content

Conversation

@jorgemudry
Copy link
Owner

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.3
  • orchestra/testbench: ^6.0|^7.0|^8.0 → ^9.0
  • pestphp/pest: ^1.22 → ^2.35|^3.0
  • pestphp/pest-plugin-laravel: ^1.4 → ^2.4|^3.0
  • phpstan/phpstan: ^1.10 → ^1.12
  • phpunit/phpunit: ^9.0 → ^10.5|^11.0
  • laravel/pint: ^1.5|^1.6 → ^1.18
  • Removed pestphp/pest-plugin-mock (bundled in Pest 2.x+)

Code Updates:

  • Updated AuthenticatedUser ArrayAccess method signatures for PHP 8.3 compatibility (proper mixed type hints)
  • Removed LumenServiceProvider (Lumen is no longer maintained)
  • Fixed typo in GetAttributesFromResponseAction ($respose$response)
  • Refactored MakeValidationRequestActionTest to use Http::fake() instead of Mockery alias mocking

CI Updates:

  • Updated test matrix to PHP 8.3/8.4 and Laravel 11
  • Updated actions/checkout from v2 to v4
  • Added PHPStan static analysis step
  • Removed legacy PHP 8.0-8.2 and Laravel 8-10 combinations

Why

  • Laravel 11 requires PHP 8.2+ and has updated dependencies
  • PHP 8.3 provides better type safety and performance
  • Pest 2.x/3.x and PHPUnit 10/11 are the current stable releases
  • Lumen has been effectively abandoned by Laravel

How to Validate

# Install dependencies
composer install

# Run tests
composer test

# Run static analysis
composer stan

# Run code style check
composer pint --test

Breaking Changes

This is a breaking change. Users must be on:

  • PHP 8.3 or higher
  • Laravel 11 or higher

Consider tagging this as v3.0.0 to indicate the major version bump.

- 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+
Copy link

Copilot AI left a 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 LumenServiceProvider as 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
Copy link

Copilot AI left a 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.

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.

2 participants