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

Simplify web profile default config #1390

Merged
merged 1 commit into from
Mar 17, 2025

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Mar 16, 2025

Q A
License MIT
Doc issue/PR n/a

Let's remove the defaults as they rarely need to be changed.

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) March 16, 2025 14:19
Copy link

github-actions bot commented Mar 16, 2025

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/flex/pull-1390/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes/flex/pull-1390/index.json
  2. Install the package(s) related to this recipe:

    composer req symfony/flex
    composer req 'symfony/web-profiler-bundle:^6.1'
  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.

symfony/web-profiler-bundle

3.3 vs 5.3
diff --git a/symfony/web-profiler-bundle/3.3/config/packages/dev/web_profiler.yaml b/symfony/web-profiler-bundle/3.3/config/packages/dev/web_profiler.yaml
deleted file mode 100644
index e92166a..0000000
--- a/symfony/web-profiler-bundle/3.3/config/packages/dev/web_profiler.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-web_profiler:
-    toolbar: true
-    intercept_redirects: false
-
-framework:
-    profiler: { only_exceptions: false }
diff --git a/symfony/web-profiler-bundle/3.3/config/packages/test/web_profiler.yaml b/symfony/web-profiler-bundle/3.3/config/packages/test/web_profiler.yaml
deleted file mode 100644
index 03752de..0000000
--- a/symfony/web-profiler-bundle/3.3/config/packages/test/web_profiler.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-web_profiler:
-    toolbar: false
-    intercept_redirects: false
-
-framework:
-    profiler: { collect: false }
diff --git a/symfony/web-profiler-bundle/5.3/config/packages/web_profiler.yaml b/symfony/web-profiler-bundle/5.3/config/packages/web_profiler.yaml
new file mode 100644
index 0000000..17893da
--- /dev/null
+++ b/symfony/web-profiler-bundle/5.3/config/packages/web_profiler.yaml
@@ -0,0 +1,15 @@
+when@dev:
+    web_profiler:
+        toolbar: true
+        intercept_redirects: false
+
+    framework:
+        profiler: { only_exceptions: false }
+
+when@test:
+    web_profiler:
+        toolbar: false
+        intercept_redirects: false
+
+    framework:
+        profiler: { collect: false }
diff --git a/symfony/web-profiler-bundle/3.3/config/routes/dev/web_profiler.yaml b/symfony/web-profiler-bundle/3.3/config/routes/dev/web_profiler.yaml
deleted file mode 100644
index c82beff..0000000
--- a/symfony/web-profiler-bundle/3.3/config/routes/dev/web_profiler.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
-web_profiler_wdt:
-    resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
-    prefix: /_wdt
-
-web_profiler_profiler:
-    resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
-    prefix: /_profiler
diff --git a/symfony/web-profiler-bundle/5.3/config/routes/web_profiler.yaml b/symfony/web-profiler-bundle/5.3/config/routes/web_profiler.yaml
new file mode 100644
index 0000000..8d85319
--- /dev/null
+++ b/symfony/web-profiler-bundle/5.3/config/routes/web_profiler.yaml
@@ -0,0 +1,8 @@
+when@dev:
+    web_profiler_wdt:
+        resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
+        prefix: /_wdt
+
+    web_profiler_profiler:
+        resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
+        prefix: /_profiler
diff --git a/symfony/web-profiler-bundle/3.3/manifest.json b/symfony/web-profiler-bundle/5.3/manifest.json
index cb84a24..be74128 100644
--- a/symfony/web-profiler-bundle/3.3/manifest.json
+++ b/symfony/web-profiler-bundle/5.3/manifest.json
@@ -4,5 +4,8 @@
     },
     "copy-from-recipe": {
         "config/": "%CONFIG_DIR%/"
+    },
+    "conflict": {
+        "symfony/framework-bundle": "<5.3"
     }
 }
5.3 vs 6.1
diff --git a/symfony/web-profiler-bundle/5.3/config/packages/web_profiler.yaml b/symfony/web-profiler-bundle/6.1/config/packages/web_profiler.yaml
index 17893da..1e039b7 100644
--- a/symfony/web-profiler-bundle/5.3/config/packages/web_profiler.yaml
+++ b/symfony/web-profiler-bundle/6.1/config/packages/web_profiler.yaml
@@ -1,15 +1,11 @@
 when@dev:
     web_profiler:
         toolbar: true
-        intercept_redirects: false
 
     framework:
-        profiler: { only_exceptions: false }
+        profiler:
+            collect_serializer_data: true
 
 when@test:
-    web_profiler:
-        toolbar: false
-        intercept_redirects: false
-
     framework:
         profiler: { collect: false }
diff --git a/symfony/web-profiler-bundle/5.3/manifest.json b/symfony/web-profiler-bundle/6.1/manifest.json
index be74128..fceb97f 100644
--- a/symfony/web-profiler-bundle/5.3/manifest.json
+++ b/symfony/web-profiler-bundle/6.1/manifest.json
@@ -6,6 +6,6 @@
         "config/": "%CONFIG_DIR%/"
     },
     "conflict": {
-        "symfony/framework-bundle": "<5.3"
+        "symfony/framework-bundle": "<6.1"
     }
 }

@fabpot fabpot disabled auto-merge March 17, 2025 03:50
@fabpot fabpot merged commit 74320a1 into main Mar 17, 2025
1 of 2 checks passed
@fabpot fabpot deleted the simplify-web-profiler-default-config branch March 17, 2025 03:50
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.

4 participants