Closed Namoshek closed 3 years ago
Build breaks due to PHPUnit version... shouldn't be caused by this PR. Locally, I had no issue installing composer dependencies.
@nunomaduro this would be nice to merge as it can be confusing to have loading... as the description when task is running.
For example I have a task that deletes something and would like to have the word deleting... to display when the task is running.
@ashleyhood You can already specify a custom loading text, it's just not documented ;) https://github.com/nunomaduro/laravel-console-task/blob/513746f6809485121898e21c8a5da1ad72dca8aa/src/LaravelConsoleTaskServiceProvider.php#L42
As discussed in #10, this PR adds support for custom success messages of tasks. As there is no way to distinguish between success and failure other than checking the result for
false
, I decided to add a fourth parameter to the macro which allows to set a custom failure message. This message simply allows to customize the currently hardcodedfailed
response:In theory, this PR is not backwards compatible, as it changes the output for
return 'OK';
compared to the previous version (not the return value of$this->task()
though). But as the special scenarios without a return value or something different to a boolean have never been documented, I guess it would still be fine to release it as minor version or so...