Class "Tymon\JWTAuth\Providers\JWT\Namshi" not found
daniilly opened this issue · comments
Subject of the issue
An attempt to create an instance of the Tymon\JWTAuth\Providers\JWT\Namshi
class using the AbstractServiceProvider::registerNamshiProvider()
method failed because the class does not exist anymore, as it was dropped in a recent commit: b0868a5#diff-f6d0165250945a702d3edc292ddd71188eaadef24c305ad994ae7c6e50fb7664
Your environment
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Framework | Laravel |
Framework version | 9.49.0 |
Package version | 2.0.0 |
PHP version | 8.1.11 |
Steps to reproduce
We have code that calls Manager::encode
:
...
/** @type Token $token */
$token = JWTAuth::manager()->encode($payload);
...
Following that, at a certain stage in the call chain, there is a call to AbstractServiceProvider::getConfigInstance("providers.jwt")
, which subsequently triggers the resolution of AbstractServiceProvider::registerNamshiProvider()
. As a result, an attempt is made to instantiate the removed class.
Expected behavior
To get encoded Token
Actual behaviour
Error: Class "Tymon\JWTAuth\Providers\JWT\Namshi" not found
From what I found, it was changed (back, I think) to Lcobucci because Namshi is deprecated.