After updating to php 8 I got that strange error in tests:
InvalidArgumentException: It was not possible to parse your key, reason:
/builds/riverwaysoft/rebelbee/phonedo_project/phonedo/vendor/lcobucci/jwt/src/Signer/OpenSSL.php:90
/builds/riverwaysoft/rebelbee/phonedo_project/phonedo/vendor/lcobucci/jwt/src/Signer/OpenSSL.php:47
/builds/riverwaysoft/rebelbee/phonedo_project/phonedo/vendor/lcobucci/jwt/src/Signer/OpenSSL.php:21
/builds/riverwaysoft/rebelbee/phonedo_project/phonedo/vendor/lcobucci/jwt/src/Signer/BaseSigner.php:36
/builds/riverwaysoft/rebelbee/phonedo_project/phonedo/vendor/lcobucci/jwt/src/Builder.php:470
/builds/riverwaysoft/rebelbee/phonedo_project/phonedo/vendor/lcobucci/jwt/src/Builder.php:450
/builds/riverwaysoft/rebelbee/phonedo_project/phonedo/vendor/lexik/jwt-authentication-bundle/Services/JWSProvider/LcobucciJWSProvider.php:99
Reason of error is empty.
Problem pointed here:

Hey,
I'm working on the PHP 8 support. I'll keep you informed.
@chalasr @mitalcoi
Issue is caused by resource to object migration, see https://php.watch/versions/8.0/OpenSSL-resource
It has been fixed in lcobucci/jwt in version 4.0.0 (https://github.com/lcobucci/jwt/pull/431)
So maybe just update composer.json lcobucci/jwt to v4?
Looks like it is already resolved here: https://github.com/lexik/LexikJWTAuthenticationBundle/releases/tag/v2.10.0
Just updated to 2.10.0 - it did't help
lcobucci/jwt v 4.0.0 cannot be installed locally, it is also locked: (lexik/jwt-authentication-bundle v2.10.0 requires lcobucci/jwt ^3.2 -> found lcobucci/jwt[3.2.0, ..., 3.4.1] but it conflicts with your root composer.json require (^4.0.0))
@mitalcoi
Yp, because in this repo in composer.json it still states "lcobucci/jwt": "^3.2"
@chalasr can you update composer.json with actual version lcobucci/jwt?
We need to make the bundle compatible with lcobucci/jwt v3.4 first.
Should be resolved quickly, I'm going to look at it this weekend.
Only cow I've found the same trouble with OpenSSLAsymmetricKey class instead of resource. I wish I could had see this issue early instead of "wasting" my time :joy:
Can't wait to see a fix! :) :muscle:
Most helpful comment
Hey,
I'm working on the PHP 8 support. I'll keep you informed.