0

I tried use to validate_m2_package.php to confign my module for Magento 2 upto marketplace. This is structure my folder:

Namespace
---- ModuleBase
------ composer.json
------ registration.php
---- ModuleName
------ composer.json
------ registration.php
composer.json ? i need know content this file.

After zipfile : Namespace.zip. It not success. Pls help me guide file composer.json in folder Namespace.

Many thanks!!!

0
{
"name": "company_name/module_name",
"description": "module description here",
"require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "magento/module-config": "100.0.*",
    "magento/module-store": "100.0.*",
    "magento/module-backend": "100.0.*",
    "magento/framework": "100.0.*"
},
"type": "magento2-module",
"version": "your module version",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"autoload": {
    "files": [
        "registration.php"
    ],
    "psr-4": {
        "COMPANY_NAME\\MODULE_NAME\\": ""
    }
}
}
  • Thanks @AsharRiaz. it only true with only one module. Ex: ModuleName.Zip. I updated structure folder in my question. – xanka Jan 3 '17 at 7:30
  • you can add on module in require:{ } of composer – Ashar Riaz Jan 3 '17 at 12:48
  • If i add require:{... namespace/moduleA: "100.0.*"... } in file composer.js. How to auto get source of namespace/moduleA. If u can give me sample code of file composer.js for this's good. – xanka Jan 3 '17 at 13:42
  • if module A not exists then it only tells you that module A is missing. – Ashar Riaz Jan 3 '17 at 13:52
  • you have to install both modules separately and both have different composer – Ashar Riaz Jan 3 '17 at 13:53

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.