CommandStarting + CommandFinished events not running
henzeb opened this issue · comments
As I am for the very first time trying out laravel zero, not sure if bug or by design, but these two do not work.
just add these two inside the boot method of your AppServiceProvider:
Event::listen(
CommandStarting::class,
function () {
dump('command starting');
}
);
Event::listen(
CommandFinished::class,
function () {
dump('command finished');
}
);
This might be because of the the PR laravel/framework#46508.
work around is setting the dispatcher myself, but was wondering if this is considered a bug, or if there is a different way of activating those events?
Could you try updating to v10.9.0 of the Foundation?
composer require laravel-zero/foundation:10.9.0
If it still doesn't work, I'm not entirely sure if this is a bug. 🤔
well, I am very positive it was a bug. Because I installed 9.2.0 and the events were fired, then I installed 10.0.0 and it failed. I had 10.0.2 installed, and it failed right up to 5 hours ago. In which changes were made similar to the PR I added in my report.
Anyway, it's fixed now, and it works when 10.0.1 and up is installed with foundation version 10.9.0.