8000 Merge branch '2.3' · symfony/symfony-docs@b9b60d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit b9b60d7

Browse files
committed
Merge branch '2.3'
Conflicts: book/internals.rst
2 parents e094853 + e2e8372 commit b9b60d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+359
-190
lines changed

book/doctrine.rst

10000 Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,12 +1441,19 @@ using. The following types are supported in Doctrine:
14411441
* ``date``
14421442
* ``time``
14431443
* ``datetime``
1444+
* ``datetimetz``
14441445

14451446
* **Other Types**
14461447

14471448
* ``boolean``
14481449
* ``object`` (serialized and stored in a ``CLOB`` field)
14491450
* ``array`` (serialized and stored in a ``CLOB`` field)
1451+
* ``blob`` (mapped to a resource stream)
1452+
* ``simple_array`` (serialized using :phpfunction:`implode()` and :phpfunction:`explode()`,
1453+
with a comma as delimiter, and stored in a ``CLOB`` field)
1454+
* ``json_array`` (serialized using :phpfunction:`json_encode()` and :phpfunction:`json_decode()`,
1455+
and stored in a ``CLOB`` field)
1456+
* ``guid``
14501457

14511458
For more information, see Doctrine's `Mapping Types documentation`_.
14521459

book/forms.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,7 +1412,7 @@ renders the form:
14121412
14131413
{% form_theme form 'AcmeTaskBundle:Form:fields.html.twig' 'AcmeTaskBundle:Form:fields2.html.twig' %}
14141414
1415-
{{ form(form) }}
1415+
<!-- ... render the form -->
14161416
14171417
.. code-block:: html+php
14181418
@@ -1421,7 +1421,7 @@ renders the form:
14211421
14221422
<?php $view['form']->setTheme($form, array('AcmeTaskBundle:Form', 'AcmeTaskBundle:Form')) ?>
14231423
1424-
<?php echo $view['form']->form($form) ?>
1424+
<!-- ... render the form -->
14251425
14261426
The ``form_theme`` tag (in Twig) "imports" the fragments defined in the given
14271427
template and uses them when rendering the form. In other words, when the

book/http_cache.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ example).
535535
The 304 status code means "Not Modified". It's important because with
536536
this status code the response does *not* contain the actual content being
537537
requested. Instead, the response is simply a light-weight set of directions that
538-
tell cache that it should use its stored version.
538+
tells the cache that it should use its stored version.
539539

540540
Like with expiration, there are two different HTTP headers that can be used
541541
to implement the validation model: ``ETag`` and ``Last-Modified``.

book/internals.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ on top of the previous one.
3030

3131
The deepest level is the :namespace:`Symfony\\Component\\HttpFoundation`
3232
component. HttpFoundation provides the main objects needed to deal with HTTP.
33-
It is an Object-Oriented abstraction of some native PHP functions and
33+
It is an object-oriented abstraction of some native PHP functions and
3434
variables:
3535

3636
* The :class:`Symfony\\Component\\HttpFoundation\\Request` class abstracts
@@ -424,6 +424,10 @@ and set a new ``Exception`` object, or do nothing::
424424
.. versionadded:: 2.4
425425
Support for HTTP status code constants was added in Symfony 2.4.
426426

427+
.. seealso::
428+
429+
Read more on the :ref:`kernel.exception event <component-http-kernel-kernel-exception>`.
430+
427431
.. index::
428432
single: Event Dispatcher
429433

@@ -434,10 +438,6 @@ The event dispatcher is a standalone component that is responsible for much
434438
of the underlying logic and flow behind a Symfony request. For more information,
435439
see the :doc:`Event Dispatcher Component Documentation </components/event_dispatcher/introduction>`.
436440

437-
.. seealso::
438-
439-
Read more on the :ref:`kernel.exception event <component-http-kernel-kernel-exception>`.
440-
441441
.. index::
442442
single: Profiler
443443

@@ -592,20 +592,20 @@ the configuration for the development environment:
592592
593593
// load the profiler
594594
$container->loadFromExtension('framework', array(
595-
'profiler' => array('only-exceptions' => false),
595+
'profiler' => array('only_exceptions' => false),
596596
));
597597
598598
// enable the web profiler
599599
$container->loadFromExtension('web_profiler', array(
600600
'toolbar' => true,
601-
'intercept-redirects' => true,
601+
'intercept_redirects' => true,
602602
'verbose' => true,
603603
));
604604
605-
When ``only-exceptions`` is set to ``true``, the profiler only collects data
605+
When ``only_exceptions`` is set to ``true``, the profiler only collects data
606606
when an exception is thrown by the application.
607607

608-
When ``intercept-redirects`` is set to ``true``, the web profiler intercepts
608+
When ``intercept_redirects`` is set to ``true``, the web profiler intercepts
609609
the redirects and gives you the opportunity to look at the collected data
610610
before following the redirect.
611611

@@ -643,7 +643,7 @@ If you enable the web profiler, you also need to mount the profiler routes:
643643
);
644644
645645
As the profiler adds some overhead, you might want to enable it only under
646-
certain circumstances in the production environment. The ``only-exceptions``
646+
certain circumstances in the production environment. The ``only_exceptions``
647647
settings limits profiling to 500 pages, but what if you want to get
648648
information when the client IP comes from a specific address, or for a limited
649649
portion of the website? You can use a Profiler Matcher, learn more about that

book/performance.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ to ensure that the cache is cleared whenever any source files change. Otherwise,
3737
the updates you've made won't be seen.
3838

3939
For example, to disable these checks in APC, simply add ``apc.stat=0`` to
40-
your php.ini configuration.
40+
your ``php.ini`` configuration.
4141

4242
.. index::
4343
single: Performance; Autoloader

book/propel.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,8 +476,8 @@ Commands
476476

477477
You should read the dedicated section for `Propel commands in Symfony2`_.
478478

479-
.. _`Working With Symfony2`: http://propelorm.org/cookbook/symfony2/working-with-symfony2.html#installation
480-
.. _`PropelBundle configuration section`: http://propelorm.org/cookbook/symfony2/working-with-symfony2.html#configuration
479+
.. _`Working With Symfony2`: http://propelorm.org/Propel/cookbook/symfony2/working-with-symfony2.html#installation
480+
.. _`PropelBundle configuration section`: http://propelorm.org/Propel/cookbook/symfony2/working-with-symfony2.html#configuration
481481
.. _`Relationships`: http://propelorm.org/documentation/04-relationships.html
482482
.. _`Behaviors reference section`: http://propelorm.org/documentation/#behaviors-reference
483-
.. _`Propel commands in Symfony2`: http://propelorm.org/cookbook/symfony2/working-with-symfony2#the-commands
483+
.. _`Propel commands in Symfony2`: http://propelorm.org/Propel/cookbook/symfony2/working-with-symfony2#the-commands

book/routing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -707,8 +707,8 @@ form via the same URL, while using distinct controllers for the two actions.
707707

708708
If no ``methods`` are specified, the route will match on *all* methods.
709709

710-
Adding a Host
711-
~~~~~~~~~~~~~
710+
Adding a Host Requirement
711+
~~~~~~~~~~~~~~~~~~~~~~~~~
712712

713713
.. versionadded:: 2.2
714714
Host matching support was added in Symfony 2.2
@@ -1067,8 +1067,8 @@ from the new routing resource.
10671067
:doc:`FrameworkExtraBundle documentation </bundles/SensioFrameworkExtraBundle/annotations/routing>`
10681068
to see how.
10691069

1070-
Adding a Host regex to Imported Routes
1071-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1070+
Adding a Host requirement to Imported Routes
1071+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10721072

10731073
.. versionadded:: 2.2
10741074
Host matching support was added in Symfony 2.2

book/security.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ that looks like the following:
146146
* Any URL matching ``/admin/*`` is secured, and only the ``admin`` user
147147
can access it;
148148
* All URLs *not* matching ``/admin/*`` are accessible by all users (and the
149-
user is never prompted to login).
149+
user is never prompted to log in).
150150

151151
Let's look briefly at how security works and how each part of the configuration
152152
comes into play.
@@ -373,10 +373,10 @@ submission (i.e. ``/login_check``):
373373
374374
# app/config/routing.yml
375375
login:
376-
pattern: /login
376+
path: /login
377377
defaults: { _controller: AcmeSecurityBundle:Security:login }
378378
login_check:
379-
pattern: /login_check
379+
path: /login_check
380380
381381
.. code-block:: xml
382382
@@ -387,11 +387,11 @@ submission (i.e. ``/login_check``):
387387
xsi:schemaLocation="http://symfony.com/schema/routing
388388
http://symfony.com/schema/routing/routing-1.0.xsd">
389389
390-
<route id="login" pattern="/login">
390+
<route id="login" path="/login">
391391
<default key="_controller">AcmeSecurityBundle:Security:login</default>
392392
</route>
393393
394-
<route id="login_check" pattern="/login_check" />
394+
<route id="login_check" path="/login_check" />
395395
</routes>
396396
397397
.. code-block:: php
@@ -1629,9 +1629,9 @@ the first provider is always used:
16291629
),
16301630
));
16311631
1632-
In this example, if a user tries to login via HTTP authentication, the authentication
1632+
In this example, if a user tries to log in via HTTP authentication, the authentication
16331633
system will use the ``in_memory`` user provider. But if the user tries to
1634-
login via the form login, the ``user_db`` provider will be used (since it's
1634+
log in via the form login, the ``user_db`` provider will be used (since it's
16351635
the default for the firewall as a whole).
16361636

16371637
For more information about user provider and firewall configuration, see
@@ -1860,7 +1860,7 @@ Impersonating a User
18601860
--------------------
18611861

18621862
Sometimes, it's useful to be able to switch from one user to another without
1863-
having to logout and login again (for instance when you are debugging or trying
1863+
having to log out and log in again (for instance when you are debugging or trying
18641864
to understand a bug a user sees that you can't reproduce). This can be easily
18651865
done by activating the ``switch_user`` firewall listener:
18661866

book/testing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ document::
244244
)
245245

246246
The ``server`` array is the raw values that you'd expect to normally
247-
find in the PHP `$_SERVER`_ superglobal. For example, to set the `Content-Type`,
248-
`Referer` and `X-Requested-With' HTTP headers, you'd pass the following (mind
249-
the `HTTP_` prefix for non standard headers)::
247+
find in the PHP `$_SERVER`_ superglobal. For example, to set the ``Content-Type``,
248+
``Referer`` and ``X-Requested-With`` HTTP headers, you'd pass the following (mind
249+
the ``HTTP_`` prefix for non standard headers)::
250250

251251
$client->request(
252252
'GET',

book/translation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ locale via routing.
534534
Fallback and Default Locale
535535
~~~~~~~~~~~~~~~~~~~~~~~~~~~
536536

537-
If the locale hasn't been set explicitly in the session, the ``fallback_locale``
537+
If the locale hasn't been set explicitly in the session, the ``fallback``
538538
configuration parameter will be used by the ``Translator``. The parameter
539539
defaults to ``en`` (see `Configuration`_).
540540

components/class_loader/introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Installation
3232

3333
You can install the component in 2 different ways:
3434

35-
* Use the official Git repository (https://github.com/symfony/ClassLoader);
3635
* :doc:`Install it via Composer </components/using_components>` (``symfony/class-loader``
37-
on `Packagist`_).
36+
on `Packagist`_);
37+
* Use the official Git repository (https://github.com/symfony/ClassLoader).
3838

3939
.. _`autoloading mechanism`: http://php.net/manual/en/language.oop5.autoload.php
4040
.. _Packagist: https://packagist.org/packages/symfony/class-loader

components/config/definition.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,8 @@ Otherwise the result is a clean array of configuration values::
565565
$configs = array($config1, $config2);
566566

567567
$processor = new Processor();
568-
$configuration = new DatabaseConfiguration;
568+
$configuration = new DatabaseConfiguration();
569569
$processedConfiguration = $processor->processConfiguration(
570570
$configuration,
571-
$configs)
572-
;
571+
$configs
572+
);

components/config/introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Installation
1717

1818
You can install the component in 2 different ways:
1919

20-
* Use the official Git repository (https://github.com/symfony/Config);
21-
* :doc:`Install it via Composer </components/using_components>` (``symfony/config`` on `Packagist`_).
20+
* :doc:`Install it via Composer </components/using_components>` (``symfony/config`` on `Packagist`_);
21+
* Use the official Git repository (https://github.com/symfony/Config).
2222

2323
Sections
2424
--------

components/console/helpers/dialoghelper.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ the following to your command::
3131
return;
3232
}
3333

34-
In this case, the user will be asked "Continue with this action", and will return
34+
In this case, the user will be asked "Continue with this action?", and will return
3535
``true`` if the user answers with ``y`` or false in any other case. The third
3636
argument to ``askConfirmation`` is the default value to return if the user doesn't
3737
enter any input.
@@ -159,7 +159,7 @@ You can also ask and validate a hidden response::
159159

160160
$password = $dialog->askHiddenResponseAndValidate(
161161
$output,
162-
'Please enter the name of the widget',
162+
'Please enter your password',
163163
$validator,
164164
20,
165165
false

components/console/introduction.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Installation
1717

1818
You can install the component in 2 different ways:
1919

20-
* Use the official Git repository (https://github.com/symfony/Console);
21-
* :doc:`Install it via Composer </components/using_components>` (``symfony/console`` on `Packagist`_).
20+
* :doc:`Install it via Composer </components/using_components>` (``symfony/console`` on `Packagist`_);
21+
* Use the official Git repository (https://github.com/symfony/Console).
2222

2323
.. note::
2424

@@ -396,6 +396,7 @@ tools capable of helping you with different tasks:
396396
* :doc:`/components/console/helpers/dialoghelper`: interactively ask the user for information
397397
* :doc:`/components/console/helpers/formatterhelper`: customize the output colorization
398398
* :doc:`/components/console/helpers/progresshelper`: shows a progress bar
399+
* :doc:`/components/console/helpers/tablehelper`: displays tabular data as a table
399400

400401
Testing Commands
401402
----------------

components/css_selector.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Installation
1212

1313
You can install the component in 2 different ways:
1414

15-
* Use the official Git repository (https://github.com/symfony/CssSelector);
16-
* :doc:`Install it via Composer </components/using_components>` (``symfony/css-selector`` on `Packagist`_).
15+
* :doc:`Install it via Composer </components/using_components>` (``symfony/css-selector`` on `Packagist`_);
16+
* Use the official Git repository (https://github.com/symfony/CssSelector).
1717

1818
Usage
1919
-----

components/dependency_injection/introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Installation
1616

1717
You can install the component in 2 different ways:
1818

19-
* Use the official Git repository (https://github.com/symfony/DependencyInjection);
20-
* :doc:`Install it via Composer </components/using_components>` (``symfony/dependency-injection`` on `Packagist`_).
19+
* :doc:`Install it via Composer </components/using_components>` (``symfony/dependency-injection`` on `Packagist`_);
20+
* Use the official Git repository (https://github.com/symfony/DependencyInjection).
2121

2222
Basic Usage
2323
-----------

components/dom_crawler.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Installation
1717

1818
You can install the component in 2 different ways:
1919

20-
* Use the official Git repository (https://github.com/symfony/DomCrawler);
21-
* :doc:`Install it via Composer </components/using_components>` (``symfony/dom-crawler`` on `Packagist`_).
20+
* :doc:`Install it via Composer </components/using_components>` (``symfony/dom-crawler`` on `Packagist`_);
21+
* Use the official Git repository (https://github.com/symfony/DomCrawler).
2222

2323
Usage
2424
-----
@@ -157,12 +157,12 @@ Call an anonymous function on each node of the list::
157157
return $node->text();
158158
});
159159

160-
.. versionadded::
160+
.. versionadded:: 2.3
161161
As seen here, in Symfony 2.3, the ``each`` and ``reduce`` Closure functions
162162
are passed a ``Crawler`` as the first argument. Previously, that argument
163163
was a :phpclass:`DOMNode`.
164164

165-
The anonymous function receives the position and the node (as a Crawler) as arguments.
165+
The anonymous function receives the node (as a Crawler) and the position as arguments.
166166
The result is an array of values returned by the anonymous function calls.
167167

168168
Adding the Content

components/event_dispatcher/generic_event.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ The Generic Event Object
55
========================
66

77
The base :class:`Symfony\\Component\\EventDispatcher\\Event` class provided by the
8-
``Event Dispatcher`` component is deliberately sparse to allow the creation of
9-
API specific event objects by inheritance using OOP. This allow for elegant and
8+
Event Dispatcher component is deliberately sparse to allow the creation of
9+
API specific event objects by inheritance using OOP. This allows for elegant and
1010
readable code in complex applications.
1111

1212
The :class:`Symfony\\Component\\EventDispatcher\\GenericEvent` is available

components/event_dispatcher/introduction.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ Installation
4949

5050
You can install the component in 2 different ways:
5151

52-
* Use the official Git repository (https://github.com/symfony/EventDispatcher);
53-
* :doc:`Install it via Composer </components/using_components>` (``symfony/event-dispatcher`` on `Packagist`_).
52+
* :doc:`Install it via Composer </components/using_components>` (``symfony/event-dispatcher`` on `Packagist`_);
53+
* Use the official Git repository (https://github.com/symfony/EventDispatcher).
5454

5555
Usage
5656
-----
@@ -188,7 +188,7 @@ In many cases, a special ``Event`` subclass that's specific to the given event
188188
is passed to the listener. This gives the listener access to special
189189
information about the event. Check the documentation or implementation of each
190190
event to determine the exact ``Symfony\Component\EventDispatcher\Event``
191-
instance that's being passed. For example, the ``kernel.event`` event passes an
191+
instance that's being passed. For example, the ``kernel.response`` event passes an
192192
instance of ``Symfony\Component\HttpKernel\Event\FilterResponseEvent``::
193193

194194
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
@@ -306,7 +306,7 @@ the ``dispatch`` method. Now, any listener to the ``store.order`` event will
306306
receive the ``FilterOrderEvent`` and have access to the ``Order`` object via
307307
the ``getOrder`` method::
308308

309-
// some listener class that's been registered for "STORE_ORDER" event
309+
// some listener class that's been registered for "store.order" event
310310
use Acme\StoreBundle\Event\FilterOrderEvent;
311311

312312
public function onStoreOrder(FilterOrderEvent $event)

0 commit comments

Comments
 (0)
0