Before submitting any extensions to the Magento Marketplace, you will need to know how to validate the composer package accurately. Otherwise, there is a high possibility that your modules will be rejected since it is packaged incorrectly or doesn’t comply with Magento coding standards. In this tutorial, we will show you a detailed instruction of module validation in order to pass the technical review at ease.
To validate your package in Magento Marketplace, implementing the following steps:
- Step 1: Go to https://github.com/magento/marketplace-tools to download the file validate_m2_package.php
- Step 2: Place your module (zipped file) in the same folder where you placed the previous file.
Important: In order to zip your package, you must get back to root path of your module, e.g.: /app/code/Vendor Name/Module Name/ and then zip your package. Also, make sure that the composer.json remains in the root path of your zipped package.
- Step 3: Run the below command:
$ <path_to_php> validate_m2_package.php -d vendor-modulename.zip
where <path_to_php> is the path to php compiler and vendor-modulename.zip should be name of your module zipped file.
-d – Showing debugs messages. (Optional)
Once your package passes the validation, it will appear the success message. Besides, the validation tool will show both errors and warnings if any, but you just need to concern about the errors. If having surplus time, you can fix warnings but we think that it’s unnecessary. After tackling all errors, you must resubmit the package to validate it again.
The next round that your module must go through is QA Review (using Magento Extension Quality Program tool).