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

Closed
Slamdunk opened this issue Feb 21, 2025 · 1 comment · Fixed by #605
Closed

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

Slamdunk opened this issue Feb 21, 2025 · 1 comment · Fixed by #605
Assignees
Milestone

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

Ocramius commented Feb 21, 2025

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 { ... }

@Slamdunk Slamdunk added this to the 10.0.0 milestone Feb 26, 2025
@Slamdunk Slamdunk linked a pull request Feb 26, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants