Skip to content

Commit

Permalink
fix(tests): replace spread operator with array_merge
Browse files Browse the repository at this point in the history
Avoid errors when trying to spread array with string keys on PHP >8.1
  • Loading branch information
stefangalescu committed Jun 20, 2022
1 parent a67a1b7 commit d8c2b25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/HeroiconTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function setUp(): void

public function render(string $variant, string $icon, array $attrs = [])
{
return Statamic::tag('heroicon')->params(['variant' => $variant, 'icon' => $icon, ...$attrs])->fetch();
return Statamic::tag('heroicon')->params(array_merge(['variant' => $variant, 'icon' => $icon], $attrs))->fetch();
}

public function getSvgAsset(string $variant, string $icon)
Expand Down

0 comments on commit d8c2b25

Please sign in to comment.