lukas-frey / filament-icon-picker

An icon picker field for Filament
MIT License
109 stars 22 forks source link

fix relationship Declaration #13

Closed atmonshi closed 1 year ago

atmonshi commented 1 year 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 1 year ago

Thank you :)

atmonshi commented 1 year ago

tag or new release soon :)?

github-actions[bot] commented 1 year 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 1 year 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.