yabhq / laravel-scout-mysql-driver

Laravel Scout MySQL Driver
MIT License
522 stars 111 forks source link

Use of the deprecated studly_case() helper breaks the library on Laravel 6 #92

Closed ziabice closed 5 years ago

ziabice commented 5 years ago

Into the file Providers\MySQLScoutServiceProvider at lines 46 and 47, the use of the deprecated studly_case helper breaks library initialization.

How to fix:

Edit the file: Providers\MySQLScoutServiceProvider.php

Include this line at the start:

use Illuminate\Support\Str;

Then edit lines 46 and 47 this way:

$mode = $engineNamespace.Str::studly(strtolower(config('scout.mysql.mode')));
$fallbackMode = $engineNamespace.Str::studly(strtolower(config('scout.mysql.min_fulltext_search_fallback')));
freezer278 commented 5 years ago

fixed in https://github.com/yabhq/laravel-scout-mysql-driver/pull/93