Skip to content

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

@jnoordsij

Description

@jnoordsij
  • Laravel version: latest (CI)
  • Algolia Scout Extended version: latest (CI)
  • Algolia Client Version: n/a
  • Language Version: any

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 laravel/scout#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions