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

Disable profiler when debug is disabled #898

Conversation

drewblin
Copy link

defaultTrue does not accept any arguments
So profiller is enable by default and this is very bad for production

Q A
Bug fix? yes
New feature? no
Doc updated no
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT

@@ -35,7 +35,11 @@ public function getConfigTreeBuilder()
$root = $tb->root('jms_serializer')->children();
}

$root->booleanNode('profiler')->defaultTrue($this->debug)->end();
if ($this->debug) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

what about $root->booleanNode('profiler')->defaultValue($this->debug)->end(); ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@goetas It looks like we there is already PR for it: https://github.com/schmittjoh/JMSSerializerBundle/pull/892/files

@dannyvw
Copy link
Contributor

dannyvw commented Sep 8, 2022

See #892

@goetas
Copy link
Collaborator

goetas commented Sep 12, 2022

done in #892

@goetas goetas closed this Sep 12, 2022
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.

None yet

4 participants