InfinetyEs / Nova-Filemanager

A Filemanager tool for Laravel Nova
https://infinetyes.github.io/Nova-Filemanager
MIT License
219 stars 95 forks source link

Error after upgrading to Laravel 6 #75

Closed devfaysal closed 5 years ago

devfaysal commented 5 years ago

[2019-09-05 06:29:34] local.ERROR: Call to undefined function Infinety\Filemanager\Http\Services\starts_with() {"userId":1,"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to undefined function Infinety\Filemanager\Http\Services\starts_with() at /var/www/html/laravel/faysal.me/vendor/infinety-es/nova-filemanager/src/Http/Services/GetFiles.php:420) [stacktrace]

DerekBuntin commented 5 years ago

Surely it would be best to upgrade to use the included methods rather than needing to install an additional package just to provide backwards compatibility?

The method should be changed to use Str::startsWith()

https://laravel.com/docs/6.0/helpers#method-starts-with

Of course, the other classes require editing to use the new helper methods Str::before(), Str::contains() etc.

devfaysal commented 5 years ago

Thanks. Good Thinking. I will try to update the helper functions to be compatible with Laravel 6 according to the docs.

KnowledgeWanderer commented 5 years ago

so how should one update the helpers? I am working on Laravel6 and I get the same error, shouldn't InfinetyEs update the package? @devfaysal @DerekBuntin Help

devfaysal commented 5 years ago

To fix this error, there is pull request made https://github.com/InfinetyEs/Nova-Filemanager/pull/77 The package author need to merge it, then you can update this package to resolve the error.

There is temporary fix for you: Just install the laravel helper package. composer require laravel/helpers

This will fix the error right away.

Krato commented 5 years ago

I'll merge tomorrow ☺️👍🏽

KnowledgeWanderer commented 5 years ago

great job! much love!

DerekBuntin commented 5 years ago

@devfaysal you would be quicker to update the package with the reference to the new Laravel helpers rather than adding this package, it took me 5 minutes to get the system working perfectly with Laravel 6 doing a search and replace, maybe I should do a pull request to help?

Krato commented 5 years ago

Nova Filemanager is ready now for Laravel 6. Update to v2.3.2. Check it https://github.com/InfinetyEs/Nova-Filemanager/releases/tag/2.3.2