cms
cms copied to clipboard
[5.x] Fix stache consistency issues with console commands
Fixes https://github.com/statamic/cms/issues/10514
One issue with this fix is that it currently does not handle shortened versions of console commands such as php artisan tin. However; I would argue that this is an issue with Laravel's handling of App::runningConsoleCommand(...) which would require a separate PR submitted to laravel/framework.
$ php artisan tin
Psy Shell v0.12.4 (PHP 8.2.18 — cli) by Justin Hileman
> Statamic\Statamic::isWorker()
= false
$ php artisan tinker
Psy Shell v0.12.4 (PHP 8.2.18 — cli) by Justin Hileman
> Statamic\Statamic::isWorker()
= true
```
@jasonvarga Sorry to be a bother, but have you had a chance to review this? Please let me know if you would like more detail on the issue and/or the intent of this PR.
Thank you for this PR but I don't feel it's the right approach.
@jasonvarga Yes, this approach was disgusting, but it's an issue that really should be resolved somehow.