laravel / tinker

Powerful REPL for the Laravel framework.
https://laravel.com/docs/artisan#tinker
MIT License
7.34k stars 130 forks source link

Laravel Vapor support #106

Closed jerguslejko closed 4 years ago

jerguslejko commented 4 years ago

Right now, tinker can't be used inside Laravel Vapor because in order to run psysh (which tinker uses), it needs to be able to create a runtime directory (which defaults to ~/.config/psysh -- this is not available inside an AWS Lambda). See the runtimeDir option @ https://github.com/bobthecow/psysh/wiki/Config-options.

However, this directory path can be changed by setting the XDG_CONFIG_HOME variable.

Not sure if this should be a tinker feature or a Vapor feature.

Anyway, once this is resolved, people can use php artisan tinker --execute "dump(config('queue'))" or whatever inside their vapor lambdas

themsaid commented 4 years ago

Hey,

You can try that by setting a XDG_CONFIG_HOME environment variable on Vapor and see if it works. Contact us on vapor@laravel.com if that works and we'll see if it's safe to make it possible to configure it in Vapor by default.

bsormagec commented 3 years ago

@themsaid XDG_CONFIG_HOME=/tmp works Lambda has 500MB temp dir on "/tmp" directory and it worked on me i just wanna inform you about this 👍🏼