I'm new to Composer and am using a Mac along with MAMP as a local web server. I've installed Composer but it's referencing an old PHP 5 version that must be the default on my Mac.
I was able to install Craft 3 via Composer by adding the --ignore-platform-reqs flag as per https://docs.craftcms.com/v3/installation.html#downloading-with-composer
The Craft 3 starter project files were all added successfully. However, at the end of the install output in terminal was the following:
@php craft setup/welcome
Craft requires PHP 7.0 or later.
If I navigate to the project install directory and try running ./craft setup I get the same message "Craft requires PHP 7.0 or later".
The installation docs did say you could alternatively edit the .env file directly, so I entered the database details in there instead. But when I went to access the browser install wizard, I got errors about the security key being missing.
Now I worked around that by just generating a random 32 character string myself and entering this for the SECURITY_KEY setting in the .env file & was then able to complete the install wizard.
However, I'm wondering if that is OK to do? I'm concerned that there may be a particular format needed etc and that just pasting in my own key could cause issues down the line.
Ideally I'd prefer to be able to just complete the standard setup via terminal instead and have the key config automatically set there. Is there a way I can get the craft setup command to use the newer PHP 7+ available from MAMP? Or is there an easy way to update the default PHP version Composer references without disturbing the rest of my Mac?