Skip to content

Commit 3705dae

Browse files
vincentchalamonOskarStark
authored andcommitted
Update documentation for MercureBundle: add enable_profiler option
1 parent a0569c9 commit 3705dae

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

_images/mercure/panel.png

41.3 KB
Loading

mercure.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,44 @@ sent. Here is the PublisherStub implementation::
568568
App\Tests\Functional\Fixtures\PublisherStub:
569569
decorates: mercure.hub.default.publisher
570570

571+
.. versionadded:: 0.2
572+
573+
Debugging
574+
---------
575+
576+
The WebProfiler panel was introduced in MercureBundle 0.2. Enable it on your configuration, as following:
577+
578+
.. configuration-block::
579+
580+
.. code-block:: yaml
581+
582+
# config/packages/mercure.yaml
583+
mercure:
584+
enable_profiler: '%kernel.debug%'
585+
586+
.. code-block:: xml
587+
588+
<!-- config/packages/mercure.xml -->
589+
<?xml version="1.0" encoding="UTF-8" ?>
590+
<container xmlns="http://symfony.com/schema/dic/services"
591+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
592+
xsi:schemaLocation="http://symfony.com/schema/dic/services
593+
https://symfony.com/schema/dic/services/services-1.0.xsd">
594+
595+
<mercure:config enable_profiler="%kernel.debug%"/>
596+
597+
</container>
598+
599+
.. code-block:: php
600+
601+
// config/packages/mercure.php
602+
$container->loadFromExtension('mercure', [
603+
'enable_profiler' => '%kernel.debug%',
604+
]);
605+
606+
607+
.. image:: /_images/mercure/panel.png
608+
571609
.. _`the Mercure protocol`: https://github.com/dunglas/mercure#protocol-specification
572610
.. _`Server-Sent Events (SSE)`: https://developer.mozilla.org/docs/Server-sent_events
573611
.. _`a polyfill`: https://github.com/Yaffle/EventSource

0 commit comments

Comments
 (0)