Skip to content

Commit e753faa

Browse files
committed
Merge branch '2.0' into 2.1
Conflicts: cookbook/doctrine/event_listeners_subscribers.rst
2 parents 42ed2c6 + 414a007 commit e753faa

File tree

12 files changed

+62
-35
lines changed

12 files changed

+62
-35
lines changed

book/doctrine.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -421,17 +421,17 @@ of the bundle:
421421

422422
Let's walk through this example:
423423

424-
* **lines 8-11** In this section, you instantiate and work with the ``$product``
424+
* **lines 9-12** In this section, you instantiate and work with the ``$product``
425425
object like any other, normal PHP object;
426426

427-
* **line 13** This line fetches Doctrine's *entity manager* object, which is
427+
* **line 14** This line fetches Doctrine's *entity manager* object, which is
428428
responsible for handling the process of persisting and fetching objects
429429
to and from the database;
430430

431-
* **line 14** The ``persist()`` method tells Doctrine to "manage" the ``$product``
431+
* **line 15** The ``persist()`` method tells Doctrine to "manage" the ``$product``
432432
object. This does not actually cause a query to be made to the database (yet).
433433

434-
* **line 15** When the ``flush()`` method is called, Doctrine looks through
434+
* **line 16** When the ``flush()`` method is called, Doctrine looks through
435435
all of the objects that it's managing to see if they need to be persisted
436436
to the database. In this example, the ``$product`` object has not been
437437
persisted yet, so the entity manager executes an ``INSERT`` query and a

components/config/definition.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Add node definitions to the tree
7272
Variable nodes
7373
~~~~~~~~~~~~~~
7474

75-
A tree contains node definitions which can be layed out in a semantic way.
75+
A tree contains node definitions which can be laid out in a semantic way.
7676
This means, using indentation and the fluent notation, it is possible to
7777
reflect the real structure of the configuration values::
7878

components/console/usage.rst

+5-4
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ with:
7474

7575
.. code-block:: bash
7676
77-
$ php app/console list -verbose
77+
$ php app/console list --verbose
7878
$ php app/console list -v
7979
8080
If you set the optional arguments to give your application a name and version::
@@ -85,7 +85,7 @@ then you can use:
8585

8686
.. code-block:: bash
8787
88-
$ php app/console list -version
88+
$ php app/console list --version
8989
$ php app/console list -V
9090
9191
to get this information output:
@@ -139,5 +139,6 @@ can run it with:
139139
140140
$ php app/console d:g Fabien
141141
142-
If you choose too short a command so it is ambiguous, then no command will be run and
143-
some suggestions of the possible commands to choose from will be output.
142+
If you enter a short command that's ambiguous (i.e. there are more than one
143+
command that match), then no command will be run and some suggestions of
144+
the possible commands to choose from will be output.

components/dependency_injection/compilation.rst

+15-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Compiling the Container
66

77
The service container can be compiled for various reasons. These reasons
88
include checking for any potential issues such as circular references and
9-
making the container more efficient by resolving parameters and removing
9+
making the container more efficient by resolving parameters and removing
1010
unused services.
1111

1212
It is compiled by running::
@@ -170,7 +170,7 @@ the XML configuration::
170170
return 'http://www.example.com/symfony/schema/';
171171
}
172172

173-
..note::
173+
.. note::
174174

175175
XSD validation is optional, returning ``false`` from the ``getXsdValidationBasePath``
176176
method will disable it.
@@ -192,7 +192,7 @@ The XML version of the config would then look like this:
192192
193193
</container>
194194
195-
..note::
195+
.. note::
196196

197197
In the Symfony2 full stack framework there is a base Extension class which
198198
implements these methods as well as a shortcut method for processing the
@@ -275,6 +275,12 @@ will then be called when the container is compiled::
275275
$container = new ContainerBuilder();
276276
$container->addCompilerPass(new CustomCompilerPass);
277277

278+
.. note::
279+
280+
Compiler passes are registered differently is you are using the full
281+
stack framework, see :doc:`cookbook/service_container/compiler_passes`
282+
for more details.
283+
278284
Controlling the Pass Ordering
279285
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
280286

@@ -371,7 +377,7 @@ but getting an up to date configuration whilst developing your application::
371377
// ...
372378
$container->compile();
373379

374-
if(!$isDebug)
380+
if (!$isDebug) {
375381
$dumper = new PhpDumper($container);
376382
file_put_contents($file, $dumper->dump(array('class' => 'MyCachedContainer')));
377383
}
@@ -418,3 +424,8 @@ constructor argument. When the cache is not in debug mode the cached container
418424
will always be used if it exists. In debug mode, an additional metadata file
419425
is written with the timestamps of all the resource files. These are then checked
420426
to see if the files have changed, if they have the cache will be considered stale.
427+
428+
.. note::
429+
430+
In the full stack framework the compilation and caching of the container
431+
is taken care of for you.

components/dependency_injection/parentservices.rst

+9
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ a parent for a service.
236236
.. code-block:: php
237237
238238
use Symfony\Component\DependencyInjection\Definition;
239+
use Symfony\Component\DependencyInjection\DefinitionDecorator;
239240
use Symfony\Component\DependencyInjection\Reference;
240241
241242
// ...
@@ -284,6 +285,12 @@ can only be used as a parent service and cannot be used directly as a service
284285
to inject and will be removed at compile time. In other words, it exists merely
285286
as a "template" that other services can use.
286287

288+
.. note::
289+
290+
In order for parent dependencies to resolve, the ``ContainerBuilder`` must
291+
first be compiled. See :doc:`/components/dependency_injection/compilation`
292+
for more details.
293+
287294
Overriding Parent Dependencies
288295
------------------------------
289296

@@ -364,6 +371,7 @@ to the ``NewsletterManager`` class, the config would look like this:
364371
.. code-block:: php
365372
366373
use Symfony\Component\DependencyInjection\Definition;
374+
use Symfony\Component\DependencyInjection\DefinitionDecorator;
367375
use Symfony\Component\DependencyInjection\Reference;
368376
369377
// ...
@@ -482,6 +490,7 @@ If you had the following config:
482490
.. code-block:: php
483491
484492
use Symfony\Component\DependencyInjection\Definition;
493+
use Symfony\Component\DependencyInjection\DefinitionDecorator;
485494
use Symfony\Component\DependencyInjection\Reference;
486495
487496
// ...

components/dependency_injection/tags.rst

+9-3
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,16 @@ run when the container is compiled::
158158
$container = new ContainerBuilder();
159159
$container->addCompilerPass(new TransportCompilerPass);
160160

161+
.. note::
162+
163+
Compiler passes are registered differently is you are using the full
164+
stack framework, see :doc:`cookbook/service_container/compiler_passes`
165+
for more details.
166+
161167
Adding additional attributes on Tags
162168
------------------------------------
163169

164-
Sometimes you need additional information about each service that's tagged with your tag.
170+
Sometimes you need additional information about each service that's tagged with your tag.
165171
For example, you might want to add an alias to each TransportChain.
166172

167173
To begin with, change the ``TransportChain`` class::
@@ -212,7 +218,7 @@ To answer this, change the service declaration:
212218
class: \Swift_SendmailTransport
213219
tags:
214220
- { name: acme_mailer.transport, alias: bar }
215-
221+
216222
217223
.. code-block:: xml
218224
@@ -224,7 +230,7 @@ To answer this, change the service declaration:
224230
<service id="acme_mailer.transport.sendmail" class="\Swift_SendmailTransport">
225231
<tag name="acme_mailer.transport" alias="bar" />
226232
</service>
227-
233+
228234
Notice that you've added a generic ``alias`` key to the tag. To actually
229235
use this, update the compiler::
230236

cookbook/bundles/extension.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,9 @@ configuration arrays together.
478478

479479
The ``Configuration`` class can be much more complicated than shown here,
480480
supporting array nodes, "prototype" nodes, advanced validation, XML-specific
481-
normalization and advanced merging. The best way to see this in action is
482-
to checkout out some of the core Configuration classes, such as the one from
483-
the `FrameworkBundle Configuration`_ or the `TwigBundle Configuration`_.
481+
normalization and advanced merging. You can read more about this in :doc:`the Config Component documentation</components/config/definition>`.
482+
You can also see it action by checking out some of the core Configuration classes,
483+
such as the one from the `FrameworkBundle Configuration`_ or the `TwigBundle Configuration`_.
484484

485485
Default Configuration Dump
486486
~~~~~~~~~~~~~~~~~~~~~~~~~~

cookbook/doctrine/event_listeners_subscribers.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
.. _doctrine-event-config:
55

6-
Registering Event Listeners and Subscribers
7-
===========================================
6+
How to Register Event Listeners and Subscribers
7+
===============================================
88

99
Doctrine packages a rich event system that fires events when almost anything
1010
happens inside the system. For you, this means that you can create arbitrary
@@ -114,4 +114,4 @@ specific type of entity (e.g. a ``Product`` entity but not a ``BlogPost``
114114
entity), you should check for the class name of the entity in your method
115115
(as shown above).
116116

117-
.. _`The Event System`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html
117+
.. _`The Event System`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html

cookbook/event_dispatcher/before_after_filters.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,15 @@ your listener to be called just before any controller is executed.
155155
# app/config/config.yml (or inside your services.yml)
156156
services:
157157
demo.tokens.action_listener:
158-
class: Acme\DemoBundle\EventListener\BeforeAndAfterListener
158+
class: Acme\DemoBundle\EventListener\TokenListener
159159
arguments: [ %tokens% ]
160160
tags:
161161
- { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
162162
163163
.. code-block:: xml
164164
165165
<!-- app/config/config.xml (or inside your services.xml) -->
166-
<service id="demo.tokens.action_listener" class="Acme\DemoBundle\EventListener\BeforeAndAfterListener">
166+
<service id="demo.tokens.action_listener" class="Acme\DemoBundle\EventListener\TokenListener">
167167
<argument>%tokens%</argument>
168168
<tag name="kernel.event_listener" event="kernel.controller" method="onKernelController" />
169169
</service>
@@ -173,7 +173,7 @@ your listener to be called just before any controller is executed.
173173
// app/config/config.php (or inside your services.php)
174174
use Symfony\Component\DependencyInjection\Definition;
175175
176-
$listener = new Definition('Acme\DemoBundle\EventListener\BeforeAndAfterListener', array('%tokens%'));
176+
$listener = new Definition('Acme\DemoBundle\EventListener\TokenListener', array('%tokens%'));
177177
$listener->addTag('kernel.event_listener', array('event' => 'kernel.controller', 'method' => 'onKernelController'));
178178
$container->setDefinition('demo.tokens.action_listener', $listener);
179179
@@ -211,7 +211,7 @@ serve as a basic flag that this request underwent token authentication::
211211
}
212212

213213
// mark the request as having passed token authentication
214-
$$event->getRequest()->attributes->set('auth_token', $token);
214+
$event->getRequest()->attributes->set('auth_token', $token);
215215
}
216216
}
217217

@@ -247,7 +247,7 @@ event:
247247
# app/config/config.yml (or inside your services.yml)
248248
services:
249249
demo.tokens.action_listener:
250-
class: Acme\DemoBundle\EventListener\BeforeAndAfterListener
250+
class: Acme\DemoBundle\EventListener\TokenListener
251251
arguments: [ %tokens% ]
252252
tags:
253253
- { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
@@ -256,7 +256,7 @@ event:
256256
.. code-block:: xml
257257
258258
<!-- app/config/config.xml (or inside your services.xml) -->
259-
<service id="demo.tokens.action_listener" class="Acme\DemoBundle\EventListener\BeforeAndAfterListener">
259+
<service id="demo.tokens.action_listener" class="Acme\DemoBundle\EventListener\TokenListener">
260260
<argument>%tokens%</argument>
261261
<tag name="kernel.event_listener" event="kernel.controller" method="onKernelController" />
262262
<tag name="kernel.event_listener" event="kernel.response" method="onKernelResponse" />
@@ -267,7 +267,7 @@ event:
267267
// app/config/config.php (or inside your services.php)
268268
use Symfony\Component\DependencyInjection\Definition;
269269
270-
$listener = new Definition('Acme\DemoBundle\EventListener\BeforeAndAfterListener', array('%tokens%'));
270+
$listener = new Definition('Acme\DemoBundle\EventListener\TokenListener', array('%tokens%'));
271271
$listener->addTag('kernel.event_listener', array('event' => 'kernel.controller', 'method' => 'onKernelController'));
272272
$listener->addTag('kernel.event_listener', array('event' => 'kernel.response', 'method' => 'onKernelResponse'));
273273
$container->setDefinition('demo.tokens.action_listener', $listener);

cookbook/routing/method_parameters.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. index::
22
single: Routing; _method
33

4-
Using HTTP Methods beyond GET and POST in Routes
5-
================================================
4+
How to use HTTP Methods beyond GET and POST in Routes
5+
=====================================================
66

77
The HTTP method of a request is one of the requirements that can be checked
88
when seeing if it matches a route. This is introduced in the routing chapter
@@ -111,4 +111,4 @@ Likewise the delete form could be changed to look like this:
111111
<input type="submit" value="Delete" />
112112
</form>
113113

114-
It will then match the ``blog_delete`` route.
114+
It will then match the ``blog_delete`` route.

cookbook/workflow/new_project_git.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ manage this is `Gitolite`_.
116116
.. _`git`: http://git-scm.com/
117117
.. _`Symfony2 Standard Edition`: http://symfony.com/download
118118
.. _`Standard Edition Readme`: https://github.com/symfony/symfony-standard/blob/master/README.md
119-
.. _`git submodules`: http://book.git-scm.com/5_submodules.html
119+
.. _`git submodules`: http://git-scm.com/book/en/Git-Tools-Submodules
120120
.. _`GitHub`: https://github.com/
121-
.. _`barebones repository`: http://progit.org/book/ch4-4.html
121+
.. _`barebones repository`: http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository
122122
.. _`Gitolite`: https://github.com/sitaramc/gitolite
123123
.. _`Github .gitignore`: http://help.github.com/ignore-files/

reference/forms/types/file.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The ``file`` type represents a file input in your form.
1414
| | - `read_only`_ |
1515
| | - `error_bubbling`_ |
1616
+-------------+---------------------------------------------------------------------+
17-
| Parent type | :doc:`form</reference/forms/types/field>` |
17+
| Parent type | :doc:`form</reference/forms/types/form>` |
1818
+-------------+---------------------------------------------------------------------+
1919
| Class | :class:`Symfony\\Component\\Form\\Extension\\Core\\Type\\FileType` |
2020
+-------------+---------------------------------------------------------------------+

0 commit comments

Comments
 (0)