Roboroads/laravel-tinker

Missing vendor root settings input

Closed this issue · 3 comments

Bug description
I have a problem with plugin paths, so I digged a little in the code to try to understand what was happenning, and I saw that there was supposed to be a vendor_root field in phpstorm settings (or at least that's what I get from reading this file https://github.com/Roboroads/laravel-tinker/blob/be0fb546e4b30c6f0f8b610063b3c8376cd92832/src/main/kotlin/nl/deschepers/laraveltinker/settings/ProjectSettingsComponent.kt).

It so happened that I only have the laravel_root input in php storm settings for the plugin.

Which means I can't specify a vendor path which is consistent with laravel root, which in turn imply that in tinker_run.php, the value $projectSettings->vendorRoot is NULL and $projectSettings->vendorRoot ?: __DIR__ takes the value of __DIR__ which doesn't suits my installation.

BTW : why isn't vendorRoot taking laravelRoot value if it's null ?
It would makes sense, no ?

To Reproduce
Install the plugin

Expected behavior
I should have two text input in Settings > Tools > Laravel Tinker > Project settings

Screenshots
image

Environment (please complete the following information):

  • IDE & Version: PhpStorm 2022.2.3, Build #PS-222.4345.15, built on October 5, 2022
  • PHP Version: 8.1.12
  • OS: [e.g. Windows 11
  • Laravel Tinker plugin version : 2.4.0
  • Interpreter Type: docker-compose
  • Laravel Version: v9.31.0
  • Tinker version: v2.7.2

Thx in advance for the help, your plugin is awesome, it was such a shame that it wasn't workign for some time (I don't remember if it was phpstorm or docker issue), but I had to work with tinkerwell for that time, which isn't free, and I missed your plugin so much for this time :-(
Now I get it working despite my problem by creating php files where tinker_run.php try to require them just to require in the correct path, but it's ugly :-P

BTW : why isn't vendorRoot taking laravelRoot value if it's null ?

It should.. I'm looking at why the field is not showing up. It's a PR from someone else.

Fun fact, my mistake, this isn't released yet. Oops!

No worries, I'll push an update today.

Version 2.5.0 is underway, pending JetBrains verification :)