Skip to content

Commit 1b2f5fa

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: fixes versionadded directive. refs #12598 Update documentation for MercureBundle: add enable_profiler option Simply update the ESI initial specs date (dated 2001) Update doctrine.rst Tell user about installing twig fix some more typos
2 parents ad95a07 + b24ccc3 commit 1b2f5fa

File tree

8 files changed

+53
-5
lines changed

8 files changed

+53
-5
lines changed

.doctor-rst.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,4 @@ whitelist:
8080
- '$var .= "Because of this `\xE9` octet (\\xE9),\n";'
8181
- "`Deploying Symfony 4 Apps on Heroku`_."
8282
- ".. _`Deploying Symfony 4 Apps on Heroku`: https://devcenter.heroku.com/articles/deploying-symfony4"
83+
- '.. versionadded:: 0.2' # MercureBundle

_images/mercure/panel.png

41.3 KB
Loading

components/property_access.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Using Getters
112112
~~~~~~~~~~~~~
113113

114114
The ``getValue()`` method also supports reading using getters. The method will
115-
be created using common naming conventions for getters. It transform the
115+
be created using common naming conventions for getters. It transforms the
116116
property name to camelCase (``first_name`` becomes ``FirstName``) and prefixes
117117
it with ``get``. So the actual method becomes ``getFirstName()``::
118118

configuration/micro_kernel_trait.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,6 @@ As before you can use the :doc:`Symfony Local Web Server
331331
cd public/
332332
$ symfony server:start
333333
334-
Then see page in browser:
334+
Then visit the page in your browser:
335335

336336
http://localhost:8000/random/10

doctrine.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,8 +735,8 @@ Now, you can call this method on the repository::
735735

736736
// ...
737737

738-
If you're in a :ref:`services-constructor-injection`, you can type-hint the
739-
``ProductRepository`` class and inject it like normal.
738+
See :ref:`services-constructor-injection` for how to inject the repository into
739+
any service.
740740

741741
Querying with the Query Builder
742742
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

http_cache/esi.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ have one limitation: they can only cache whole pages. If your pages contain
1212
dynamic sections, such as the user name or a shopping cart, you are out of
1313
luck. Fortunately, Symfony provides a solution for these cases, based on a
1414
technology called `ESI`_, or Edge Side Includes. Akamai wrote this specification
15-
almost 10 years ago and it allows specific parts of a page to have a different
15+
in 2001 and it allows specific parts of a page to have a different
1616
caching strategy than the main page.
1717

1818
The ESI specification describes tags you can embed in your pages to communicate

mercure.rst

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

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

page_creation.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ If you're returning HTML from your controller, you'll probably want to render
197197
a template. Fortunately, Symfony comes with `Twig`_: a templating language that's
198198
easy, powerful and actually quite fun.
199199

200+
Install the twig package with:
201+
202+
.. code-block:: terminal
203+
204+
$ composer require twig
205+
200206
Make sure that ``LuckyController`` extends Symfony's base
201207
:class:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController` class:
202208

0 commit comments

Comments
 (0)