jdavidbakr / MultiServerEvent

Laravel plugin to allow scheduled events across multiple servers with the same scheduler to not overlap.
MIT License
37 stars 17 forks source link

Argument must implement interface Mutex, Repository given #13

Closed japsen closed 7 years ago

japsen commented 7 years ago
[Symfony\Component\Debug\Exception\FatalThrowableError]
  Type error: Argument 1 passed to Illuminate\Console\Scheduling\Event::__con
  struct() must implement interface Illuminate\Console\Scheduling\Mutex, inst
  ance of Illuminate\Cache\Repository given, called in /var/www/vendor/jdavid
  bakr/multi-server-event/src/Scheduling/Event.php on line 45

I get this when executing "php laravel" on console. running laravel framework 5.4.19, jdavidbakr/multi-server-event version 2.0.1

Minor: There is an unmatched bracket in the example Kernel.php defineConsoleSchedule code on https://github.com/jdavidbakr/MultiServerEvent

james-coder commented 7 years ago

jdavidbakr/multi-server-event still works with laravel/framework 5.4.16.

It looks like this broke when laravel framework went to 5.4.17. https://github.com/laravel/framework/compare/v5.4.16...v5.4.17 (See the many changes of Illuminate\Contracts\Cache\Repository to Illuminate\Console\Scheduling\Mutex there.)

Part of 5.4.16 was this breaking change: https://github.com/laravel/framework/pull/18295

jdavidbakr commented 7 years ago

PR merged

benswinburne commented 7 years ago

Did you bump the composer version after this change? It doesn't appear so?

jdavidbakr commented 7 years ago

It should be in 1.0.9

benswinburne commented 7 years ago

Doesn't appear to to be in the 2.x release for > 5.4?

jdavidbakr commented 7 years ago

My bad, looks like I accidentally released in the 1.x branch instead of the 2.x branch. Should be there now.