I have a serie of bug when installing this package on an existing installation.
Run upgrade/update, in order to use he last version if Laravel, filament & your package.
The ['primary' => null] always exists. And Arr::get(Array, null) return the full array. Need to check existence with has (or use collect()->get(null, default)).
Sunset Theme
Here I removed the Color:rgb in order to avoid Filament\Support\Colors\Color::rgb(): Argument #1 ($color) must be of type string, array given. Maybe DefaultTheme too ?
public function getPrimaryColor(): array
{
return ['primary' => $this->getThemeColor()['blue']];
}
How to reproduce the bug
Follow installation notes.
Go to Themes, and play with options
What happened?
Hello,
I have a serie of bug when installing this package on an existing installation. Run upgrade/update, in order to use he last version if Laravel, filament & your package.
pages/themes.blade.php
@if ($this->getCurrentTheme() instanceof \Hasnayeen\Themes\Contracts\HasChangeableColor)
GetCurrentTheme() is a class, but getCurrentTheme return a string (getName)
Themes.php
For the function getCurrentThemeColor(), I had to modify like this:
The ['primary' => null] always exists. And Arr::get(Array, null) return the full array. Need to check existence with has (or use collect()->get(null, default)).
Sunset Theme
Here I removed the Color:rgb in order to avoid
Filament\Support\Colors\Color::rgb(): Argument #1 ($color) must be of type string, array given
. Maybe DefaultTheme too ?How to reproduce the bug
Follow installation notes. Go to Themes, and play with options
Package Version
v3.0.8
PHP Version
8.2.4
Laravel Version
v3.0.39
Which operating systems does with happen with?
Windows
Notes
(Thank you for this great package :) )