Skip to content

Commit 9e0e12d

Browse files
committed
Merge branch '2.5'
* 2.5: [#4276] Making language correction we agreed on Correct a typo: replace "then" by "the". Correct a typo: remove unnecessary "the" word. Remove horizontal scrollbar and change event name to follow conventions Remove horizontal scrollbar Update choice.rst Improve readability support Varnish in configuration blocks minor #4285 Update security.rst (placid2000) Update security.rst [Cookbook][External Parameters] Enhance description of environment variables Make a small grammatical adjustment
2 parents 25a17fe + 171f085 commit 9e0e12d

File tree

11 files changed

+51
-18
lines changed

11 files changed

+51
-18
lines changed

book/security.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ will match any ``ip``, ``host`` or ``method``:
939939
.....................
940940

941941
Once Symfony has decided which ``access_control`` entry matches (if any),
942-
it then *enforces* access restrictions based on the ``roles`` and ``requires_channel``
942+
it then *enforces* access restrictions based on the ``roles``, ``allow_if`` and ``requires_channel``
943943
options:
944944

945945
* ``role`` If the user does not have the given role(s), then access is denied

components/dependency_injection/definitions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Creating a new Definition
4040
~~~~~~~~~~~~~~~~~~~~~~~~~
4141

4242
If you need to create a new definition rather than manipulate one retrieved
43-
from then container then the definition class is :class:`Symfony\\Component\\DependencyInjection\\Definition`.
43+
from the container then the definition class is :class:`Symfony\\Component\\DependencyInjection\\Definition`.
4444

4545
Class
4646
~~~~~

components/event_dispatcher/introduction.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,11 @@ Lazy loading listeners::
509509
{
510510
private $started = false;
511511

512-
public function myLazyListener(Event $event, $eventName, EventDispatcherInterface $dispatcher)
513-
{
512+
public function myLazyListener(
513+
Event $event,
514+
$eventName,
515+
EventDispatcherInterface $dispatcher
516+
) {
514517
if (false === $this->started) {
515518
$subscriber = new StoreSubscriber();
516519
$dispatcher->addSubscriber($subscriber);
@@ -529,8 +532,11 @@ Dispatching another event from within a listener::
529532

530533
class Foo
531534
{
532-
public function myFooListener(Event $event, $eventName, EventDispatcherInterface $dispatcher)
533-
{
535+
public function myFooListener(
536+
Event $event,
537+
$eventName,
538+
EventDispatcherInterface $dispatcher
539+
) {
534540
$dispatcher->dispatch('log', $event);
535541

536542
// ... more code

components/event_dispatcher/traceable_dispatcher.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ Pass the event dispatcher to be wrapped and an instance of the
2121
// the event dispatcher to debug
2222
$eventDispatcher = ...;
2323

24-
$traceableEventDispatcher = new TraceableEventDispatcher($eventDispatcher, new Stopwatch());
24+
$traceableEventDispatcher = new TraceableEventDispatcher(
25+
$eventDispatcher,
26+
new Stopwatch()
27+
);
2528

2629
Now, the ``TraceableEventDispatcher`` can be used like any other event dispatcher
2730
to register event listeners and dispatch events::
@@ -31,11 +34,11 @@ to register event listeners and dispatch events::
3134
// register an event listener
3235
$eventListener = ...;
3336
$priority = ...;
34-
$traceableEventDispatcher->addListener('the-event-name', $eventListener, $priority);
37+
$traceableEventDispatcher->addListener('event.the_name', $eventListener, $priority);
3538

3639
// dispatch an event
3740
$event = ...;
38-
$traceableEventDispatcher->dispatch('the-event-name', $event);
41+
$traceableEventDispatcher->dispatch('event.the_name', $event);
3942

4043
After your application has been processed, you can use the
4144
:method:`Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface::getCalledListeners`

components/http_foundation/session_configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ which runs reasonably frequently. The ``cookie_lifetime`` would be set to a
181181
relatively high value, and the garbage collection ``gc_maxlifetime`` would be set
182182
to destroy sessions at whatever the desired idle period is.
183183

184-
The other option is to specifically checking if a session has expired after the
184+
The other option is specifically check if a session has expired after the
185185
session is started. The session can be destroyed as required. This method of
186186
processing can allow the expiry of sessions to be integrated into the user
187187
experience, for example, by displaying a message.

conf.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
# adding PhpLexer
2424
from sphinx.highlighting import lexers
2525
from pygments.lexers.web import PhpLexer
26+
from pygments.lexers.agile import RubyLexer
2627

2728
# -- General configuration -----------------------------------------------------
2829

@@ -100,6 +101,15 @@
100101
lexers['php-annotations'] = PhpLexer(startinline=True)
101102
lexers['php-standalone'] = PhpLexer(startinline=True)
102103
lexers['php-symfony'] = PhpLexer(startinline=True)
104+
lexers['varnish2'] = RubyLexer()
105+
lexers['varnish3'] = RubyLexer()
106+
lexers['varnish4'] = RubyLexer()
107+
108+
config_block = {
109+
'varnish2': 'Varnish 2',
110+
'varnish3': 'Varnish 3',
111+
'varnish4': 'Varnish 4'
112+
}
103113

104114
# use PHP as the primary domain
105115
primary_domain = 'php'
@@ -264,3 +274,4 @@
264274

265275
# Use PHP syntax highlighting in code examples by default
266276
highlight_language='php'
277+

cookbook/bundles/extension.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ container, to ensure all services and parameters are also added to the actual
8484
container.
8585

8686
In the ``load()`` method, you can use PHP code to register service definitions,
87-
but it is more common if you put the these definitions in a configuration file
87+
but it is more common if you put these definitions in a configuration file
8888
(using the Yaml, XML or PHP format). Luckily, you can use the file loaders in
8989
the extension!
9090

cookbook/configuration/external_parameters.rst

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ Environment Variables
1414
---------------------
1515

1616
Symfony will grab any environment variable prefixed with ``SYMFONY__`` and
17-
set it as a parameter in the service container. Double underscores are replaced
18-
with a period, as a period is not a valid character in an environment variable
19-
name.
17+
set it as a parameter in the service container. Some transformations are
18+
applied to the resulting parameter name:
19+
20+
* ``SYMFONY__`` prefix is removed;
21+
* Parameter name is lowercased;
22+
* Double underscores are replaced with a period, as a period is not
23+
a valid character in an environment variable name.
2024

2125
For example, if you're using Apache, environment variables can be set using
2226
the following ``VirtualHost`` configuration:
@@ -94,6 +98,14 @@ You can now reference these parameters wherever you need them.
9498
)
9599
));
96100
101+
.. note::
102+
103+
Even in debug mode, setting or changing an environment variable
104+
requires your cache to be cleared to make the parameter available.
105+
In debug mode, this is required since only a change to a configuration
106+
file that is loaded by Symfony triggers your configuration to be
107+
re-evaluated.
108+
97109
Constants
98110
---------
99111

cookbook/event_dispatcher/before_after_filters.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ event listeners, you can learn more about them at :doc:`/cookbook/service_contai
125125
$controller = $event->getController();
126126

127127
/*
128-
* $controller passed can be either a class or a Closure. This is not usual in Symfony but it may happen.
128+
* $controller passed can be either a class or a Closure.
129+
* This is not usual in Symfony but it may happen.
129130
* If it is a class, it comes in array format
130131
*/
131132
if (!is_array($controller)) {
@@ -189,7 +190,7 @@ want.
189190
After Filters with the ``kernel.response`` Event
190191
------------------------------------------------
191192

192-
In addition to having a "hook" that's executed before your controller, you
193+
In addition to having a "hook" that's executed *before* your controller, you
193194
can also add a hook that's executed *after* your controller. For this example,
194195
imagine that you want to add a sha1 hash (with a salt using that token) to
195196
all responses that have passed this token authentication.

reference/forms/types/choice.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ With this option you can also allow float values to be selected as data.
119119
120120
// ...
121121
$builder->add('status', 'choice', array(
122-
'choice_list' => new ChoiceList(array(1, 0.5), array('Full', 'Half')
122+
'choice_list' => new ChoiceList(array(1, 0.5), array('Full', 'Half'))
123123
));
124124
125125
.. include:: /reference/forms/types/options/empty_value.rst.inc

0 commit comments

Comments
 (0)