archtechx / tenancy

Automatic multi-tenancy for Laravel. No code changes needed.
https://tenancyforlaravel.com
MIT License
3.67k stars 432 forks source link

CacheManager breaks on `tags` with named parameter #1256

Closed tminich closed 2 months ago

tminich commented 2 months ago

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

stancl commented 2 months ago

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 commented 2 months ago

Looks like it's fixed, thank you 😊