Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/matrix.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"include": [
{ "php": "8.2" },
{ "php": "8.3" }
{ "php": "8.3" },
{ "php": "8.4" }
]
}
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -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",
Expand Down
15 changes: 9 additions & 6 deletions docs/Support.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
<MixedArgument errorLevel="suppress"/>
<MixedArgumentTypeCoercion errorLevel="suppress"/>
<MixedAssignment errorLevel="suppress"/>
<MixedInferredReturnType errorLevel="suppress"/>
<MixedReturnStatement errorLevel="suppress"/>
<DeprecatedClass errorLevel="suppress"/>
<DeprecatedInterface errorLevel="suppress"/>
<MissingOverrideAttribute errorLevel="suppress"/>
</issueHandlers>

<plugins>
Expand Down
11 changes: 11 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
[
Expand Down
8 changes: 5 additions & 3 deletions src/ServiceProviderAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

// @php-cs-fixer-ignore static_lambda

namespace Auth0\Laravel;

use Auth0\Laravel\Auth\Guard;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Loading