Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

Since Symfony 2.4.0, the "timer" and "timeline" no longer work in the Profiler. #30

Closed
bobdenotter opened this issue Dec 5, 2013 · 1 comment

Comments

@bobdenotter
Copy link

Since the upgrade to Symfony 2.4.0, the toolbar no longer lists the execution time, and the profiler timelines do not work either. As far as I can tell, this is because of the changes in Symfony\Component\HttpKernel\DataCollector\TimeDataCollector, but it might be something else.

Minimal testcase:

composer.json:

{
    "require": {
        "silex/silex": "~1.1",
        "silex/web-profiler": "1.0.*"
    }
}

index.php:

<?php

use Silex\Provider;

require_once __DIR__.'/../vendor/autoload.php';

$app = new Silex\Application();

$app['debug'] = true;

$app->register(new Provider\ServiceControllerServiceProvider());
$app->register(new Provider\TwigServiceProvider());
$app->register(new Provider\UrlGeneratorServiceProvider());

$app->register(new Provider\WebProfilerServiceProvider(), array(
    'profiler.cache_dir' => __DIR__.'/../cache/profiler',
    'profiler.mount_prefix' => '/_profiler', // this is the default
));

$app->get('/', function () {
    return "<html><body>Hi!</body></html>";
});

$app->run();

Result:

screen shot 2013-12-05 at 19 10 39


screen shot 2013-12-05 at 19 09 57

@fabpot fabpot closed this as completed in 8ba9634 Dec 5, 2013
fabpot added a commit that referenced this issue Dec 5, 2013
This PR was merged into the master branch.

Discussion
----------

Supply StopWatch to TimeDataCollector. Fixes #30

Added the StopWatch as second argument to TimeDataCollector.
The second paramter is new in symfony 2.4. For 2.3 it will be ignored.

Also removed $app argument from RequestDataCollector, as it does not support any argument.

Commits
-------

8ba9634 Supply StopWatch to TimeDataCollector. Fixes #30
@OnekO
Copy link

OnekO commented Apr 27, 2016

This is happening to me yet... using Silex 1.* and silex/web-profiler 1.0.*. Any suggestion?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants