8000 Profiler activation by fabpot · Pull Request #7859 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Profiler activation #7859

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

Merged
merged 3 commits into from
Apr 26, 2013
Merged

Profiler activation #7859

merged 3 commits into from
Apr 26, 2013

Conversation

fabpot
Copy link
Member
@fabpot fabpot commented Apr 26, 2013
Q A
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets #7064, #7071
License MIT
Doc PR symfony/symfony-docs#2565

As stated in #7071, there is no way to disable the profiler completely. Even when the enabled flag is set to false, the profiler is still registered but the data collectors are not activated.

Now, when enabled is false, the profiler is disabled. To get the old false behavior, you now need to set enabled to true and set the new collect flag to false.

Todo:

  • update docs
  • update Symfony SE -- not needed

@@ -39,6 +39,10 @@ class WebProfilerExtension extends Extension
*/
public function load(array $configs, ContainerBuilder $container)
{
if (!$container->hasParameter('profiler.class')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would break if FrameworkBundle is registered after WebProfilerBundle.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. I have not changed this part of the old PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed now

dlsniper and others added 3 commits April 26, 2013 16:14
Before:

  enabled: true  # the profiler is enabled and data are collected

  enabled: false # the profiler is enabled but data are not collected (data can be collected on demand)

  No way to disable the profiler

After:

  enabled: true  # the profiler is enabled and data are collected
  collect: true

  enabled: true  # the profiler is enabled but data are not collected (data can be collected on demand)
  collect: false

  enabled: false # the profiler is disabled
fabpot added a commit that referenced this pull request Apr 26, 2013
This PR was merged into the master branch.

Discussion
----------

Profiler activation

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7064, #7071
| License       | MIT
| Doc PR        | symfony/symfony-docs#2565

As stated in #7071, there is no way to disable the profiler completely. Even when the `enabled` flag is set to `false`, the profiler is still registered but the data collectors are not activated.

Now, when `enabled` is `false`, the profiler is disabled. To get the old `false` behavior, you now need to set `enabled` to `true` and set the new `collect` flag to `false`.

Todo:

 - [x] update docs
 - [x] update Symfony SE -- not needed

Commits
-------

88ebd62 fixed 
8000
the registration of the web profiler when the profiler is disabled
a11f901 [FrameworkBundle] added a way to disable the profiler
f675dd8 Truly disabled profiler in prod
@fabpot fabpot merged commit 88ebd62 into symfony:master Apr 26, 2013
@Tobion
Copy link
Contributor
Tobion commented Apr 26, 2013

What is the use-case for an enabled profiler that does not collect any data?

@stof
Copy link
Member
stof commented Apr 27, 2013

@Tobion enabling it only for some uri (with a request matcher) or enablign it only for some tests of the testsuite instead of all of them (to make the functional testsuite faster)

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
0