Skip to content

Commit

Permalink
feat: add shopware/app-bundle 4.0 variant (#1673)
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim authored Sep 21, 2024
1 parent be6c378 commit 334aa88
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
7 changes: 7 additions & 0 deletions shopware/app-bundle/4.0/config/packages/shopware_app.yaml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions shopware/app-bundle/4.0/config/routes/shopware_app.yaml
Original file line number Diff line number Diff line change
@@ -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

13 changes: 13 additions & 0 deletions shopware/app-bundle/4.0/manifest.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
6 changes: 6 additions & 0 deletions shopware/app-bundle/4.0/post-install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* <fg=yellow>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
13 changes: 13 additions & 0 deletions shopware/app-bundle/4.0/src/Entity/Shop.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace App\Entity;

use Doctrine\ORM\Mapping\Entity;
use Shopware\AppBundle\Entity\AbstractShop;

#[Entity]
class Shop extends AbstractShop
{
}

0 comments on commit 334aa88

Please sign in to comment.