Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Slon's avatar
Level 2

When use php 7.1 with Laravel Valet 2.7.0 got an error

I need to use php 7.1 with laravel valet, but after valet use [email protected] valet show error:

Fatal error: Declaration of Symfony\Component\Console\Input\Input::getArgument($name) must be compatible with Symfony\Component\Console\Input\InputInterface::getArgument(string $name) in /Users/slon/.composer/vendor/symfony/console/Input/Input.php on line 28
php -v
PHP 7.1.33 (cli) (built: Nov 28 2019 14:00:51) ( NTS )
composer global update
Nothing to install or update

Any ideas?

0 likes
5 replies
fylzero's avatar
fylzero
Best Answer
Level 67

@slon Valet 2.7.0 is part of Laravel 6.x which requires PHP v7.2 or above.

1 like
Slon's avatar
Level 2

That explains everything! Thanks!

@fylzero which version to use if I need PHP v7.1 (one of old project use Laravel 5.2)?

fylzero's avatar

@slon

Laravel 5.8 supported PHP >= 7.1.3 Laravel 6 was release Sept 3rd 2019 According to https://github.com/laravel/valet/releases Before Sept 3rd, the Valet version would have been Valet v2.3.3

So I think Valet 2.3.3 is your answer.

...but honestly, upgrade your framework. It isn't usually too difficult and will save you a headache as the project moves along. Tech debt is called debt because it gets harder to pay off with time.

2 likes
Slon's avatar
Level 2

@fylzero can't downgrade Valet to 2.3.3 version. I change version in composer.json to "laravel/valet": "^2.3.3" but after composer global update:

Changed current directory to /Users/slon/.composer
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

Please or to participate in this conversation.