diff --git a/book/forms.rst b/book/forms.rst index 4d9cc85f8d6..ac6c673d234 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -232,10 +232,10 @@ controller:: } .. versionadded:: 2.3 - The :method:`Symfony\\Component\\Form\\FormInterface::handleRequest` method was - added in Symfony 2.3. Previously, the ``$request`` was passed to the - ``submit`` method - a strategy which is deprecated and will be removed - in Symfony 3.0. For details on that method, see :ref:`cookbook-form-submit-request`. + The :method:`Symfony\\Component\\Form\\FormInterface::handleRequest` method + was introduced in Symfony 2.3. Previously, the ``$request`` was passed + to the ``submit`` method - a strategy which is deprecated and will be + removed in Symfony 3.0. For details on that method, see :ref:`cookbook-form-submit-request`. This controller follows a common pattern for handling forms, and has three possible paths: diff --git a/book/page_creation.rst b/book/page_creation.rst index 05d0f61b533..b2b26c04c11 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -1061,5 +1061,5 @@ to rapidly develop applications. .. _`Twig`: http://twig.sensiolabs.org .. _`third-party bundles`: http://knpbundles.com .. _`Symfony Standard Edition`: http://symfony.com/download -.. _`Apache's DirectoryIndex documentation`: http://httpd.apache.org/docs/2.0/mod/mod_dir.html +.. _`Apache's DirectoryIndex documentation`: http://httpd.apache.org/docs/current/mod/mod_dir.html .. _`Nginx HttpCoreModule location documentation`: http://wiki.nginx.org/HttpCoreModule#location diff --git a/book/testing.rst b/book/testing.rst index 3a89a90e684..0e53f1dfb2f 100644 --- a/book/testing.rst +++ b/book/testing.rst @@ -415,8 +415,9 @@ Accessing internal Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.3 - The ``getInternalRequest()`` and ``getInternalResponse()`` method were - added in Symfony 2.3. + The :method:`Symfony\\Component\\BrowserKit\\Client::getInternalRequest` + and :method:`Symfony\\Component\\BrowserKit\\Client::getInternalResponse` + methods were introduced in Symfony 2.3. If you use the client to test your application, you might want to access the client's internal objects:: diff --git a/changelog.rst b/changelog.rst index e7a6d40c2b2..109ea504c7d 100644 --- a/changelog.rst +++ b/changelog.rst @@ -206,8 +206,9 @@ New Documentation Fixed Documentation ~~~~~~~~~~~~~~~~~~~ -- `adcbb5d `_ #3615 Fixes to cookbook/doctrine/registration_form.rst (Crushnaut) - `5c4336a `_ #3570 Callback: [Validator, validate] expects validate to be static (nixilla) +- `5c367b4 `_ #3517 Fixed OptionsResolver component docs (WouterJ) +- `adcbb5d `_ #3615 Fixes to cookbook/doctrine/registration_form.rst (Crushnaut) - `a21fb26 `_ #3559 Remove reference to copying parameters.yml from Git cookbook (pwaring) - `de71a51 `_ #3551 [Cookbook][Dynamic Form Modification] Fix sample code (rybakit) - `143db2f `_ #3550 Update introduction.rst (taavit) diff --git a/components/config/caching.rst b/components/config/caching.rst index e014abdff87..4bb43558c64 100644 --- a/components/config/caching.rst +++ b/components/config/caching.rst @@ -1,7 +1,7 @@ .. index:: single: Config; Caching based on resources -Caching based on resources +Caching Based on Resources ========================== When all configuration resources are loaded, you may want to process the configuration diff --git a/components/config/definition.rst b/components/config/definition.rst index b635ff2a205..772f51ceb9f 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -1,10 +1,10 @@ .. index:: single: Config; Defining and processing configuration values -Defining and processing configuration values +Defining and Processing Configuration Values ============================================ -Validating configuration values +Validating Configuration Values ------------------------------- After loading configuration values from all kinds of resources, the values @@ -38,7 +38,7 @@ they are when first encountered. Also, some keys are only available when another key has a specific value (in the sample configuration above: the ``memory`` key only makes sense when the ``driver`` is ``sqlite``). -Defining a hierarchy of configuration values using the TreeBuilder +Defining a Hierarchy of Configuration Values Using the TreeBuilder ------------------------------------------------------------------ All the rules concerning configuration values can be defined using the @@ -66,10 +66,10 @@ should be returned from a custom ``Configuration`` class which implements the } } -Adding node definitions to the tree +Adding Node Definitions to the Tree ----------------------------------- -Variable nodes +Variable Nodes ~~~~~~~~~~~~~~ A tree contains node definitions which can be laid out in a semantic way. @@ -91,7 +91,7 @@ The root node itself is an array node, and has children, like the boolean node ``auto_connect`` and the scalar node ``default_connection``. In general: after defining a node, a call to ``end()`` takes you one step up in the hierarchy. -Node type +Node Type ~~~~~~~~~ It is possible to validate the type of a provided value by using the appropriate @@ -108,7 +108,7 @@ node definition. Node type are available for: and are created with ``node($name, $type)`` or their associated shortcut ``xxxxNode($name)`` method. -Numeric node constraints +Numeric Node Constraints ~~~~~~~~~~~~~~~~~~~~~~~~ Numeric nodes (float and integer) provide two extra constraints - @@ -130,7 +130,7 @@ allowing to validate the value:: ->end() ; -Enum nodes +Enum Nodes ~~~~~~~~~~ Enum nodes provide a constraint to match the given input against a set of @@ -146,7 +146,7 @@ values:: This will restrict the ``gender`` option to be either ``male`` or ``female``. -Array nodes +Array Nodes ~~~~~~~~~~~ It is possible to add a deeper level to the hierarchy, by adding an array @@ -187,7 +187,7 @@ inside the current node. According to the prototype definition in the example above, it is possible to have multiple connection arrays (containing a ``driver``, ``host``, etc.). -Array node options +Array Node Options ~~~~~~~~~~~~~~~~~~ Before defining the children of an array node, you can provide options like: @@ -230,7 +230,7 @@ In XML, each ``parameters`` node would have a ``name`` attribute (along with the final array. The ``useAttributeAsKey`` is useful for normalizing how arrays are specified between different formats like XML and YAML. -Default and required values +Default and required Values --------------------------- For all node types, it is possible to define default values and replacement @@ -307,7 +307,7 @@ you can take advantage of the shortcut The ``canBeDisabled`` method looks about the same except that the section would be enabled by default. -Merging options +Merging Options --------------- Extra options concerning the merge process may be provided. For arrays: @@ -321,7 +321,7 @@ For all nodes: ``cannotBeOverwritten()`` don’t let other configuration arrays overwrite an existing value for this node -Appending sections +Appending Sections ------------------ If you have a complex configuration to validate then the tree can grow to @@ -493,7 +493,7 @@ By changing a string value into an associative array with ``name`` as the key:: ->end() ; -Validation rules +Validation Rules ---------------- More advanced validation rules can be provided using the @@ -539,7 +539,7 @@ Usually, "then" is a closure. Its return value will be used as a new value for the node, instead of the node's original value. -Processing configuration values +Processing Configuration Values ------------------------------- The :class:`Symfony\\Component\\Config\\Definition\\Processor` uses the tree diff --git a/components/config/resources.rst b/components/config/resources.rst index 15b357c3ee2..bcc47aa02e1 100644 --- a/components/config/resources.rst +++ b/components/config/resources.rst @@ -1,10 +1,10 @@ .. index:: single: Config; Loading resources -Loading resources +Loading Resources ================= -Locating resources +Locating Resources ------------------ Loading the configuration normally starts with a search for resources – in @@ -24,7 +24,7 @@ look in this directory first. The third argument indicates whether or not the locator should return the first file it has found, or an array containing all matches. -Resource loaders +Resource Loaders ---------------- For each type of resource (YAML, XML, annotation, etc.) a loader must be defined. @@ -57,7 +57,7 @@ class, which allows for recursively importing other resources:: } } -Finding the right loader +Finding the right Loader ------------------------ The :class:`Symfony\\Component\\Config\\Loader\\LoaderResolver` receives as diff --git a/components/console/events.rst b/components/console/events.rst index f1dd133d505..ff7048138e8 100644 --- a/components/console/events.rst +++ b/components/console/events.rst @@ -5,7 +5,7 @@ Using Events ============ .. versionadded:: 2.3 - Console events were added in Symfony 2.3. + Console events were introduced in Symfony 2.3. The Application class of the Console component allows you to optionally hook into the lifecycle of a console application via events. Instead of reinventing @@ -51,7 +51,7 @@ dispatched. Listeners receive a $application = $command->getApplication(); }); -The ``ConsoleEvents::TERMINATE`` event +The ``ConsoleEvents::TERMINATE`` Event -------------------------------------- **Typical Purposes**: To perform some cleanup actions after the command has @@ -89,7 +89,7 @@ Listeners receive a It is then dispatched just before the ``ConsoleEvents::EXCEPTION`` event. The exit code received in this case is the exception code. -The ``ConsoleEvents::EXCEPTION`` event +The ``ConsoleEvents::EXCEPTION`` Event -------------------------------------- **Typical Purposes**: Handle exceptions thrown during the execution of a diff --git a/components/console/helpers/dialoghelper.rst b/components/console/helpers/dialoghelper.rst index 781d61f6d94..bcbb57bbb2d 100644 --- a/components/console/helpers/dialoghelper.rst +++ b/components/console/helpers/dialoghelper.rst @@ -23,7 +23,7 @@ All the methods inside the Dialog Helper have an argument, the question as the second argument and the default value as the last argument. -Asking the User for confirmation +Asking the User for Confirmation -------------------------------- Suppose you want to confirm an action before actually executing it. Add @@ -172,7 +172,7 @@ You can also ask and validate a hidden response:: If you want to allow the response to be visible if it cannot be hidden for some reason, pass true as the fifth argument. -Let the user choose from a list of Answers +Let the User Choose from a List of Answers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you have a predefined set of answers the user can choose from, you @@ -240,7 +240,7 @@ this set the seventh argument to ``true``:: Now, when the user enters ``1,2``, the result will be: ``You have just selected: blue, yellow``. -Testing a Command which expects input +Testing a Command which Expects Input ------------------------------------- If you want to write a unit test for a command which expects some kind of input diff --git a/components/console/introduction.rst b/components/console/introduction.rst index 801ac379344..dc602c3020e 100644 --- a/components/console/introduction.rst +++ b/components/console/introduction.rst @@ -472,7 +472,7 @@ method:: You can also test a whole console application by using :class:`Symfony\\Component\\Console\\Tester\\ApplicationTester`. -Calling an existing Command +Calling an Existing Command --------------------------- If a command depends on another one being run before it, instead of asking the diff --git a/components/console/single_command_tool.rst b/components/console/single_command_tool.rst index 36c7d54818e..609f7a0c2e3 100644 --- a/components/console/single_command_tool.rst +++ b/components/console/single_command_tool.rst @@ -1,7 +1,7 @@ .. index:: single: Console; Single command application -Building a Single Command Application +Building a single Command Application ===================================== When building a command line tool, you may not need to provide several commands. diff --git a/components/css_selector.rst b/components/css_selector.rst index 4a332a73c0d..412aed84e97 100644 --- a/components/css_selector.rst +++ b/components/css_selector.rst @@ -18,8 +18,8 @@ You can install the component in 2 different ways: Usage ----- -Why use CSS selectors? -~~~~~~~~~~~~~~~~~~~~~~ +Why to Use CSS selectors? +~~~~~~~~~~~~~~~~~~~~~~~~~ When you're parsing an HTML or an XML document, by far the most powerful method is XPath. @@ -41,7 +41,7 @@ be converted to an XPath equivalent. This XPath expression can then be used with other functions and classes that use XPath to find elements in a document. -The CssSelector component +The CssSelector Component ~~~~~~~~~~~~~~~~~~~~~~~~~ The component's only goal is to convert CSS selectors to their XPath @@ -66,7 +66,7 @@ You can use this expression with, for instance, :phpclass:`DOMXPath` or uses the CssSelector component to find elements based on a CSS selector string. See the :doc:`/components/dom_crawler` for more details. -Limitations of the CssSelector component +Limitations of the CssSelector Component ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Not all CSS selectors can be converted to XPath equivalents. diff --git a/components/debug/introduction.rst b/components/debug/introduction.rst index 5691ca58be4..8f3fc17102e 100644 --- a/components/debug/introduction.rst +++ b/components/debug/introduction.rst @@ -8,8 +8,8 @@ The Debug Component The Debug component provides tools to ease debugging PHP code. .. versionadded:: 2.3 - The Debug component is new to Symfony 2.3. Previously, the classes were - located in the HttpKernel component. + The Debug component was introduced in Symfony 2.3. Previously, the classes + were located in the HttpKernel component. Installation ------------ diff --git a/components/dependency_injection/advanced.rst b/components/dependency_injection/advanced.rst index db5fa9a04b2..77056c296ce 100644 --- a/components/dependency_injection/advanced.rst +++ b/components/dependency_injection/advanced.rst @@ -156,7 +156,7 @@ service by asking for the ``bar`` service like this:: bar: "@foo" -Requiring files +Requiring Files --------------- There might be use cases when you need to include another file just before diff --git a/components/dependency_injection/compilation.rst b/components/dependency_injection/compilation.rst index d9413aa7e75..766f1b082b0 100644 --- a/components/dependency_injection/compilation.rst +++ b/components/dependency_injection/compilation.rst @@ -273,7 +273,7 @@ but also load a secondary one only if a certain parameter is set:: .. _components-dependency-injection-compiler-passes: -Prepending Configuration passed to the Extension +Prepending Configuration Passed to the Extension ------------------------------------------------ An Extension can prepend the configuration of any Bundle before the ``load()`` diff --git a/components/dependency_injection/definitions.rst b/components/dependency_injection/definitions.rst index 04c96bba872..46ed34ab36a 100644 --- a/components/dependency_injection/definitions.rst +++ b/components/dependency_injection/definitions.rst @@ -33,10 +33,10 @@ it to the container using:: $container->setDefinition($id, $definition); -Working with a definition +Working with a Definition ------------------------- -Creating a new definition +Creating a new Definition ~~~~~~~~~~~~~~~~~~~~~~~~~ If you need to create a new definition rather than manipulate one retrieved diff --git a/components/dependency_injection/introduction.rst b/components/dependency_injection/introduction.rst index a07d0aef948..0d1448a1cfa 100644 --- a/components/dependency_injection/introduction.rst +++ b/components/dependency_injection/introduction.rst @@ -160,7 +160,7 @@ like this:: $newsletterManager = $container->get('newsletter_manager'); -Avoiding Your Code Becoming Dependent on the Container +Avoiding your Code Becoming Dependent on the Container ------------------------------------------------------ Whilst you can retrieve services from the container directly it is best @@ -175,7 +175,7 @@ should be as few times as possible at the entry point to your application. .. _components-dependency-injection-loading-config: -Setting Up the Container with Configuration Files +Setting up the Container with Configuration Files ------------------------------------------------- As well as setting up the services using PHP as above you can also use diff --git a/components/dependency_injection/lazy_services.rst b/components/dependency_injection/lazy_services.rst index b232de064f0..7fff5442a54 100644 --- a/components/dependency_injection/lazy_services.rst +++ b/components/dependency_injection/lazy_services.rst @@ -5,9 +5,9 @@ Lazy Services ============= .. versionadded:: 2.3 - Lazy services were added in Symfony 2.3. + Lazy services were introduced in Symfony 2.3. -Why Lazy Services? +Why lazy Services? ------------------ In some cases, you may want to inject a service that is a bit heavy to instantiate, @@ -36,13 +36,13 @@ the `ProxyManager bridge`_: If you're using the full-stack framework, the proxy manager bridge is already included but the actual proxy manager needs to be included. Therefore add - + .. code-block:: json "require": { "ocramius/proxy-manager": "0.5.*" } - + to your ``composer.json``. Afterwards compile your container and check to make sure that you get a proxy for your lazy services. @@ -79,13 +79,13 @@ the same signature of the class representing the service. You can also inject the service just like normal into other services. The object that's actually injected will be the proxy. -To check if your proxy works you can simply check the interface of the +To check if your proxy works you can simply check the interface of the received object. .. code-block:: php var_dump(class_implements($service)); - + If the class implements the ``ProxyManager\Proxy\LazyLoadingInterface`` your lazy loaded services are working. diff --git a/components/dependency_injection/parentservices.rst b/components/dependency_injection/parentservices.rst index 36b0c1aa434..8b3cf6fb7e3 100644 --- a/components/dependency_injection/parentservices.rst +++ b/components/dependency_injection/parentservices.rst @@ -1,7 +1,7 @@ .. index:: single: DependencyInjection; Parent services -Managing Common Dependencies with Parent Services +Managing common Dependencies with parent Services ================================================= As you add more functionality to your application, you may well start to have @@ -299,7 +299,7 @@ would cause an exception to be raised for a non-abstract service. You can just extract common parts of similar service definitions into a parent service without also extending a parent class in PHP. -Overriding Parent Dependencies +Overriding parent Dependencies ------------------------------ There may be times where you want to override what class is passed in for diff --git a/components/dependency_injection/tags.rst b/components/dependency_injection/tags.rst index b96cce13287..67a4a730cce 100644 --- a/components/dependency_injection/tags.rst +++ b/components/dependency_injection/tags.rst @@ -64,7 +64,7 @@ Then, define the chain as a service: $container->setDefinition('acme_mailer.transport_chain', new Definition('%acme_mailer.transport_chain.class%')); -Define Services with a Custom Tag +Define Services with a custom Tag --------------------------------- Now you might want several of the ``\Swift_Transport`` classes to be instantiated @@ -172,7 +172,7 @@ run when the container is compiled:: stack framework. See :doc:`/cookbook/service_container/compiler_passes` for more details. -Adding additional attributes on Tags +Adding additional Attributes on Tags ------------------------------------ Sometimes you need additional information about each service that's tagged with your tag. diff --git a/components/dependency_injection/workflow.rst b/components/dependency_injection/workflow.rst index f869587d49d..2373ec5f4dc 100644 --- a/components/dependency_injection/workflow.rst +++ b/components/dependency_injection/workflow.rst @@ -18,8 +18,8 @@ also handles the compilation and caching. Even if you are not using HttpKernel, it should give you an idea of one way of organizing configuration in a modular application. -Working with cached Container ------------------------------ +Working with a Cached Container +------------------------------- Before building it, the kernel checks to see if a cached version of the container exists. The HttpKernel has a debug setting and if this is false, the @@ -58,7 +58,7 @@ passed to the Extension which also usually loads its own config file(s), typical with a :doc:`Configuration object ` also stored in the bundle's ``DependencyInjection`` directory. -Compiler passes to allow Interaction between Bundles +Compiler Passes to Allow Interaction between Bundles ---------------------------------------------------- :ref:`Compiler passes ` are diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index c8adf4908c1..1e870277878 100644 --- a/components/event_dispatcher/introduction.rst +++ b/components/event_dispatcher/introduction.rst @@ -243,7 +243,7 @@ Notice that this class doesn't actually *do* anything. The purpose of the events can be centralized. Notice also that a special ``FilterOrderEvent`` class will be passed to each listener of this event. -Creating an Event object +Creating an Event Object ........................ Later, when you dispatch this new event, you'll create an ``Event`` instance diff --git a/components/filesystem.rst b/components/filesystem.rst index 210aa6cdc34..26be4490039 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -6,6 +6,10 @@ The Filesystem Component The Filesystem component provides basic utilities for the filesystem. +.. versionadded:: 2.1 + The Filesystem component was introduced in Symfony 2.1. Previously, the + ``Filesystem`` class was located in the HttpKernel component. + Installation ------------ @@ -237,7 +241,7 @@ dumpFile ~~~~~~~~ .. versionadded:: 2.3 - ``dumpFile`` is new in Symfony 2.3. + The ``dumpFile()`` was introduced in Symfony 2.3. :method:`Symfony\\Component\\Filesystem\\Filesystem::dumpFile` allows you to dump contents to a file. It does this in an atomic manner: it writes a temporary diff --git a/components/finder.rst b/components/finder.rst index 31997e17508..48a6c55a9b9 100644 --- a/components/finder.rst +++ b/components/finder.rst @@ -289,7 +289,7 @@ it is called with the file as a :class:`Symfony\\Component\\Finder\\SplFileInfo` instance. The file is excluded from the result set if the Closure returns ``false``. -Reading contents of returned files +Reading Contents of Returned Files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The contents of returned files can be read with diff --git a/components/form/introduction.rst b/components/form/introduction.rst index 4b99dda69fa..f65556defc9 100644 --- a/components/form/introduction.rst +++ b/components/form/introduction.rst @@ -364,7 +364,7 @@ it throughout your application. .. _component-form-intro-create-simple-form: -Creating a Simple Form +Creating a simple Form ---------------------- .. tip:: @@ -425,7 +425,7 @@ comes with a lot of :doc:`built-in types `. Now that you've built your form, learn how to :ref:`render ` it and :ref:`process the form submission `. -Setting Default Values +Setting default Values ~~~~~~~~~~~~~~~~~~~~~~ If you need your form to load with some default values (or you're building diff --git a/components/form/type_guesser.rst b/components/form/type_guesser.rst index 652f350b1ac..015bb8aeb1b 100644 --- a/components/form/type_guesser.rst +++ b/components/form/type_guesser.rst @@ -1,7 +1,7 @@ .. index:: single: Forms; Custom Type Guesser -Creating a Custom Type Guesser +Creating a custom Type Guesser ============================== The Form component can guess the type and some options of a form field by diff --git a/components/http_foundation/session_configuration.rst b/components/http_foundation/session_configuration.rst index ba8dfa80fd8..ca1332cfaa1 100644 --- a/components/http_foundation/session_configuration.rst +++ b/components/http_foundation/session_configuration.rst @@ -188,7 +188,7 @@ experience, for example, by displaying a message. Symfony2 records some basic metadata about each session to give you complete freedom in this area. -Session metadata +Session Metadata ~~~~~~~~~~~~~~~~ Sessions are decorated with some basic metadata to enable fine control over the @@ -217,7 +217,7 @@ particular cookie by reading the ``getLifetime()`` method:: The expiry time of the cookie can be determined by adding the created timestamp and the lifetime. -PHP 5.4 compatibility +PHP 5.4 Compatibility ~~~~~~~~~~~~~~~~~~~~~ Since PHP 5.4.0, :phpclass:`SessionHandler` and :phpclass:`SessionHandlerInterface` diff --git a/components/http_foundation/sessions.rst b/components/http_foundation/sessions.rst index dd5ddfdba54..df9938a4ebe 100644 --- a/components/http_foundation/sessions.rst +++ b/components/http_foundation/sessions.rst @@ -225,7 +225,7 @@ has a simple API * :method:`Symfony\\Component\\HttpFoundation\\Session\\Attribute\\AttributeBagInterface::clear`: Clear the bag; -Flash messages +Flash Messages ~~~~~~~~~~~~~~ The purpose of the :class:`Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface` diff --git a/components/http_foundation/trusting_proxies.rst b/components/http_foundation/trusting_proxies.rst index f514e97835d..5ce8f888c50 100644 --- a/components/http_foundation/trusting_proxies.rst +++ b/components/http_foundation/trusting_proxies.rst @@ -24,10 +24,10 @@ your proxy. // only trust proxy headers coming from this IP addresses Request::setTrustedProxies(array('192.0.0.1', '10.0.0.0/8')); - + .. note:: - When using Symfony's internal reverse proxy (``AppCache.php``) make sure to add + When using Symfony's internal reverse proxy (``AppCache.php``) make sure to add ``127.0.0.1`` to the list of trusted proxies. @@ -49,7 +49,7 @@ can configure that header name via :method:`Symfony\\Component\\HttpFoundation\\ Request::setTrustedHeaderName(Request::HEADER_CLIENT_PORT, 'X-Proxy-Port'); Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, 'X-Proxy-Proto'); -Not trusting certain Headers +Not Trusting certain Headers ---------------------------- By default, if you whitelist your proxy's IP address, then all four headers diff --git a/components/http_kernel/introduction.rst b/components/http_kernel/introduction.rst index 5ab8e5c729b..ec2bf29316b 100644 --- a/components/http_kernel/introduction.rst +++ b/components/http_kernel/introduction.rst @@ -123,7 +123,7 @@ For general information on adding listeners to the events below, see .. _component-http-kernel-kernel-request: -1) The ``kernel.request`` event +1) The ``kernel.request`` Event ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **Typical Purposes**: To add more information to the ``Request``, initialize @@ -261,7 +261,7 @@ will be called after another event - ``kernel.controller`` - is dispatched. .. _component-http-kernel-kernel-controller: -3) The ``kernel.controller`` event +3) The ``kernel.controller`` Event ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **Typical Purposes**: Initialize things or change the controller just before @@ -367,7 +367,7 @@ has a little bit more work to do - :ref:`kernel.view ` is very strict and allows developers to upgrade with confidence from one minor version diff --git a/contributing/documentation/overview.rst b/contributing/documentation/overview.rst index 1efc8e9fe15..8796557e56d 100644 --- a/contributing/documentation/overview.rst +++ b/contributing/documentation/overview.rst @@ -187,7 +187,7 @@ about in the :doc:`/contributing/community/releases` section. To keep up with the release process, the documentation team makes several changes to the documentation at various parts of the lifecycle. -When a Release reaches "end of maintenance" +When a Release Reaches "End of Maintenance" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Every release will eventually reach its "end of maintenance". For details, @@ -210,7 +210,7 @@ For this example, suppose version 2.1 has just reached its end of maintenance: *after* the end of maintenance of this branch), will have no mentions of the old version (e.g. 2.1). -When a new Branch is created for a Release +When a new Branch is Created for a Release ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ During the :ref:`stabilization phase `, a diff --git a/cookbook/console/logging.rst b/cookbook/console/logging.rst index 21bd1162777..6f34a75048d 100644 --- a/cookbook/console/logging.rst +++ b/cookbook/console/logging.rst @@ -73,7 +73,7 @@ To get your console application to automatically log uncaught exceptions for all of your commands, you can use :doc:`console events`. .. versionadded:: 2.3 - Console events were added in Symfony 2.3. + Console events were introduced in Symfony 2.3. First configure a listener for console exception events in the service container: diff --git a/cookbook/console/sending_emails.rst b/cookbook/console/sending_emails.rst index 450e415b22c..1fd86788d0d 100644 --- a/cookbook/console/sending_emails.rst +++ b/cookbook/console/sending_emails.rst @@ -95,14 +95,14 @@ the queue yourself. Use the following code to send emails inside your console command:: $message = new \Swift_Message(); - + // ... prepare the message - + $container = $this->getContainer(); $mailer = $container->get('mailer'); - + $mailer->send($message); - + // now manually flush the queue $spool = $mailer->getTransport()->getSpool(); $transport = $container->get('swiftmailer.transport.real'); diff --git a/cookbook/form/dynamic_form_modification.rst b/cookbook/form/dynamic_form_modification.rst index 97a33d49118..5b51ab6cd2c 100644 --- a/cookbook/form/dynamic_form_modification.rst +++ b/cookbook/form/dynamic_form_modification.rst @@ -513,8 +513,8 @@ On a form, we can usually listen to the following events: * ``POST_SUBMIT`` .. versionadded:: 2.3 - The events ``PRE_SUBMIT``, ``SUBMIT`` and ``POST_SUBMIT`` were added in - Symfony 2.3. Before, they were named ``PRE_BIND``, ``BIND`` and ``POST_BIND``. + The events ``PRE_SUBMIT``, ``SUBMIT`` and ``POST_SUBMIT`` were introduced + in Symfony 2.3. Before, they were named ``PRE_BIND``, ``BIND`` and ``POST_BIND``. The key is to add a ``POST_SUBMIT`` listener to the field that your new field depends on. If you add a ``POST_SUBMIT`` listener to a form child (e.g. ``sport``), diff --git a/cookbook/form/form_collections.rst b/cookbook/form/form_collections.rst index eed8615aa23..27ab0bc74db 100644 --- a/cookbook/form/form_collections.rst +++ b/cookbook/form/form_collections.rst @@ -653,12 +653,12 @@ the relationship between the removed ``Tag`` and ``Task`` object. work to ensure that the relationship between the ``Task`` and the removed ``Tag`` is properly removed. - In Doctrine, you have two side of the relationship: the owning side and the - inverse side. Normally in this case you'll have a many-to-many relation + In Doctrine, you have two sides of the relationship: the owning side and the + inverse side. Normally in this case you'll have a many-to-many relationship and the deleted tags will disappear and persist correctly (adding new tags also works effortlessly). - But if you have an one-to-many relation or a many-to-many with a + But if you have a one-to-many relationship or a many-to-many relationship with a ``mappedBy`` on the Task entity (meaning Task is the "inverse" side), you'll need to do more work for the removed tags to persist correctly. diff --git a/cookbook/form/inherit_data_option.rst b/cookbook/form/inherit_data_option.rst index 92efc82be10..ee46305be2b 100644 --- a/cookbook/form/inherit_data_option.rst +++ b/cookbook/form/inherit_data_option.rst @@ -5,7 +5,8 @@ How to Reduce Code Duplication with "inherit_data" ================================================== .. versionadded:: 2.3 - This ``inherit_data`` option was known as ``virtual`` before Symfony 2.3. + This ``inherit_data`` option was introduced in Symfony 2.3. Before, it + was known as ``virtual``. The ``inherit_data`` form field option can be very useful when you have some duplicated fields in different entities. For example, imagine you have two diff --git a/cookbook/security/csrf_in_login_form.rst b/cookbook/security/csrf_in_login_form.rst index b833fedb382..d957a2585b5 100644 --- a/cookbook/security/csrf_in_login_form.rst +++ b/cookbook/security/csrf_in_login_form.rst @@ -1,8 +1,8 @@ .. index:: - single: Security; CSRF in the Login Form + single: Security; CSRF Protection in the Login Form -Using CSRF in the Login Form -============================ +Using CSRF Protection in the Login Form +======================================= When using a login form, you should make sure that you are protected against CSRF (`Cross-site request forgery`_). The Security component already has built-in support @@ -13,11 +13,11 @@ for CSRF. In this article you'll learn how you can use it in your login form. Login CSRF attacks are a bit less well-known. See `Forging Login Requests`_ if you're curious about more details. -Configuring CSRF ----------------- +Configuring CSRF Protection +--------------------------- First, configure the Security component so it can use CSRF protection. -The Security component needs a CSRF provider. You can set this to use the default +The Security component needs a CSRF token provider. You can set this to use the default provider available in the Form component: .. configuration-block:: diff --git a/cookbook/security/custom_authentication_provider.rst b/cookbook/security/custom_authentication_provider.rst index 4a8fb4862b8..66312dad9b5 100644 --- a/cookbook/security/custom_authentication_provider.rst +++ b/cookbook/security/custom_authentication_provider.rst @@ -358,7 +358,7 @@ requires the following methods: and ``remember_me`` and defines the position at which the provider is called; * ``getKey`` method which defines the configuration key used to reference - the provider; + the provider in the firewall configuration; * ``addConfiguration`` method, which is used to define the configuration options underneath the configuration key in your security configuration. diff --git a/cookbook/security/voters_data_permission.rst b/cookbook/security/voters_data_permission.rst index b9e3afdb025..8f2b4ac605a 100644 --- a/cookbook/security/voters_data_permission.rst +++ b/cookbook/security/voters_data_permission.rst @@ -62,7 +62,6 @@ edit a particular object. Here's an example implementation: namespace Acme\DemoBundle\Security\Authorization\Voter; use Symfony\Component\Security\Core\Exception\InvalidArgumentException; - use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\User\UserInterface; diff --git a/cookbook/service_container/scopes.rst b/cookbook/service_container/scopes.rst index 918b1e75fd3..657ac81284f 100644 --- a/cookbook/service_container/scopes.rst +++ b/cookbook/service_container/scopes.rst @@ -118,7 +118,7 @@ A) Using a Synchronized Service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.3 - Synchronized services are new in Symfony 2.3. + Synchronized services were introduced in Symfony 2.3. Both injecting the container and setting your service to a narrower scope have drawbacks. Assume first that the ``client_configuration`` service has been diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 79c62088a62..9abbf592ea7 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -65,7 +65,7 @@ http_method_override ~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 2.3 - The ``http_method_override`` option is new in Symfony 2.3. + The ``http_method_override`` option was introduced in Symfony 2.3. **type**: ``Boolean`` **default**: ``true`` @@ -420,10 +420,10 @@ enabled The profiler can be disabled by setting this key to ``false``. .. versionadded:: 2.3 - - The ``collect`` option is new in Symfony 2.3. Previously, when ``profiler.enabled`` - was false, the profiler *was* actually enabled, but the collectors were - disabled. Now the profiler and collectors can be controller independently. + The ``collect`` option was introduced in Symfony 2.3. Previously, when + ``profiler.enabled`` was ``false``, the profiler *was* actually enabled, + but the collectors were disabled. Now, the profiler and the collectors + can be controlled independently. collect ....... diff --git a/reference/constraints/Currency.rst b/reference/constraints/Currency.rst index 3a2a3b1b8cf..22709f469ba 100644 --- a/reference/constraints/Currency.rst +++ b/reference/constraints/Currency.rst @@ -2,7 +2,7 @@ Currency ======== .. versionadded:: 2.3 - This constraint is new in version 2.3. + The ``Currency`` constraint was introduced in Symfony 2.3. Validates that a value is a valid `3-letter ISO 4217`_ currency name. diff --git a/reference/constraints/EqualTo.rst b/reference/constraints/EqualTo.rst index c8e36b2be4a..1079bd90430 100644 --- a/reference/constraints/EqualTo.rst +++ b/reference/constraints/EqualTo.rst @@ -2,7 +2,7 @@ EqualTo ======= .. versionadded:: 2.3 - This constraint is new in version 2.3. + The ``EqualTo`` constraint was introduced in Symfony 2.3. Validates that a value is equal to another value, defined in the options. To force that a value is *not* equal, see :doc:`/reference/constraints/NotEqualTo`. diff --git a/reference/constraints/GreaterThan.rst b/reference/constraints/GreaterThan.rst index a266a6c97cc..80439900b26 100644 --- a/reference/constraints/GreaterThan.rst +++ b/reference/constraints/GreaterThan.rst @@ -2,7 +2,7 @@ GreaterThan =========== .. versionadded:: 2.3 - This constraint is new in version 2.3. + The ``GreaterThan`` constraint was introduced in Symfony 2.3. Validates that a value is greater than another value, defined in the options. To force that a value is greater than or equal to another value, see diff --git a/reference/constraints/GreaterThanOrEqual.rst b/reference/constraints/GreaterThanOrEqual.rst index 383c572d3a8..0dfe7072dc6 100644 --- a/reference/constraints/GreaterThanOrEqual.rst +++ b/reference/constraints/GreaterThanOrEqual.rst @@ -2,7 +2,7 @@ GreaterThanOrEqual ================== .. versionadded:: 2.3 - This constraint is new in version 2.3. + The ``GreaterThanOrEqual`` constraint was introduced in Symfony 2.3. Validates that a value is greater than or equal to another value, defined in the options. To force that a value is greater than another value, see diff --git a/reference/constraints/IdenticalTo.rst b/reference/constraints/IdenticalTo.rst index 44ba134dcd1..ea010607dd9 100644 --- a/reference/constraints/IdenticalTo.rst +++ b/reference/constraints/IdenticalTo.rst @@ -2,7 +2,7 @@ IdenticalTo =========== .. versionadded:: 2.3 - This constraint is new in version 2.3. + The ``IdenticalTo`` constraint was introduced in Symfony 2.3. Validates that a value is identical to another value, defined in the options. To force that a value is *not* identical, see diff --git a/reference/constraints/LessThan.rst b/reference/constraints/LessThan.rst index 2ae57eee0a7..849b157bc0a 100644 --- a/reference/constraints/LessThan.rst +++ b/reference/constraints/LessThan.rst @@ -2,7 +2,7 @@ LessThan ======== .. versionadded:: 2.3 - This constraint is new in version 2.3. + The ``LessThan`` constraint was introduced in Symfony 2.3. Validates that a value is less than another value, defined in the options. To force that a value is less than or equal to another value, see diff --git a/reference/constraints/LessThanOrEqual.rst b/reference/constraints/LessThanOrEqual.rst index e1b56e32e05..d706ac20693 100644 --- a/reference/constraints/LessThanOrEqual.rst +++ b/reference/constraints/LessThanOrEqual.rst @@ -2,7 +2,7 @@ LessThanOrEqual =============== .. versionadded:: 2.3 - This constraint is new in version 2.3. + The ``LessThanOrEqual`` constraint was introduced in Symfony 2.3. Validates that a value is less than or equal to another value, defined in the options. To force that a value is less than another value, see diff --git a/reference/constraints/Luhn.rst b/reference/constraints/Luhn.rst index 2329d4c0ff2..70ca0912888 100644 --- a/reference/constraints/Luhn.rst +++ b/reference/constraints/Luhn.rst @@ -36,7 +36,7 @@ will contain a credit card number. // src/Acme/SubscriptionBundle/Entity/Transaction.php namespace Acme\SubscriptionBundle\Entity\Transaction; - + use Symfony\Component\Validator\Constraints as Assert; class Transaction @@ -68,7 +68,7 @@ will contain a credit card number. // src/Acme/SubscriptionBundle/Entity/Transaction.php namespace Acme\SubscriptionBundle\Entity\Transaction; - + use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Constraints as Assert; diff --git a/reference/constraints/NotEqualTo.rst b/reference/constraints/NotEqualTo.rst index 6805a425599..0e2e9f7593d 100644 --- a/reference/constraints/NotEqualTo.rst +++ b/reference/constraints/NotEqualTo.rst @@ -2,7 +2,7 @@ NotEqualTo ========== .. versionadded:: 2.3 - This constraint is new in version 2.3. + The ``NotEqualTo`` constraint was introduced in Symfony 2.3. Validates that a value is **not** equal to another value, defined in the options. To force that a value is equal, see diff --git a/reference/constraints/NotIdenticalTo.rst b/reference/constraints/NotIdenticalTo.rst index d83ef989ae6..9a70d41c571 100644 --- a/reference/constraints/NotIdenticalTo.rst +++ b/reference/constraints/NotIdenticalTo.rst @@ -2,7 +2,7 @@ NotIdenticalTo ============== .. versionadded:: 2.3 - This constraint is new in version 2.3. + The ``NotIdenticalTo`` constraint was introduced in Symfony 2.3. Validates that a value is **not** identical to another value, defined in the options. To force that a value is identical, see diff --git a/reference/forms/types/options/inherit_data.rst.inc b/reference/forms/types/options/inherit_data.rst.inc index 5537c1aa51c..3b789db9f25 100644 --- a/reference/forms/types/options/inherit_data.rst.inc +++ b/reference/forms/types/options/inherit_data.rst.inc @@ -2,7 +2,8 @@ inherit_data ~~~~~~~~~~~~ .. versionadded:: 2.3 - This option was known as ``virtual`` before Symfony 2.3. + The ``inherit_data`` option was introduced in Symfony 2.3. Before, it + was known as ``virtual``. **type**: ``boolean`` **default**: ``false``