Skip to content

Commit 6c746a7

Browse files
committed
Merge branch '2.8' into 3.3
* 2.8: Fixed indentation errors
2 parents 0d6e3a1 + bd4d6ed commit 6c746a7

24 files changed

+176
-176
lines changed

bundles.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ are used by your application (including the core Symfony bundles).
5858

5959
.. tip::
6060

61-
A bundle can live *anywhere* as long as it can be autoloaded (via the
62-
autoloader configured at ``app/autoload.php``).
61+
A bundle can live *anywhere* as long as it can be autoloaded (via the
62+
autoloader configured at ``app/autoload.php``).
6363

6464
Creating a Bundle
6565
-----------------
@@ -90,10 +90,10 @@ called ``AcmeTestBundle.php``::
9090

9191
.. tip::
9292

93-
The name AcmeTestBundle follows the standard
94-
:ref:`Bundle naming conventions <bundles-naming-conventions>`. You could
95-
also choose to shorten the name of the bundle to simply TestBundle by naming
96-
this class TestBundle (and naming the file ``TestBundle.php``).
93+
The name AcmeTestBundle follows the standard
94+
:ref:`Bundle naming conventions <bundles-naming-conventions>`. You could
95+
also choose to shorten the name of the bundle to simply TestBundle by naming
96+
this class TestBundle (and naming the file ``TestBundle.php``).
9797

9898
This empty class is the only piece you need to create the new bundle. Though
9999
commonly empty, this class is powerful and can be used to customize the behavior
@@ -130,9 +130,9 @@ tools later.
130130

131131
.. tip::
132132

133-
Whenever creating a new bundle or using a third-party bundle, always make
134-
sure the bundle has been enabled in ``registerBundles()``. When using
135-
the ``generate:bundle`` command, this is done for you.
133+
Whenever creating a new bundle or using a third-party bundle, always make
134+
sure the bundle has been enabled in ``registerBundles()``. When using
135+
the ``generate:bundle`` command, this is done for you.
136136

137137
Bundle Directory Structure
138138
--------------------------

bundles/best_practices.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,21 @@ The following classes and files have specific emplacements (some are mandatory
116116
and others are just conventions followed by most developers):
117117

118118
=================================================== ========================================
119-
Type Directory
119+
Type Directory
120120
=================================================== ========================================
121-
Commands ``Command/``
122-
Controllers ``Controller/``
123-
Service Container Extensions ``DependencyInjection/``
121+
Commands ``Command/``
122+
Controllers ``Controller/``
123+
Service Container Extensions ``DependencyInjection/``
124124
Doctrine ORM entities (when not using annotations) ``Entity/``
125125
Doctrine ODM documents (when not using annotations) ``Document/``
126-
Event Listeners ``EventListener/``
127-
Configuration ``Resources/config/``
128-
Web Resources (CSS, JS, images) ``Resources/public/``
129-
Translation files ``Resources/translations/``
126+
Event Listeners ``EventListener/``
127+
Configuration ``Resources/config/``
128+
Web Resources (CSS, JS, images) ``Resources/public/``
129+
Translation files ``Resources/translations/``
130130
Validation (when not using annotations) ``Resources/config/validation/``
131131
Serialization (when not using annotations) ``Resources/config/serialization/``
132-
Templates ``Resources/views/``
133-
Unit and Functional Tests ``Tests/``
132+
Templates ``Resources/views/``
133+
Unit and Functional Tests ``Tests/``
134134
=================================================== ========================================
135135

136136
Classes
@@ -174,19 +174,19 @@ the ``Tests/`` directory. Tests should follow the following principles:
174174

175175
.. note::
176176

177-
A test suite must not contain ``AllTests.php`` scripts, but must rely on the
178-
existence of a ``phpunit.xml.dist`` file.
177+
A test suite must not contain ``AllTests.php`` scripts, but must rely on the
178+
existence of a ``phpunit.xml.dist`` file.
179179

180180
Documentation
181181
-------------
182182

183183
All classes and functions must come with full PHPDoc.
184184

185-
Extensive documentation should also be provided in the ``Resources/doc/``
185+
Extensive documentation should also be provided in the ``Resources/doc/``
186186
directory.
187-
The index file (for example ``Resources/doc/index.rst`` or
188-
``Resources/doc/index.md``) is the only mandatory file and must be the entry
189-
point for the documentation. The
187+
The index file (for example ``Resources/doc/index.rst`` or
188+
``Resources/doc/index.md``) is the only mandatory file and must be the entry
189+
point for the documentation. The
190190
:doc:`reStructuredText (rST) </contributing/documentation/format>` is the format
191191
used to render the documentation on symfony.com.
192192

bundles/inheritance.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ The same goes for routing files and some other resources.
9999

100100
.. caution::
101101

102-
Translation and validation files do not work in the same way as described
103-
above. Read ":ref:`override-translations`" if you want to learn how to
104-
override translations and see ":ref:`override-validation`" for tricks to
105-
override the validation.
102+
Translation and validation files do not work in the same way as described
103+
above. Read ":ref:`override-translations`" if you want to learn how to
104+
override translations and see ":ref:`override-validation`" for tricks to
105+
override the validation.
106106

107107
.. _`FOSUserBundle`: https://github.com/friendsofsymfony/fosuserbundle

components/asset.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
The Asset Component
66
===================
77

8-
The Asset component manages URL generation and versioning of web assets such
9-
as CSS stylesheets, JavaScript files and image files.
8+
The Asset component manages URL generation and versioning of web assets such
9+
as CSS stylesheets, JavaScript files and image files.
1010

1111
In the past, it was common for web applications to hardcode URLs of web assets.
1212
For example:

components/event_dispatcher.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,14 +402,14 @@ the dispatcher to stop all propagation of the event to future listeners
402402
inside a listener via the
403403
:method:`Symfony\\Component\\EventDispatcher\\Event::stopPropagation` method::
404404

405-
use Acme\Store\Event\OrderPlacedEvent;
405+
use Acme\Store\Event\OrderPlacedEvent;
406406

407-
public function onStoreOrder(OrderPlacedEvent $event)
408-
{
409-
// ...
407+
public function onStoreOrder(OrderPlacedEvent $event)
408+
{
409+
// ...
410410

411-
$event->stopPropagation();
412-
}
411+
$event->stopPropagation();
412+
}
413413

414414
Now, any listeners to ``order.placed`` that have not yet been called will
415415
*not* be called.

components/finder.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
The Finder Component
66
====================
77

8-
The Finder component finds files and directories via an intuitive fluent
9-
interface.
8+
The Finder component finds files and directories via an intuitive fluent
9+
interface.
1010

1111
Installation
1212
------------

components/process.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,12 @@ Process Idle Timeout
331331
In contrast to the timeout of the previous paragraph, the idle timeout only
332332
considers the time since the last output was produced by the process::
333333

334-
use Symfony\Component\Process\Process;
334+
use Symfony\Component\Process\Process;
335335

336-
$process = new Process('something-with-variable-runtime');
337-
$process->setTimeout(3600);
338-
$process->setIdleTimeout(60);
339-
$process->run();
336+
$process = new Process('something-with-variable-runtime');
337+
$process->setTimeout(3600);
338+
$process->setIdleTimeout(60);
339+
$process->run();
340340

341341
In the case above, a process is considered timed out, when either the total runtime
342342
exceeds 3600 seconds, or the process does not produce any output for 60 seconds.

components/routing.rst

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
The Routing Component
66
=====================
77

8-
The Routing component maps an HTTP request to a set of configuration
9-
variables.
8+
The Routing component maps an HTTP request to a set of configuration
9+
variables.
1010

1111
Installation
1212
------------
@@ -100,28 +100,28 @@ A full route definition can contain up to seven parts:
100100

101101
Take the following route, which combines several of these ideas::
102102

103-
$route = new Route(
104-
'/archive/{month}', // path
105-
array('_controller' => 'showArchive'), // default values
106-
array('month' => '[0-9]{4}-[0-9]{2}', 'subdomain' => 'www|m'), // requirements
107-
array(), // options
108-
'{subdomain}.example.com', // host
109-
array(), // schemes
110-
array() // methods
111-
);
112-
113-
// ...
114-
115-
$parameters = $matcher->match('/archive/2012-01');
116-
// array(
117-
// '_controller' => 'showArchive',
118-
// 'month' => '2012-01',
119-
// 'subdomain' => 'www',
120-
// '_route' => ...
121-
// )
122-
123-
$parameters = $matcher->match('/archive/foo');
124-
// throws ResourceNotFoundException
103+
$route = new Route(
104+
'/archive/{month}', // path
105+
array('_controller' => 'showArchive'), // default values
106+
array('month' => '[0-9]{4}-[0-9]{2}', 'subdomain' => 'www|m'), // requirements
107+
array(), // options
108+
'{subdomain}.example.com', // host
109+
array(), // schemes
110+
array() // methods
111+
);
112+
113+
// ...
114+
115+
$parameters = $matcher->match('/archive/2012-01');
116+
// array(
117+
// '_controller' => 'showArchive',
118+
// 'month' => '2012-01',
119+
// 'subdomain' => 'www',
120+
// '_route' => ...
121+
// )
122+
123+
$parameters = $matcher->match('/archive/foo');
124+
// throws ResourceNotFoundException
125125

126126
In this case, the route is matched by ``/archive/2012-01``, because the ``{month}``
127127
wildcard matches the regular expression wildcard given. However, ``/archive/foo``

components/serializer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
The Serializer Component
66
========================
77

8-
The Serializer component is meant to be used to turn objects into a
9-
specific format (XML, JSON, YAML, ...) and the other way around.
8+
The Serializer component is meant to be used to turn objects into a
9+
specific format (XML, JSON, YAML, ...) and the other way around.
1010

1111
In order to do so, the Serializer component follows the following
1212
simple schema.

configuration/environments.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ Either way: *one of these two files is always executed*.
166166

167167
.. note::
168168

169-
The given URLs assume that your web server is configured to use the ``web/``
170-
directory of the application as its root. Read more in
171-
:doc:`Installing Symfony </setup>`.
169+
The given URLs assume that your web server is configured to use the ``web/``
170+
directory of the application as its root. Read more in
171+
:doc:`Installing Symfony </setup>`.
172172

173173
If you open up one of these files, you'll quickly see that the environment
174174
used by each is explicitly set::
@@ -186,10 +186,10 @@ this code and changing the environment string.
186186

187187
.. note::
188188

189-
The ``test`` environment is used when writing functional tests and is
190-
not accessible in the browser directly via a front controller. In other
191-
words, unlike the other environments, there is no ``app_test.php`` front
192-
controller file.
189+
The ``test`` environment is used when writing functional tests and is
190+
not accessible in the browser directly via a front controller. In other
191+
words, unlike the other environments, there is no ``app_test.php`` front
192+
controller file.
193193

194194
.. index::
195195
single: Configuration; Debug mode

console/request_context.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,18 @@ Configuring the Request Context per Command
6565
To change it only in one command you can simply fetch the Request Context
6666
from the ``router`` service and override its settings::
6767

68-
// src/AppBundle/Command/DemoCommand.php
69-
70-
// ...
71-
class DemoCommand extends ContainerAwareCommand
72-
{
73-
protected function execute(InputInterface $input, OutputInterface $output)
74-
{
75-
$context = $this->getContainer()->get('router')->getContext();
76-
$context->setHost('example.com');
77-
$context->setScheme('https');
78-
$context->setBaseUrl('my/path');
79-
80-
// ... your code here
81-
}
82-
}
68+
// src/AppBundle/Command/DemoCommand.php
69+
70+
// ...
71+
class DemoCommand extends ContainerAwareCommand
72+
{
73+
protected function execute(InputInterface $input, OutputInterface $output)
74+
{
75+
$context = $this->getContainer()->get('router')->getContext();
76+
$context->setHost('example.com');
77+
$context->setScheme('https');
78+
$context->setBaseUrl('my/path');
79+
80+
// ... your code here
81+
}
82+
}

contributing/code/patches.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ software:
1818

1919
.. caution::
2020

21-
Before Symfony 2.7, the minimal PHP version was 5.3.3. Before Symfony 3.0,
22-
minimal version was 5.3.9. Please keep this in mind, if you are working on a
23-
bug fix for earlier versions of Symfony.
21+
Before Symfony 2.7, the minimal PHP version was 5.3.3. Before Symfony 3.0,
22+
minimal version was 5.3.9. Please keep this in mind, if you are working on a
23+
bug fix for earlier versions of Symfony.
2424

2525
Configure Git
2626
~~~~~~~~~~~~~

deployment/fortrabbit.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,16 +205,16 @@ Add fortrabbit as a (additional) Git remote and add your configuration changes:
205205

206206
.. code-block:: terminal
207207
208-
$ git remote add fortrabbit git@deploy.eu2.frbit.com:<your-app>.git
209-
$ git add composer.json composer.lock
210-
$ git add app/config/config_prod_secrets.php
208+
$ git remote add fortrabbit git@deploy.eu2.frbit.com:<your-app>.git
209+
$ git add composer.json composer.lock
210+
$ git add app/config/config_prod_secrets.php
211211
212212
Commit and push
213213

214214
.. code-block:: terminal
215215
216-
$ git commit -m 'fortrabbit config'
217-
$ git push fortrabbit master -u
216+
$ git commit -m 'fortrabbit config'
217+
$ git push fortrabbit master -u
218218
219219
.. note::
220220

doctrine/registration_form.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ your database schema using this command:
385385

386386
.. code-block:: terminal
387387
388-
$ php bin/console doctrine:schema:update --force
388+
$ php bin/console doctrine:schema:update --force
389389
390390
That's it! Head to ``/register`` to try things out!
391391

form/form_customization.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -725,14 +725,14 @@ field whose *id* is ``product_name`` (and name is ``product[name]``).
725725

726726
.. tip::
727727

728-
The ``product`` portion of the field is the form name, which may be set
729-
manually or generated automatically based on your form type name (e.g.
730-
``ProductType`` equates to ``product``). If you're not sure what your
731-
form name is, just view the source of your generated form.
728+
The ``product`` portion of the field is the form name, which may be set
729+
manually or generated automatically based on your form type name (e.g.
730+
``ProductType`` equates to ``product``). If you're not sure what your
731+
form name is, just view the source of your generated form.
732732

733-
If you want to change the ``product`` or ``name`` portion of the block
734-
name ``_product_name_widget`` you can set the ``block_name`` option in your
735-
form type::
733+
If you want to change the ``product`` or ``name`` portion of the block
734+
name ``_product_name_widget`` you can set the ``block_name`` option in your
735+
form type::
736736

737737
use Symfony\Component\Form\FormBuilderInterface;
738738
use Symfony\Component\Form\Extension\Core\Type\TextType;
@@ -746,7 +746,7 @@ field whose *id* is ``product_name`` (and name is ``product[name]``).
746746
));
747747
}
748748

749-
Then the block name will be ``_product_custom_name_widget``.
749+
Then the block name will be ``_product_custom_name_widget``.
750750

751751
You can also override the markup for an entire field row using the same method:
752752

@@ -839,10 +839,11 @@ Customizing Error Output
839839
~~~~~~~~~~~~~~~~~~~~~~~~
840840

841841
.. note::
842-
The Form component only handles *how* the validation errors are rendered,
843-
and not the actual validation error messages. The error messages themselves
844-
are determined by the validation constraints you apply to your objects.
845-
For more information, see the article on :doc:`validation </validation>`.
842+
843+
The Form component only handles *how* the validation errors are rendered,
844+
and not the actual validation error messages. The error messages themselves
845+
are determined by the validation constraints you apply to your objects.
846+
For more information, see the article on :doc:`validation </validation>`.
846847

847848
There are many different ways to customize how errors are rendered when a
848849
form is submitted with errors. The error messages for a field are rendered

0 commit comments

Comments
 (0)