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

[7.x] Match Symfony's Command::setHidden declaration #31840

Merged

Conversation

sperelson
Copy link
Contributor

@sperelson sperelson commented Mar 8, 2020

Source of declaration mismatch: Symfony\Component\Console\Command\Command::setHidden(bool $hidden) - vendor/symfony/console/Command/Command.php:456
symfony/console@101b74f

After installing Laravel v7.0.7 on PHP 7.3.12 via laravel new I got a few declaration mismatches with Symfony. Two in Carbon which appear to be documented and with a fix pending here: briannesbitt/Carbon#2033 and this one in
Illuminate\Console\Command::setHidden($hidden) with a mismatch to Symfony\Component\Console\Command\Command::setHidden(bool $hidden)

Installed Symfony is v5.0.5. Errors were displayed in Tinkerwell.

This very well may be a PHP 7.3 issue. Cannot replicate using PHP 7.4

Symfony\Component\Console\Command\Command::setHidden(bool $hidden)
symfony/console@101b74f
@taylorotwell taylorotwell merged commit cf85266 into laravel:7.x Mar 8, 2020
@sperelson sperelson deleted the Fix-Console-setHidden-declaration branch March 8, 2020 16:26
@sperelson
Copy link
Contributor Author

This is a fine fix as method parameter signatures should match if possible. But, my actual problem was that I am a Tinkerwell noob and didn't link my correct PHP version. 🤦‍♂

Meaning that the error was happening because of PHP 7.1....

@hopeseekr
Copy link

I'm still experiencing this problem.

  Declaration of Illuminate\Console\Command::setHidden(bool $hidden) should be compatible with Symfony\Component\Console\Command\Command::setHidden($hidden)

Brand new install of Laravel v7.

@GrahamCampbell
Copy link
Member

This happens if you have the wrong version of Symfony in your vendor folder, possibly due to a global install.

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

Successfully merging this pull request may close these issues.

4 participants