Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tinker broken in laravel 9.0.0 #142

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

Closed
grota opened this issue Feb 8, 2022 · 8 comments
Closed

Tinker broken in laravel 9.0.0 #142

grota opened this issue Feb 8, 2022 · 8 comments

Comments

@grota
Copy link

grota commented Feb 8, 2022

  • Tinker Version: 2.7.0
  • Laravel Version: 9.0.0
  • PHP Version: 8.1.2
  • Database Driver & Version: N/A

Description:

Seems like tinker is broken in laravel 9.
Bootstrapping a new laravel 9.0.0 project via sail, launching ./artisan tinker followed by help results in

RuntimeException with message 'Too many arguments, expected arguments "command" "command_name".'

Issuing ls results in:

InvalidArgumentException with message 'Unknown namespace, class or function: s'

Steps To Reproduce:

  • curl -s "https://laravel.build/sail9" | bash
  • cd sail9 && ./vendor/bin/sail up -d
  • ./vendor/bin/sail shell
  • php ./artisan tinker
  • help
@driesvints
Copy link
Member

Seems like this is a breaking change in Symfony Console's v5.4.3 release. It works for me with v5.4.2. Can you post an issue report on their tracker?

@grota
Copy link
Author

grota commented Feb 8, 2022

done ⬆️ , btw, is symfony/console:^6.0 (introduced here laravel/framework@03fa6a2#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R34 ) a required dependency? Meaning, can we mitigate the bug by using an alias dependency like "symfony/console": "5.4.2 as 6.0.2" ?

@driesvints
Copy link
Member

it's a required dependency of Laravel yeah

@grota
Copy link
Author

grota commented Feb 8, 2022

For people encountering the same issue, pinning symfony/console to 6.0.2 can be used a temporary workaround while a new 6.x release of symfony/console gets published.

@bobthecow
Copy link
Contributor

It's broken in the latest point releases of Symfony 4.4, 5.3, 5.4, and 6.0. You can fix any of them by pinning to one version back.

@ankurk91
Copy link

It is still broken for me. Even unable to exit from tinker.

Laravel v9.0.2
php v8.1.2
symfony/console v6.0.3

Everything is on their latest version.

symfony/symfony#45240
The PR was merged 12 days ago, still broken :(

@grota
Copy link
Author

grota commented Feb 12, 2022

6.0.3 is the one that has the bug, you/we need to wait the next point release

@bobthecow
Copy link
Contributor

If you explicitly require symfony/console v6.0.2 it will fix it. Otherwise you need to wait for the next release. I believe it'll be in a week or so?

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

No branches or pull requests

4 participants