Skip to content

Commit 08de8b2

Browse files
committed
Merge branch '2.3' into 2.4
2 parents 22b3776 + 8bbc918 commit 08de8b2

File tree

3 files changed

+49
-23
lines changed

3 files changed

+49
-23
lines changed

book/translation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Translations
66

77
The term "internationalization" (often abbreviated `i18n`_) refers to the
88
process of abstracting strings and other locale-specific pieces out of your
9-
application and into a layer where they can be translated and converted based
9+
application into a layer where they can be translated and converted based
1010
on the user's locale (i.e. language and country). For text, this means
1111
wrapping each with a function capable of translating the text (or "message")
1212
into the language of the user::

cookbook/logging/channels_handlers.rst

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,65 @@ To do so, just create a new handler and configure it like this:
2424

2525
.. code-block:: yaml
2626
27+
# app/config/config.yml
2728
monolog:
2829
handlers:
2930
main:
30-
type: stream
31-
path: /var/log/symfony.log
32-
channels: !doctrine
31+
type: stream
32+
path: /var/log/symfony.log
33+
channels: [!doctrine]
3334
doctrine:
34-
type: stream
35-
path: /var/log/doctrine.log
36-
channels: doctrine
35+
type: stream
36+
path: /var/log/doctrine.log
37+
channels: [doctrine]
3738
3839
.. code-block:: xml
3940
40-
<monolog:config>
41-
<monolog:handlers>
41+
<!-- app/config/config.xml -->
42+
<container xmlns="http://symfony.com/schema/dic/services"
43+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44+
xmlns:monolog="http://symfony.com/schema/dic/monolog"
45+
xsi:schemaLocation="http://symfony.com/schema/dic/services
46+
http://symfony.com/schema/dic/services/services-1.0.xsd
47+
http://symfony.com/schema/dic/monolog
48+
http://symfony.com/schema/dic/monolog/monolog-1.0.xsd"
49+
>
50+
<monolog:config>
4251
<monolog:handler name="main" type="stream" path="/var/log/symfony.log">
4352
<monolog:channels>
44-
<type>exclusive</type>
45-
<channel>doctrine</channel>
53+
<monolog:channel>!doctrine</monolog:channel>
4654
</monolog:channels>
4755
</monolog:handler>
4856
49-
<monolog:handler name="doctrine" type="stream" path="/var/log/doctrine.log" />
57+
<monolog:handler name="doctrine" type="stream" path="/var/log/doctrine.log">
5058
<monolog:channels>
51-
<type>inclusive</type>
52-
<channel>doctrine</channel>
59+
<monolog:channel>doctrine</monolog:channel>
5360
</monolog:channels>
5461
</monolog:handler>
55-
</monolog:handlers>
56-
</monolog:config>
62+
</monolog:config>
63+
</container>
64+
65+
.. code-block:: php
66+
67+
// app/config/config.php
68+
$container->loadFromExtension('monolog', array(
69+
'handlers' => array(
70+
'main' => array(
71+
'type' => 'stream',
72+
'path' => '/var/log/symfony.log',
73+
'channels' => array(
74+
'!doctrine',
75+
),
76+
),
77+
'doctrine' => array(
78+
'type' => 'stream',
79+
'path' => '/var/log/doctrine.log',
80+
'channels' => array(
81+
'doctrine',
82+
),
83+
),
84+
),
85+
));
5786
5887
YAML specification
5988
------------------
@@ -70,13 +99,6 @@ You can specify the configuration by many forms:
7099
channels: [foo, bar] # Include only channels "foo" and "bar"
71100
channels: [!foo, !bar] # Include all channels, except "foo" and "bar"
72101
73-
channels:
74-
type: inclusive # Include only those listed below
75-
elements: [ foo, bar ]
76-
channels:
77-
type: exclusive # Include all, except those listed below
78-
elements: [ foo, bar ]
79-
80102
Creating your own Channel
81103
-------------------------
82104

cookbook/security/voters.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ and compare the IP address against a set of blacklisted IP addresses:
6767
6868
class ClientIpVoter implements VoterInterface
6969
{
70+
private $container;
71+
72+
private $blacklistedIp;
73+
7074
public function __construct(ContainerInterface $container, array $blacklistedIp = array())
7175
{
7276
$this->container = $container;

0 commit comments

Comments
 (0)