Skip to content

Commit 17b584a

Browse files
committed
Merge branch '2.2' into 2.3
Conflicts: book/templating.rst
2 parents 08ef9f8 + b1cc82d commit 17b584a

File tree

15 files changed

+60
-44
lines changed

15 files changed

+60
-44
lines changed

book/forms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ There's still much more to learn about the powerful world of forms, such as
18651865
how to handle
18661866
:doc:`file uploads with Doctrine </cookbook/doctrine/file_uploads>` or how
18671867
to create a form where a dynamic number of sub-forms can be added (e.g. a
1868-
todo list where you can keep adding more fields via Javascript before submitting).
1868+
todo list where you can keep adding more fields via JavaScript before submitting).
18691869
See the cookbook for these topics. Also, be sure to lean on the
18701870
:doc:`field type reference documentation </reference/forms/types>`, which
18711871
includes examples of how to use each field type and its options.

book/http_fundamentals.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ specific PHP method ``contactAction`` inside a class called ``MainController``::
479479

480480
In this very simple example, the controller simply creates a
481481
:class:`Symfony\\Component\\HttpFoundation\\Response` object with the HTML
482-
``<h1>Contact us! </h1>``. In the :doc:`controller chapter </book/controller>`,
482+
``<h1>Contact us!</h1>``. In the :doc:`controller chapter </book/controller>`,
483483
you'll learn how a controller can render templates, allowing your "presentation"
484484
code (i.e. anything that actually writes out HTML) to live in a separate
485485
template file. This frees up the controller to worry only about the hard
@@ -524,14 +524,14 @@ regardless of how your project is developed. To name a few:
524524
* `Form`_ - A full-featured and flexible framework for creating forms and
525525
handling form submissions;
526526

527-
* `Validator`_ A system for creating rules about data and then validating
527+
* `Validator`_ - A system for creating rules about data and then validating
528528
whether or not user-submitted data follows those rules;
529529

530-
* :doc:`ClassLoader </components/class_loader/introduction>` An autoloading library that allows
530+
* :doc:`ClassLoader </components/class_loader/introduction>` - An autoloading library that allows
531531
PHP classes to be used without needing to manually ``require`` the files
532532
containing those classes;
533533

534-
* :doc:`Templating </components/templating/introduction>` A toolkit for rendering
534+
* :doc:`Templating </components/templating/introduction>` - A toolkit for rendering
535535
templates, handling template inheritance (i.e. a template is decorated with
536536
a layout) and performing other common template tasks;
537537

book/page_creation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ inside a bundle.
9595

9696
A bundle is nothing more than a directory that houses everything related
9797
to a specific feature, including PHP classes, configuration, and even stylesheets
98-
and Javascript files (see :ref:`page-creation-bundles`).
98+
and JavaScript files (see :ref:`page-creation-bundles`).
9999

100100
To create a bundle called ``AcmeHelloBundle`` (a play bundle that you'll
101101
build in this chapter), run the following command and follow the on-screen

book/security.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,9 @@ submission (i.e. ``/login_check``):
415415
to this URL.
416416

417417
.. versionadded:: 2.1
418-
As of Symfony 2.1, you *must* have routes configured for your ``login_path``,
419-
``check_path`` ``logout`` keys. These keys can be route names (as shown
420-
in this example) or URLs that have routes configured for them.
418+
As of Symfony 2.1, you *must* have routes configured for your ``login_path``
419+
and ``check_path``. These keys can be route names (as shown in this example)
420+
or URLs that have routes configured for them.
421421

422422
Notice that the name of the ``login`` route matches the ``login_path`` config
423423
value, as that's where the security system will redirect users that need

book/templating.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,10 @@ that as much code as possible lives in reusable :doc:`services </book/service_co
676676
Asynchronous Content with hinclude.js
677677
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
678678

679-
Controllers can be embedded asynchronously using the hinclude.js_ javascript library.
679+
.. versionadded:: 2.1
680+
hinclude.js support was added in Symfony 2.1
681+
682+
Controllers can be embedded asynchronously using the hinclude.js_ JavaScript library.
680683
As the embedded content comes from another page (or controller for that matter),
681684
Symfony2 uses a version of the standard ``render`` function to configure ``hinclude``
682685
tags:
@@ -741,7 +744,7 @@ tags:
741744
'fragments' => array('path' => '/_fragment'),
742745
));
743746
744-
Default content (while loading or if javascript is disabled) can be set globally
747+
Default content (while loading or if JavaScript is disabled) can be set globally
745748
in your application configuration:
746749

747750
.. configuration-block::
@@ -971,7 +974,7 @@ correctly:
971974
Linking to Assets
972975
~~~~~~~~~~~~~~~~~
973976

974-
Templates also commonly refer to images, Javascript, stylesheets and other
977+
Templates also commonly refer to images, JavaScript, stylesheets and other
975978
assets. Of course you could hard-code the path to these assets (e.g. ``/images/logo.png``),
976979
but Symfony2 provides a more dynamic option via the ``asset`` Twig function:
977980

@@ -1004,29 +1007,29 @@ look like ``/images/logo.png?v2``. For more information, see the :ref:`ref-frame
10041007
configuration option.
10051008

10061009
.. index::
1007-
single: Templating; Including stylesheets and Javascripts
1010+
single: Templating; Including stylesheets and JavaScripts
10081011
single: Stylesheets; Including stylesheets
1009-
single: Javascript; Including Javascripts
1012+
single: JavaScript; Including JavaScripts
10101013

1011-
Including Stylesheets and Javascripts in Twig
1014+
Including Stylesheets and JavaScripts in Twig
10121015
---------------------------------------------
10131016

1014-
No site would be complete without including Javascript files and stylesheets.
1017+
No site would be complete without including JavaScript files and stylesheets.
10151018
In Symfony, the inclusion of these assets is handled elegantly by taking
10161019
advantage of Symfony's template inheritance.
10171020

10181021
.. tip::
10191022

10201023
This section will teach you the philosophy behind including stylesheet
1021-
and Javascript assets in Symfony. Symfony also packages another library,
1024+
and JavaScript assets in Symfony. Symfony also packages another library,
10221025
called Assetic, which follows this philosophy but allows you to do much
10231026
more interesting things with those assets. For more information on
10241027
using Assetic see :doc:`/cookbook/assetic/asset_management`.
10251028

10261029
Start by adding two blocks to your base template that will hold your assets:
10271030
one called ``stylesheets`` inside the ``head`` tag and another called ``javascripts``
10281031
just above the closing ``body`` tag. These blocks will contain all of the
1029-
stylesheets and Javascripts that you'll need throughout your site:
1032+
stylesheets and JavaScripts that you'll need throughout your site:
10301033

10311034
.. code-block:: html+jinja
10321035

@@ -1049,7 +1052,7 @@ stylesheets and Javascripts that you'll need throughout your site:
10491052
</html>
10501053

10511054
That's easy enough! But what if you need to include an extra stylesheet or
1052-
Javascript from a child template? For example, suppose you have a contact
1055+
JavaScript from a child template? For example, suppose you have a contact
10531056
page and you need to include a ``contact.css`` stylesheet *just* on that
10541057
page. From inside that contact page's template, do the following:
10551058

book/validation.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,18 @@ entity and a new constraint group called ``Premium``:
971971

972972
.. configuration-block::
973973

974+
.. code-block:: yaml
975+
976+
# src/Acme/DemoBundle/Resources/config/validation.yml
977+
Acme\DemoBundle\Entity\User:
978+
properties:
979+
name:
980+
- NotBlank
981+
creditCard:
982+
- CardScheme
983+
schemes: [VISA]
984+
groups: [Premium]
985+
974986
.. code-block:: php-annotations
975987
976988
// src/Acme/DemoBundle/Entity/User.php
@@ -996,18 +1008,6 @@ entity and a new constraint group called ``Premium``:
9961008
private $creditCard;
9971009
}
9981010
999-
.. code-block:: yaml
1000-
1001-
# src/Acme/DemoBundle/Resources/config/validation.yml
1002-
Acme\DemoBundle\Entity\User:
1003-
properties:
1004-
name:
1005-
- NotBlank
1006-
creditCard:
1007-
- CardScheme
1008-
schemes: [VISA]
1009-
groups: [Premium]
1010-
10111011
.. code-block:: xml
10121012
10131013
<!-- src/Acme/DemoBundle/Resources/config/validation.xml -->

components/css_selector.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ long and unwieldy expressions.
3232

3333
Many developers -- particularly web developers -- are more comfortable
3434
using CSS selectors to find elements. As well as working in stylesheets,
35-
CSS selectors are used in Javascript with the ``querySelectorAll`` function
36-
and in popular Javascript libraries such as jQuery, Prototype and MooTools.
35+
CSS selectors are used in JavaScript with the ``querySelectorAll`` function
36+
and in popular JavaScript libraries such as jQuery, Prototype and MooTools.
3737

3838
CSS selectors are less powerful than XPath, but far easier to write, read
3939
and understand. Since they are less powerful, almost all CSS selectors can

cookbook/assetic/apply_to_option.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ How to Apply an Assetic Filter to a Specific File Extension
77
Assetic filters can be applied to individual files, groups of files or even,
88
as you'll see here, files that have a specific extension. To show you how
99
to handle each option, let's suppose that you want to use Assetic's CoffeeScript
10-
filter, which compiles CoffeeScript files into Javascript.
10+
filter, which compiles CoffeeScript files into JavaScript.
1111

1212
The main configuration is just the paths to coffee, node and node_modules.
1313
An example configuration might look like this:

cookbook/assetic/uglifyjs.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
How to Minify CSS/JS Files (using UglifyJs and UglifyCss)
55
=========================================================
66

7-
`UglifyJs`_ is a javascript parser/compressor/beautifier toolkit. It can be used
8-
to combine and minify javascript assets so that they require less HTTP requests
7+
`UglifyJs`_ is a JavaScript parser/compressor/beautifier toolkit. It can be used
8+
to combine and minify JavaScript assets so that they require less HTTP requests
99
and make your site load faster. `UglifyCss`_ is a css compressor/beautifier
1010
that is very similar to UglifyJs.
1111

cookbook/assetic/yuicompressor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ the view layer, this work is done in your templates:
103103

104104
The above example assumes that you have a bundle called ``AcmeFooBundle``
105105
and your JavaScript files are in the ``Resources/public/js`` directory under
106-
your bundle. This isn't important however - you can include your Javascript
106+
your bundle. This isn't important however - you can include your JavaScript
107107
files no matter where they are.
108108

109109
With the addition of the ``yui_js`` filter to the asset tags above, you should

cookbook/configuration/web_server_configuration.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,20 @@ following configuration snippet:
4848

4949
.. code-block:: apache
5050
51-
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
51+
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
52+
53+
.. caution::
54+
55+
In Apache 2.4, ``Order allow,deny`` has been replaced by ``Require all granted``,
56+
and hence you need to modify your Directory permission settings as follows:
57+
58+
.. code-block:: apache
59+
60+
<Directory /var/www/project/web>
61+
# enable the .htaccess rewrites
62+
AllowOverride All
63+
Require all granted
64+
</Directory>
5265
5366
Nginx
5467
-----

cookbook/console/logging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Manually logging from a console Command
2323
This one is really simple. When you create a console command within the full
2424
framework as described in ":doc:`/cookbook/console/console_command`", your command
2525
extends :class:`Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand`.
26-
This means that you can simply access the standard logger service through the
26+
This means that you can simply access the standard logger service through the
2727
container and use it to do the logging::
2828

2929
// src/Acme/DemoBundle/Command/GreetCommand.php

cookbook/controller/error_pages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ end-user, create a new template located at
6868

6969
In addition to the standard HTML error page, Symfony provides a default error
7070
page for many of the most common response formats, including JSON
71-
(``error.json.twig``), XML (``error.xml.twig``) and even Javascript
71+
(``error.json.twig``), XML (``error.xml.twig``) and even JavaScript
7272
(``error.js.twig``), to name a few. To override any of these templates, just
7373
create a new file with the same name in the
7474
``app/Resources/TwigBundle/views/Exception`` directory. This is the standard

cookbook/event_dispatcher/class_extension.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ use this pattern of class extension:
7777
$this->stopPropagation();
7878
}
7979
80-
public function getReturnValue($val)
80+
public function getReturnValue()
8181
{
8282
return $this->returnValue;
8383
}

reference/constraints/CardScheme.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CardScheme
55
The CardScheme validation is new in Symfony 2.2.
66

77
This constraint ensures that a credit card number is valid for a given credit card
8-
company. It can be used to validate the number before trying to initiate a payment
8+
company. It can be used to validate the number before trying to initiate a payment
99
through a payment gateway.
1010

1111
+----------------+--------------------------------------------------------------------------+
@@ -23,7 +23,7 @@ Basic Usage
2323
-----------
2424

2525
To use the ``CardScheme`` validator, simply apply it to a property or method
26-
on an object that will contain a credit card number.
26+
on an object that will contain a credit card number.
2727

2828
.. configuration-block::
2929

@@ -103,7 +103,7 @@ schemes
103103

104104
**type**: ``mixed`` [:ref:`default option <validation-default-option>`]
105105

106-
This option is required and represents the name of the number scheme used to
106+
This option is required and represents the name of the number scheme used to
107107
validate the credit card number, it can either be a string or an array. Valid
108108
values are:
109109

0 commit comments

Comments
 (0)