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

[5.8] Improve event list command #28177

Merged
merged 1 commit into from
Apr 11, 2019
Merged

[5.8] Improve event list command #28177

merged 1 commit into from
Apr 11, 2019

Conversation

seriquynh
Copy link
Contributor

There are two things I think the "event:list" command can be improved.

  • When there aren't any events, we should display a message rather than an empty table.
  • It's pretty to support a developer to look for some specific events by name.

return $this->error('Your application doesn\'t have any events matching the given criteria.');
}

return $this->error('Your application doesn\'t has any events, listeners.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo....should be...

return $this->error('Your application doesn\'t have any event listeners.');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your comment! This command still lists an event to the table even it doesn't has any listeners. The error message is only printed when no event is found, so I think the right message may be:

'Your application doesn\'t have any events.'

But Mr.Otwell always modifies the message of an accepted commit if he needs. Therefore, let him decide finally.

Copy link

@chriskonnertz chriskonnertz Apr 11, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Your application doesn't have any events.'

  • If you define the word "event" as a synonym for "event class" -> might be true then.
  • If you define the word "event" as the name of an event ( = strings that do not have to match the name of an event class) that can be passed to the event() helper function - for example event('event-'.time()) - then the statement is not valid, because it is not possible to automatically detect (all) event names. Therefore the command cannot decide if the application does not have any events.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But Mr.Otwell always modifies the message of an accepted commit if he needs. Therefore, let him decide finally.

Indeed, such changes have been made:
cde1c5d

@taylorotwell taylorotwell merged commit be08939 into laravel:5.8 Apr 11, 2019
@seriquynh seriquynh deleted the improve_event_list_command branch April 11, 2019 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants