Switching the Profiler Storage

Version: 3.1
Edit this page

Warning: You are browsing the documentation for version 3.1 which is not maintained anymore.

If some of your projects are still using this version, consider upgrading.

Switching the Profiler Storage

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.

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:

  • YAML
  • XML
  • PHP
# app/config/config.yml
        dsn: 'file:/tmp/symfony/profiler'

You can also create your own profile storage service implementing the ProfilerStorageInterface and overriding the profiler.storage service.

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.