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

Allow integerish keys in methods handling multiple keys at once #315

Merged
merged 2 commits into from
Jun 15, 2024

Conversation

boesing
Copy link
Member

@boesing boesing commented Jun 15, 2024

Q A
Bugfix no
BC Break no
New Feature no

Description

In the (non-official) PSR integration tests are checks for iterables with a non-empty-string cache key 0. Internal PHP type juggling converts integerish strings to int which leads to a type conflict when passing these values to our internal assertion.
Therefore, this patch provides compatibility for integer keys in methods consuming iterable keys either in key-value or key-only combination.

Ref: https://github.com/php-cache/integration-tests/blob/824633c9547dc3c7ac5faeca03dd82939cdeb73c/src/SimpleCacheTest.php#L258-L267

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
@boesing boesing added Bug Something isn't working Enhancement labels Jun 15, 2024
@boesing boesing added this to the 4.0.0 milestone Jun 15, 2024
In the (non-official) PSR integration tests are checks for iterables with a non-empty-string cache key `0`. Internal PHP type juggling converts integerish strings to `int` which leads to a type conflict when passing these values to our internal assertion.
Therefore, this patch provides compatibility for integer keys in methods consuming iterable keys either in key-value or key-only combination.

Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
@boesing boesing merged commit bf83c2a into laminas:4.0.x Jun 15, 2024
18 checks passed
@boesing boesing deleted the bugfix/integerish-keys branch June 15, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant