You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When including Laravel via another composer dependency it's not booted in tinker
Extended bug description
Since the addition of Laravel detection composer set-ups where another composer.json dependency includes laravel/framework no longer work with the tinker plugin, as $isLaravelProject (of tinker_run.php) is false and thus the kernel isn't required/bootstrapped
Your project is not the problem
I tried using a fresh laravel install - I'm fairly certain it has nothing to do with my project.
How to reproduce?
Create a repo which includes a composer.json that requires laravel/framework
Create another repo which includes the first repo in its composer.json
Attempt to use a Laravel function in tinker, eg: echo app()->environment() . PHP_EOL;
Expected behavior
Laravel would be booted and the code execute under tinker
Screenshots
No response
IDE & Version
PHPStorm 2024.1.4
PHP Version
8.3
OS and version
Windows 11
Laravel Tinker plugin version
2.7.3
Interpreter type
Remote
Laravel Version
v11.18.0
Tinker version
v2.9.0
Psysh version
v0.12.4
Additional Context
Simply checking the composer.lock instead of the composer.json to see if Laravel exists will resolve this problem
The text was updated successfully, but these errors were encountered:
Hmmmmmmmmmmmmm, yea I could see that being a problem. Should detect if the file vendor/laravel/framework/conposer.json exists maybe instead. Or indeed, check the lockfile (if that's an easier option, idk..)
Short bug description
When including Laravel via another composer dependency it's not booted in tinker
Extended bug description
Since the addition of Laravel detection composer set-ups where another
composer.json
dependency includeslaravel/framework
no longer work with the tinker plugin, as$isLaravelProject
(oftinker_run.php
) isfalse
and thus the kernel isn't required/bootstrappedYour project is not the problem
How to reproduce?
composer.json
that requireslaravel/framework
composer.json
echo app()->environment() . PHP_EOL;
Expected behavior
Laravel would be booted and the code execute under tinker
Screenshots
No response
IDE & Version
PHPStorm 2024.1.4
PHP Version
8.3
OS and version
Windows 11
Laravel Tinker plugin version
2.7.3
Interpreter type
Remote
Laravel Version
v11.18.0
Tinker version
v2.9.0
Psysh version
v0.12.4
Additional Context
Simply checking the
composer.lock
instead of thecomposer.json
to see if Laravel exists will resolve this problemThe text was updated successfully, but these errors were encountered: