Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommandStarting + CommandFinished events not running #448

Open
henzeb opened this issue May 3, 2023 · 2 comments
Open

CommandStarting + CommandFinished events not running #448

henzeb opened this issue May 3, 2023 · 2 comments

Comments

@henzeb
Copy link

henzeb commented May 3, 2023

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?

@owenvoke
Copy link
Member

owenvoke commented May 9, 2023

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. 🤔

@henzeb
Copy link
Author

henzeb commented May 9, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants