Laravel 11 Upgrade Problems #649
Replies: 3 comments 3 replies
-
Hi @JoeyofBladez, Can you post your entire |
Beta Was this translation helpful? Give feedback.
-
@stevebauman See below stack trace. It is not very informative on the surface but I appreciate your help looking into this and your responsiveness, so I can provide any more details that would be helpful to you. Below are the results of the joeyofbladez@web-ubuntu:~/joey-app-core$ php artisan serve
#0 /home/joeyofbladez/joey-app-core/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php(128): Illuminate\Auth\AuthManager->createUserProvider('...')
#1 /home/joeyofbladez/joey-app-core/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php(97): Illuminate\Auth\AuthManager->createSessionDriver('...', Array)
#2 /home/joeyofbladez/joey-app-core/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php(71): Illuminate\Auth\AuthManager->resolve('...')
#3 /home/joeyofbladez/joey-app-core/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php(352): Illuminate\Auth\AuthManager->guard()
#4 /home/joeyofbladez/joey-app-core/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(357): Illuminate\Auth\AuthManager->__call('...', Array)
#5 /home/joeyofbladez/joey-app-core/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(531): Illuminate\Support\Facades\Facade::__callStatic('...', Array)
#6 /home/joeyofbladez/joey-app-core/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(496): Illuminate\Foundation\Exceptions\Handler->context()
#7 /home/joeyofbladez/joey-app-core/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(373): Illuminate\Foundation\Exceptions\Handler->buildExceptionContext(Object(Error))
#8 /home/joeyofbladez/joey-app-core/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(337): Illuminate\Foundation\Exceptions\Handler->reportThrowable(Object(Error))
#9 /home/joeyofbladez/joey-app-core/vendor/nunomaduro/collision/src/Adapters/Laravel/ExceptionHandler.php(46): Illuminate\Foundation\Exceptions\Handler->report(Object(Error))
#10 /home/joeyofbladez/joey-app-core/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(621): NunoMaduro\Collision\Adapters\Laravel\ExceptionHandler->report(Object(Error))
#11 /home/joeyofbladez/joey-app-core/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(200): Illuminate\Foundation\Console\Kernel->reportException(Object(Error))
#12 /home/joeyofbladez/joey-app-core/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) Additionally, I get this exception when I run > Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
InvalidArgumentException
Authentication user provider [ldap] is not defined.
at vendor/laravel/framework/src/Illuminate/Auth/CreatesUserProviders.php:45
41▕
42▕ return match ($driver) {
43▕ 'database' => $this->createDatabaseProvider($config),
44▕ 'eloquent' => $this->createEloquentProvider($config),
➜ 45▕ default => throw new InvalidArgumentException(
46▕ "Authentication user provider [{$driver}] is not defined."
47▕ ),
48▕ };
49▕ }
+5 vendor frames
6 app/Logging/MysqlHandler.php:37
Illuminate\Support\Facades\Facade::__callStatic()
+11 vendor frames
18 artisan:35
Illuminate\Foundation\Console\Kernel::handle()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 |
Beta Was this translation helpful? Give feedback.
-
Thanks for your willingness to help on this. My error logger was then trying to call Auth::id() to get the current user's ID but throwing an exception on that since Sanctum and LdapRecord were not setting themselves up properly... I had error handling for this returning 0 if the user is not authenticated, but the authentication services themselves were not instantiating properly so looks like I need another try/catch there... With that I then moved on to two easily solved issues:
Both are standard upgrade procedures and while the Sanctum issue wasn't explicitly stated, looking at the source code and seeing it removed along with the migration info made sense with how Laravel's v11 upgrade guide states that it won't do automatic migrations anymore, making the function obsolete. The LdapRecord guide has a nice clean table of renamed functions, so thanks for that! |
Beta Was this translation helpful? Give feedback.
-
Laravel: v11.5.0
ldaprecord-laravel: v3.3.2
I have been using ldaprecord-laravel smoothly on a web application but after upgrading to Laravel 11 (released last month), I am seeing the following exception whenever a composer or artisan command is run:
I've cross-checked available documentation at https://ldaprecord.com/docs/laravel/v3/auth/database/configuration and this is my auth.php file:
Is there no compatibility with Laravel 11 available yet, or are there config changes that need to be made? If I revert composer.json to use my current Laravel 10 and associated packages, the application works perfectly fine and has for almost a year now. Thanks in advance for anyone who can provide insight.
Beta Was this translation helpful? Give feedback.
All reactions