vinkla / laravel-hashids

A Hashids bridge for Laravel
MIT License
2k stars 173 forks source link

Lumen 5.2 Issue. #17

Closed irazasyed closed 8 years ago

irazasyed commented 8 years ago

There's some problem when using with Lumen 5.2, here's the error it's throwing:

[ErrorException]
  Argument 1 passed to Vinkla\Hashids\HashidsServiceProvider::registerFactory() must be an instance of Illuminate\Contracts\Foundation\Application, i
  nstance of Laravel\Lumen\Application given, called in /Users/User/Projects/Code/lumen/vendor/vinkla/hashids/src/HashidsServiceProvider.php on line 6
  4 and defined
vinkla commented 8 years ago

Yeah, thanks for reporting! I know about the issue though, this bug currently exists in all my packages. I'll find a better solution soon. Closing this in the meantime.

irazasyed commented 8 years ago

Fix: use Illuminate\Contracts\Container\Container as Application;

Same thing with another package as well. That's what fixed it. Works for both Lumen and Laravel too.

vinkla commented 8 years ago

Yeah, sounds like a good idea.

irazasyed commented 8 years ago

I'm still waiting for this package to be updated :)

I can send a PR if you'd like.

vinkla commented 8 years ago

I'll get to this asap.

irazasyed commented 8 years ago

Great. Sounds good. Thanks!

vinkla commented 8 years ago

I've added an implementation in https://github.com/lucadegasperi/oauth2-server-laravel/pull/646 If everything runs smoothly on that one I'll just do the same on all packages.

irazasyed commented 8 years ago

:+1:

vinkla commented 8 years ago

Fixed in 2.2.1

irazasyed commented 8 years ago

Thank you :)