【问题标题】:upload plugin in shopware store(The essential composer.json file for the plugin was not in the expected folder)在商店商店上传插件(插件的基本 composer.json 文件不在预期的文件夹中)
【发布时间】:2020-11-11 12:23:22
【问题描述】:

我想在 Shopware 商店中上传插件 上传并定义要求提交后,当我尝试提交我的插件进行代码审查时出现错误

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

我在谷歌上搜索了这个错误并找到了这个问题https://forum.shopware.com/discussion/69413/json-composer-file-nicht-gefunden-beim-upload-in-den-community-store

我在 Shopware 面板中的技术名称是:

xxx46AKGoogleMapPlugin

而我的 composer.json 是

.
"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",
.
.
.

它是我的基类插件。我在需要的地方使用了 Aks\GoogleMapPlugin 命名空间

<?php declare(strict_types=1);

namespace Aks\GoogleMapPlugin;
.
.
.
class AKGoogleMapPlugin extends Plugin
{
.

。 .

我怎么了?我的文件夹名称是 AKGoogleMapPlugin,我在 Ubuntu 中创建 zip 文件 (AKGoogleMapPlugin->composer.json , AKGoogleMapPlugin->src->AKGoogleMapPlugin.php)

【问题讨论】:

    标签: shopware


    【解决方案1】:

    如果您的技术名称是 xxx46AKGoogleMapPlugin,那么您的 shopware 插件类和文件夹的名称应与此完全相同。

    您还应该考虑使用您的供应商前缀 xxx46AK 作为您的作曲家命名空间的一部分,这样您的命名空间是唯一的。

    请参考以下指南:https://docs.shopware.com/en/plugin-standard-for-community-store#the-required-composer-json-file-was-not-found

    【讨论】:

    • 嗨。谢谢。我在 Shopware 面板中为技术名称定义了 AKGoogleMapPlugin,并由 Shopware 自动定义前缀 xxx46。我也必须在我的插件中使用前缀 xxx46?我想知道如果用户运行 bin/控制台插件:列出他/她在列表插件中看到的 xxx46AKGoogleMapPlugin
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-02-06
    • 2017-01-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多