I want to check My Extension's coding standard for Magento Marketplace before submitting it on **Magento Marketplace*. Can anyone tell me how can I install coding standard in My Local Environment and check my extension whether this extension is eligible or not for Magento Marketplace code standard.

Thanks In Advance..!


Magento use EQP Coding Standard tool for checking the coding standard of a module.https://github.com/magento/marketplace-eqp

Magento this tool used basically using PHP_CodeSniffer tool.

If you want to in run EQP Coding Standard on your local system, then follow steps:

  1. Go to your Magento root directory, install this too using composer:

composer create-project --repository=https://repo.magento.com magento/marketplace-eqp magento-coding-standard

  1. Then go to this tool directly using cd magento-coding-standard

  2. run Composer update command composer install which will update module dependency packages. Also set config path specific PHP version set paths to php binary dir

vendor/bin/phpcs --config-set php7.0_path /path/to/your/php7

  1. After that, you can use below command for checkout code start of your module from magento-coding-standard folder

    php vendor/bin/phpcs /path/to/your/extension --standard=MEQP2

use MEQP2 for magento2 extension.


php vendor/bin/phpcs /var/www/html/MagentoProkect/app/code/DevAmitbera/CustomModule --standard=MEQP2 --extensions=php,phtml

Here i give full path of my extension /var/www/html/MagentoProkect/app/code/DevAmitbera/CustomModule

4.1. If you use windows and face some path must be translated related warning in command line then try below solution. Install Cygwin console from https://cygwin.com and then go to magento-coding-standard directory and run below command.

vendor/bin/phpcs F:/xampp/htdocs/magento2/app/code/DevAmitbera/CustomModule --standard=MEQP2 --severity=10 --extensions=php,phtml

  1. After That, I have tun code sniffer auto fixer command which is basic code standards issue.

php vendor/bin/phpcbf /path/to/your/extension -extensions=php,phtml --standard=MEQP2


php vendor/bin/phpcbf /var/www/html/app/code/DevAmitbera/CustomModule --standard=MEQP2 --extensions=php,phtml

After re-run Step 4 command for check out the rest of error which you need to fix yourself manually.

  • 1
    I will try and let you know, If My extension is pass in this than it will approved in Magento Marketplace ? Apr 16 '19 at 9:00
  • 1
    You have to follow also https://docs.magento.com/marketplace/user_guide/Resources/pdf/Extension_Quality_Program_Overview.pdf and
    – Amit Bera
    Apr 16 '19 at 9:03
  • 1
    prntscr.com/nclrtq Apr 16 '19 at 9:20
  • 1
    Can you please help me to solve code_sniffer related issue. Apr 16 '19 at 10:13
  • 1
    I am run command from "magento-coding-standard" folder php vendor/bin/phpcs ../app/code/Cirkle/Behalf --standard=MEQP2 and got this error : prntscr.com/nd0yv5 Apr 17 '19 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.