Skip to content

Commit 0a65492

Browse files
committed
feature #12598 Update documentation for MercureBundle: add enable_profiler option (vincentchalamon)
This PR was submitted for the master branch but it was squashed and merged into the 4.3 branch instead (closes #12598). Discussion ---------- Update documentation for MercureBundle: add enable_profiler option Related feature: symfony/mercure-bundle#13 ![panel](https://user-images.githubusercontent.com/995707/68297999-9d299b00-0098-11ea-9662-86062da00bf8.png) Commits ------- 3705dae Update documentation for MercureBundle: add enable_profiler option
2 parents a0569c9 + 3705dae commit 0a65492

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)