Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add shopware/app-bundle 4.0 variant #1673

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

shyim
Copy link
Contributor

@shyim shyim commented Sep 19, 2024

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

Copy link

github-actions bot commented Sep 19, 2024

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 --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

auto-merge was automatically disabled September 19, 2024 08:48

Head branch was pushed to by a user without write access

@shyim
Copy link
Contributor Author

shyim commented Sep 19, 2024

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

auto-merge was automatically disabled September 19, 2024 09:05

Head branch was pushed to by a user without write access

@shyim
Copy link
Contributor Author

shyim commented Sep 19, 2024

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

@symfony-recipes-bot symfony-recipes-bot merged commit 334aa88 into symfony:main Sep 21, 2024
1 of 2 checks passed
@shyim shyim deleted the add-shopware-app-bundle-4.0 branch September 21, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants