Skip to content

Commit

Permalink
Update documentation for MercureBundle: add enable_profiler option
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentchalamon authored and OskarStark committed Nov 12, 2019
1 parent a0569c9 commit 3705dae
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
Binary file added _images/mercure/panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions mercure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,44 @@ sent. Here is the PublisherStub implementation::
App\Tests\Functional\Fixtures\PublisherStub:
decorates: mercure.hub.default.publisher

.. versionadded:: 0.2

Debugging
---------

The WebProfiler panel was introduced in MercureBundle 0.2. Enable it on your configuration, as following:

.. configuration-block::

.. code-block:: yaml
# config/packages/mercure.yaml
mercure:
enable_profiler: '%kernel.debug%'
.. code-block:: xml
<!-- config/packages/mercure.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services
https://symfony.com/schema/dic/services/services-1.0.xsd">
<mercure:config enable_profiler="%kernel.debug%"/>
</container>
.. code-block:: php
// config/packages/mercure.php
$container->loadFromExtension('mercure', [
'enable_profiler' => '%kernel.debug%',
]);
.. image:: /_images/mercure/panel.png

.. _`the Mercure protocol`: https://github.com/dunglas/mercure#protocol-specification
.. _`Server-Sent Events (SSE)`: https://developer.mozilla.org/docs/Server-sent_events
.. _`a polyfill`: https://github.com/Yaffle/EventSource
Expand Down

0 comments on commit 3705dae

Please sign in to comment.