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

Decouple from lcobucci/clock in favour of psr/clock #1269

Open
okorneliuk opened this issue Jan 23, 2025 · 0 comments
Open

Decouple from lcobucci/clock in favour of psr/clock #1269

okorneliuk opened this issue Jan 23, 2025 · 0 comments

Comments

@okorneliuk
Copy link

okorneliuk commented Jan 23, 2025

Hello everyone,

The problem: my application is currently in the state of having 3 implementations of psr/clock. I want to reduce this quantity to 1.

I noticed, that this bundle uses mostly $clock->now() fuctionality from psr/clock and there is only one place, where SystemClock is used (we can get rid of it too). We can easily decouple from lcobucci/clock so will be able to use another implementation of psr/clock. For example, if you have this bundle v3, you have symfony/clock already installed for sure, because symfony/security-bundle v6.3+ depends of it.

As of system clock, having Psr/Clock interface instead of nullable class in the argument of the service, we will be able to replace it easily if there is such a demand for testing or else.

Is it worth to create a PR and implement all of these there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant