Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Valet installation

Tags:

php

laravel

In trying to get Laravel Valet up and running, I have stumbled upon this issue. When running 'valet install' or 'valet park' or any valet-command at all, I get the following error:

> PHP Fatal error:  Cannot redeclare info() (previously declared in /Users/jantore/.composer/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:454) in /Users/jantore/.composer/vendor/laravel/valet/cli/includes/helpers.php on line 20
> 
> Fatal error: Cannot redeclare info() (previously declared in
> /Users/jantore/.composer/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php:454)
> in
> /Users/jantore/.composer/vendor/laravel/valet/cli/includes/helpers.php
> on line 20 eger:~ jantore$

I went through the helpers.php document and tried to comment out the info()-function, but that didn't make a difference.

I have a fresh Brew install with PHP 7.0 as per the Valet-install instructions.

Anyone have any clue what this might be?


Update: As per Ben Swinbourne's suggestion I tried with composer global dump-autoload. Unfortunately the same result, no change in the error. Thanx to Ben for the suggestion though :)

like image 286
EgerHeed Avatar asked Nov 26 '25 16:11

EgerHeed


1 Answers

I know this is an old topic, I recently had a similar issue, except mine was around the retry() function.

to solve it.

composer global remove laravel/valet
composer global require laravel/valet
like image 135
Diego Antunes Avatar answered Nov 29 '25 04:11

Diego Antunes



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!