4

Magento 2 comes with some tools to help developers create quality extensions.
What are the things that one should check before publishing an extension?
I have 3 for now:

  • running the tests bin/magento dev:tests:run
  • running php codesniffer with the Ecg2 standard phpcs --standard=EcgM2 path/to/code
  • make sure compilation works bin/magento setup:di:compile

Anything else i can run to get information about what I did wrong?

2

You can also add Marketplace Upload Validator to your checklist as well.

The current version is a standalone PHP script that takes the Composer package ZIP file(s) on the command line. Errors are reported to the screen. Examples include a missing composer.json file, missing fields in the composer.json file, and so on.

Script present here

| improve this answer | |
  • 1
    This validator only makes sense if you want to distribute via Marketplace. If you use a different distribution model (for example directly via github for an open source module this tool is not needed). – Kristof at Fooman Jul 1 '16 at 9:28
  • 1
    @KristofatFooman This script also validates your composer.json and folder structure file which is vital even if you are publishing it on GitHub and would like the option to provide extension downloadable via composer as well – Atish Goswami Jul 1 '16 at 9:34
  • The marketplace validation is stricter than what is doable with Composer and in particular doesn't handle additional folders for things like integration tests well. Agree with you that this script gives you some guidance on how to structure some elements of your composer.json but I would not consider the folder structure as the only way of working. – Kristof at Fooman Jul 3 '16 at 5:19

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.