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

Integrate serialization with the stopwatch #334

Merged
merged 1 commit into from
Oct 16, 2013

Conversation

adrienbrault
Copy link
Contributor

Maybe the subscriber should go the lib ?

@@ -119,6 +119,10 @@ public function loadInternal(array $config, ContainerBuilder $container)
if ( ! $config['enable_short_alias']) {
$container->removeAlias('serializer');
}

if (!$container->getParameter('kernel.debug')) {
Copy link
Owner

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?

Copy link
Contributor

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)

Copy link
Contributor Author

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

@schmittjoh
Copy link
Owner

Let's keep it here for now. Eventually we will need some sort of bridge repository probably.

*/
private $rootObject;

public function __construct(Stopwatch $stopwatch)
Copy link
Owner

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.

Copy link
Contributor

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)

schmittjoh added a commit that referenced this pull request Oct 16, 2013
Integrate serialization with the stopwatch
@schmittjoh schmittjoh merged commit 65ffc83 into schmittjoh:master Oct 16, 2013
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.

3 participants