Plugin meta information

To provide Shopware and the shop owner with information about your plugin, you have to supply a composer.json with your plugin. Some information are gathered through the default properties of a composer.json. For some Shopware specific information, you have to extend the extra property. Have a look at the composer schema, to learn more about the properties.

Example composer.json

    "name": "swag/example-plugin",
    "description": "Example plugin",
    "version": "v1.0.1",
    "type": "shopware-platform-plugin",
    "license": "MIT",
    "authors": [
            "name": "Example Company",
            "homepage": "",
            "role": "Manufacturer"
    "require": {
        "shopware/core": "6.1.*",
        "example-plugin": "1.0.0"
    "extra": {
        "shopware-plugin-class": "Swag\\ExamplePlugin\\ExamplePlugin",
        "plugin-icon": "src/Resources/config/plugin.png",
        "copyright": "(c) by shopware AG",
        "label": {
            "de-DE": "Beispiel Plugin für Shopware",
            "en-GB": "Example plugin for Shopware"
        "description": {
            "de-DE": "Deutsche Beschreibung des Plugins",
            "en-GB": "English Description of Plugin"
        "manufacturerLink": {
            "de-DE": "",
            "en-GB": ""
        "supportLink": {
            "de-DE": "",
            "en-GB": ""
    "autoload": {
        "psr-4": {
            "Swag\\BaseClass\\": "src/"

Explanation of the properties

nameName of your package
descriptionThe composer JSON schema requires a short description of your package. This field does not allow HTML.
versionCurrent version of your plugin
typeSet the type to shopware-platform-plugin. Otherwise Shopware won't be able to recognize your plugin
licenseProvide the license model of your plugin, e.g. MIT or proprietary
authorsCollection of the authors of your plugin. If one or more authors with the role Manufacturer are provided, only these will be written to the database.
requireAdd your dependencies here. This should be at least shopware/core
extraThe extra property is used to provide some Shopware specific information
extra - shopware-plugin-classThe fully qualified class name of your plugin's base class
extra - plugin-iconThe path to the plugin's icon file. This is optional if you don't have any custom plugin icon
extra - copyrightSet a copyright for your plugin
extra - labelThe name of your plugin which is displayed to the Shopware user. Translatable
extra - descriptionThe description of your plugin which is displayed to the Shopware user. This field does not allow HTML. Translatable
extra - manufacturerLinkLink to your homepage. Translatable
extra - supportLinkA link to your support homepage. Translatable
autoloadRequired to have a custom PSR-4 autoloader for your custom plugin directory


The require field in the composer.json file defines on which dependencies your plugin relies. As you want to develop a plugin for Shopware, you should have at least an entry for shopware/core here. If you also rely on other parts of Shopware 6 you should als require them, e.g. shopware/storefront. In addition to that, it is also possible to define dependencies on other plugins or even every other composer package.


Some fields of the plugin entity are translatable. Shopware will try to match each of your provided translations with an existing language in the system. For more information about the translation system in Shopware have look here. Your translation locale code must look like that "de-DE", "en-GB", "de-CH", etc. If a language with this locale is not available, the translation will not be written.


The changelog for your plugin now has to be located in another file. Have as look at our changelog guide to figure out how that's done in Shopware 6.


A plugin can have an icon which will be rendered in the shopware administration. The default path for an icon is src/Resources/config/plugin.png relative from the plugin root folder. This path can be overridden using the extra object in the composer.json as follows:

    "extra": {
        "plugin-icon": "myFolder/icon.png"

The icon should be a png file with the size 40 x 40 px. Since it is stored in the database as mediumblob the theoretical max file size is 16 MB.

Was this article helpful?