newbie question - install errors with composer

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Silverstripe Version:4.1.1

Question:

I’m just starting to get my head around Silverstripe, and am trying to install via composer on mac. I get the below errors when trying to install. This problem occurs if I run MAMP or AMPPS. I’ve tested that the intl extension is running by running -
echo (extension_loaded(‘intl’)) ? ‘yes’ : ‘no’;
Does anyone know what I’m missing or doing wrong?

MacBook-Pro:ss$ composer create-project silverstripe/installer example

Installing silverstripe/installer (4.1.2)
  - Installing silverstripe/installer (4.1.2): Loading from cache
Created project in example
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - silverstripe/framework 4.1.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - silverstripe/recipe-cms 1.1.2 requires silverstripe/recipe-core 1.1.2@stable -> satisfiable by silverstripe/recipe-core[1.1.2].
    - silverstripe/recipe-core 1.1.2 requires silverstripe/framework 4.1.2@stable -> satisfiable by silverstripe/framework[4.1.2].
    - Installation request for silverstripe/recipe-cms 1.1.2@stable -> satisfiable by silverstripe/recipe-cms[1.1.2].

Do your command line and server use different versions of PHP? I assume Composer would be checking against the CLI version. You can use the command which php on the command line to see which version of PHP the command line is using, and php -m to see which modules are loaded in the CLI version of PHP.

This might be helpful: Use mamp php in cli (using an alias) · GitHub

You also might want to explore a different environment setup (backup your system first!)… I’ve found this guide very helpful in the past: macOS 10.13 High Sierra Apache Setup: Multiple PHP Versions | Grav . I sometimes use Vagrant but find it slow so for most sites I use a homebrew based local environment.

Thanks for your reply. My CLI php was different, so now it’s loading the MAMP PHP and I can see that intl is being loaded when running php -m. I’m still getting the same error though -
silverstripe/framework 4.1.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
Anything else I should check?
many thanks

A post was split to a new topic: Composer issue