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

Replace Lcobucci\Clock\Clock typehints with Psr\Clock\ClockInterface #603

Open
Slamdunk opened this issue Feb 21, 2025 · 1 comment
Open
Assignees

Comments

@Slamdunk
Copy link
Member

Parameter #1 $clock of method PSR7Sessions\Storageless\Http\Configuration::withClock() expects Lcobucci\Clock\Clock, Psr\Clock\ClockInterface given.
@Slamdunk Slamdunk self-assigned this Feb 21, 2025
@Ocramius
Copy link
Member

I checked this briefly: can't change the Configuration without a major release (which we can do).

I'd say that it's a good idea to do so, though.

Also, perhaps we should stop relying on Configuration at runtime, and extract relevant Configuration values in named constructors, so:

    public function __construct(
        private Configuration $config,
    ) {
    }

becomes

    public function __construct(
        private ClockInterface $clock,
    ) {
    }

    public static function fromConfiguration(Configuration $config) : self { ... }

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

No branches or pull requests

2 participants