lcobucci/jwt v5 incompatibility: permittedFor() receives array instead of variadic string arguments
Author: AliGambCreated Jun 27, 2026Updated Jul 11, 2026
To complete the support for lcobucci/jwt v5, it seems necessary to modify src/Providers/JWT/Lcobucci.php so that permittedFor() receives the correct type expected by v5 of the library.
Specifically:
phpRegisteredClaims::AUDIENCE => $builder->permittedFor(...$value)instead of:
phpRegisteredClaims::AUDIENCE => $builder->permittedFor($value)This way individual strings are passed correctly via the variadic signature, instead of an array — which causes a fatal error with lcobucci/jwt v5.
Source: tymondesigns/jwt-auth