babenkoivan / elastic-scout-driver-plus

Extension for Elastic Scout Driver
MIT License
267 stars 52 forks source link

Undefined type 'Elastic\ScoutDriverPlus\Searchable' #152

Closed vincenzolegrottaglie closed 1 year ago

vincenzolegrottaglie commented 1 year ago
Software Version
PHP 8.1.12
Elasticsearch 8.7.0
Laravel 10.9.0
Laravel Scout 10.1.1
Elastic Scout Driver 2.0.0

Undefined type 'Elastic\ScoutDriverPlus\Searchable'

When adding to my Model the use Elastic\ScoutDriverPlus\Searchable; and use Searchable; it gives me the error just above.

Instead, my code editor suggets me to use use ElasticScoutDriverPlus\Searchable; and this is not giving me problems but seems to not work anyway.

babenkoivan commented 1 year ago

Hi @vincenzolegrottaglie, there is no Searchable trait in version 2 of Elastic Scout Driver. Also, version 2 doesn't support Elasticsearch 8. I'd recommend you upgrade Elastic Scout Driver and related packages to the latest versions.

vincenzolegrottaglie commented 1 year ago

Thank you. I managed the issue by changing versions like you suggested!