Shopware 6:在代码审查之前测试扩展。

huangapple go评论60阅读模式
英文:

Shopware 6: Test extension before code review

问题

I'm developing an app for Shopware 6 app marketplace. I've already created it and tested it in locally running Shopware 6 instance where it has been successfully registered and confirmed with our server.

现在我想要发布这个应用。为此,我不得不替换一些端点,以连接到我们的生产服务器,并替换 Shopware 扩展合作伙伴区域中的秘密 "App key",然后创建一个压缩文件并将其上传为扩展的发布版本。

Now I've got an option to submit the app for a review, but before that I would like to thoroughly test the uploaded version.

我现在有一个选项可以提交应用进行审查,但在那之前,我想要彻底测试已上传的版本。

I see that there is an option to add "Demo shops", but there is no documentation for that and I don't know how to setup one. Maybe local instance exposed to internet through ngrok?

我看到有一个选项可以添加 "Demo shops",但是没有相关文档,我不知道如何设置。也许可以通过 ngrok 将本地实例暴露到互联网上?

Could someone please explain to me how to test the extension on some live Shopware before submitting it for a code review?

请问有人可以解释一下如何在提交代码审查之前在一些活动的 Shopware 上测试这个扩展吗?

(It's worth noting that our extension consists of just a manifest.xml file and icon.png and is used just as an API connector, it has no other code.)

值得注意的是,我们的扩展只包括一个 manifest.xml 文件和 icon.png,仅用作 API 连接器,没有其他代码。

英文:

I'm developing an app for Shopware 6 app marketplace. I've already created it and tested it in locally running Shopware 6 instance where it has been successfully registered and confirmed with our server.

Now I want to publish the app. For this I had to replace some endpoint to lead to our production servers and replace the secret "App key" from the Shopware Extensions Partner area, created zip file and uploaded it as a release of the extension.

Now I've got an option to submit the app for a review, but before that I would like to thoroughly test the uploaded version.

I see that there is an option to add "Demo shops", but there is no documentation for that and I don't know how to setup one. Maybe local instance exposed to internet through ngrok?

Could someone please explain to me how to test the extension on some live Shopware before submitting it for a code review?

(It's worth noting that our extension consists of just a manifest.xml file and icon.png and is used just as an API connector, it has no other code.)

答案1

得分: 1

为了开发目的,您可以通过提供一个硬编码的秘密值来使您的应用程序私有化。在提交到商店之前,您只需将其删除。

对于本地开发,您可以在用于签署注册请求的清单文件中指定一个<secret>。然而,如果应用程序在清单中使用了硬编码的秘密,它无法上传到商店。

<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/shopware/platform/master/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd">
    <setup>
        <registrationUrl>http://localhost/register</registrationUrl>
        <secret>verysecret</secret>
    </setup>
</manifest>
英文:

For development purposes you can make your app private by
providing a hard-coded secret value. You'll just have to remove it before submitting it to the store.

> For local development, you can specify a &lt;secret&gt; in the manifest file that is used for signing the registration request. However, if an app uses a hard-coded secret in the manifest, it can't be uploaded to the store.

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;manifest xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;https://raw.githubusercontent.com/shopware/platform/master/src/Core/Framework/App/Manifest/Schema/manifest-2.0.xsd&quot;&gt;
    &lt;setup&gt;
        &lt;registrationUrl&gt;http://localhost/register&lt;/registrationUrl&gt;
        &lt;secret&gt;verysecret&lt;/secret&gt;
    &lt;/setup&gt;
&lt;/manifest&gt;

huangapple
  • 本文由 发表于 2023年6月29日 23:17:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/76582425.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定