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

Unpexpected parameter names for SessionUpdateTimestampHandlerInterface #10512

Closed
zerkms opened this issue Dec 21, 2023 · 2 comments · Fixed by #10524
Closed

Unpexpected parameter names for SessionUpdateTimestampHandlerInterface #10512

zerkms opened this issue Dec 21, 2023 · 2 comments · Fixed by #10524

Comments

@zerkms
Copy link
Contributor

zerkms commented Dec 21, 2023

https://psalm.dev/r/37d0b51da1

https://www.php.net/manual/en/class.sessionupdatetimestamphandlerinterface.php

Copy link

I found these snippets:

https://psalm.dev/r/37d0b51da1
<?php
declare(strict_types=1);

final class Redis implements \SessionUpdateTimestampHandlerInterface
{
    public function updateTimestamp(string $id, string $data): bool
    {
        return true;
    }

    public function validateId(string $id): bool
    {
        return false;
    }
}
Psalm output (using commit a75d26a):

ERROR: ParamNameMismatch - 6:44 - Argument 1 of Redis::updateTimestamp has wrong name $id, expecting $key as defined by SessionUpdateTimestampHandlerInterface::updateTimestamp

ERROR: ParamNameMismatch - 6:56 - Argument 2 of Redis::updateTimestamp has wrong name $data, expecting $value as defined by SessionUpdateTimestampHandlerInterface::updateTimestamp

@ging-dev
Copy link
Contributor

Hi @zerkms, do you want open pull request?

https://github.com/vimeo/psalm/blob/5.x/dictionaries/CallMap_historical.php#L6586-L6587

zerkms pushed a commit to zerkms/psalm that referenced this issue Jan 2, 2024
zerkms pushed a commit to zerkms/psalm that referenced this issue Jan 2, 2024
orklah added a commit that referenced this issue Jan 2, 2024
…dlerInterface_Parameters

Fix #10512: Fixed SessionUpdateTimestampHandlerInterface parameter names
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

Successfully merging a pull request may close this issue.

2 participants