-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Hello.
I have "psy/psysh": "0.12.16" in my local environment, and the Artisan command runner works fine. For example:
tinker --execute="echo \App\Models\User::count();"
However, after upgrading the library to version 0.12.19, I get an HTTP 500 error when running the same Tinker command.
Stack trace:
[2026-02-10 09:51:39] local.ERROR: Undefined constant "STDIN" {"userId":1,"exception":"[object] (Error(code: 0): Undefined constant "STDIN" at project_folder\vendor\symfony\console\Helper\QuestionHelper.php:58)
[stacktrace]
#0 project_folder\vendor\psy\psysh\src\ProjectTrust.php(251): Symfony\Component\Console\Helper\QuestionHelper->ask()
#1 project_folder\vendor\psy\psysh\src\Configuration.php(685): Psy\ProjectTrust->promptForTrust()
#2 project_folder\vendor\psy\psysh\src\Shell.php(193): Psy\Configuration->loadLocalConfigWithPrompt()
#3 project_folder\vendor\psy\psysh\src\Shell.php(170): Psy\Shell->loadLocalConfig()
It looks like this error occurs because PsySH tries to prompt for project trust in a non-interactive environment, where the STDIN constant is not defined.
Is there a recommended way to disable the trust prompt or mark the project as trusted for non-interactive execution? Or is it possible to update the package so that it doesn't need to be added to trusted projects on the server side?
As I understand, upgrading to version 0.12.19 is necessary due to the security fix.