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?
Mar 4, 2021
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.
Problem Solving
Run composer require lcobucci/jwt:3.3
Then try run project withphp artisan serve
and test it again. Hope it solve your problem.
Big Note
- 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.3
can resolve it.