Skip to content

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

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

Closed
nrolando opened this issue Feb 19, 2025 · 2 comments · May be fixed by #618
Closed

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

nrolando opened this issue Feb 19, 2025 · 2 comments · May be fixed by #618
Assignees
Labels
Dependencies Pull requests that update a dependency file DX wontfix
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
Copy link

stale bot commented Apr 26, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 26, 2025
@Spomky Spomky modified the milestones: 3.5.0, 4.1.0 Apr 26, 2025
@Spomky Spomky linked a pull request Apr 26, 2025 that will close this issue
5 tasks
@stale stale bot closed this as completed May 6, 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 wontfix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants