Skip to content

Upgrade to Laravel 10+ and PHP 8.1+ with modern tooling#1

Merged
designvoid merged 1 commit into2.0from
claude/modernize-php8-laravel-aJuCg
Jan 28, 2026
Merged

Upgrade to Laravel 10+ and PHP 8.1+ with modern tooling#1
designvoid merged 1 commit into2.0from
claude/modernize-php8-laravel-aJuCg

Conversation

@designvoid
Copy link

Summary

This PR modernizes the package by upgrading minimum requirements to PHP 8.1+ and Laravel 10.x, while adding GitHub Actions CI/CD and improving code quality standards.

Key Changes

  • PHP & Laravel Requirements: Updated minimum PHP version to 8.1 and added support for Laravel 10.x, 11.x, and 12.x
  • CI/CD Migration: Replaced Travis CI with GitHub Actions workflow that tests against PHP 8.1-8.3 and Laravel 10-12 combinations
  • Code Quality:
    • Added declare(strict_types=1) to all source files
    • Added proper type hints and return type declarations throughout
    • Updated all handler classes with explicit exception type hints
    • Improved property type declarations with nullable types
  • Configuration Updates:
    • Updated Scrutinizer CI config to use PHP 8.2 and proper coverage file naming
    • Enhanced StyleCI config with risky mode enabled
    • Removed deprecated .travis.yml
  • Dependencies: Updated composer.json with explicit Laravel framework dependencies and modern test tooling (PHPUnit 10+, Testbench 8-10)
  • PHPUnit Config: Modernized phpunit.xml to use current schema and best practices
  • Documentation: Updated README with new requirements, modern code examples, and upgrade guide from 2.x

Implementation Details

  • All exception handlers now properly type-hint their exception parameters
  • Status codes are consistently cast to strings per JsonAPI specification
  • Return types use union types (ErrorHandledInterface|ErrorHandledCollectionInterface)
  • Improved null safety with proper nullable type declarations
  • GitHub Actions matrix tests all supported PHP/Laravel combinations with proper exclusions for incompatible versions

https://claude.ai/code/session_01D66jVcfUoruENdy4YFLxPo

- Update composer.json to require PHP ^8.1 and Laravel 10/11/12
- Add strict types declarations to all PHP files
- Update all type hints from Exception to Throwable
- Add proper return types and typed properties throughout
- Update PHPUnit configuration for version 10.x
- Replace Travis CI with GitHub Actions workflow
- Update tests for PHPUnit 10.x compatibility
- Update README with new requirements and upgrade guide

BREAKING CHANGES:
- Minimum PHP version is now 8.1
- Minimum Laravel version is now 10.0
- Status codes in JSON responses are now strings (per JsonAPI spec)
- Handler constructors now type-hint Throwable instead of Exception

https://claude.ai/code/session_01D66jVcfUoruENdy4YFLxPo
@designvoid designvoid merged commit 583029e into 2.0 Jan 28, 2026
7 checks passed
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