Looks like there is no support for custom Psy shell options via Tinker's configuration options. I looked in the documentation and could find no mention of it.
-- There is a way to bypass Laravel's configuration sys completely by setting a PSYSH_CONFIG env variable, but even then, you would end up with at least one additional file for those configurations somewhere.
So I've patched Tinker, to handle such a use case.
Looks like there is no support for custom Psy shell options via Tinker's configuration options. I looked in the documentation and could find no mention of it.
-- There is a way to bypass Laravel's configuration sys completely by setting a PSYSH_CONFIG env variable, but even then, you would end up with at least one additional file for those configurations somewhere.
So I've patched Tinker, to handle such a use case.
To see it in action, you would need to:
php artisan vendor:publish --publisher=laravel\tinker --tag=config
.Then uncomment the lines in the config/tinker.php file.
Then run
php artisan config:clear
, to ensure its picked up.Now when you run
php artisan tinker
you should see a new custom prompt.It should work with all other Psy configuration options too. - :)