Troubleshoot When Upgrade Laravel from 5.7 to 6.x — Error Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes.
Why this Error Show?
Because JWT Token from tymon/jwt-auth package or Laravel Passport in Laravel version 6.x need lcobucci/jwt package to converting the token string.
composer require lcobucci/jwt:3.3
Then try run project with
php artisan serve and test it again. Hope it solve your problem.
- lcobucci/jwt package version 3.3 is more stable than 3.4 for Laravel 6.x. Version 3.4 has show this problem too. So, if you already installed this package with 3.4 version, so you can downgrade it.
composer require lcobucci/jwt:3.3can resolve it.