lukas-frey / filament-icon-picker

An icon picker field for Filament
MIT License
101 stars 20 forks source link

fix relationship Declaration #13

Closed atmonshi closed 10 months ago

atmonshi commented 10 months ago

this will fix the error:

Declaration of Guava\FilamentIconPicker\Forms\IconPicker::relationship(Closure|string|null $name, Closure|string|null $titleAttribute, ?Closure $modifyQueryUsing = null): static must be compatible with Filament\Forms\Components\Select::relationship(Closure|string|null $name, Closure|string|null $titleAttribute = null, ?Closure $modifyQueryUsing = null): static

in filament v3.0.37

lukas-frey commented 10 months ago

Thank you :)

atmonshi commented 10 months ago

tag or new release soon :)?

github-actions[bot] commented 10 months ago

:tada: This PR is included in version 2.0.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

malle-pietje commented 9 months ago

I'm running version 2.0.2 and seeing the same error. After changing the relationship() method to this the error goes away:

    public function relationship(Closure|string|null $name, Closure|string|null $titleAttribute = null, ?Closure $modifyQueryUsing = null): static
    {
        throw new \BadMethodCallException('Method not allowed.');
    }

Note the addition of = null to the second parameter.