cms icon indicating copy to clipboard operation
cms copied to clipboard

[5.x] Fix stache consistency issues with console commands

Open kingsven opened this issue 1 year ago • 2 comments

Fixes https://github.com/statamic/cms/issues/10514

kingsven avatar Aug 06 '24 05:08 kingsven

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
```

simonworkhouse avatar Aug 06 '24 05:08 simonworkhouse

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

simonworkhouse avatar Oct 17 '24 08:10 simonworkhouse

Thank you for this PR but I don't feel it's the right approach.

jasonvarga avatar Dec 05 '24 20:12 jasonvarga

@jasonvarga Yes, this approach was disgusting, but it's an issue that really should be resolved somehow.

simonworkhouse avatar Nov 12 '25 01:11 simonworkhouse