Skip to content

Commit c0f9f67

Browse files
committed
Merge branch '2.7'
2 parents 87eb36c + d71fe6d commit c0f9f67

13 files changed

+54
-38
lines changed

book/installation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ version as the second argument of the ``create-project`` command:
127127

128128
.. code-block:: bash
129129
130-
$ composer create-project symfony/framework-standard-edition my_project_name '2.3.*'
130+
$ composer create-project symfony/framework-standard-edition my_project_name "2.3.*"
131131
132132
.. tip::
133133

components/event_dispatcher/traceable_dispatcher.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ to register event listeners and dispatch events::
3030
// register an event listener
3131
$eventListener = ...;
3232
$priority = ...;
33-
$traceableEventDispatcher->addListener('event.the_name', $eventListener, $priority);
33+
$traceableEventDispatcher->addListener(
34+
'event.the_name',
35+
$eventListener,
36+
$priority
37+
);
3438

3539
// dispatch an event
3640
$event = ...;

components/finder.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ The contents of returned files can be read with
302302

303303
foreach ($finder as $file) {
304304
$contents = $file->getContents();
305-
...
305+
306+
// ...
306307
}
307308

308309
.. _strtotime: http://www.php.net/manual/en/datetime.formats.php

components/form/form_events.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ The ``FormEvents::PRE_SUBMIT`` event is dispatched at the beginning of the
134134

135135
It can be used to:
136136

137-
* Change data from the request, before submitting the data to the form.
137+
* Change data from the request, before submitting the data to the form;
138138
* Add or remove form fields, before submitting the data to the form.
139139

140140
:ref:`Form Events Information Table<component-form-event-table>`
@@ -309,7 +309,10 @@ callback for better readability::
309309
{
310310
$builder->add('username', 'text');
311311
$builder->add('show_email', 'checkbox');
312-
$builder->addEventListener(FormEvents::PRE_SET_DATA, array($this, 'onPreSetData'));
312+
$builder->addEventListener(
313+
FormEvents::PRE_SET_DATA,
314+
array($this, 'onPreSetData')
315+
);
313316
}
314317

315318
public function onPreSetData(FormEvent $event)

components/form/introduction.rst

+13-11
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,17 @@ to bootstrap or access Twig and add the :class:`Symfony\\Bridge\\Twig\\Extension
186186
// this file comes with TwigBridge
187187
$defaultFormTheme = 'form_div_layout.html.twig';
188188

189-
$vendorDir = realpath(__DIR__ . '/../vendor');
189+
$vendorDir = realpath(__DIR__.'/../vendor');
190190
// the path to TwigBridge so Twig can locate the
191191
// form_div_layout.html.twig file
192192
$vendorTwigBridgeDir =
193-
$vendorDir . '/symfony/twig-bridge/Symfony/Bridge/Twig';
193+
$vendorDir.'/symfony/twig-bridge/Symfony/Bridge/Twig';
194194
// the path to your other templates
195-
$viewsDir = realpath(__DIR__ . '/../views');
195+
$viewsDir = realpath(__DIR__.'/../views');
196196

197197
$twig = new Twig_Environment(new Twig_Loader_Filesystem(array(
198198
$viewsDir,
199-
$vendorTwigBridgeDir . '/Resources/views/Form',
199+
$vendorTwigBridgeDir.'/Resources/views/Form',
200200
)));
201201
$formEngine = new TwigRendererEngine(array($defaultFormTheme));
202202
$formEngine->setEnvironment($twig);
@@ -315,24 +315,24 @@ Your integration with the Validation component will look something like this::
315315
use Symfony\Component\Form\Extension\Validator\ValidatorExtension;
316316
use Symfony\Component\Validator\Validation;
317317

318-
$vendorDir = realpath(__DIR__ . '/../vendor');
319-
$vendorFormDir = $vendorDir . '/symfony/form/Symfony/Component/Form';
318+
$vendorDir = realpath(__DIR__.'/../vendor');
319+
$vendorFormDir = $vendorDir.'/symfony/form/Symfony/Component/Form';
320320
$vendorValidatorDir =
321-
$vendorDir . '/symfony/validator/Symfony/Component/Validator';
321+
$vendorDir.'/symfony/validator/Symfony/Component/Validator';
322322

323323
// create the validator - details will vary
324324
$validator = Validation::createValidator();
325325

326326
// there are built-in translations for the core error messages
327327
$translator->addResource(
328328
'xlf',
329-
$vendorFormDir . '/Resources/translations/validators.en.xlf',
329+
$vendorFormDir.'/Resources/translations/validators.en.xlf',
330330
'en',
331331
'validators'
332332
);
333333
$translator->addResource(
334334
'xlf',
335-
$vendorValidatorDir . '/Resources/translations/validators.en.xlf',
335+
$vendorValidatorDir.'/Resources/translations/validators.en.xlf',
336336
'en',
337337
'validators'
338338
);
@@ -671,10 +671,12 @@ method to access the list of errors. It returns a
671671

672672
// ...
673673

674-
// a FormErrorIterator instance, but only errors attached to this form level (e.g. "global errors)
674+
// a FormErrorIterator instance, but only errors attached to this
675+
// form level (e.g. "global errors)
675676
$errors = $form->getErrors();
676677

677-
// a FormErrorIterator instance, but only errors attached to the "firstName" field
678+
// a FormErrorIterator instance, but only errors attached to the
679+
// "firstName" field
678680
$errors = $form['firstName']->getErrors();
679681

680682
// a FormErrorIterator instance in a flattened structure

components/form/type_guesser.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Start by creating the class and these methods. Next, you'll learn how to fill ea
4646
4747
use Symfony\Component\Form\FormTypeGuesserInterface;
4848
49-
class PhpdocTypeGuesser implements FormTypeGuesserInterface
49+
class PHPDocTypeGuesser implements FormTypeGuesserInterface
5050
{
5151
public function guessType($class, $property)
5252
{
@@ -92,7 +92,7 @@ With this knowledge, you can easily implement the ``guessType`` method of the
9292
use Symfony\Component\Form\Guess\Guess;
9393
use Symfony\Component\Form\Guess\TypeGuess;
9494

95-
class PhpdocTypeGuesser implements FormTypeGuesserInterface
95+
class PHPDocTypeGuesser implements FormTypeGuesserInterface
9696
{
9797
public function guessType($class, $property)
9898
{

components/http_foundation/introduction.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ by using the following methods:
250250
:method:`Symfony\\Component\\HttpFoundation\\Request::getCharsets`
251251
Returns the list of accepted charsets ordered by descending quality.
252252

253-
* :method:`Symfony\\Component\\HttpFoundation\\Request::getEncodings`:
254-
returns the list of accepted charsets ordered by descending quality;
253+
:method:`Symfony\\Component\\HttpFoundation\\Request::getEncodings`
254+
Returns the list of accepted encodings ordered by descending quality.
255255

256256
.. versionadded:: 2.4
257257
The ``getEncodings()`` method was introduced in Symfony 2.4.
@@ -331,7 +331,7 @@ code, and an array of HTTP headers::
331331
array('content-type' => 'text/html')
332332
);
333333

334-
These information can also be manipulated after the Response object creation::
334+
This information can also be manipulated after the Response object creation::
335335

336336
$response->setContent('Hello World');
337337

components/http_foundation/sessions.rst

+7-3
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,12 @@ data is an array, for example a set of tokens. In this case, managing the array
190190
becomes a burden because you have to retrieve the array then process it and
191191
store it again::
192192

193-
$tokens = array('tokens' => array('a' => 'a6c1e0b6',
194-
'b' => 'f4a7b1f3'));
193+
$tokens = array(
194+
'tokens' => array(
195+
'a' => 'a6c1e0b6',
196+
'b' => 'f4a7b1f3',
197+
),
198+
);
195199

196200
So any processing of this might quickly get ugly, even simply adding a token to
197201
the array::
@@ -201,7 +205,7 @@ the array::
201205
$session->set('tokens', $tokens);
202206

203207
With structured namespacing, the key can be translated to the array
204-
structure like this using a namespace character (defaults to `/`)::
208+
structure like this using a namespace character (defaults to ``/``)::
205209

206210
$session->set('tokens/c', $value);
207211

components/intl.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Installation
2222

2323
You can install the component in two different ways:
2424

25-
* Using the official Git repository (https://github.com/symfony/Intl);
26-
* :doc:`Install it via Composer</components/using_components>` (``symfony/intl`` on `Packagist`_).
25+
* :doc:`Install it via Composer</components/using_components>` (``symfony/intl`` on `Packagist`_);
26+
* Using the official Git repository (https://github.com/symfony/Intl).
2727

2828
If you install the component via Composer, the following classes and functions
2929
of the intl extension will be automatically provided if the intl extension is

components/options_resolver.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ is thrown if an unknown option is passed::
134134
'usernme' => 'johndoe',
135135
));
136136

137-
// UndefinedOptionsException: The option "usernme" does not exist. Known
138-
// options are: "host", "password", "port", "username"
137+
// UndefinedOptionsException: The option "usernme" does not exist.
138+
// Known options are: "host", "password", "port", "username"
139139

140140
The rest of your code can access the values of the options without boilerplate
141141
code::
@@ -354,8 +354,8 @@ is thrown::
354354
'host' => 25,
355355
));
356356

357-
// InvalidOptionsException: The option "host" with value "25" is expected to
358-
// be of type "string"
357+
// InvalidOptionsException: The option "host" with value "25" is
358+
// expected to be of type "string"
359359

360360
In sub-classes, you can use :method:`Symfony\\Component\\OptionsResolver\\OptionsResolver::addAllowedTypes`
361361
to add additional allowed types without erasing the ones already set.
@@ -395,8 +395,8 @@ is thrown::
395395
'transport' => 'send-mail',
396396
));
397397

398-
// InvalidOptionsException: The option "transport" has the value "send-mail",
399-
// but is expected to be one of "sendmail", "mail", "smtp"
398+
// InvalidOptionsException: The option "transport" has the value
399+
// "send-mail", but is expected to be one of "sendmail", "mail", "smtp"
400400

401401
For options with more complicated validation schemes, pass a closure which
402402
returns ``true`` for acceptable values and ``false`` for invalid values::

components/process.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Stopping a Process
133133

134134
Any asynchronous process can be stopped at any time with the
135135
:method:`Symfony\\Component\\Process\\Process::stop` method. This method takes
136-
two arguments : a timeout and a signal. Once the timeout is reached, the signal
136+
two arguments: a timeout and a signal. Once the timeout is reached, the signal
137137
is sent to the running process. The default signal sent to a process is ``SIGKILL``.
138138
Please read the :ref:`signal documentation below<reference-process-signal>`
139139
to find out more about signal handling in the Process component::
@@ -249,7 +249,7 @@ Process Signals
249249
.. versionadded:: 2.3
250250
The ``signal`` method was introduced in Symfony 2.3.
251251

252-
When running a program asynchronously, you can send it posix signals with the
252+
When running a program asynchronously, you can send it POSIX signals with the
253253
:method:`Symfony\\Component\\Process\\Process::signal` method::
254254

255255
use Symfony\Component\Process\Process;

components/routing/introduction.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ calls a closure and uses the result as a :class:`Symfony\\Component\\Routing\\Ro
284284

285285
use Symfony\Component\Routing\Loader\ClosureLoader;
286286

287-
$closure = function() {
287+
$closure = function () {
288288
return new RouteCollection();
289289
};
290290

@@ -303,7 +303,7 @@ out here.
303303
The all-in-one Router
304304
~~~~~~~~~~~~~~~~~~~~~
305305

306-
The :class:`Symfony\\Component\\Routing\\Router` class is a all-in-one package
306+
The :class:`Symfony\\Component\\Routing\\Router` class is an all-in-one package
307307
to quickly use the Routing component. The constructor expects a loader instance,
308308
a path to the main route definition and some other settings::
309309

cookbook/form/use_empty_data.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ your form. For example::
1313
{
1414
$blog = ...;
1515

16-
// $blog is passed in as the data, so the empty_data option is not needed
16+
// $blog is passed in as the data, so the empty_data
17+
// option is not needed
1718
$form = $this->createForm(new BlogType(), $blog);
1819

19-
// no data is passed in, so empty_data is used to get the "starting data"
20+
// no data is passed in, so empty_data is
21+
// used to get the "starting data"
2022
$form = $this->createForm(new BlogType());
2123
}
2224

0 commit comments

Comments
 (0)