Skip to content

Commit

Permalink
3547: Added Profiler
Browse files Browse the repository at this point in the history
  • Loading branch information
rimi-itk committed Jan 10, 2025
1 parent 51abfc9 commit e1f657d
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 1 deletion.
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
"friendsofphp/php-cs-fixer": "^3.8",
"phpstan/phpstan": "^1.5",
"symfony/maker-bundle": "^1.38",
"symfony/stopwatch": "5.4.*",
"symfony/web-profiler-bundle": "5.4.*",
"vincentlanglet/twig-cs-fixer": "^3.5"
},
"replace": {
Expand Down
82 changes: 81 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
];
4 changes: 4 additions & 0 deletions config/packages/framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ framework:
php_errors:
log: true

# trust *all* requests (the 'REMOTE_ADDR' string is replaced at
# runtime by $_SERVER['REMOTE_ADDR'])
trusted_proxies: '127.0.0.1,REMOTE_ADDR'

when@test:
framework:
test: true
Expand Down
15 changes: 15 additions & 0 deletions config/packages/web_profiler.yaml
Original file line number Diff line number Diff line change
@@ -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 }
8 changes: 8 additions & 0 deletions config/routes/web_profiler.yaml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,19 @@
"symfony/web-link": {
"version": "v5.4.3"
},
"symfony/web-profiler-bundle": {
"version": "5.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "5.3",
"ref": "24bbc3d84ef2f427f82104f766014e799eefcc3e"
},
"files": [
"config/packages/web_profiler.yaml",
"config/routes/web_profiler.yaml"
]
},
"symfony/webpack-encore-bundle": {
"version": "1.17",
"recipe": {
Expand Down

0 comments on commit e1f657d

Please sign in to comment.