diff --git a/profiler.rst b/profiler.rst
index 496b86fbf62..0f20ead43b8 100644
--- a/profiler.rst
+++ b/profiler.rst
@@ -3,6 +3,8 @@ Profiler
.. toctree::
:maxdepth: 1
- :glob:
- profiler/*
+ profiler/data_collector
+ profiler/profiling_data
+ profiler/matchers
+ profiler/storage
diff --git a/profiler/data_collector.rst b/profiler/data_collector.rst
index 1e84d95a05d..16647b48fbd 100644
--- a/profiler/data_collector.rst
+++ b/profiler/data_collector.rst
@@ -122,8 +122,8 @@ block and set the value of two variables called ``icon`` and ``text``:
{% block toolbar %}
{% set icon %}
{# this is the content displayed as a panel in the toolbar #}
-
- Request
+
+ Request
{% endset %}
{% set text %}
@@ -147,23 +147,15 @@ block and set the value of two variables called ``icon`` and ``text``:
.. tip::
- Built-in collector templates define all their images as embedded base64-encoded
- images. This makes them work everywhere without having to mess with web assets
- links:
-
- .. code-block:: html
-
-
-
- Another solution is to define the images as SVG files. In addition to being
- resolution-independent, these images can be easily embedded in the Twig
- template or included from an external file to reuse them in several templates:
+ Built-in collector templates define all their images as embedded SVG files.
+ This makes them work everywhere without having to mess with web assets links:
.. code-block:: twig
- {{ include('data_collector/icon.svg') }}
-
- You are encouraged to use the latter technique for your own toolbar panels.
+ {% set icon %}
+ {{ include('data_collector/icon.svg') }}
+ {# ... #}
+ {% endset %}
If the toolbar panel includes extended web profiler information, the Twig template
must also define additional blocks:
@@ -174,8 +166,7 @@ must also define additional blocks:
{% block toolbar %}
{% set icon %}
-
- Request
+ {# ... #}
{% endset %}
{% set text %}
@@ -275,6 +266,5 @@ to specify a tag that contains the template:
))
;
-The position of each panel in the toolbar is determined by the priority defined
-by each collector. Most built-in collectors use ``255`` as their priority. If you
-want your collector to be displayed before them, use a higher value (like 300).
+The position of each panel in the toolbar is determined by the collector priority
+(the higher the priority, the earlier the panel is displayed in the toolbar).
diff --git a/profiler/profiling_data.rst b/profiler/profiling_data.rst
index 427d2e28d09..824267eb358 100644
--- a/profiler/profiling_data.rst
+++ b/profiler/profiling_data.rst
@@ -21,7 +21,7 @@ Using this token, you can access the profile of any past response thanks to the
:method:`Symfony\\Component\\HttpKernel\\Profiler\\Profiler::loadProfile` method::
$token = $response->headers->get('X-Debug-Token');
- $profile = $container->get('profiler')->loadProfile($token);
+ $profile = $profiler->loadProfile($token);
.. tip::
@@ -34,14 +34,13 @@ The ``profiler`` service also provides the
look for tokens based on some criteria::
// get the latest 10 tokens
- $tokens = $container->get('profiler')->find('', '', 10, '', '', '');
+ $tokens = $profiler->find('', '', 10, '', '', '');
// get the latest 10 tokens for all URL containing /admin/
- $tokens = $container->get('profiler')->find('', '/admin/', 10, '', '', '');
+ $tokens = $profiler->find('', '/admin/', 10, '', '', '');
// get the latest 10 tokens for local POST requests
- $tokens = $container->get('profiler')->find('127.0.0.1', '', 10, 'POST', '', '');
+ $tokens = $profiler->find('127.0.0.1', '', 10, 'POST', '', '');
// get the latest 10 tokens for requests that happened between 2 and 4 days ago
- $tokens = $container->get('profiler')
- ->find('', '', 10, '', '4 days ago', '2 days ago');
+ $tokens = $profiler->find('', '', 10, '', '4 days ago', '2 days ago');
diff --git a/profiler/storage.rst b/profiler/storage.rst
index f4bdaaca061..fc9d31d528b 100644
--- a/profiler/storage.rst
+++ b/profiler/storage.rst
@@ -4,11 +4,7 @@
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/``
+The profiler 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``:
@@ -16,14 +12,14 @@ directory. If you want to use another location to store the profiles, define the
.. code-block:: yaml
- # app/config/config.yml
+ # config/packages/dev/web_profiler.yaml
framework:
profiler:
dsn: 'file:/tmp/symfony/profiler'
.. code-block:: xml
-
+
loadFromExtension('framework', array(