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 shopware/app-bundle 4.0 variant #1673

Closed shyim closed 1 month ago

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

We changed the schema of the yaml, therefore need a new recipe version

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-1673/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1673/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..7b722900 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 use doctrine or dynamodb as storage + storage: 'in-memory' + 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

Whats the best way here? I made doctrine optional as we support dynamodb in that bundle now too. So the new require flow is like: composer require shopware/app-bundle doctrine/orm symfony/doctrine-bridge

I make the default in-memory, so it does not require anything

shyim commented 1 month ago

Now it's fine, we don't support Symfony 5