Reputation: 1680
I want to upload a plugin in the Shopware store after upload and defined require filed when i try to submitting my plugin for code review i got an error
Basic plugin analysis failed.
The required composer.json file was not found
Context: [
• reason: The essential composer.json file for the plugin was not in the expected folder
]
Documentation: https://docs.shopware.com/en/shopware-platform-dev-en/references-internals/plugins/plugin-base-class?category=shopware-platform-dev-en/references-internals/plugins
I googling about this error and find this issue https://forum.shopware.com/discussion/69413/json-composer-file-nicht-gefunden-beim-upload-in-den-community-store
My technical name in the Shopware panel is:
xxx46AKGoogleMapPlugin
And my composer.json is
.
"name": "aks/google-map-plugin",
.
.
"license": "proprietary",
"autoload": {
"psr-4": {
"Aks\\GoogleMapPlugin\\": "src/"
}
},
"require": {
"shopware/core": "6.*",
"shopware/storefront": "6.*",
"shopware/administration": "6.*"
},
"extra": {
"shopware-plugin-class": "Aks\\GoogleMapPlugin\\AKGoogleMapPlugin",
.
.
.
And it is my base class plugin. I used Aks\GoogleMapPlugin namespace wherever I needed
<?php declare(strict_types=1);
namespace Aks\GoogleMapPlugin;
.
.
.
class AKGoogleMapPlugin extends Plugin
{
.
. .
What is my wrong ? My folder name is AKGoogleMapPlugin and i create zip file in Ubuntu (AKGoogleMapPlugin->composer.json , AKGoogleMapPlugin->src->AKGoogleMapPlugin.php)
Upvotes: 1
Views: 535
Reputation: 3190
If your technical name is xxx46AKGoogleMapPlugin
then your shopware plugin class and the folder should be named exactly like that.
You should also consider using your vendor prefix xxx46AK
as a part of your composer namespace, that way your namespace is unique.
Please refer to these guidelines: https://docs.shopware.com/en/plugin-standard-for-community-store#the-required-composer-json-file-was-not-found
Upvotes: 2