Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Valet Install On Mac - Cannot Redeclare

Tags:

php

laravel

I'm installing Valet on my MacBook Pro - El Capitan.

I installed PHP and MySQL with Homebrew as suggested on the Valet documentation page.

However, when I try to install Valet, I get the error:

PHP Fatal error: Cannot redeclare resolve() (previously declared in /Users/marc/.composer/vendor/hoa/core/Protocol.php:1140) in /Users/marc/.composer/vendor/laravel/valet/cli/includes/helpers.php on line 57

Fatal error: Cannot redeclare resolve() (previously declared in /Users/marc/.composer/vendor/hoa/core/Protocol.php:1140) in /Users/marc/.composer/vendor/laravel/valet/cli/includes/helpers.php on line 57

My composer.json file looks like this:

{
    "require": {
        "phpunit/phpunit": "~4.2",
        "phpmetrics/phpmetrics": "^1.10",
        "laravel/valet": "^1.1"
    }
}

I have tried deleting composer.lock and deleted the vendor directory, then composer install, but nothing changes. Any one have any advice here?

like image 992
Marc Steven Plotz Avatar asked Dec 04 '25 13:12

Marc Steven Plotz


1 Answers

I ran into this recently and I was able to resolve it by uninstalling / reinstalling valet:

composer global remove laravel/valet

then

composer global require laravel/valet

like image 199
user101289 Avatar answered Dec 07 '25 14:12

user101289



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!