PHP-Open-Source-Saver / jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen
MIT License
729 stars 113 forks source link

Target class [request] does not exist. #201

Closed bakle closed 1 year ago

bakle commented 1 year ago

Subject of the issue

When running Phpunit tests it generates the error

Error in bootstrap script: Illuminate\Contracts\Container\BindingResolutionException:
Target class [request] does not exist.

Process finished with exit code 1

It seems to be a problem in AbstractServiceProvider.php

image

$app['request'] or $this->app['request'] doesn't exist

Your environment:

Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 8.29
Package version 2.0.0
PHP version 8.0

Steps to reproduce

Run any phpunit test

Expected behaviour

Test should run

Actual behaviour

image

Note

I migrated from tymon and it was working fine, after I migrated test stopped working. The application works correctly if I log in, but tests are not working.