chore: modernise package tooling and drop legacy support - #247
Conversation
Require PHP ^8.3 (8.2 is security-only until Dec 2026) and drop the Laravel 11 constraint, which pinned illuminate/support to a PHP 8.2 floor. Upgrade PHPUnit 9 -> 12.5 and migrate @test annotations to attributes; 12.5 is the newest major that still supports PHP 8.3. Remove the Lumen branch from the ServiceProvider. Lumen's final release (v11.2.0) requires illuminate/support ^11.0, so it can no longer resolve against this package. The SOCIALITEPROVIDERS_STATELESS reads are kept, as users may define the constant themselves. Declare clientId/clientSecret/redirectUrl on OAuth1\Server to fix dynamic property deprecations on PHP 8.4+. Run CI on 8.3, 8.4 and 8.5.
Run pint --test in its own Lint workflow rather than as a step in the test matrix, so a style failure does not mask the test results. Pint is installed via setup-php instead of require-dev, keeping it out of the package's dependency graph.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #247 +/- ##
============================================
+ Coverage 55.10% 56.72% +1.62%
- Complexity 78 79 +1
============================================
Files 10 10
Lines 245 238 -7
============================================
Hits 135 135
+ Misses 110 103 -7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The rewritten phpunit.xml.dist declared coverage reports unconditionally, so PHPUnit warned about the missing driver on the 8.3 and 8.4 legs, which run with coverage disabled. Combined with failOnWarning that aborted the run before any test executed. Move the clover and text report flags onto the coverage job instead, and stop requesting the xdebug extension when coverage is none.
There was a problem hiding this comment.
Pull request overview
This PR modernises the package for current PHP/Laravel versions by raising the PHP floor, updating key dependencies, migrating the test suite to PHPUnit 12, and simplifying runtime integration by removing unreachable Lumen-specific logic. It also refreshes CI and documentation to match the new support baseline.
Changes:
- Upgrade runtime + dev dependencies (PHP
^8.3, dropilluminate/support:^11, bump Socialite, PHPUnit 12.5, Mockery 1.6). - Update tests/config for PHPUnit 12 (migrate
@test→#[Test], refreshphpunit.xml.distschema, remove deprecated reflection usage). - Remove Lumen-specific branches from the service provider; update CI workflows and README links/badges.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/UserTest.php | Migrates @test to #[Test] for PHPUnit 12 compatibility. |
| tests/ServiceProviderTest.php | Migrates @test to #[Test] for PHPUnit 12 compatibility. |
| tests/OAuthTwoTest.php | Migrates tests to #[Test], renames test methods, removes deprecated reflection call. |
| tests/OAuth2ProviderTest.php | Migrates @test to #[Test] for PHPUnit 12 compatibility. |
| tests/OAuth1ProviderTest.php | Migrates @test to #[Test] for PHPUnit 12 compatibility. |
| tests/ConfigTest.php | Migrates @test to #[Test] for PHPUnit 12 compatibility. |
| tests/ConfigRetrieverTest.php | Migrates @test to #[Test] for PHPUnit 12 compatibility. |
| src/ServiceProvider.php | Removes Lumen-specific logic; simplifies event firing to Laravel-only path. |
| src/OAuth1/Server.php | Declares config-set properties to avoid dynamic-property deprecations. |
| README.md | Updates badges and links; removes outdated references and Lumen messaging. |
| phpunit.xml.dist | Updates to PHPUnit 12.5 schema; moves coverage include to <source>. |
| composer.json | Raises PHP floor and updates dependency constraints/tooling versions. |
| .github/workflows/test.yml | Updates PHP matrix and PHPUnit invocation; adds explicit coverage run. |
| .github/workflows/lint.yml | Adds Pint lint workflow (currently repository-wide). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Modernises the package's dependencies, test tooling and CI matrix.
PHP & Laravel
phpto^8.3. 8.2 is security-only until Dec 2026 and receives no bug fixes.illuminate/support: ^11.0, keeping^12.0 || ^13.0. L11 permits PHP 8.2, which conflicts with the new floor.laravel/socialiteto^5.29.Testing
^9.0→^12.5, and Mockery to^1.6.@testannotations to#[Test]attributes (annotations were removed in PHPUnit 12).phpunit.xml.distfor the 12.5 schema, dropping attributes removed in 10+ (convertErrorsToExceptions,backupStaticAttributes,verbose) and moving<coverage><include>to<source>.clientId/clientSecret/redirectUrlonOAuth1\Server.ConfigTrait::setConfig()assigned them without declaration, which is deprecated on PHP 8.4+.ReflectionProperty::setAccessible()call, deprecated in PHP 8.5.The suite passes on PHP 8.5 with no deprecations.
Lumen
Removes the Lumen branch from
ServiceProvider. Lumen's final release (v11.2.0, Nov 2024) requiresilluminate/support: ^11.0, so it can no longer resolve against this package once L11 is dropped — the branch is unreachable.The
SOCIALITEPROVIDERS_STATELESSreads inSocialiteWasCalledandOAuth1\AbstractProviderare deliberately kept, since users may define the constant themselves to force stateless mode. Only the Lumen-specific auto-define is gone.CI
--no-suggest(a no-op since Composer 2) andphpunit -v(removed in PHPUnit 10).Lintworkflow runningpint --test.pint.jsonwas already committed but was never actually enforced. Pint is installed viasetup-php, so it stays out of the package's dependency graph.Docs
Replace the dead Travis and SensioLabsInsight badges with the Actions badge, point Laravel doc links at 13.x, drop two Laravel 5-era Laracasts links, update
socialiteproviders.netlify.applinks to the live domain, and remove the "Lumen usage is easy" line.Note: this is a breaking change (PHP floor, L11 drop, Lumen removal) and needs a major version bump.