# Plugin Store Code Review shopware-plugin-class

**URL:** https://forum.shopware.com/t/plugin-store-code-review-shopware-plugin-class/64757
**Category:** Programmierung
**Created:** [17. Februar 2020 um 07:43 UTC](https://forum.shopware.com/t/plugin-store-code-review-shopware-plugin-class/64757 "2020-02-17T07:43:39Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![ShapeAndShift](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@ShapeAndShift](https://forum.shopware.com/u/ShapeAndShift)
#### Post date: [17. Februar 2020 um 07:43 UTC](https://forum.shopware.com/t/plugin-store-code-review-shopware-plugin-class/64757/1 "2020-02-17T07:43:39Z")

</div>

Ich scheitere schon am ersten Code-Review, da ich hier nicht ganz durchblicke und die Doku hierzu mager ist und ich nichts passendes finde.

**Fehler:&nbsp;**

```
_the composer.json file is invalid, Context: [reason: Under 'extra'.'shopware-plugin-class' you have to enter the full qualified classname of your plugins base class. The class name must match the technical name of your plugi_

```

**Hersteller Präfix im Store:&nbsp;** sas

**Technischer Plugin Name:** &nbsp;SasTags

Hier wollte ich eigentlich Tags angeben - Jedoch hat der Assistent gemeckert, dass ich den Präfix mit angeben muss.

**Im Plugin:&nbsp;**

```
"shopware-plugin-class": "Sas\\Tags\\Tags",

```

**Die Base Class:**

Ich würde es jetzt so verstehen, dass es wie folgt sein müsste:

```
"shopware-plugin-class": "SasTags\\SasTags",

```

Allerdings wäre das in meinen Augen nicht ganz optimal - **HerstellerPräfix\Pluginname** so dachte ich wäre es korrekt? Was mache ich hier falsch / übersehe ich? 🙂

---

<div class="post-metadata">

### Author: ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)
#### Post date: [17. Februar 2020 um 07:49 UTC](https://forum.shopware.com/t/plugin-store-code-review-shopware-plugin-class/64757/2 "2020-02-17T07:49:11Z")

</div>

Hallo,

ist dein technischer Name (im Shopware Account) des Plugins wirklich nur „Tags“? Dies ist sehr unwahrscheinlich, da ja dann dein Herstellerkürzel fehlen würde.

Im Prinzip ist die Meldung eigentlich sehr eindeutig: dein festgelegter, technischer Name ds Plugins im Shopware Account stimmt nicht mit dem in der composer.json überein.

Es müsste also eher:

„shopware-plugin-class“: „sas\sasTags\sasTags“,

lauten (um es dann überall einheitlich zu halten, alternativ kannst du beim ersten Wert auch das sas weglassen).

Grüße

Sebastian

---

<div class="post-metadata">

### Author: ![ShapeAndShift](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@ShapeAndShift](https://forum.shopware.com/u/ShapeAndShift)
#### Post date: [17. Februar 2020 um 08:06 UTC](https://forum.shopware.com/t/plugin-store-code-review-shopware-plugin-class/64757/3 "2020-02-17T08:06:40Z")

</div>

Ich bin ein wengi verwirrt bzgl. der ganzen Namen.

Im Plugin im Store habe ich “SasTags” angegeben als technischer Plugin Name. Der Hersteller Präfix ist “sas”.

Vielen Dank für den Hinweis, dass hat mir nun geholfen.

Die Baseclass muss also **immer** heißen technischerPluginName welchen ich im Store angegeben habe - Und damit eingehend also Herstellerpräfix und Name. Derr Namespace ist daher immer&nbsp;

```
 namespace HerstellerPräfix\TechnischerPluginName; 

```

Ist das so korrekt?

---

<div class="post-metadata">

### Author: ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)
#### Post date: [17. Februar 2020 um 08:10 UTC](https://forum.shopware.com/t/plugin-store-code-review-shopware-plugin-class/64757/4 "2020-02-17T08:10:43Z")

</div>

Hallo,

nein, nur die BaseClass muss so heißen, die dein technischer Pluginname. Der Namespace davor ist völlig egal.&nbsp;

```
"shopware-plugin-class": "Sas\\Tags\\SasTags",

```

So müsste das auch funktionieren.

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

### Author: ![ShapeAndShift](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@ShapeAndShift](https://forum.shopware.com/u/ShapeAndShift)
#### Post date: [17. Februar 2020 um 08:44 UTC](https://forum.shopware.com/t/plugin-store-code-review-shopware-plugin-class/64757/5 "2020-02-17T08:44:48Z")

</div>

Alles klar, super - Danke euch&nbsp;

---

<div class="post-metadata">

### Author: ![ShapeAndShift](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@ShapeAndShift](https://forum.shopware.com/u/ShapeAndShift)
#### Post date: [11. März 2020 um 04:50 UTC](https://forum.shopware.com/t/plugin-store-code-review-shopware-plugin-class/64757/6 "2020-03-11T04:50:45Z")

</div>

Guten Morgen,

ich muss noch einmal nachforschen: Bei einem weiteren Plugin habe ich nun erneut den Fehler. Ich habe mir auch andere Plugins angeschaut - Ich habe es im Endeffekt genau gleich, verstehe daher den Fehler nicht.

[@Michael Telgmann]([http://forum.shopware.com/profile/17553/Michael](http://forum.shopware.com/profile/17553/Michael) Telgmann „Michael Telgmann“)‍ Kannst du vielleicht noch einmal helfen?

> **Basic plugin analysis failed.** shopware plugin class not found in any defined autoload namespace, Context: [shopware-plugin-class: Sas\Maps\SasMaps]

Technischer Pluginname im Store:&nbsp;SasMaps

**SasMaps/src/SasMaps.php**

**SasMaps/composer.json**

```
    "autoload": {
        "psr-4": {
          "Sas\\SasMaps\\": "src/"
        }
    },
    "require": {
        "shopware/core": "6.1.*",
        "shopware/administration": "6.1.*",
        "shopware/storefront": "6.1.*"
    },
    "extra": {
        "shopware-plugin-class": "Sas\\Maps\\SasMaps",
        "label": {
          "de-DE": "Maps",
          "en-GB": "Maps"
        }
    }

```

&nbsp;

---

<div class="post-metadata">

### Author: ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)
#### Post date: [11. März 2020 um 07:10 UTC](https://forum.shopware.com/t/plugin-store-code-review-shopware-plugin-class/64757/7 "2020-03-11T07:10:50Z")

</div>

Hallo,

der autoload part müsste so aussehen: “Sas\Maps\”: “src/”

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

### Author: ![simkli](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/simkli/32/13124_2.png) [@simkli](https://forum.shopware.com/u/simkli)
#### Post date: [11. März 2020 um 07:12 UTC](https://forum.shopware.com/t/plugin-store-code-review-shopware-plugin-class/64757/8 "2020-03-11T07:12:30Z")

</div>

Wie die Fehlermeldung schon sagt: du hast im Autoload einen Namespace angegeben, deine Pluginklasse ist aber in einem anderen:

 ![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/2X/5/5d5438c68932a232f38b72341af94713fde4f850.jpeg)

---

<div class="post-metadata">

### Author: ![ShapeAndShift](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@ShapeAndShift](https://forum.shopware.com/u/ShapeAndShift)
#### Post date: [11. März 2020 um 10:14 UTC](https://forum.shopware.com/t/plugin-store-code-review-shopware-plugin-class/64757/9 "2020-03-11T10:14:49Z")

</div>

Oje … Ich musste tatsächlich erst einmal 5x drauf schauen, bevor ich es gesehen habe. Danke euch&nbsp; ![Angry-Face](https://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/angry-face.png "Angry-Face")
