# Auth0 Laravel Package broken with composer update?

**URL:** <https://community.auth0.com/t/auth0-laravel-package-broken-with-composer-update/92590>\
**Category:** Get Help\
**Tags:** laravel\
**Created:** [October 18, 2022, 12:49am UTC](https://community.auth0.com/t/auth0-laravel-package-broken-with-composer-update/92590 "2022-10-18T00:49:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![FuturShoc](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/futurshoc/32/40343_2.png) [@FuturShoc](https://community.auth0.com/u/FuturShoc)\
**Post date:** [October 18, 2022, 12:49am UTC](https://community.auth0.com/t/auth0-laravel-package-broken-with-composer-update/92590/1 "2022-10-18T00:49:40Z")

</div>

I just did a composer update on our newly upgraded Laravel 9.x app which is using the Auth0 package provided by Auth0. It’s suddenly broken. Can someone offer any insight?

Any use of the Auth:: facade is now throwing this:

 ![Screen Shot 2022-10-17 at 7.46.17 PM](https://global.discourse-cdn.com/auth0/original/3X/2/f/2fa0e38f0d69d28f6780ee08ae669eea77f03b77.png)

(Thankfully, I had a previous composer /vendor folder I was able to recover and roll back to for now.)

---

<div class="post-metadata">

**Author:** ![jasper1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jasper1/32/33232_2.png) [@jasper1](https://community.auth0.com/u/jasper1)\
**Post date:** [October 18, 2022, 2:06am UTC](https://community.auth0.com/t/auth0-laravel-package-broken-with-composer-update/92590/2 "2022-10-18T02:06:57Z")

</div>

Here [laravel-auth0/UPGRADE.md at main · auth0/laravel-auth0 · GitHub](https://github.com/auth0/laravel-auth0/blob/main/UPGRADE.md) it says you need SDK 7 to make it work with Laravel 9 and PHP 8 of course.

---

<div class="post-metadata">

**Author:** ![FuturShoc](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/futurshoc/32/40343_2.png) [@FuturShoc](https://community.auth0.com/u/FuturShoc)\
**Post date:** [October 19, 2022, 12:08am UTC](https://community.auth0.com/t/auth0-laravel-package-broken-with-composer-update/92590/3 "2022-10-19T00:08:10Z")

</div>

@jasper1 Well, that’s my problem. I already have the updated laravel auth0 package.  
I’m finding anywhere the Auth:: facade is used now throws this undefined array key error.

---

<div class="post-metadata">

**Author:** ![FuturShoc](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/futurshoc/32/40343_2.png) [@FuturShoc](https://community.auth0.com/u/FuturShoc)\
**Post date:** [October 19, 2022, 12:10am UTC](https://community.auth0.com/t/auth0-laravel-package-broken-with-composer-update/92590/4 "2022-10-19T00:10:16Z")

</div>

Here is my composer.json

```auto
{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "require": {
        "php": "^7.3|^8.0",
        "auth0/auth0-php": "^8.2",
        "auth0/login": "^7.1",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "kriswallsmith/buzz": "^1.2",
        "laravel/framework": "^9.0",
        "laravel/sanctum": "^2.11",
        "laravel/tinker": "^2.5",
        "laravel/ui": "^3.4",
        "nyholm/psr7": "^1.5"
    },
    "require-dev": {
        "spatie/laravel-ignition": "^1.0",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^6.1",
        "phpunit/phpunit": "^9.5.10"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

```

---

<div class="post-metadata">

**Author:** ![jasper1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jasper1/32/33232_2.png) [@jasper1](https://community.auth0.com/u/jasper1)\
**Post date:** [October 19, 2022, 6:25am UTC](https://community.auth0.com/t/auth0-laravel-package-broken-with-composer-update/92590/5 "2022-10-19T06:25:54Z")

</div>

See 7.2.1 update October 13th [https://github.com/auth0/laravel-auth0/blob/main/CHANGELOG.md](https://github.com/auth0/laravel-auth0/blob/main/CHANGELOG.md)

> [7.2.1](https://github.com/auth0/laravel-auth0/tree/7.2.1) (2022-10-13)  
> [Full Changelog](https://github.com/auth0/laravel-auth0/compare/7.2.0...7.2.1)  
> **Fixed**
> 
> - `Auth0\Laravel\Auth0` no longer requires a session configuration for stateless strategies, restoring previous behavior. [#317](https://github.com/auth0/laravel-auth0/pull/317) ([evansims](https://github.com/evansims))
> - The SDK now requires `^3.0` of the `psr/cache` dependency, to accomodate breaking changes made in the upstream interface (typed parameters and return types) for PHP 8.0+. [#316](https://github.com/auth0/laravel-auth0/pull/316) ([evansims](https://github.com/evansims))

That may help as it seems your version of Auth0 login is older.

---

<div class="post-metadata">

**Author:** ![FuturShoc](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/futurshoc/32/40343_2.png) [@FuturShoc](https://community.auth0.com/u/FuturShoc)\
**Post date:** [October 19, 2022, 1:30pm UTC](https://community.auth0.com/t/auth0-laravel-package-broken-with-composer-update/92590/6 "2022-10-19T13:30:47Z")

</div>

Ok, so I see that my composer.json references auth0/login version as “^7.1”. I had assumed that would simply ensure I have the latest higher than 7.1.

The doc you’ve referenced clearly indicates that the latest is 7.2.1 with 7.2 being release just a few days before that. I’m sure that’s my problem.

However, I’d like to understand how I missed a necessary step to avoid this breakage.  
Do I need to explicitly define auth0/login to be 7.2.1 in order to receive it in a ‘composer update’ command?

---

<div class="post-metadata">

**Author:** ![jasper1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jasper1/32/33232_2.png) [@jasper1](https://community.auth0.com/u/jasper1)\
**Post date:** [October 20, 2022, 6:35am UTC](https://community.auth0.com/t/auth0-laravel-package-broken-with-composer-update/92590/7 "2022-10-20T06:35:06Z")

</div>

Auth0 could simply have missed a step causing issues with your version too and then the new version should be fine where they restored behavior from before that version.

What version do you have in `composer.lock` anyways?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 14, 2024, 11:07pm UTC](https://community.auth0.com/t/auth0-laravel-package-broken-with-composer-update/92590/8 "2024-11-14T23:07:19Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
