#How to use Laravel 8 on Mac?

1 messages · Page 1 of 1 (latest)

rose kayak
#

I need to use Laravel 8 specifically.
My PHP version is higher than what it says in the command prompt

PHP 8.2.5 (cli) (built: Apr 13 2023 17:59:46) (NTS) Copyright (c) The PHP Group

So I installed an older PHP version (7.4)
But I still get an error....

Cannot use laravel/laravel's latest version v8.0.3 as it requires php ^7.3 which is not satisfied by your platform.

So it means I cannot use Laravel 8 on mac?

#

How to use Laravel 8 on Mac?

#

I solved by reinstalling composer...

So if anyone wants to use previous versions

  • Should install compatible php version with Laravel version of choice
  • Chosing the active php version in mac, you do brew unlink php@version then brew link php@version
  • Then re-install composer it can be the latest version it doesn't matter for composer.
eternal needle
wary canopy
#

I agree 100% with Martin's statement, but IF you HAVE to run legacy - I'd recommend using valet. You can use valet isolate to specify a specific PHP version for a specific app, run composer using that specific php version and more.

rose kayak
rose kayak
eternal needle
#

And if you need to maintain old apps, then you’d just clone those apps rather than creating brand new apps surely?

rose kayak
#

server computer has laravel 8 installed I think, they made me downgrade the version and they said it is because of the servers, I was fine with latest.

eternal needle
#

That makes no sense.

rose kayak
#

so I could basically keep working with latest laravel?

eternal needle
#

Well what version of PHP is installed on these servers?

rose kayak
#

7

eternal needle
#

Mate.

rose kayak
#

lol I know

#

and current project I'm working shares one backend for 2 diffferent apps, and it is laravel 8 as well so I have to work with legacy version.

#

have you ever seen php v4? A couple of months ago there was a legacy app that required maintenance and the company brought someone who could code with that dinosour.

#

he worked for two days and gone.