From 32a63d80bc0b117c79968db3956682d933afb8b0 Mon Sep 17 00:00:00 2001 From: Xavier Leune Date: Wed, 16 Dec 2015 11:59:29 +0100 Subject: [PATCH 1/3] ProfilerStorage configuration The ProfilerStorage other than FileProfilerStorage have been removed in this PR : https://github.com/symfony/symfony/pull/16018 --- cookbook/profiler/storage.rst | 64 ++--------------------------------- 1 file changed, 2 insertions(+), 62 deletions(-) diff --git a/cookbook/profiler/storage.rst b/cookbook/profiler/storage.rst index 37463ae6fee..fc6d8e4da22 100644 --- a/cookbook/profiler/storage.rst +++ b/cookbook/profiler/storage.rst @@ -5,65 +5,5 @@ Switching the Profiler Storage ============================== By default the profile stores the collected data in files in the ``%kernel.cache_dir%/profiler/`` directory. -You can control the storage being used through the ``dsn``, ``username``, -``password`` and ``lifetime`` options. For example, the following configuration -uses MySQL as the storage for the profiler with a lifetime of one hour: - -.. configuration-block:: - - .. code-block:: yaml - - # app/config/config.yml - framework: - profiler: - dsn: 'mysql:host=localhost;dbname=%database_name%' - username: '%database_user%' - password: '%database_password%' - lifetime: 3600 - - .. code-block:: xml - - - - - - - - - - .. code-block:: php - - // app/config/config.php - - // ... - $container->loadFromExtension('framework', array( - 'profiler' => array( - 'dsn' => 'mysql:host=localhost;dbname=%database_name%', - 'username' => '%database_user', - 'password' => '%database_password%', - 'lifetime' => 3600, - ), - )); - -The :doc:`HttpKernel component ` currently -supports the following profiler storage drivers: - -* file -* sqlite -* mysql -* mongodb -* memcache -* memcached -* redis +You can control the storage by implementing the ``Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface`` in +your own service and override the ``profiler.storage`` service. From bcc5634849b41f32b904c62ab0b6197b9b09ef2e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Dec 2015 08:53:45 +0100 Subject: [PATCH 2/3] Finished the rewording of the "profiler storage" article --- cookbook/profiler/storage.rst | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/cookbook/profiler/storage.rst b/cookbook/profiler/storage.rst index fc6d8e4da22..1ce0a51c6fd 100644 --- a/cookbook/profiler/storage.rst +++ b/cookbook/profiler/storage.rst @@ -4,6 +4,21 @@ Switching the Profiler Storage ============================== -By default the profile stores the collected data in files in the ``%kernel.cache_dir%/profiler/`` directory. -You can control the storage by implementing the ``Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface`` in -your own service and override the ``profiler.storage`` service. +In Symfony versions previous to 2.8, profiles could be stored in files, databases, +services like Redis and Memcache, etc. Starting from Symfony 2.8, the only storage +mechanism with built-in support is the filesystem. + +By default the profile stores the collected data in the ``%kernel.cache_dir%/profiler/`` +directory. If you want to use another location to store the profiles, define the +``dsn`` option of the ``framework.profiler``: + +.. code-block:: yaml + + # app/config/config.yml + framework: + profiler: + dsn: 'file:/tmp/symfony/profiler' + +You can also create your own profile storage service implementing the +:class:``Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface`` and +overriding the ``profiler.storage`` service. From bcbb87f47deeebdb791b3cdf1e809bca8e717564 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 30 Dec 2015 08:55:30 +0100 Subject: [PATCH 3/3] Fixed the Symfony version number --- cookbook/profiler/storage.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbook/profiler/storage.rst b/cookbook/profiler/storage.rst index 1ce0a51c6fd..f10f41e0ca0 100644 --- a/cookbook/profiler/storage.rst +++ b/cookbook/profiler/storage.rst @@ -4,8 +4,8 @@ Switching the Profiler Storage ============================== -In Symfony versions previous to 2.8, profiles could be stored in files, databases, -services like Redis and Memcache, etc. Starting from Symfony 2.8, the only storage +In Symfony versions previous 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. By default the profile stores the collected data in the ``%kernel.cache_dir%/profiler/``