symfony / recipes-contrib

Symfony Contrib Recipes Repositories
https://github.com/symfony/recipes-contrib/blob/flex/main/RECIPES.md
MIT License
528 stars 630 forks source link

feat: add storage to auto for shopware app bundle #1680

Closed shyim closed 1 month ago

shyim commented 1 month ago
Q A
License MIT
Packagist https://packagist.org/packages/shopware/app-bundle

Instead of using hard-code in-memory, we let auto detect the storage so it's more convenient for users to install

github-actions[bot] commented 1 month ago

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1680/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1680/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'shopware/app-bundle:^4.0'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. I'm going keep this comment up to date with any updates of the attached patch.

shopware/app-bundle

1.0 vs 4.0 ```diff diff --git a/shopware/app-bundle/1.0/config/packages/shopware_app.yaml b/shopware/app-bundle/4.0/config/packages/shopware_app.yaml index 645d80a3..1c40076a 100644 --- a/shopware/app-bundle/1.0/config/packages/shopware_app.yaml +++ b/shopware/app-bundle/4.0/config/packages/shopware_app.yaml @@ -1,5 +1,7 @@ shopware_app: - shop_class: App\Entity\Shop name: '%env(SHOPWARE_APP_NAME)%' secret: '%env(SHOPWARE_APP_SECRET)%' - + # You should specify a specific storage like: dynamodb or doctrine + storage: 'auto' + doctrine: + shop_class: App\Entity\Shop 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 00000000..3c53f3e3 --- /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 ```
shyim commented 1 month ago

Symfony 5 failure is fine, we don't support it