Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class ...\NullAdapter not found in .../UrlKeySetFactory #605

Open
nrolando opened this issue Feb 19, 2025 · 1 comment
Open

Class ...\NullAdapter not found in .../UrlKeySetFactory #605

nrolando opened this issue Feb 19, 2025 · 1 comment
Assignees
Labels
Dependencies Pull requests that update a dependency file DX
Milestone

Comments

@nrolando
Copy link

Version(s) affected

^3.4

Description

report.CRITICAL: Error: Class "Symfony\Component\Cache\Adapter\NullAdapter" not found in /var/www/html/vendor/web-token/jwt-framework/src/Library/KeyManagement/UrlKeySetFactory.php:44

You reference and try to utilize this NullAdapter class, but yet you do not require the package that it comes from, symfony/cache. Why is that? Forgive me if I'm mistaken, but I shouldn't need to require symfony/cache myself in my own project's root composer.json. It should be required by the jwt-framework package that is utilizing it.

How to reproduce

Create a class that extends Jose\Component\KeyManagement\JKUFactory and attempt to utilize it. The JKUFactory class extends the problematic abstract class Jose\Component\KeyManagement\UrlKeySetFactory that is attempting to utilize a broken reference to Symfony\Component\Cache\Adapter\NullAdapter in its constructor.

Possible Solution

require symfony/cache in jwt-framework composer.json

Additional Context

No response

@Spomky
Copy link
Member

Spomky commented Feb 24, 2025

Indeed there is a missing package here.
But instead of forcing this dependency, I think I will deprecate this value in favor of the Http cache that is possible via the Http Client.

@Spomky Spomky self-assigned this Feb 24, 2025
@Spomky Spomky added DX Dependencies Pull requests that update a dependency file labels Feb 24, 2025
@Spomky Spomky added this to the 3.5.0 milestone Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Pull requests that update a dependency file DX
Projects
None yet
Development

No branches or pull requests

2 participants