Skip to content

Commit 52bd0a9

Browse files
committed
Merge branch '2.3' into 2.6
Conflicts: components/event_dispatcher/introduction.rst cookbook/bundles/best_practices.rst reference/forms/types/choice.rst
2 parents 8b8ba03 + 4f3ce84 commit 52bd0a9

28 files changed

+253
-188
lines changed

book/doctrine.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,8 @@ to the given ``Category`` object via their ``category_id`` value.
12041204
$category = $product->getCategory();
12051205

12061206
// prints "Proxies\AppBundleEntityCategoryProxy"
1207-
echo get_class($category);
1207+
dump(get_class($category));
1208+
die();
12081209

12091210
This proxy object extends the true ``Category`` object, and looks and
12101211
acts exactly like it. The difference is that, by using a proxy object,

book/service_container.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,11 @@ The service container is built using a single configuration resource
276276
be imported from inside this file in one way or another. This gives you absolute
277277
flexibility over the services in your application.
278278

279-
External service configuration can be imported in two different ways. The
280-
first - and most common method - is via the ``imports`` directive. Later, you'll
281-
learn about the second method, which is the flexible and preferred method
282-
for importing service configuration from third-party bundles.
279+
External service configuration can be imported in two different ways. The first
280+
method, commonly used to import container configuration from the bundles you've
281+
created - is via the ``imports`` directive. The second method, although slightly more
282+
complex offers more flexibility and is commonly used to import third-party bundle
283+
configuration. Read on to learn more about both methods.
283284

284285
.. index::
285286
single: Service Container; Imports

book/translation.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ wrapping each with a function capable of translating the text (or "message")
1212
into the language of the user::
1313

1414
// text will *always* print out in English
15-
echo 'Hello World';
15+
dump('Hello World');
16+
die();
1617

1718
// text can be translated into the end-user's language or
1819
// default to English
19-
echo $translator->trans('Hello World');
20+
dump($translator->trans('Hello World'));
21+
die();
2022

2123
.. note::
2224

components/class_loader/class_map_generator.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ method::
5050

5151
use Symfony\Component\ClassLoader\ClassMapGenerator;
5252

53-
print_r(ClassMapGenerator::createMap(__DIR__.'/library'));
53+
var_dump(ClassMapGenerator::createMap(__DIR__.'/library'));
5454

5555
Given the files and class from the table above, you should see an output like
5656
this:

components/console/console_arguments.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Have a look at the following command that has three options::
1414

1515
use Symfony\Component\Console\Command\Command;
1616
use Symfony\Component\Console\Input\InputArgument;
17+
use Symfony\Component\Console\Input\InputDefinition;
1718
use Symfony\Component\Console\Input\InputInterface;
1819
use Symfony\Component\Console\Input\InputOption;
1920
use Symfony\Component\Console\Output\OutputInterface;

components/css_selector.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ equivalents::
5151

5252
use Symfony\Component\CssSelector\CssSelector;
5353

54-
print CssSelector::toXPath('div.item > h4 > a');
54+
var_dump(CssSelector::toXPath('div.item > h4 > a'));
5555

5656
This gives the following output:
5757

components/dependency_injection/advanced.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
Advanced Container Configuration
55
================================
66

7+
.. _container-private-services:
8+
79
Marking Services as public / private
810
------------------------------------
911

components/dom_crawler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ traverse easily::
4747
$crawler = new Crawler($html);
4848

4949
foreach ($crawler as $domElement) {
50-
print $domElement->nodeName;
50+
var_dump($domElement->nodeName);
5151
}
5252

5353
Specialized :class:`Symfony\\Component\\DomCrawler\\Link` and

components/event_dispatcher/generic_event.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ the event arguments::
7575
);
7676
$dispatcher->dispatch('foo', $event);
7777

78-
echo $event['counter'];
78+
var_dump($event['counter']);
7979

8080
class FooListener
8181
{
@@ -96,7 +96,7 @@ Filtering data::
9696
$event = new GenericEvent($subject, array('data' => 'Foo'));
9797
$dispatcher->dispatch('foo', $event);
9898

99-
echo $event['data'];
99+
var_dump($event['data']);
100100

101101
class FooListener
102102
{
@@ -105,3 +105,4 @@ Filtering data::
105105
$event['data'] = strtolower($event['data']);
106106
}
107107
}
108+

components/event_dispatcher/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ dispatched, are passed as arguments to the listener::
638638
{
639639
public function myEventListener(Event $event, $eventName, EventDispatcherInterface $dispatcher)
640640
{
641-
echo $eventName;
641+
// ... do something with the event name
642642
}
643643
}
644644

0 commit comments

Comments
 (0)