Closed motia closed 4 years ago
Any update?
@maxbrokman could we get this merged please?
Hey @motia , i'm getting following error while using this PR
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
In Container.php line 993:
Unresolvable dependency resolving [Parameter #4 [ <required> callable $isDo
wnForMaintenance ]] in class MaxBrokman\SafeQueue\Worker
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
After disabled exception got null argument error
$ composer dumpautoload
Generating optimized autoload filesocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
In Worker.php line 33:
Argument 5 passed to MaxBrokman\SafeQueue\Worker::__construct() must be cal
lable, null given
Seems you can't pass callable function twice to parent::__construct()
in MaxBrokman\SafeQueue\Worker
line 40
It works when i changed the MaxBrokman\SafeQueue\Worker
construct to
public function __construct(
QueueManager $manager,
Dispatcher $events,
EntityManager $entityManager,
ExceptionHandler $exceptions
) {
$isDownForMaintenance = function () {
return app()->isDownForMaintenance();
};
parent::__construct($manager, $events, $exceptions, $isDownForMaintenance);
$this->entityManager = $entityManager;
}
Hi, I have updated the code to support laravel 6.
I did not find any major changes besides those of the constructors of the Worker and WorkerCommand base classes. So this PR has breaking changes to laravel 5 and it would be best to put it in a 0.4 branch.
Also, I had to swap the php-cs-fixer as the old version did not support php7 and was moved to another repository.
Thank you.