1

I created a custom module but trying to convert it to extension.

I am trying to validate my extension with this tool https://github.com/magento/marketplace-tools .

What i tried::

File structure of Market place folder as below :

maddy@maddy:/var/www/html/marketplace-tools$ ls -l
total 2192
-rwxrwxrwx 1 maddy maddy     930 Dec 31 17:58 README.md
-rw-rw-r-- 1 maddy maddy 2211434 Dec 31 19:23 validationcheck.zip
-rwxrwxrwx 1 maddy maddy   27430 Dec 31 17:58 validate_m2_package.php
maddy@maddy:/var/www/html/marketplace-tools$ 

I created the zip from /var/www/html/marketplace-tools/app/code/Namespace/ReviewRating as validationcheck.zip and place as above.

Root file structure of Extension as below.

total 32
drwxrwxrwx 4 maddy maddy 4096 Dec 21 18:46 Block
-rwxrwxrwx 1 maddy maddy  917 Dec 31 19:08 composer.json
drwxrwxrwx 4 maddy maddy 4096 Nov 12 20:00 Controller
drwxrwxrwx 4 maddy maddy 4096 Nov 15 11:26 etc
drwxrwxrwx 2 maddy maddy 4096 Dec 22 11:03 Helper
drwxrwxrwx 2 maddy maddy 4096 Dec 22 10:58 images
-rwxrwxrwx 1 maddy maddy  176 Nov 12 20:00 registration.php
drwxrwxrwx 4 maddy maddy 4096 Nov 12 20:00 view

Executed under command

maddy@maddy:/var/www/html/marketplace-tools$ php validate_m2_package.php -d validationcheck.zip

I got below error

maddy@maddy:/var/www/html/marketplace-tools$ php validate_m2_package.php validationcheck.zip

`ERROR` - "validationcheck.zip": The 'magento/magento-composer-installer' must have specific version(s) as a dependency.

My cosposer.json

{
    "name": "namespace/reviewrating",
    "description": "Namespace ReviewRating description goes here",
    "require": {
      "magento/module-store": "0.74.0-beta4",
      "magento/module-theme": "0.74.0-beta4",
      "magento/module-widget": "0.74.0-beta4",
      "magento/module-backend": "0.74.0-beta4",
      "magento/module-catalog": "0.74.0-beta4",
      "magento/module-email": "0.74.0-beta4",
      "magento/module-ui": "0.74.0-beta4",
      "magento/module-variable": "0.74.0-beta4",
      "magento/module-media-storage": "0.74.0-beta4",
      "magento/framework": "0.74.0-beta4",
      "magento/magento-composer-installer": "*"
    },
    "type": "magento2-module",
    "version": "0.74.0-beta4",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
    "files": [
    "registration.php"
    ],
    "psr-4": {
      "Namespace\\Reviewrating\\": ""
    }
   }

}

To this

{
    "name": "namespace/reviewrating",
    "description": "Namespace ReviewRating description goes here",
    "require": {
        "magento/module-store": ">100.0",
        "magento/module-backend": ">100.0",
        "magento/framework": ">100.0"
    },
    "type": "magento2-module",
    "version": "1.0.0",
    "license": [
        "proprietary"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
            "Namespace\\Reviewrating\\": ""
        }
    }

}

I used the composer file of another extension and i am confused about version numbers and the lines under require tag ?

Your Answer

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

Browse other questions tagged or ask your own question.