diff --git a/cookbook/profiler/storage.rst b/cookbook/profiler/storage.rst index f10f41e0ca0..f0a330f2da6 100644 --- a/cookbook/profiler/storage.rst +++ b/cookbook/profiler/storage.rst @@ -4,7 +4,7 @@ Switching the Profiler Storage ============================== -In Symfony versions previous to 3.0, profiles could be stored in files, databases, +In Symfony versions prior to 3.0, profiles could be stored in files, databases, services like Redis and Memcache, etc. Starting from Symfony 3.0, the only storage mechanism with built-in support is the filesystem. @@ -12,12 +12,42 @@ By default the profile stores the collected data in the ``%kernel.cache_dir%/pro directory. If you want to use another location to store the profiles, define the ``dsn`` option of the ``framework.profiler``: -.. code-block:: yaml +.. configuration-block:: - # app/config/config.yml - framework: - profiler: - dsn: 'file:/tmp/symfony/profiler' + .. code-block:: yaml + + # app/config/config.yml + framework: + profiler: + dsn: 'file:/tmp/symfony/profiler' + + .. code-block:: xml + + + + + + + + + + .. code-block:: php + + // app/config/config.php + + // ... + $container->loadFromExtension('framework', array( + 'profiler' => array( + 'dsn' => 'file:/tmp/symfony/profiler', + ), + )); You can also create your own profile storage service implementing the :class:``Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface`` and