Radix Salvilines
Radix Salvilines

Reputation: 416

Require shopware 6 plugin via composer

I am developing a custom plugin for Shopware 6. It will not be sitting in Shopware Store but our own company repo on github.

How can I make it get installed into custom/plugins instead of vendor when I run composer require plugin/name?

I tried setting up in plugin's composer "type": "shopware-plugin" and "type": "shopware-platform-plugin" but it still puts it into vendor.

There is this: https://getcomposer.org/doc/faqs/how-do-i-install-a-package-to-a-custom-path-for-my-framework.md - I would rather specify a correct type instead of setting up an install path manually using installer-paths.

Do you know what each shopware type means?

My composer version is 1.10.8

Upvotes: 0

Views: 1824

Answers (1)

Radix Salvilines
Radix Salvilines

Reputation: 416

EDIT: Turns out that as of today (2020.07.07) composer installers is unable to handle shopware-platform-plugin types. I ended up making a custom installer that you can find here: https://github.com/radixs/composer-shopware6-installer - just add it to your plugin's composer and done.


I found what is wrong. I got confused with other guides that explain how to create custom installer and did not notice that when using default installers - they are not included in composer, they need to be required in the plugin:

    "require": {
        "shopware/core": "*",
        "composer/installers": "~1.0"
    },

I feel silly, not deleting it in case there are more geniuses like me out there.

Upvotes: 2

Related Questions