Search

Composer > Add Package

MAMP PRO provides a user-friendly interface for adding Composer packages directly to a site.

MAMP PRO - Composer - Add Package

Adding a Package

  1. Open the Menu:
    Select Site → Composer → Add Package… from the top menu.

  2. Search for a Package:
    A dialog window will open with an input field. Start typing the name of the desired Composer package. Matching packages from the Packagist repository will be listed below in real time.

  3. Select a Package:
    Click on the package you want to add from the list.

  4. Optional: Add as a Development Package:
    Enable the Add as dev package checkbox if the package is only needed for development purposes (e.g., debugging tools, testing frameworks). The package will then be added to the “require-dev” section of the composer.json file.

  5. Install the Package: Click Add to add the selected package to the current site. The installation will be performed automatically in the background using Composer.

Once installed, the package will be listed in the site’s composer.json file and will be immediately available for use.