Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cfbc03f

Browse filesBrowse files
committed
Merge branch '2.3' into 2.5
* 2.3: [symfony#4099] Adding an extra tip Added Composer installation tip Clarifying a bit more that you're passing variables into your controller Update http_cache.rst Conflicts: cookbook/workflow/new_project_git.rst
2 parents fa32606 + 866d2a8 commit cfbc03f
Copy full SHA for cfbc03f

File tree

Expand file treeCollapse file tree

4 files changed

+31
-6
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+31
-6
lines changed

‎book/http_cache.rst

Copy file name to clipboardExpand all lines: book/http_cache.rst
+12-5Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -915,20 +915,20 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags:
915915
.. code-block:: jinja
916916
917917
{# you can use a controller reference #}
918-
{{ render_esi(controller('...:news', { 'max': 5 })) }}
918+
{{ render_esi(controller('...:news', { 'maxPerPage': 5 })) }}
919919
920920
{# ... or a URL #}
921-
{{ render_esi(url('latest_news', { 'max': 5 })) }}
921+
{{ render_esi(url('latest_news', { 'maxPerPage': 5 })) }}
922922
923923
.. code-block:: html+php
924924

925925
<?php echo $view['actions']->render(
926-
new \Symfony\Component\HttpKernel\Controller\ControllerReference('...:news', array('max' => 5)),
926+
new \Symfony\Component\HttpKernel\Controller\ControllerReference('...:news', array('maxPerPage' => 5)),
927927
array('strategy' => 'esi'))
928928
?>
929929

930930
<?php echo $view['actions']->render(
931-
$view['router']->generate('latest_news', array('max' => 5), true),
931+
$view['router']->generate('latest_news', array('maxPerPage' => 5), true),
932932
array('strategy' => 'esi'),
933933
) ?>
934934

@@ -938,6 +938,13 @@ wondering why you would want to use a helper instead of just writing the ESI
938938
tag yourself. That's because using a helper makes your application work even
939939
if there is no gateway cache installed.
940940

941+
.. tip::
942+
943+
As you'll see below, the ``maxPerPage`` variable you pass is available
944+
as an argument to your controller (i.e. ``$maxPerPage``). The variables
945+
passed through ``render_esi`` also become part of the cache key so that
946+
you have unique caches for each combination of variables and values.
947+
941948
When using the default ``render`` function (or setting the renderer to
942949
``inline``), Symfony merges the included page content into the main one
943950
before sending the response to the client. But if you use the ``esi`` renderer
@@ -958,7 +965,7 @@ of the master page.
958965

959966
.. code-block:: php
960967
961-
public function newsAction($max)
968+
public function newsAction($maxPerPage)
962969
{
963970
// ...
964971

‎book/installation.rst

Copy file name to clipboardExpand all lines: book/installation.rst
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ Distribution:
6666
To download the vendor files faster, add the ``--prefer-dist`` option at
6767
the end of any Composer command.
6868

69+
.. tip::
70+
71+
Add the ``-vvv`` flag to see everything that Composer is doing - this is
72+
especially useful on a slow connection where it may seem that nothing is
73+
happening.
74+
6975
This command may take several minutes to run as Composer downloads the Standard
7076
Distribution along with all of the vendor libraries that it needs. When it finishes,
7177
you should have a directory that looks something like this:

‎cookbook/workflow/new_project_git.rst

Copy file name to clipboardExpand all lines: cookbook/workflow/new_project_git.rst
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ git repository:
2626

2727
.. code-block:: bash
2828
29-
$ php composer.phar create-project symfony/framework-standard-edition path/ "~2.3"
29+
$ php composer.phar create-project symfony/framework-standard-edition path/ '~2.5'
30+
31+
.. tip::
32+
33+
Add the ``-vvv`` flag to see everything that Composer is doing - this is
34+
especially useful on a slow connection where it may seem that nothing is
35+
happening.
3036

3137
Composer will now download the Standard Distribution along with all of the
3238
required vendor libraries. For more information about downloading Symfony using

‎quick_tour/the_big_picture.rst

Copy file name to clipboardExpand all lines: quick_tour/the_big_picture.rst
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ directory:
2222
2323
$ composer create-project symfony/framework-standard-edition myproject/ "~2.3"
2424
25+
.. tip::
26+
27+
Add the ``-vvv`` flag to see everything that Composer is doing - this is
28+
especially useful on a slow connection where it may seem that nothing is
29+
happening.
30+
2531
.. note::
2632

2733
`Composer`_ is the package manager used by modern PHP applications and the

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.