WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Sep 14, 2018. It is now read-only.

Conversation

@skalpa
Copy link
Contributor

@skalpa skalpa commented May 25, 2017

This will enable the cache panel once silexphp/Silex#1524 gets merged and symfony 3.3 is released.

I had to add @dev entries to composer.json so composer would run, I'll update the file when 3.3 is ready.

I also had to check if symfony/web-profiler-bundle >= 3.3 was available:

As profiler.templates_path was registered as a lazy/dynamic parameter and I didn't want to initialize anything lazy at this stage, I changed its definition and made it a regular parameter.

If you don't like this I could change it back, but that means we'll have to do something like the following instead 😢 :

if (isset($app['cache.pools']) && class_exists('Symfony\Component\Cache\DataCollector\CacheDataCollector')) {
    $app->extend('cache.pools', function ($pools) {
        if (is_file($app['profiler.templates_path'].'/Collector/cache.html.twig')) {
            // ...
        }

        return $pools;
    });
    $app->extend('data_collector.templates', function ($templates) {
        if (is_file($app['profiler.templates_path'].'/Collector/cache.html.twig')) {
            // ...
        }

        return $templates;
    });
    $app->extend('data_collectors', function ($collectors) {
        if (is_file($app['profiler.templates_path'].'/Collector/cache.html.twig')) {
            // ...
        }

        return $collectors;
    });
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant