diff --git a/cookbook/profiler/storage.rst b/cookbook/profiler/storage.rst index 37463ae6fee..f10f41e0ca0 100644 --- a/cookbook/profiler/storage.rst +++ b/cookbook/profiler/storage.rst @@ -4,66 +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 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: +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. -.. configuration-block:: +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 +.. code-block:: yaml - # app/config/config.yml - framework: - profiler: - dsn: 'mysql:host=localhost;dbname=%database_name%' - username: '%database_user%' - password: '%database_password%' - lifetime: 3600 + # 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' => '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 also create your own profile storage service implementing the +:class:``Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface`` and +overriding the ``profiler.storage`` service.