Monthly Archives: June 2022

Install Composer with MAMP on Windows 10

Download Composer

Retrieve the latest version of Composer from the link below :
https://getcomposer.org/Composer-Setup.exe

Install Composer

Please find below the steps I used to install Composer with MAMP.

Step 1 : Turn off the developer mode

Don’t use the developer mode !

Step 1

Step 2 : Select the right version of PHP

Click Browse then find and select the php.exe you are currently using.

Step 2

If you don’t know which version of MAMP you are using, just go to the MAMP’s preferences. Ex:
MAMP PHP Preferences

In my case, I’m using PHP version 7.4.1 at the time of writing.
And I’m the only person using my machine so I checked the option to modify the path:
Step 2-2

Step 2-3

Step 3 : Configure a proxy or not

You are now prompted to confirm if you want to configure a proxy.
In you don’t know what a proxy is, then you are probably not using one.
Just skip it

Step 3

Step 4 : Confirm

If you are ready, just press the install button! Otherwise go back to adjust the settings.

Step 4

Step 5 : Warning

I just click the Next button and will logoff / login later.

Step 5

Step 6 : All done

Everything’s good! You can safely logoff and login again to trigger the refresh of Windows Environment. (I meant it, logoff and login again, NOT restarting)

Step 6

Give it a try

Open a terminal and try to install the hubspot sdk for example :

cd E:\GitHub\phutured\past\
composer require hubspot/api-client
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^8.2 for hubspot/api-client
./composer.json has been created
Running composer update hubspot/api-client
Loading composer repositories with package information
https://repo.packagist.org could not be fully loaded (curl error 35 while downloading https://repo.packagist.org/packages.json: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to repo.packagist.org:443 ), package information was loaded from the local cache and may be out of date
Updating dependencies
Lock file operations: 9 installs, 0 updates, 0 removals
  - Locking guzzlehttp/guzzle (7.4.5)
  - Locking guzzlehttp/promises (1.5.1)
  - Locking guzzlehttp/psr7 (2.4.0)
  - Locking hubspot/api-client (8.2.1)
  - Locking psr/http-client (1.0.1)
  - Locking psr/http-factory (1.0.1)
  - Locking psr/http-message (1.0.1)
  - Locking ralouphie/getallheaders (3.0.3)
  - Locking symfony/deprecation-contracts (v2.5.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 9 installs, 0 updates, 0 removals
  - Downloading guzzlehttp/promises (1.5.1)
  - Downloading ralouphie/getallheaders (3.0.3)
  - Downloading psr/http-message (1.0.1)
  - Downloading psr/http-factory (1.0.1)
  - Downloading guzzlehttp/psr7 (2.4.0)
  - Downloading symfony/deprecation-contracts (v2.5.1)
  - Downloading psr/http-client (1.0.1)
  - Downloading guzzlehttp/guzzle (7.4.5)
  - Downloading hubspot/api-client (8.2.1)
  - Installing guzzlehttp/promises (1.5.1): Extracting archive
  - Installing ralouphie/getallheaders (3.0.3): Extracting archive
  - Installing psr/http-message (1.0.1): Extracting archive
  - Installing psr/http-factory (1.0.1): Extracting archive
  - Installing guzzlehttp/psr7 (2.4.0): Extracting archive
  - Installing symfony/deprecation-contracts (v2.5.1): Extracting archive
  - Installing psr/http-client (1.0.1): Extracting archive
  - Installing guzzlehttp/guzzle (7.4.5): Extracting archive
  - Installing hubspot/api-client (8.2.1): Extracting archive
3 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
4 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Everything looks to work properly!