When a lot of text is printed (example User::all()), old tinker v2.7.1 prints all data. The new tinker stops with a colon (:). Is there a way to return the old behavior?
Laravel "artisan tinker" stops with a colon (:)
528 views Asked by Mantas D AtThere are 2 answers
On
Whilst setting pager to false does work for me (thanks to @bobthecow for the help with that in the comments) I wanted a solution that didn’t require adding .psysh.php to all my projects.
For anyone else who's experiencing this, as far as I can tell, it turns our that if you have never had the pcntl extension installed, Psysh has never used a pager: https://github.com/bobthecow/psysh/blob/v0.11.20/src/Configuration.php#L1240
I had recently installed this and so everything started going through less. I prefer the previous behaviour in that all tinker output is in my actual terminal and shell, so I reverted to the previous behaviour by exporting the TERM=dumb variable.
I'm running in alpine on Docker so my existing TERM was xterm. No idea if this has any knock-on effects but so var it seemingly works as before installing the extension.

Tinker uses Psysh.
Psysh has a config option for setting pager.
From https://github.com/bobthecow/psysh/wiki/Config-options
For anything more than one page long, less will interrupt output with a colon.
I fixed this by switching the pager to 'cat'.
To update psysh options for tinker, create a
.psysh.phpfile in the laravel project root directory and throw this in it:Now when you run tinker, you'll get uninterrupted output (like it used to be).