From 334aa88ca4d3dd35f71e60889bd2458a43631ba8 Mon Sep 17 00:00:00 2001 From: Shyim Date: Sat, 21 Sep 2024 10:47:10 +0200 Subject: [PATCH] feat: add shopware/app-bundle 4.0 variant (#1673) --- .../4.0/config/packages/shopware_app.yaml | 7 +++++++ .../app-bundle/4.0/config/routes/shopware_app.yaml | 8 ++++++++ shopware/app-bundle/4.0/manifest.json | 13 +++++++++++++ shopware/app-bundle/4.0/post-install.txt | 6 ++++++ shopware/app-bundle/4.0/src/Entity/Shop.php | 13 +++++++++++++ 5 files changed, 47 insertions(+) create mode 100644 shopware/app-bundle/4.0/config/packages/shopware_app.yaml create mode 100644 shopware/app-bundle/4.0/config/routes/shopware_app.yaml create mode 100644 shopware/app-bundle/4.0/manifest.json create mode 100644 shopware/app-bundle/4.0/post-install.txt create mode 100644 shopware/app-bundle/4.0/src/Entity/Shop.php diff --git a/shopware/app-bundle/4.0/config/packages/shopware_app.yaml b/shopware/app-bundle/4.0/config/packages/shopware_app.yaml new file mode 100644 index 000000000..7b7229009 --- /dev/null +++ b/shopware/app-bundle/4.0/config/packages/shopware_app.yaml @@ -0,0 +1,7 @@ +shopware_app: + name: '%env(SHOPWARE_APP_NAME)%' + secret: '%env(SHOPWARE_APP_SECRET)%' + # You should use doctrine or dynamodb as storage + storage: 'in-memory' + doctrine: + shop_class: App\Entity\Shop diff --git a/shopware/app-bundle/4.0/config/routes/shopware_app.yaml b/shopware/app-bundle/4.0/config/routes/shopware_app.yaml new file mode 100644 index 000000000..218e0228d --- /dev/null +++ b/shopware/app-bundle/4.0/config/routes/shopware_app.yaml @@ -0,0 +1,8 @@ +shopware_app_lifecycle: + resource: '@ShopwareAppBundle/Resources/config/routing/lifecycle.xml' + prefix: /app + +shopware_app_webhook: + resource: '@ShopwareAppBundle/Resources/config/routing/webhook.xml' + prefix: /app + diff --git a/shopware/app-bundle/4.0/manifest.json b/shopware/app-bundle/4.0/manifest.json new file mode 100644 index 000000000..33481859d --- /dev/null +++ b/shopware/app-bundle/4.0/manifest.json @@ -0,0 +1,13 @@ +{ + "bundles": { + "Shopware\\AppBundle\\ShopwareAppBundle": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/", + "src/": "%SRC_DIR%/" + }, + "env": { + "SHOPWARE_APP_NAME": "TestApp", + "SHOPWARE_APP_SECRET": "MySecret" + } +} diff --git a/shopware/app-bundle/4.0/post-install.txt b/shopware/app-bundle/4.0/post-install.txt new file mode 100644 index 000000000..3c53f3e32 --- /dev/null +++ b/shopware/app-bundle/4.0/post-install.txt @@ -0,0 +1,6 @@ + * Warning the shopware/app-bundle uses by default a in-memory database. You should use doctrine or dynamodb + + For doctrine install the following packages: composer require doctrine/orm symfony/doctrine-bridge + For dynamodb install the following packages: composer require async-aws/async-aws-bundle async-aws/dynamo-db + + Make sure to configure the correct storage after installing the packages in config/packages/shopware_app.yaml diff --git a/shopware/app-bundle/4.0/src/Entity/Shop.php b/shopware/app-bundle/4.0/src/Entity/Shop.php new file mode 100644 index 000000000..2d04f87b3 --- /dev/null +++ b/shopware/app-bundle/4.0/src/Entity/Shop.php @@ -0,0 +1,13 @@ +