Skip to content
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

Issue registering StorageLinkCommand #143

Closed
michaelhume opened this issue Mar 15, 2022 · 2 comments · Fixed by #144
Closed

Issue registering StorageLinkCommand #143

michaelhume opened this issue Mar 15, 2022 · 2 comments · Fixed by #144
Labels

Comments

@michaelhume
Copy link
Contributor

  • Tinker Version: v0.11.2
  • Laravel Version: 9.4.1
  • PHP Version: 8.1.3

Description:

I have recently encountered a problem attempting to bind the StorageLinkCommand into tinker.

This was working, but I've been using Tinkerwell for a while now (which has no issue) so I'm not exactly sure at what point it stopped working, but I now get a TypeError when attempting to start tinker.

  Psy\Shell::add(): Argument #1 ($command) must be of type Symfony\Component\Console\Command\Command, null given, called in /path/to/my/code/vendor/symfony/console/Application.php on line 478

In config/tinker.php I have:

'commands' => [
        \Illuminate\Foundation\Console\StorageLinkCommand::class,
    ],

If I remove this - all is well.

In TinkerCommand.php the command is failing to resolve from the app

foreach ($config->get('tinker.commands', []) as $command) {
            $commands[] = $this->getApplication()->resolve($command);   // <-- this is returning null
        }

Any idea what might be happening here?

Steps To Reproduce:

Add the following to config/tinker.php and try to start tinker

'commands' => [
        \Illuminate\Foundation\Console\StorageLinkCommand::class,
    ],
@driesvints
Copy link
Member

Actually, I now notice that none of the artisan commands work anymore within Tinker with Laravel 9. I'll investigate. Thanks

@driesvints
Copy link
Member

Fixed with #144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants