-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
Integrate serialization with the stopwatch #334
Conversation
@@ -119,6 +119,10 @@ public function loadInternal(array $config, ContainerBuilder $container) | |||
if ( ! $config['enable_short_alias']) { | |||
$container->removeAlias('serializer'); | |||
} | |||
|
|||
if (!$container->getParameter('kernel.debug')) { |
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.
Could you add a check to see whether the stopwatch class exists? IIRC it was added somewhere around 2.2/2.3, no?
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 is added in 2.2 as a standalone component (it would be possible to support 2.1 by allowing both the standalone component and the old class of the HttpKernel which has been removed in 2.3)
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.
Ok, then it would become a compiler pass
Let's keep it here for now. Eventually we will need some sort of bridge repository probably. |
*/ | ||
private $rootObject; | ||
|
||
public function __construct(Stopwatch $stopwatch) |
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.
If we remove the type-hinting here, it should work fine with all Symfony versions.
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.
All except 2.0 (which does not have a stopwatch)
Integrate serialization with the stopwatch
Maybe the subscriber should go the lib ?