How to add Mage2.PRO packages to the Magento 2 root composer.json file

You need to add Mage2.PRO packages to the require section of the Magento 2 root composer.json file.

You can do it from the command line.


This command should be executed in the Magento 2 root folder!
Otherwise, you will get an error like «mage2pro/core requires magento/framework >=100.0.0 -> no matching package found».
You can check the current folder with the standard Unix pwd command.

Use the composer require command:

composer require <package name>:*

Examples

«Stripe» extension:

composer require mage2pro/stripe:*

«Price Format» extension:

composer require mage2pro/currency-format:*

See also: