Skip to content

Installation Guide

Daniel Renaud edited this page Oct 21, 2019 · 3 revisions

Overview

The current repository contains modules that belong to Amazon Event Bridge functionality only. To provide the ability to develop the project locally we introduced flow that can help the external developers work with it.

Development setup

Installation as a composer package

  1. Magento git repository is cloned and 2.3-develop branch is checked out. Checking out any 2.3 release tags should work fine as well.

    git clone [email protected]:magento/magento2.git .
  2. Create ext directory in the root directory of Magento:

    mkdir ext
  3. Git clone the amazon-event-bridge repository into the appropriate directory inside ext:

    git clone [email protected]:magento-engcom/amazon-event-bridge.git ext/magento/amazon-event-bridge
  4. Update Composer settings for the project to allow a better development workflow:

    • minimum-stability for packages is updated to dev value. This allows to install development modules:

        composer config minimum-stability dev
      
    • To be able to work with stable packages enable the prefer-stable property: prefer-stable: true. It should be included right above the minimum-stability setting.

    • Local package sources are configured, to let Composer know where to find the modules. The following command will configure the extension code, inside ext directory, to be treated as a package and symlinked to the vendor directory:

        composer config repositories.ext path "./ext/*/*/*"
      
  5. Finally, install the amazon-event-bridge-integration metapackage:

    composer require magento/amazon-event-bridge-integration

At this point, all of the amazon-event-bridge-integration modules are symlinked to vendor directory, which allows both running Magento installation with additional modules and development using the git workflow.

Setting up Git workflow

In order to improve Developer Experience when working with this repository structure, a few additional items may be configured:

  1. Exclude ext directories from root directory Git:

    echo ext >> ./.git/info/exclude
  2. Skip root directory composer.* files to avoid committing them by mistake:

    git update-index --skip-worktree composer.json
    git update-index --skip-worktree composer.lock

    This operation is reversible, if needed:

    git update-index --no-skip-worktree composer.json
    git update-index --no-skip-worktree composer.lock
Clone this wiki locally