-
Notifications
You must be signed in to change notification settings - Fork 92
Installation
The current repository contains modules that belong to Adobe Stock Integration functionality only. In order to use the Magento Adobe Stock Integration the package needs to be installed on top of magento2 framework installation.
There are two options of installation that you can choose depending on your preference: modman or composer, see below.
-
Clone the
magento2
git repository and check out the2.4-develop
branch. Checking out any2.4
release tags should work fine as well.git clone git@github.com:magento/magento2.git .
-
Ensure Module Manger (modman) is installed:
brew install modman
-
Clone the Adobe Stock Integration repo from the project root directory via modman - the metapackage will be stored inside the
.modman
directory, module symlinks will be created inapp/code
directory:modman init modman clone git@github.com:magento/adobe-stock-integration.git modman clone git@github.com:magento/adobe-ims.git
-
Install the Adobe Stock PHP SDK (required dependency)
adobe/stock-api-libphp
via composercomposer require astock/stock-api-libphp
-
Ensure Adobe Stock Integration modules are enabled
bin/magento module:status
/bin/magento module:enable
(https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/enable-module.html). -
Install/Upgrade the database
bin/magento setup:install ... or bin/magento setup:upgrade
-
Clone the
magento2
git repository and check out the2.4-develop
branch. You may also check out and use any2.4
release tags.git clone git@github.com:magento/magento2.git .
-
Create an
ext
directory in the root of themagento2
project directory:cd magento2 mkdir ext
-
Clone the
adobe-stock-integration
repository into the appropriate directory insideext
:git clone git@github.com:magento/adobe-ims.git ext/magento/adobe-ims git clone git@github.com:magento/adobe-stock-integration.git ext/magento/stock-integration
-
Update Composer settings for the project to allow a better development workflow:
-
minimum-stability
for packages is updated todev
value. This allows installation of 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 theminimum-stability
setting. -
Next we configure Composer so that it knows where to find new modules. The following command will configure any extension code inside the
ext
directory to be treated as a package and symlinked to thevendor
directory:composer config repositories.ext path "./ext/*/*/*"
-
-
Finally, install the
adobe-stock-integration
metapackage:composer require magento/adobe-stock-integration
-
Ensure Adobe Stock Integration modules are enabled
bin/magento module:status
/bin/magento module:enable
(https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/enable-module.html). -
Install/Upgrade the database
bin/magento setup:install ... or bin/magento setup:upgrade
At this point, all of the adobe-stock-integration
modules are symlinked inside the vendor
directory, which allows both running a Magento installation with additional modules as well as doing development using the standard git workflow.
In order to improve the developer experience when working with this repository structure, a few additional items may be configured:
-
Exclude
ext
directories from root directory Git:echo ext >> ./.git/info/exclude
-
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
- Enable "Enhanced Media Gallery" in Magento Configuration:
Stores -> Configuration -> Advanced -> System -> Enhanced Media Gallery
(orbin/magento config:set system/media_gallery/enabled 1
) - Populate the Adobe Stock API keys: Get API Keys