Sentinel icon indicating copy to clipboard operation
Sentinel copied to clipboard

Laravel 6.2 Call to undefined function Cartalyst\Sentry\Users\Eloquent\ends_with() on Sentry::check()

Open warmwhisky opened this issue 6 years ago • 3 comments

This is a fresh install of Laravel 6.2 and "rydurham/sentinel": "^3.0"

Sentry::check() seems to have an issue with Laravel 6.2.

I've tried \Sentry::check() and many of the other versions that pop up in PhpStorm like "\Cartalyst\Sentry\Sentry", but nothing registers as the correct Sentry::check()

How can I properly register Sentry::check()?

warmwhisky avatar Oct 31 '19 10:10 warmwhisky

The ends_with() helper function was removed from Laravel in version 6.0 which is most likely why the error you mention in the title of this issue was thrown. I am not sure why the tests in this package didn't catch that problem - I will look in to that.

Given that Cartalyst has deprecated the Sentry package it is unlikely that they will address that on their end. You have two options:

  1. Migrate to cartalyst/sentinel (This will be your best bet over the long term.)
  2. Add a version of the ends_with helper to your application. (There may be other deprecated helper methods that will need to be restored in your application as well.)

I don't think it makes sense for this package to try to restore those missing helper functions - there could be some unexpected consequences there. Most likely this means that this package has finally reached the end of the road; I will probably have to deprecate it.

rydurham avatar Oct 31 '19 23:10 rydurham

Well Sir,

It has been an interesting 4 years that I have been using your package and I thank you for it. It has helped me learn Laravel and how authentication works.

warmwhisky avatar Dec 04 '19 13:12 warmwhisky

Thank you; I appreciate you saying that.

If you are interested in upgrading your project to use cartalyst/sentinel you can checkout these two repos that you might find helpful:

rydurham avatar Dec 04 '19 22:12 rydurham