-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Artisan::call is broken in tinker #181
Comments
Thank you for reporting this issue! As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub. If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team. Thank you! |
I investigated a little bit the I don't really know why they where not added in the first place, maybe @driesvints can explain it better. |
Same here I first published the tinker config file and added But the issue with |
Ah there it is ! |
Thanks @yoonustehrani. @netpok feel free to add the command to the config file if you need it in Tinker. |
Tinker Version
2.9.0
Laravel Version
11.19.0
PHP Version
8.3.9
Database Driver & Version
MySQL 8.0.37 on Linux
Description
Artisan calls are not working as expected, two examples:
migrate --seed
results in errorNAMESPACE NOT FOUND There are no commands defined in the "db" namespace.
down --quiet
results inINVALID OPTION The "--quiet" option does not exist.
These commands are running successfully when called like
php artisan down --quiet
orphp artisan migrate --seed
.Also the same happens when they are indirectly called (e.g.
$model->restore()
is called in tinker and an event listener executes theArtisan::call('migrate --seed');
line.Steps To Reproduce
Take a brand new Laravel install and run
Artisan::call('migrate --seed')
orArtisan::call('down --quiet')
in tinker.The text was updated successfully, but these errors were encountered: