Skip to content

Instantly share code, notes, and snippets.

@nanasess
Last active April 19, 2021 14:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanasess/ca8312478d565acc5f3563e9e50022a5 to your computer and use it in GitHub Desktop.
Save nanasess/ca8312478d565acc5f3563e9e50022a5 to your computer and use it in GitHub Desktop.
Symfony Profiler on APP_ENV=prod
From 796868cf2bfece8e0912fe3c30a37e76d505da5c Mon Sep 17 00:00:00 2001
From: Kentaro Ohkouchi <nanasess@fsm.ne.jp>
Date: Thu, 16 Aug 2018 09:35:23 +0900
Subject: [PATCH] =?UTF-8?q?WebProfiler=20=E3=82=92=20production=20?=
=?UTF-8?q?=E3=83=A2=E3=83=BC=E3=83=89=E3=81=A7=E5=8B=95=E4=BD=9C=E3=81=95?=
=?UTF-8?q?=E3=81=9B=E3=82=8B=E8=A8=AD=E5=AE=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/config/eccube/bundles.php | 6 +++---
app/config/eccube/packages/prod/web_profiler.yaml | 6 ++++++
app/config/eccube/routes/prod/web_profiler.yaml | 7 +++++++
3 files changed, 16 insertions(+), 3 deletions(-)
create mode 100644 app/config/eccube/packages/prod/web_profiler.yaml
create mode 100644 app/config/eccube/routes/prod/web_profiler.yaml
diff --git a/app/config/eccube/bundles.php b/app/config/eccube/bundles.php
index 9f22986894..5543baeee8 100644
--- a/app/config/eccube/bundles.php
+++ b/app/config/eccube/bundles.php
@@ -21,9 +21,9 @@
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
- Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true, 'install' => true],
- Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true, 'install' => true],
- Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true, 'install' => true],
+ Symfony\Bundle\DebugBundle\DebugBundle::class => ['all' => true],
+ Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['all' => true],
+ Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['all' => true],
DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
SunCat\MobileDetectBundle\MobileDetectBundle::class => ['all' => true],
diff --git a/app/config/eccube/packages/prod/web_profiler.yaml b/app/config/eccube/packages/prod/web_profiler.yaml
new file mode 100644
index 0000000000..e92166a7fd
--- /dev/null
+++ b/app/config/eccube/packages/prod/web_profiler.yaml
@@ -0,0 +1,6 @@
+web_profiler:
+ toolbar: true
+ intercept_redirects: false
+
+framework:
+ profiler: { only_exceptions: false }
diff --git a/app/config/eccube/routes/prod/web_profiler.yaml b/app/config/eccube/routes/prod/web_profiler.yaml
new file mode 100644
index 0000000000..c82beff2f6
--- /dev/null
+++ b/app/config/eccube/routes/prod/web_profiler.yaml
@@ -0,0 +1,7 @@
+web_profiler_wdt:
+ resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
+ prefix: /_wdt
+
+web_profiler_profiler:
+ resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
+ prefix: /_profiler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment