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

Update in the Fastly package config with Shopware 6.6 #124

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

vrobert78
Copy link
Contributor

No description provided.

@vrobert78 vrobert78 changed the title update in the package config with Shopware 6.6 Update in the Fastly package config with Shopware 6.6 Sep 27, 2024
Copy link

Thanks for the PR 😍

How to test these changes in your application

  1. Add the Shopware flex endpoint in your composer.json to https://raw.githubusercontent.com/shopware/recipes/flex/pull-124/index.json.

    # When jq is installed
    jq '.extra.symfony.endpoint |= [ "https://raw.githubusercontent.com/shopware/recipes/flex/pull-124/index.json" ] + .' composer.json > composer.tmp && mv composer.tmp composer.json

    or manually

    "endpoint": [
        "https://raw.githubusercontent.com/shopware/recipes/flex/pull-124/index.json",
        "https://raw.githubusercontent.com/shopware/recipes/flex/main/index.json",
        "flex://defaults"
    ]
  2. Install the package(s) related to this recipe:

    composer req 'shopware/fastly-meta:^6.6'

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/fastly-meta

6.4 vs 6.6
diff --git a/shopware/fastly-meta/6.4/config/packages/fastly.yaml b/shopware/fastly-meta/6.6/config/packages/fastly.yaml
index 704768a..a60d99a 100644
--- a/shopware/fastly-meta/6.4/config/packages/fastly.yaml
+++ b/shopware/fastly-meta/6.6/config/packages/fastly.yaml
@@ -1,14 +1,15 @@
 when@prod:
-    storefront:
+    shopware:
         # Uncomment all to enable soft purge
-        # http_cache:
-        # stale_while_revalidate: 300
-        # stale_if_error: 3600
-        reverse_proxy:
-            enabled: true
-            fastly:
+        http_cache:
+            # Allow to serve the out-dated cache for 300 seconds
+            # stale_while_revalidate: 300
+            # Allow to serve the out-dated cache for an hour if the origin server is offline
+            # stale_if_error: 3600
+            reverse_proxy:
                 enabled: true
-                api_key: '%env(FASTLY_API_TOKEN)%'
-                service_id: '%env(FASTLY_SERVICE_ID)%'
-                # Uncomment to enable soft purge
-                # soft_purge: '1'
+                fastly:
+                    enabled: true
+                    api_key: '%env(FASTLY_API_TOKEN)%'
+                    service_id: '%env(FASTLY_SERVICE_ID)%'
+                    soft_purge: '1'

@shyim shyim merged commit 0586670 into shopware:main Sep 30, 2024
2 checks passed
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.

2 participants