-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Profiler][Translation] Logging false by default and desactivated when using the profiler #24785
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
Conversation
Simperfit
commented
Nov 1, 2017
•
edited
Loading
edited
Q | A |
---|---|
Branch? | 4.1 |
Bug fix? | no |
New feature? | yes |
BC breaks? | no |
Deprecations? | no |
Tests pass? | no |
Fixed tickets | #23146 |
License | MIT |
Doc PR | todo. |
7c8c7e3
to
c6a5316
Compare
@@ -28,6 +28,9 @@ public function process(ContainerBuilder $container) | |||
if (!$container->hasAlias('logger') || !$container->hasAlias('translator')) { | |||
return; | |||
} | |||
if ($container->has('profiler')) { | |||
$container->hasParameter('translator.logging') && $container->setParameter('translator.logging', false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This &&
is like an "if" - that's uncommon syntax in SF code base, isn't it?
the "hasParameter" check should be moved in the "if" instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not common in SF you are right.
new features are for 4.1 (master) only |
c6a5316
to
1df6d5d
Compare
1df6d5d
to
ffc6e9b
Compare
@nicolas-grekas comments done and PR rebased |
0fe56df
to
1dd741e
Compare
With these changes, it's not possible at all to set But IMHO, changing the default value to |
I may have misunderstood what we wanted here, I understood that we wanted to enforce it at I don't think it would be considered as BC too. |
To clarify: from dev point of view, there is no apparent reason we want the logging + translator panel being enabled at the same time, as the info is redundant. The point is that in most case the info is just redundant and disabling this feature when the profiler is enabled (or at all) is a better default. |
1dd741e
to
7b803d2
Compare
…n using the profiler
7b803d2
to
0252830
Compare
@ogizanagi changes done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As explained, it seems right to me to do this change, unless we want strict BC (then see #24785 (comment))
Thank you @Simperfit. |
…esactivated when using the profiler (Simperfit) This PR was merged into the 4.1-dev branch. Discussion ---------- [Profiler][Translation] Logging false by default and desactivated when using the profiler | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | #23146 | License | MIT | Doc PR | todo. Commits ------- 0252830 [Profiler][Translation] Logging false by default and desactivated when using the profiler
This is fixed in Symfony 4.x, see symfony/symfony#24785