Standardizing Artisan Command and Scheduler Argument Syntax #49643
Replies: 3 comments 1 reply
-
Hello, encountered this inconsistency today, really really frustrating, had to dig out night logs to see why it didn't work, while looking through logs my eye stumbled upon full command that it calls using $schedule->command( |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
This has happened to me as well and is very frustrating until you figure it out. |
Beta Was this translation helpful? Give feedback.
-
Current State
Consider an Artisan command with the signature:
When called directly using the
InteractsWithConsole
trait, the syntax is as follows:However, when scheduling the command with the Laravel Scheduler, the syntax becomes:
Proposed Solution
To enhance consistency and reduce the chances of misuse, I propose standardizing the syntax for specifying command arguments and options, regardless of whether the command is called directly or scheduled.
This change would result in a unified syntax, such as:
Discussion
Please share your thoughts on this proposed change. Do you see any potential drawbacks or advantages?
Beta Was this translation helpful? Give feedback.
All reactions