diff --git a/_exts b/_exts index 03bc1c60172..bb540b67288 160000 --- a/_exts +++ b/_exts @@ -1 +1 @@ -Subproject commit 03bc1c60172a280619e3476f22b111b4a187895d +Subproject commit bb540b6728898b48d7ec61e52065a18c391951fe diff --git a/book/security.rst b/book/security.rst index 8d5b96d3479..b229c52830b 100644 --- a/book/security.rst +++ b/book/security.rst @@ -939,7 +939,7 @@ will match any ``ip``, ``host`` or ``method``: ..................... Once Symfony has decided which ``access_control`` entry matches (if any), -it then *enforces* access restrictions based on the ``roles`` and ``requires_channel`` +it then *enforces* access restrictions based on the ``roles``, ``allow_if`` and ``requires_channel`` options: * ``role`` If the user does not have the given role(s), then access is denied diff --git a/components/dependency_injection/definitions.rst b/components/dependency_injection/definitions.rst index 46ed34ab36a..c9d1e72cb3d 100644 --- a/components/dependency_injection/definitions.rst +++ b/components/dependency_injection/definitions.rst @@ -40,7 +40,7 @@ Creating a new Definition ~~~~~~~~~~~~~~~~~~~~~~~~~ If you need to create a new definition rather than manipulate one retrieved -from then container then the definition class is :class:`Symfony\\Component\\DependencyInjection\\Definition`. +from the container then the definition class is :class:`Symfony\\Component\\DependencyInjection\\Definition`. Class ~~~~~ diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index 39e6c42b345..4775280a54f 100644 --- a/components/event_dispatcher/introduction.rst +++ b/components/event_dispatcher/introduction.rst @@ -509,8 +509,11 @@ Lazy loading listeners:: { private $started = false; - public function myLazyListener(Event $event, $eventName, EventDispatcherInterface $dispatcher) - { + public function myLazyListener( + Event $event, + $eventName, + EventDispatcherInterface $dispatcher + ) { if (false === $this->started) { $subscriber = new StoreSubscriber(); $dispatcher->addSubscriber($subscriber); @@ -529,8 +532,11 @@ Dispatching another event from within a listener:: class Foo { - public function myFooListener(Event $event, $eventName, EventDispatcherInterface $dispatcher) - { + public function myFooListener( + Event $event, + $eventName, + EventDispatcherInterface $dispatcher + ) { $dispatcher->dispatch('log', $event); // ... more code diff --git a/components/event_dispatcher/traceable_dispatcher.rst b/components/event_dispatcher/traceable_dispatcher.rst index 22404865fbf..3c1bcc2118c 100644 --- a/components/event_dispatcher/traceable_dispatcher.rst +++ b/components/event_dispatcher/traceable_dispatcher.rst @@ -21,7 +21,10 @@ Pass the event dispatcher to be wrapped and an instance of the // the event dispatcher to debug $eventDispatcher = ...; - $traceableEventDispatcher = new TraceableEventDispatcher($eventDispatcher, new Stopwatch()); + $traceableEventDispatcher = new TraceableEventDispatcher( + $eventDispatcher, + new Stopwatch() + ); Now, the ``TraceableEventDispatcher`` can be used like any other event dispatcher to register event listeners and dispatch events:: @@ -31,11 +34,11 @@ to register event listeners and dispatch events:: // register an event listener $eventListener = ...; $priority = ...; - $traceableEventDispatcher->addListener('the-event-name', $eventListener, $priority); + $traceableEventDispatcher->addListener('event.the_name', $eventListener, $priority); // dispatch an event $event = ...; - $traceableEventDispatcher->dispatch('the-event-name', $event); + $traceableEventDispatcher->dispatch('event.the_name', $event); After your application has been processed, you can use the :method:`Symfony\\Component\\EventDispatcher\\Debug\\TraceableEventDispatcherInterface::getCalledListeners` diff --git a/components/http_foundation/session_configuration.rst b/components/http_foundation/session_configuration.rst index 07413e7f162..4a28190e795 100644 --- a/components/http_foundation/session_configuration.rst +++ b/components/http_foundation/session_configuration.rst @@ -181,7 +181,7 @@ which runs reasonably frequently. The ``cookie_lifetime`` would be set to a relatively high value, and the garbage collection ``gc_maxlifetime`` would be set to destroy sessions at whatever the desired idle period is. -The other option is to specifically checking if a session has expired after the +The other option is specifically check if a session has expired after the session is started. The session can be destroyed as required. This method of processing can allow the expiry of sessions to be integrated into the user experience, for example, by displaying a message. diff --git a/conf.py b/conf.py index b8ffe20fc86..fe7fd835847 100644 --- a/conf.py +++ b/conf.py @@ -23,6 +23,7 @@ # adding PhpLexer from sphinx.highlighting import lexers from pygments.lexers.web import PhpLexer +from pygments.lexers.agile import RubyLexer # -- General configuration ----------------------------------------------------- @@ -100,6 +101,15 @@ lexers['php-annotations'] = PhpLexer(startinline=True) lexers['php-standalone'] = PhpLexer(startinline=True) lexers['php-symfony'] = PhpLexer(startinline=True) +lexers['varnish2'] = RubyLexer() +lexers['varnish3'] = RubyLexer() +lexers['varnish4'] = RubyLexer() + +config_block = { + 'varnish2': 'Varnish 2', + 'varnish3': 'Varnish 3', + 'varnish4': 'Varnish 4' +} # use PHP as the primary domain primary_domain = 'php' @@ -264,3 +274,4 @@ # Use PHP syntax highlighting in code examples by default highlight_language='php' + diff --git a/cookbook/bundles/extension.rst b/cookbook/bundles/extension.rst index cc4ce322399..d335b8a3f26 100644 --- a/cookbook/bundles/extension.rst +++ b/cookbook/bundles/extension.rst @@ -84,7 +84,7 @@ container, to ensure all services and parameters are also added to the actual container. In the ``load()`` method, you can use PHP code to register service definitions, -but it is more common if you put the these definitions in a configuration file +but it is more common if you put these definitions in a configuration file (using the Yaml, XML or PHP format). Luckily, you can use the file loaders in the extension! diff --git a/cookbook/configuration/external_parameters.rst b/cookbook/configuration/external_parameters.rst index 0f9c56501c5..58a72fd898c 100644 --- a/cookbook/configuration/external_parameters.rst +++ b/cookbook/configuration/external_parameters.rst @@ -14,9 +14,13 @@ Environment Variables --------------------- Symfony will grab any environment variable prefixed with ``SYMFONY__`` and -set it as a parameter in the service container. Double underscores are replaced -with a period, as a period is not a valid character in an environment variable -name. +set it as a parameter in the service container. Some transformations are +applied to the resulting parameter name: + +* ``SYMFONY__`` prefix is removed; +* Parameter name is lowercased; +* Double underscores are replaced with a period, as a period is not + a valid character in an environment variable name. For example, if you're using Apache, environment variables can be set using the following ``VirtualHost`` configuration: @@ -94,6 +98,14 @@ You can now reference these parameters wherever you need them. ) )); +.. note:: + + Even in debug mode, setting or changing an environment variable + requires your cache to be cleared to make the parameter available. + In debug mode, this is required since only a change to a configuration + file that is loaded by Symfony triggers your configuration to be + re-evaluated. + Constants --------- diff --git a/cookbook/event_dispatcher/before_after_filters.rst b/cookbook/event_dispatcher/before_after_filters.rst index 569f0c7cce5..7fe93410713 100644 --- a/cookbook/event_dispatcher/before_after_filters.rst +++ b/cookbook/event_dispatcher/before_after_filters.rst @@ -125,7 +125,8 @@ event listeners, you can learn more about them at :doc:`/cookbook/service_contai $controller = $event->getController(); /* - * $controller passed can be either a class or a Closure. This is not usual in Symfony but it may happen. + * $controller passed can be either a class or a Closure. + * This is not usual in Symfony but it may happen. * If it is a class, it comes in array format */ if (!is_array($controller)) { @@ -189,7 +190,7 @@ want. After Filters with the ``kernel.response`` Event ------------------------------------------------ -In addition to having a "hook" that's executed before your controller, you +In addition to having a "hook" that's executed *before* your controller, you can also add a hook that's executed *after* your controller. For this example, imagine that you want to add a sha1 hash (with a salt using that token) to all responses that have passed this token authentication. diff --git a/reference/forms/types/choice.rst b/reference/forms/types/choice.rst index 9b2ef49971c..95c91e8442b 100644 --- a/reference/forms/types/choice.rst +++ b/reference/forms/types/choice.rst @@ -119,7 +119,7 @@ With this option you can also allow float values to be selected as data. // ... $builder->add('status', 'choice', array( - 'choice_list' => new ChoiceList(array(1, 0.5), array('Full', 'Half') + 'choice_list' => new ChoiceList(array(1, 0.5), array('Full', 'Half')) )); .. include:: /reference/forms/types/options/empty_value.rst.inc