Roboroads/laravel-tinker

Plugin breaks om PHP7.0 because of list unpacking

Closed this issue · 1 comments

          Possibly related..  Psysh and dependencies versions breaking things for me working on older package and php versions 

I'm using laravel-tinker on some of our newer projects that are running Laravel 9 and PHP 8.1 and all it good (thanks for great plugin).

I do have a problem trying to use the plugin with the majority of our older (and very complex) projects that are stuck on PHP-7.0 and Laravel 5.5. I'm not a phpstrom plugin developer but looking at the entry point for PHP, the tinker_run.php script, I see my problems being driven from a few dependency/version related issues.

  • [$id, $token] = $token; # list unpacking only supported in php-7.1+ ( fix with traditional list($id,$token) = $token )
  • Psy\Configuration signature changed - between v0.9.12 and v.0.11.13

It would be great if

  • the newest plugin's tinker_run.php was dependency aware and adapted accordingly ( something like if(PHP_VERSION_ID < 71000) { )

For anybody else having these issues (on php-7.0) the only solution I found is the travel back in time and manually force things

Originally posted by @bgdevlab in #306 (comment)

Fixed in 7be6c52