Skip to content

Artisan::call is broken in tinker #181

@netpok

Description

@netpok

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:

  • Calling migrate --seed results in error NAMESPACE NOT FOUND There are no commands defined in the "db" namespace.
  • Calling down --quiet results in INVALID OPTION The "--quiet" option does not exist.

These commands are running successfully when called like php artisan down --quiet or php 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 the Artisan::call('migrate --seed'); line.

Steps To Reproduce

Take a brand new Laravel install and run Artisan::call('migrate --seed') or Artisan::call('down --quiet') in tinker.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions