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

CacheManager breaks on tags with named parameter #1256

Closed
tminich opened this issue Sep 17, 2024 · 2 comments
Closed

CacheManager breaks on tags with named parameter #1256

tminich opened this issue Sep 17, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tminich
Copy link

tminich commented Sep 17, 2024

Bug description

If you use

Cache::tags(names: ['a']);

CacheManager breaks in line 29 because it assumes $parameters is int-indexed, which it isn't if you use named parameters.

Steps to reproduce

see above

Expected behavior

No error.

Wrapping $parameters in an array_values call should be fine in these specific circumstances and fix the issue.

Laravel version

11.23.5

stancl/tenancy version

3.8.4

@tminich tminich added the bug Something isn't working label Sep 17, 2024
@stancl stancl closed this as completed in ed02943 Sep 17, 2024
@stancl
Copy link
Member

stancl commented Sep 17, 2024

Hi, thanks for the detailed report. Just to be sure, can you confirm if composer require stancl/tenancy:3.x-dev fixes the issue for you (since our tests likely won't be affected by the change at all)?

@tminich
Copy link
Author

tminich commented Sep 18, 2024

Looks like it's fixed, thank you 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants