Skip to content

Commit 02aead2

Browse files
committed
Merge branch '2.2' into 2.3
2 parents 7a56692 + 2e649b3 commit 02aead2

File tree

14 files changed

+49
-8
lines changed

14 files changed

+49
-8
lines changed

book/index.rst

100755100644
File mode changed.

book/validation.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,14 @@ simple example from inside a controller::
129129
$errors = $validator->validate($author);
130130

131131
if (count($errors) > 0) {
132-
return new Response(print_r($errors, true));
132+
/*
133+
* Uses a __toString method on the $errors variable which is a
134+
* ConstraintViolationList object. This gives us a nice string
135+
* for debugging
136+
*/
137+
$errorsString = (string) $errors;
138+
139+
return new Response($errorsString);
133140
}
134141

135142
return new Response('The author is valid! Yes!');

components/console/introduction.rst

100755100644
File mode changed.

components/console/usage.rst

100755100644
File mode changed.

cookbook/assetic/asset_management.rst

+29-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ Using Assetic provides many advantages over directly serving the files.
4343
The files do not need to be stored where they are served from and can be
4444
drawn from various sources such as from within a bundle.
4545

46-
You can use Assetic to process both :ref:`CSS stylesheets <cookbook-assetic-including-css>`
47-
and :ref:`JavaScript files <cookbook-assetic-including-javascript>`. The philosophy
46+
You can use Assetic to process :ref:`CSS stylesheets <cookbook-assetic-including-css>`,
47+
:ref:`JavaScript files <cookbook-assetic-including-javascript>` and
48+
:ref:`images <cookbook-assetic-including-image>`. The philosophy
4849
behind adding either is basically the same, but with a slightly different syntax.
4950

5051
.. _cookbook-assetic-including-javascript:
@@ -128,6 +129,32 @@ the :ref:`cssrewrite <cookbook-assetic-cssrewrite>` filter.
128129
that there is a known issue that causes the ``cssrewrite`` filter to fail
129130
when using the ``@AcmeFooBundle`` syntax for CSS Stylesheets.
130131

132+
.. _cookbook-assetic-including-image:
133+
134+
Including images
135+
~~~~~~~~~~~~~~~~
136+
137+
To include an image you can use the ``image`` tag.
138+
139+
.. configuration-block::
140+
141+
.. code-block:: html+jinja
142+
143+
{% image '@AcmeFooBundle/Resources/public/images/example.jpg' %}
144+
<img src="{{ asset_url }}" alt="Example" />
145+
{% endimage %}
146+
147+
.. code-block:: html+php
148+
149+
<?php foreach ($view['assetic']->image(
150+
array('@AcmeFooBundle/Resources/public/images/example.jpg')
151+
) as $url): ?>
152+
<img src="<?php echo $view->escape($url) ?>" alt="Example" />
153+
<?php endforeach; ?>
154+
155+
You can also use Assetic for image optimization. More information in
156+
:doc:`/cookbook/assetic/jpeg_optimize`.
157+
131158
.. _cookbook-assetic-cssrewrite:
132159

133160
Fixing CSS Paths with the ``cssrewrite`` Filter

cookbook/assetic/jpeg_optimize.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ It can now be used from a template:
6464

6565
.. code-block:: html+php
6666

67-
<?php foreach ($view['assetic']->images(
67+
<?php foreach ($view['assetic']->image(
6868
array('@AcmeFooBundle/Resources/public/images/example.jpg'),
6969
array('jpegoptim')
7070
) as $url): ?>

cookbook/bundles/remove.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ can remove the ``Acme`` directory as well.
7676
.. tip::
7777

7878
If you don't know the location of a bundle, you can use the
79-
:method:`Symfony\\Bundle\\FrameworkBundle\\Bundle\\Bundle::getPath` method
79+
:method:`Symfony\\Component\\HttpKernel\\Bundle\\BundleInterface::getPath` method
8080
to get the path of the bundle::
8181

8282
echo $this->container->get('kernel')->getBundle('AcmeDemoBundle')->getPath();

cookbook/event_dispatcher/before_after_filters.rst

100755100644
File mode changed.

cookbook/form/form_collections.rst

100755100644
+4-1
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,11 @@ First, add a "delete this tag" link to each tag form:
608608
.. code-block:: javascript
609609
610610
jQuery(document).ready(function() {
611+
// Get the ul that holds the collection of tags
612+
$collectionHolder = $('ul.tags');
613+
611614
// add a delete link to all of the existing tag form li elements
612-
collectionHolder.find('li').each(function() {
615+
$collectionHolder.find('li').each(function() {
613616
addTagFormDeleteLink($(this));
614617
});
615618

quick_tour/the_controller.rst

100755100644
File mode changed.

reference/configuration/monolog.rst

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ MonologBundle Configuration ("monolog")
3030
id: my_handler
3131
3232
# Default options and values for some "my_custom_handler"
33+
# Note: many of these options are specific to the "type".
34+
# For example, the "service" type doesn't use any options
35+
# except id and channels
3336
my_custom_handler:
3437
type: ~ # Required
3538
id: ~

reference/index.rst

100755100644
File mode changed.

reference/map.rst.inc

100755100644
File mode changed.

reference/requirements.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ Required
2626

2727
.. caution::
2828

29-
Be aware that Symfony2 has some known limitations when using PHP 5.3.8
30-
or below. For more information see the `Requirements section of the README`_.
29+
Be aware that Symfony2 has some known limitations when using a PHP version
30+
less than 5.3.8 or equal to 5.3.16. For more information see the
31+
`Requirements section of the README`_.
3132

3233
Optional
3334
--------

0 commit comments

Comments
 (0)