diff --git a/.github/workflows/matrix.json b/.github/workflows/matrix.json
index 68634de..a827963 100644
--- a/.github/workflows/matrix.json
+++ b/.github/workflows/matrix.json
@@ -1,6 +1,7 @@
{
"include": [
{ "php": "8.2" },
- { "php": "8.3" }
+ { "php": "8.3" },
+ { "php": "8.4" }
]
}
diff --git a/composer.json b/composer.json
index 29482fa..93294a0 100644
--- a/composer.json
+++ b/composer.json
@@ -38,9 +38,9 @@
"php": "^8.2",
"ext-json": "*",
"auth0/auth0-php": "^8.19",
- "illuminate/contracts": "^11 || ^12",
- "illuminate/http": "^11 || ^12",
- "illuminate/support": "^11 || ^12",
+ "illuminate/contracts": "^11 || ^12 || ^13",
+ "illuminate/http": "^11 || ^12 || ^13",
+ "illuminate/support": "^11 || ^12 || ^13",
"psr-discovery/all": "^1",
"psr/cache": "^2 || ^3"
},
@@ -60,7 +60,7 @@
"spatie/laravel-ray": "^1.40",
"squizlabs/php_codesniffer": "^3",
"symfony/cache": "^6 || ^7",
- "vimeo/psalm": "^5",
+ "vimeo/psalm": "^5 || ^6",
"wikimedia/composer-merge-plugin": "^2"
},
"minimum-stability": "dev",
diff --git a/docs/Support.md b/docs/Support.md
index 7a1251b..bad572f 100644
--- a/docs/Support.md
+++ b/docs/Support.md
@@ -6,12 +6,15 @@ You will also need [Composer](https://getcomposer.org/) and an [Auth0 account](h
### Supported Laravel Releases
-The next major release of Laravel is forecasted for Q1 2025. We anticipate supporting it upon release.
-
-| Laravel | SDK | PHP | Supported Until |
-| ---------------------------------------------- | ----- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------ |
-| [11.x](https://laravel.com/docs/11.x/releases) | 7.13+ | [8.3](https://www.php.net/releases/8.3/en.php) | Approx. [March 2026](https://laravel.com/docs/11.x/releases#support-policy) (EOL for Laravel 11) |
-| | | [8.2](https://www.php.net/releases/8.2/en.php) | Approx. [Dec 2025](https://www.php.net/supported-versions.php) (EOL for PHP 8.2) |
+| Laravel | SDK | PHP | Supported Until |
+| ---------------------------------------------- | ------ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------ |
+| [13.x](https://laravel.com/docs/13.x/releases) | 7.21+ | [8.4](https://www.php.net/releases/8.4/en.php) | Approx. [Dec 2028](https://www.php.net/supported-versions.php) (EOL for PHP 8.4) |
+| | | [8.3](https://www.php.net/releases/8.3/en.php) | Approx. [March 2028](https://laravel.com/docs/13.x/releases#support-policy) (EOL for Laravel 13) |
+| [12.x](https://laravel.com/docs/12.x/releases) | 7.16+ | [8.4](https://www.php.net/releases/8.4/en.php) | Approx. [Dec 2028](https://www.php.net/supported-versions.php) (EOL for PHP 8.4) |
+| | | [8.3](https://www.php.net/releases/8.3/en.php) | Approx. [Feb 2027](https://laravel.com/docs/12.x/releases#support-policy) (EOL for Laravel 12) |
+| | | [8.2](https://www.php.net/releases/8.2/en.php) | Approx. [Dec 2026](https://www.php.net/supported-versions.php) (EOL for PHP 8.2) |
+| [11.x](https://laravel.com/docs/11.x/releases) | 7.13+ | [8.3](https://www.php.net/releases/8.3/en.php) | Approx. [March 2026](https://laravel.com/docs/11.x/releases#support-policy) (EOL for Laravel 11) |
+| | | [8.2](https://www.php.net/releases/8.2/en.php) | Approx. [Dec 2026](https://www.php.net/supported-versions.php) (EOL for PHP 8.2) |
We strive to support all actively maintained Laravel releases, prioritizing support for the latest major version with our SDK. If a new Laravel major introduces breaking changes, we may have to end support for past Laravel versions earlier than planned.
diff --git a/psalm.xml.dist b/psalm.xml.dist
index 5256e8b..c657a15 100644
--- a/psalm.xml.dist
+++ b/psalm.xml.dist
@@ -21,10 +21,10 @@
-
+
diff --git a/rector.php b/rector.php
index a0fee44..054ea85 100644
--- a/rector.php
+++ b/rector.php
@@ -223,6 +223,17 @@
__DIR__ . '/src',
]);
+ // Laravel AuthManager::extend() resolves callbacks in a way that breaks with
+ // static arrow functions on Laravel 13; keep non-static `fn` here.
+ $rectorConfig->skip([
+ StaticArrowFunctionRector::class => [
+ __DIR__ . '/src/ServiceProviderAbstract.php',
+ ],
+ StaticClosureRector::class => [
+ __DIR__ . '/src/ServiceProviderAbstract.php',
+ ],
+ ]);
+
$rectorConfig->ruleWithConfiguration(
RenameFunctionRector::class,
[
diff --git a/src/ServiceProviderAbstract.php b/src/ServiceProviderAbstract.php
index 51770e4..e8d0dc9 100644
--- a/src/ServiceProviderAbstract.php
+++ b/src/ServiceProviderAbstract.php
@@ -2,6 +2,8 @@
declare(strict_types=1);
+// @php-cs-fixer-ignore static_lambda
+
namespace Auth0\Laravel;
use Auth0\Laravel\Auth\Guard;
@@ -34,8 +36,8 @@ final public function boot(
$this->mergeConfigFrom(implode(DIRECTORY_SEPARATOR, [__DIR__, '..', 'config', 'auth0.php']), 'auth0');
$this->publishes([implode(DIRECTORY_SEPARATOR, [__DIR__, '..', 'config', 'auth0.php']) => config_path('auth0.php')], 'auth0');
- $auth->extend('auth0.authenticator', static fn (Application $app, string $name, array $config): AuthenticationGuard => new AuthenticationGuard($name, $config));
- $auth->extend('auth0.authorizer', static fn (Application $app, string $name, array $config): AuthorizationGuard => new AuthorizationGuard($name, $config));
+ $auth->extend('auth0.authenticator', fn (Application $app, string $name, array $config): AuthenticationGuard => new AuthenticationGuard($name, $config));
+ $auth->extend('auth0.authorizer', fn (Application $app, string $name, array $config): AuthorizationGuard => new AuthorizationGuard($name, $config));
$auth->provider('auth0.provider', static fn (Application $app, array $config): UserProvider => new UserProvider($config));
$router->aliasMiddleware('guard', GuardMiddleware::class);
@@ -149,7 +151,7 @@ final public function registerDeprecated(
Router $router,
AuthManager $auth,
): void {
- $auth->extend('auth0.guard', static fn (Application $app, string $name, array $config): Guard => new Guard($name, $config));
+ $auth->extend('auth0.guard', fn (Application $app, string $name, array $config): Guard => new Guard($name, $config));
$router->aliasMiddleware('auth0.authenticate.optional', AuthenticateOptionalMiddleware::class);
$router->aliasMiddleware('auth0.authenticate', AuthenticateMiddleware::class);