Skip to content

Commit

Permalink
Fixed some of the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterj committed Mar 10, 2015
1 parent c6ff013 commit 3ab53a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions book/http_cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ To see a simple implementation, generate the ETag as the md5 of the content::
{
public function homepageAction(Request $request)
{
$response = $this->render('homepage.html.twig');
$response = $this->render('static/homepage.html.twig');
$response->setETag(md5($response->getContent()));
$response->setPublic(); // make sure the response is public/cacheable
$response->isNotModified($request);
Expand Down Expand Up @@ -1019,7 +1019,6 @@ First, to use ESI, be sure to enable it in your application configuration:
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
">
<framework:config>
<!-- ... -->
Expand Down Expand Up @@ -1048,7 +1047,7 @@ independent of the rest of the page.
{
public function aboutAction()
{
$response = $this->render('about.html.twig');
$response = $this->render('static/about.html.twig');
// set the shared max age - which also marks the response as public
$response->setSharedMaxAge(600);
Expand All @@ -1068,7 +1067,7 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags:

.. code-block:: jinja
{# app/Resources/views/about.html.twig #}
{# app/Resources/views/static/about.html.twig #}
{# you can use a controller reference #}
{{ render_esi(controller('AppBundle:News:latest', { 'maxPerPage': 5 })) }}
Expand All @@ -1078,7 +1077,7 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags:
.. code-block:: html+php

<!-- app/Resources/views/about.html.php -->
<!-- app/Resources/views/static/about.html.php -->

// you can use a controller reference
use Symfony\Component\HttpKernel\Controller\ControllerReference;
Expand Down
2 changes: 1 addition & 1 deletion book/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ unit tests. Suppose, for example, that you have an *incredibly* simple class
called ``Calculator`` in the ``Util/`` directory of the app bundle::

// src/AppBundle/Util/Calculator.php
namespace AppBundle\Utility;
namespace AppBundle\Util;

class Calculator
{
Expand Down
4 changes: 2 additions & 2 deletions book/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ class to have at least 3 characters.
{
/**
* @Assert\NotBlank()
* @Assert\Length(min="3")
* @Assert\Length(min=3)
*/
private $firstName;
}
Expand Down Expand Up @@ -823,7 +823,7 @@ user registers and when a user updates their contact information later:
'groups' => array('registration'),
)));
$metadata->addPropertyConstraint('city', Assert\Length(array(
$metadata->addPropertyConstraint('city', new Assert\Length(array(
"min" => 3,
)));
}
Expand Down

0 comments on commit 3ab53a6

Please sign in to comment.