1

Take a look at this -

enter image description here

This question is different than the possible duplicate - Laravel valet linked php error

Because this guy has following result -

$ which php
/usr/local/Cellar/php70/7.0.6/bin/php

While I had

$ which php
/usr/local/bin/php

And now this because I followed some Stack Overflow answer

/usr/local/opt/php71/bin/php

The problem seems originated from the laravel valets ability to find PHP at the location which it expects or it is having multiple PHP versions to choose from. I am not sure but this is my guess. And I do not know how to fix this.

syam
  • 892
  • 8
  • 19
  • Possible duplicate of [Laravel valet linked php error](https://stackoverflow.com/questions/37178743/laravel-valet-linked-php-error) – shukshin.ivan Aug 20 '17 at 12:34
  • sorry the steps in it did not help – syam Aug 20 '17 at 13:00
  • @samo I don't have the solution, but a pro tip for a good question is to avoid screenshot of error message, it's better to type the out the text you get (and if you like only a link to screenshot) the reason is that search engines do not use OCR, hence your question will be less useful for others. – Petter Friberg Aug 20 '17 at 13:03
  • This question was easy for me to find (and helped me a lot btw, so thank you @samo), the screenshot is supplementary as the error message is already stated, and it's not a duplicate because I already looked at the supposed duplicate (as well as other questions) and they did not help and where slightly different questions. – Attila May 25 '18 at 02:08

2 Answers2

3

I had the same issue today. For me the solution was to run composer global update to update my global packages to the latest version of Laravel.

This is required because of this change to the order of the arguments for collection methods in 5.3: https://github.com/laravel/framework/blob/5.5/src/Illuminate/Support/Arr.php#L175 and this change to the way Valet validates the version of PHP installed: https://github.com/laravel/valet/commit/84ade711b61fd79ead98e08b5186704f68b4f993

hermanschutte
  • 662
  • 2
  • 5
  • 20
1

I found the answer in this post from The Web Tier.

  1. brew link php71 (or whatever PHP version you are running)
  2. brew services restart --all
  3. composer global update
  4. valet start
Jacob
  • 1,560
  • 4
  • 19
  • 41