chris-ware / nova-breadcrumbs

Breadcrumbs for Laravel Nova
152 stars 44 forks source link

Wrong dependency description #119

Closed alberto-bottarini closed 3 years ago

alberto-bottarini commented 3 years ago

You are using Str::of method that is available only starting from Laravel 7.

I installed this package in Laravel 5.8, composer does not complain but code breaks

alberto-bottarini commented 3 years ago

I solved adding

Str::macro('of', function($string) {
    return new App\Support\Stringable($string);
});

in AppServiceProvider

and copying https://raw.githubusercontent.com/laravel/framework/7.x/src/Illuminate/Support/Stringable.php in my codebase

chris-ware commented 3 years ago

Ah, this is because I'm limiting it to > Nova 2.7, which supports Laravel 5.8+. I can see why this would cause an issue. This version constraint is solely due to the way that we target Nova Views to implement breadcrumbs.

I think I'll switch to limiting it to Nova 3, which requires Laravel 7+

create-issue-branch[bot] commented 3 years ago

Branch issue-119-Wrong_dependency_description created!