algolia / scout-extended

Scout Extended: The Full Power of Algolia in Laravel
https://www.algolia.com/doc/framework-integration/laravel/getting-started/introduction-to-scout-extended/
MIT License
393 stars 85 forks source link

Fix static code error in Searchable\Aggregator.php #330

Open jnoordsij opened 8 months ago

jnoordsij commented 8 months ago

Description

With the latest larastan version installed, the following error appears when running static analysis:

 ------ ------------------------------------------------------------------------------------
  Line   Searchable\Aggregator.php
 ------ ------------------------------------------------------------------------------------
  266    Call to an undefined method Illuminate\Database\Eloquent\Model::searchableUsing().
 ------ ------------------------------------------------------------------------------------

A possible solution would be working with the laravel/scout repository to add a proper contract to allow for better type-hints; see also https://github.com/laravel/scout/issues/771.

Steps To Reproduce

Run composer update followed by composer test.

See any recently created CI test job, e.g. https://app.circleci.com/pipelines/github/algolia/scout-extended/255/workflows/ec6dc973-ce16-4d43-82e8-a61c2b2b4cd4/jobs/2079/parallel-runs/0/steps/0-109.