From 84d43ac157a8860f667bc6b40278197203b4c333 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Tue, 10 Dec 2013 23:07:24 +0100 Subject: [PATCH] typos, CS and PSR links fixed --- README.markdown | 6 +++--- book/forms.rst | 2 +- book/installation.rst | 2 +- book/page_creation.rst | 8 ++++---- book/propel.rst | 8 ++++---- book/templating.rst | 2 +- book/testing.rst | 2 +- book/validation.rst | 2 +- components/class_loader/cache_class_loader.rst | 4 ++-- components/class_loader/class_loader.rst | 2 +- components/class_loader/map_class_loader.rst | 2 +- components/dependency_injection/parameters.rst | 2 +- components/event_dispatcher/introduction.rst | 4 ++-- components/filesystem.rst | 4 ++-- components/finder.rst | 4 ++-- components/http_foundation/session_configuration.rst | 4 ++-- components/http_foundation/sessions.rst | 2 +- components/http_kernel/introduction.rst | 2 +- components/routing/hostname_pattern.rst | 2 +- components/routing/introduction.rst | 2 +- contributing/code/standards.rst | 6 +++--- contributing/community/releases.rst | 1 - cookbook/assetic/apply_to_option.rst | 4 ++-- cookbook/assetic/asset_management.rst | 2 +- cookbook/bundles/best_practices.rst | 2 +- cookbook/bundles/extension.rst | 4 ++-- cookbook/bundles/remove.rst | 4 ++-- cookbook/configuration/environments.rst | 2 +- cookbook/configuration/external_parameters.rst | 4 ++-- cookbook/configuration/front_controllers_and_kernel.rst | 2 +- cookbook/configuration/web_server_configuration.rst | 2 +- cookbook/console/logging.rst | 3 +-- cookbook/deployment-tools.rst | 2 +- cookbook/doctrine/registration_form.rst | 2 +- cookbook/logging/monolog_email.rst | 2 +- cookbook/routing/service_container_parameters.rst | 2 +- cookbook/security/custom_authentication_provider.rst | 2 +- cookbook/security/entity_provider.rst | 6 +++--- cookbook/service_container/event_listener.rst | 2 +- cookbook/session/sessions_directory.rst | 2 +- cookbook/validation/custom_constraint.rst | 2 +- cookbook/web_services/php_soap_extension.rst | 2 +- glossary.rst | 4 ++-- quick_tour/the_architecture.rst | 2 -- reference/configuration/doctrine.rst | 2 +- reference/configuration/monolog.rst | 2 +- reference/constraints/Count.rst | 8 ++++---- reference/forms/types/birthday.rst | 4 ++-- reference/forms/types/collection.rst | 4 ++-- reference/forms/types/entity.rst | 2 +- reference/forms/types/integer.rst | 2 +- reference/forms/types/number.rst | 2 +- reference/forms/types/options/data.rst.inc | 2 +- reference/forms/types/options/days.rst.inc | 2 +- reference/forms/types/options/disabled.rst.inc | 4 ++-- reference/forms/types/options/error_mapping.rst.inc | 2 +- reference/forms/types/options/label.rst.inc | 6 +++--- reference/forms/types/options/minutes.rst.inc | 4 ++-- reference/forms/types/options/property_path.rst.inc | 4 ++-- reference/forms/types/options/years.rst.inc | 2 +- reference/forms/types/textarea.rst | 2 +- reference/twig_reference.rst | 4 ++-- 62 files changed, 93 insertions(+), 97 deletions(-) diff --git a/README.markdown b/README.markdown index 79ea15a20ee..56f267d7ea3 100644 --- a/README.markdown +++ b/README.markdown @@ -8,9 +8,9 @@ Contributing >**Note** >Unless you're documenting a feature that's new to a specific version of Symfony ->(e.g. Symfony 2.3), all pull requests must be based off of the **2.2** branch, +>(e.g. Symfony 2.3), all pull requests must be based off of the **2.2** branch, >**not** the master or 2.3 branch. We love contributors! For more information on how you can contribute to the -Symfony documentation, please read -[Contributing to the Documentation](http://symfony.com/doc/current/contributing/documentation/overview.html) +Symfony documentation, please read +[Contributing to the Documentation](http://symfony.com/doc/current/contributing/documentation/overview.html) diff --git a/book/forms.rst b/book/forms.rst index 74398c965da..1f6a6326500 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -1166,7 +1166,7 @@ form with many ``Product`` sub-forms). This is done by using the ``collection`` field type. For more information see the ":doc:`/cookbook/form/form_collections`" cookbook -entry and the :doc:`collection ` field type reference. +entry and the :doc:`collection ` field type reference. .. index:: single: Forms; Theming diff --git a/book/installation.rst b/book/installation.rst index 9ea45d139b0..ae31696d824 100644 --- a/book/installation.rst +++ b/book/installation.rst @@ -140,7 +140,7 @@ Updating Vendors At this point, you've downloaded a fully-functional Symfony project in which you'll start to develop your own application. A Symfony project depends on -a number of external libraries. These are downloaded into the `vendor/` directory +a number of external libraries. These are downloaded into the ``vendor/`` directory of your project via a library called `Composer`_. Depending on how you downloaded Symfony, you may or may not need to update diff --git a/book/page_creation.rst b/book/page_creation.rst index 97da53ddfa3..460d798cb01 100644 --- a/book/page_creation.rst +++ b/book/page_creation.rst @@ -42,10 +42,10 @@ also load specific bundles based on the selected environment. For example, Symfony2 comes with the WebProfilerBundle (described below), enabled only in the ``dev`` and ``test`` environments. -Symfony2 comes with two web-accessible front controllers: ``app_dev.php`` +Symfony2 comes with two web-accessible front controllers: ``app_dev.php`` provides the ``dev`` environment, and ``app.php`` provides the ``prod`` environment. All web accesses to Symfony2 normally go through one of these front controllers. -(The ``test`` environment is normally only used when running unit tests, and so +(The ``test`` environment is normally only used when running unit tests, and so doesn't have a dedicated front controller. The console tool also provides a front controller that can be used with any environment.) @@ -555,7 +555,7 @@ You'll learn more about each of these directories in later chapters. When Symfony is loading, a special file - ``vendor/autoload.php`` - is included. This file is created by Composer and will autoload all - application files living in the `src/` folder as well as all + application files living in the ``src/`` folder as well as all third-party libraries mentioned in the ``composer.json`` file. Because of the autoloader, you never need to worry about using ``include`` @@ -868,7 +868,7 @@ Default Configuration Dump The ``config:dump-reference`` command was added in Symfony 2.1 You can dump the default configuration for a bundle in YAML to the console using -the ``config:dump-reference`` command. Here is an example of dumping the default +the ``config:dump-reference`` command. Here is an example of dumping the default FrameworkBundle configuration: .. code-block:: text diff --git a/book/propel.rst b/book/propel.rst index 396d5a279af..91b9c2fe144 100644 --- a/book/propel.rst +++ b/book/propel.rst @@ -134,7 +134,7 @@ Creating the Database Tables/Schema Now you have a usable ``Product`` class and all you need to persist it. Of course, you don't yet have the corresponding ``product`` table in your database. Fortunately, Propel can automatically create all the database tables -needed for every known model in your application. To do this, run: +needed for every known model in your application. To do this, run: .. code-block:: bash @@ -153,7 +153,7 @@ Persisting Objects to the Database ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Now that you have a ``Product`` object and corresponding ``product`` table, -you're ready to persist data to the database. From inside a controller, this +you're ready to persist data to the database. From inside a controller, this is pretty easy. Add the following method to the ``DefaultController`` of the bundle:: @@ -406,7 +406,7 @@ Fetching Related Objects ~~~~~~~~~~~~~~~~~~~~~~~~ When you need to fetch associated objects, your workflow looks just like it did -before. First, fetch a ``$product`` object and then access its related +before. First, fetch a ``$product`` object and then access its related ``Category``:: // ... @@ -435,7 +435,7 @@ Lifecycle Callbacks ------------------- Sometimes, you need to perform an action right before or after an object is -inserted, updated, or deleted. These types of actions are known as "lifecycle" +inserted, updated, or deleted. These types of actions are known as "lifecycle" callbacks or "hooks", as they're callback methods that you need to execute during different stages of the lifecycle of an object (e.g. the object is inserted, updated, deleted, etc). diff --git a/book/templating.rst b/book/templating.rst index a06faae8ef6..85fd5331b85 100644 --- a/book/templating.rst +++ b/book/templating.rst @@ -1091,7 +1091,7 @@ Global Template Variables ------------------------- During each request, Symfony2 will set a global template variable ``app`` -in both Twig and PHP template engines by default. The ``app`` variable +in both Twig and PHP template engines by default. The ``app`` variable is a :class:`Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables` instance which will give you access to some application specific variables automatically: diff --git a/book/testing.rst b/book/testing.rst index 8b3319f488e..1c825a5bfc4 100644 --- a/book/testing.rst +++ b/book/testing.rst @@ -464,7 +464,7 @@ Redirecting When a request returns a redirect response, the client does not follow it automatically. You can examine the response and force a redirection -afterwards with the ``followRedirect()`` method:: +afterwards with the ``followRedirect()`` method:: $crawler = $client->followRedirect(); diff --git a/book/validation.rst b/book/validation.rst index a6ec3bebe0c..44eaa9f3458 100644 --- a/book/validation.rst +++ b/book/validation.rst @@ -168,7 +168,7 @@ You could also pass the collection of errors into a template. return $this->render('AcmeBlogBundle:Author:validate.html.twig', array( 'errors' => $errors, )); - } + } Inside the template, you can output the list of errors exactly as needed: diff --git a/components/class_loader/cache_class_loader.rst b/components/class_loader/cache_class_loader.rst index 125a1356224..d9ef74ca207 100644 --- a/components/class_loader/cache_class_loader.rst +++ b/components/class_loader/cache_class_loader.rst @@ -20,8 +20,8 @@ for a class. .. note:: - Both the ``ApcClassLoader`` and the ``XcacheClassLoader`` can be used - to cache Composer's `autoloader`_. + Both the ``ApcClassLoader`` and the ``XcacheClassLoader`` can be used + to cache Composer's `autoloader`_. ApcClassLoader -------------- diff --git a/components/class_loader/class_loader.rst b/components/class_loader/class_loader.rst index a51738bd592..8ad2ca29dd3 100644 --- a/components/class_loader/class_loader.rst +++ b/components/class_loader/class_loader.rst @@ -81,4 +81,4 @@ or one of its children, the autoloader will first look for the class under the of the prefix registrations is significant in this case. .. _PEAR: http://pear.php.net/manual/en/standards.naming.php -.. _PSR-0: http://symfony.com/PSR0 +.. _PSR-0: http://www.php-fig.org/psr/psr-0/ diff --git a/components/class_loader/map_class_loader.rst b/components/class_loader/map_class_loader.rst index 7507b0369eb..0243550af68 100644 --- a/components/class_loader/map_class_loader.rst +++ b/components/class_loader/map_class_loader.rst @@ -36,4 +36,4 @@ an instance of the ``MapClassLoader`` class:: $loader->register(); -.. _PSR-0: http://symfony.com/PSR0 +.. _PSR-0: http://www.php-fig.org/psr/psr-0/ diff --git a/components/dependency_injection/parameters.rst b/components/dependency_injection/parameters.rst index 04f61a712b5..16de8c3ece2 100644 --- a/components/dependency_injection/parameters.rst +++ b/components/dependency_injection/parameters.rst @@ -250,7 +250,7 @@ Constants as Parameters ----------------------- The container also has support for setting PHP constants as parameters. To -take advantage of this feature, map the name of your constant to a parameter +take advantage of this feature, map the name of your constant to a parameter key, and define the type as ``constant``. .. configuration-block:: diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index 23278ef67af..428b460e9d0 100644 --- a/components/event_dispatcher/introduction.rst +++ b/components/event_dispatcher/introduction.rst @@ -445,7 +445,7 @@ EventDispatcher aware Events and Listeners The ``Event`` object contains a reference to the invoking dispatcher since Symfony 2.1 The ``EventDispatcher`` always injects a reference to itself in the passed event -object. This means that all listeners have direct access to the +object. This means that all listeners have direct access to the ``EventDispatcher`` object that notified the listener via the passed ``Event`` object's :method:`Symfony\\Component\\EventDispatcher\\Event::getDispatcher` method. @@ -492,7 +492,7 @@ Dispatching another event from within a listener:: While this above is sufficient for most uses, if your application uses multiple ``EventDispatcher`` instances, you might need to specifically inject a known -instance of the ``EventDispatcher`` into your listeners. This could be done +instance of the ``EventDispatcher`` into your listeners. This could be done using constructor or setter injection as follows: Constructor injection:: diff --git a/components/filesystem.rst b/components/filesystem.rst index 12811225b26..fa985245339 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -65,7 +65,7 @@ Exists ~~~~~~ :method:`Symfony\\Component\\Filesystem\\Filesystem::exists` checks for the -presence of all files or directories and returns false if a file is missing:: +presence of all files or directories and returns ``false`` if a file is missing:: // this directory exists, return true $fs->exists('/tmp/photos'); @@ -222,7 +222,7 @@ isAbsolutePath ~~~~~~~~~~~~~~ :method:`Symfony\\Component\\Filesystem\\Filesystem::isAbsolutePath` returns -``true`` if the given path is absolute, false otherwise:: +``true`` if the given path is absolute, ``false`` otherwise:: // return true $fs->isAbsolutePath('/tmp'); diff --git a/components/finder.rst b/components/finder.rst index 8746fd9ffec..a7f9a7ecfeb 100644 --- a/components/finder.rst +++ b/components/finder.rst @@ -258,8 +258,8 @@ Restrict files by last modified dates with the $finder->date('since yesterday'); -The comparison operator can be any of the following: ``>``, ``>=``, ``<``, '<=', -'=='. You can also use ``since`` or ``after`` as an alias for ``>``, and +The comparison operator can be any of the following: ``>``, ``>=``, ``<``, ``<=``, +``==``. You can also use ``since`` or ``after`` as an alias for ``>``, and ``until`` or ``before`` as an alias for ``<``. The target value can be any date supported by the `strtotime`_ function. diff --git a/components/http_foundation/session_configuration.rst b/components/http_foundation/session_configuration.rst index a4e327c47a8..7e420f768b8 100644 --- a/components/http_foundation/session_configuration.rst +++ b/components/http_foundation/session_configuration.rst @@ -12,11 +12,11 @@ store and retrieve session data, and configuring session behaviour. Save Handlers ~~~~~~~~~~~~~ -The PHP session workflow has 6 possible operations that may occur. The normal +The PHP session workflow has 6 possible operations that may occur. The normal session follows `open`, `read`, `write` and `close`, with the possibility of `destroy` and `gc` (garbage collection which will expire any old sessions: `gc` is called randomly according to PHP's configuration and if called, it is invoked -after the `open` operation). You can read more about this at +after the `open` operation). You can read more about this at `php.net/session.customhandler`_ Native PHP Save Handlers diff --git a/components/http_foundation/sessions.rst b/components/http_foundation/sessions.rst index 6cbbc11a69f..d77edd267ad 100644 --- a/components/http_foundation/sessions.rst +++ b/components/http_foundation/sessions.rst @@ -258,7 +258,7 @@ has a simple API Adds a flash message to the stack of specified type; * :method:`Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface::set`: - Sets flashes by type; This method conveniently takes both singles messages as + Sets flashes by type; This method conveniently takes both singles messages as a ``string`` or multiple messages in an ``array``. * :method:`Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface::get`: diff --git a/components/http_kernel/introduction.rst b/components/http_kernel/introduction.rst index eccaa9cbd71..072005c101a 100644 --- a/components/http_kernel/introduction.rst +++ b/components/http_kernel/introduction.rst @@ -193,7 +193,7 @@ The only requirement is that it is a PHP callable - i.e. a function, method on an object, or a ``Closure``. But *how* you determine the exact controller for a request is entirely up -to your application. This is the job of the "controller resolver" - a class +to your application. This is the job of the "controller resolver" - a class that implements :class:`Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface` and is one of the constructor arguments to ``HttpKernel``. diff --git a/components/routing/hostname_pattern.rst b/components/routing/hostname_pattern.rst index 38499a918d8..d2ac2bfa8e1 100644 --- a/components/routing/hostname_pattern.rst +++ b/components/routing/hostname_pattern.rst @@ -125,7 +125,7 @@ instance, if you want to match both ``m.example.com`` and mobile_homepage: path: / host: "{subdomain}.example.com" - defaults: + defaults: _controller: AcmeDemoBundle:Main:mobileHomepage subdomain: m requirements: diff --git a/components/routing/introduction.rst b/components/routing/introduction.rst index 30116934707..a3ab1b59800 100644 --- a/components/routing/introduction.rst +++ b/components/routing/introduction.rst @@ -85,7 +85,7 @@ placeholders as regular expressions. 4. An array of options. These contain internal settings for the route and are the least commonly needed. -5. A host. This is matched against the host of the request. See +5. A host. This is matched against the host of the request. See :doc:`/components/routing/hostname_pattern` for more details. 6. An array of schemes. These enforce a certain HTTP scheme (``http``, ``https``). diff --git a/contributing/code/standards.rst b/contributing/code/standards.rst index 96d9421e9ec..1d512b3855e 100644 --- a/contributing/code/standards.rst +++ b/contributing/code/standards.rst @@ -158,6 +158,6 @@ License * Symfony is released under the MIT license, and the license block has to be present at the top of every PHP file, before the namespace. -.. _`PSR-0`: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md -.. _`PSR-1`: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md -.. _`PSR-2`: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md +.. _`PSR-0`: http://www.php-fig.org/psr/psr-0/ +.. _`PSR-1`: http://www.php-fig.org/psr/psr-1/ +.. _`PSR-2`: http://www.php-fig.org/psr/psr-2/ diff --git a/contributing/community/releases.rst b/contributing/community/releases.rst index c849a38408a..1e8471d00d8 100644 --- a/contributing/community/releases.rst +++ b/contributing/community/releases.rst @@ -161,5 +161,4 @@ upgrade. .. _Git repository: https://github.com/symfony/symfony .. _SensioLabs: http://sensiolabs.com/ -.. _roadmap: http://symfony.com/roadmap .. _`timeline calculator`: http://symfony.com/roadmap diff --git a/cookbook/assetic/apply_to_option.rst b/cookbook/assetic/apply_to_option.rst index d4935ce62fd..4d2691620af 100644 --- a/cookbook/assetic/apply_to_option.rst +++ b/cookbook/assetic/apply_to_option.rst @@ -28,7 +28,7 @@ An example configuration might look like this: - @@ -72,7 +72,7 @@ templates: -This is all that's needed to compile this CoffeeScript file and server it +This is all that's needed to compile this CoffeeScript file and serve it as the compiled JavaScript. Filter Multiple Files diff --git a/cookbook/assetic/asset_management.rst b/cookbook/assetic/asset_management.rst index 6bff1a6e884..48037824e45 100644 --- a/cookbook/assetic/asset_management.rst +++ b/cookbook/assetic/asset_management.rst @@ -255,7 +255,7 @@ In fact, Assetic has a long list of available filters. Many of the filters do not do the work directly, but use existing third-party libraries to do the heavy-lifting. This means that you'll often need to install -a third-party library to use a filter. The great advantage of using Assetic +a third-party library to use a filter. The great advantage of using Assetic to invoke these libraries (as opposed to using them directly) is that instead of having to run them manually after you work on the files, Assetic will take care of this for you and remove this step altogether from your development diff --git a/cookbook/bundles/best_practices.rst b/cookbook/bundles/best_practices.rst index ec41e47e3db..e57652c3777 100644 --- a/cookbook/bundles/best_practices.rst +++ b/cookbook/bundles/best_practices.rst @@ -284,4 +284,4 @@ Learn more from the Cookbook * :doc:`/cookbook/bundles/extension` -.. _standards: http://symfony.com/PSR0 +.. _standards: http://www.php-fig.org/psr/psr-0/ diff --git a/cookbook/bundles/extension.rst b/cookbook/bundles/extension.rst index 714be96e834..bb1e34abcf4 100644 --- a/cookbook/bundles/extension.rst +++ b/cookbook/bundles/extension.rst @@ -62,7 +62,7 @@ When you create a bundle, you have two choices on how to handle configuration: The second option - which you'll learn about in this article - is much more flexible, but also requires more time to setup. If you're wondering which method you should use, it's probably a good idea to start with method #1, -and then change to #2 later if you need to. If you plan to distribute your +and then change to #2 later if you need to. If you plan to distribute your bundle, the second option is recommended. The second method has several specific advantages: @@ -519,7 +519,7 @@ be output to the console in YAML. As long as your bundle's configuration is located in the standard location (``YourBundle\DependencyInjection\Configuration``) and does not have a -``__construct()`` it will work automatically. If you have something +``__construct()`` it will work automatically. If you have something different, your ``Extension`` class must override the :method:`Extension::getConfiguration() ` method and return an instance of your diff --git a/cookbook/bundles/remove.rst b/cookbook/bundles/remove.rst index 69df8c8c1dc..4925f85054e 100644 --- a/cookbook/bundles/remove.rst +++ b/cookbook/bundles/remove.rst @@ -62,7 +62,7 @@ the name of the bundle is, e.g. ``fos_user`` for the FOSUserBundle) string in the configuration files. The AcmeDemoBundle doesn't have configuration. However, the bundle is -used in the configuration for the ``app/config/security.yml`` file. You can +used in the configuration for the ``app/config/security.yml`` file. You can use it as a boilerplate for your own security, but you **can** also remove everything: it doesn't matter to Symfony if you remove it or not. @@ -103,4 +103,4 @@ rely on the bundle you are about to remove. .. tip:: If a third party bundle relies on another bundle, you can find that bundle - mentioned in the ``composer.json`` file included in the bundle directory. \ No newline at end of file + mentioned in the ``composer.json`` file included in the bundle directory. diff --git a/cookbook/configuration/environments.rst b/cookbook/configuration/environments.rst index 450803b3962..d634e71be32 100644 --- a/cookbook/configuration/environments.rst +++ b/cookbook/configuration/environments.rst @@ -55,7 +55,7 @@ multiple environments in an elegant, powerful and transparent way. Of course, in reality, each environment differs only somewhat from others. Generally, all environments will share a large base of common configuration. -Opening the "dev" configuration file, you can see how this is accomplished +Opening the "dev" configuration file, you can see how this is accomplished easily and transparently: .. configuration-block:: diff --git a/cookbook/configuration/external_parameters.rst b/cookbook/configuration/external_parameters.rst index 61f59f55867..b2fb61bce5f 100644 --- a/cookbook/configuration/external_parameters.rst +++ b/cookbook/configuration/external_parameters.rst @@ -14,7 +14,7 @@ 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 +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. @@ -39,7 +39,7 @@ the following ``VirtualHost`` configuration: .. note:: The example above is for an Apache configuration, using the `SetEnv`_ - directive. However, this will work for any web server which supports + directive. However, this will work for any web server which supports the setting of environment variables. Also, in order for your console to work (which does not use Apache), diff --git a/cookbook/configuration/front_controllers_and_kernel.rst b/cookbook/configuration/front_controllers_and_kernel.rst index 8bfcf1f36c0..38fc5f6bdce 100644 --- a/cookbook/configuration/front_controllers_and_kernel.rst +++ b/cookbook/configuration/front_controllers_and_kernel.rst @@ -7,7 +7,7 @@ Understanding how the Front Controller, Kernel and Environments work together The section :doc:`/cookbook/configuration/environments` explained the basics on how Symfony uses environments to run your application with different configuration -settings. This section will explain a bit more in-depth what happens when +settings. This section will explain a bit more in-depth what happens when your application is bootstrapped. To hook into this process, you need to understand three parts that work together: diff --git a/cookbook/configuration/web_server_configuration.rst b/cookbook/configuration/web_server_configuration.rst index 632763cce4e..306a99b644e 100644 --- a/cookbook/configuration/web_server_configuration.rst +++ b/cookbook/configuration/web_server_configuration.rst @@ -48,7 +48,7 @@ following configuration snippet: .. code-block:: apache - RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] .. caution:: diff --git a/cookbook/console/logging.rst b/cookbook/console/logging.rst index b16e946703c..5352fb581ee 100644 --- a/cookbook/console/logging.rst +++ b/cookbook/console/logging.rst @@ -55,8 +55,7 @@ container and use it to do the logging:: if ($input->getOption('yell')) { $text = strtoupper($text); $logger->warn('Yelled: '.$text); - } - else { + } else { $logger->info('Greeted: '.$text); } diff --git a/cookbook/deployment-tools.rst b/cookbook/deployment-tools.rst index 486a8276a28..4376f26ed7b 100644 --- a/cookbook/deployment-tools.rst +++ b/cookbook/deployment-tools.rst @@ -93,7 +93,7 @@ as you normally do: .. tip:: The ``--optimize-autoloader`` flag makes Composer's autoloader more - performant by building a "class map". The ``--no-dev`` flag + performant by building a "class map". The ``--no-dev`` flag ensures that development packages are not installed in the production environment. diff --git a/cookbook/doctrine/registration_form.rst b/cookbook/doctrine/registration_form.rst index 2bee0c06c05..f537709c3d2 100644 --- a/cookbook/doctrine/registration_form.rst +++ b/cookbook/doctrine/registration_form.rst @@ -271,7 +271,7 @@ And its template: -Next, create the controller which handles the form submission. This performs +Next, create the controller which handles the form submission. This performs the validation and saves the data into the database:: public function createAction() diff --git a/cookbook/logging/monolog_email.rst b/cookbook/logging/monolog_email.rst index b429bc8c588..3dc89f4e254 100644 --- a/cookbook/logging/monolog_email.rst +++ b/cookbook/logging/monolog_email.rst @@ -88,7 +88,7 @@ it is broken down. The ``mail`` handler is a ``fingers_crossed`` handler which means that it is only triggered when the action level, in this case ``critical`` is reached. -It then logs everything including messages below the action level. The +It then logs everything including messages below the action level. The ``critical`` level is only triggered for 5xx HTTP code errors. The ``handler`` setting means that the output is then passed onto the ``buffered`` handler. diff --git a/cookbook/routing/service_container_parameters.rst b/cookbook/routing/service_container_parameters.rst index 29edf772c1c..7d260b7401d 100644 --- a/cookbook/routing/service_container_parameters.rst +++ b/cookbook/routing/service_container_parameters.rst @@ -117,7 +117,7 @@ path): .. note:: Just like in normal service container configuration files, if you actually - need a ``%`` in your route, you can escape the percent sign by doubling + need a ``%`` in your route, you can escape the percent sign by doubling it, e.g. ``/score-50%%``, which would resolve to ``/score-50%``. However, as the ``%`` characters included in any URL are automatically encoded, diff --git a/cookbook/security/custom_authentication_provider.rst b/cookbook/security/custom_authentication_provider.rst index dcce5113e93..710fd08bfd7 100644 --- a/cookbook/security/custom_authentication_provider.rst +++ b/cookbook/security/custom_authentication_provider.rst @@ -494,7 +494,7 @@ You are finished! You can now define parts of your app as under WSSE protection. ), )); -Congratulations! You have written your very own custom security authentication +Congratulations! You have written your very own custom security authentication provider! A Little Extra diff --git a/cookbook/security/entity_provider.rst b/cookbook/security/entity_provider.rst index e971a84e443..3c6adebc57f 100644 --- a/cookbook/security/entity_provider.rst +++ b/cookbook/security/entity_provider.rst @@ -240,7 +240,7 @@ layer is a piece of cake. Everything resides in the configuration of the :doc:`SecurityBundle ` stored in the ``app/config/security.yml`` file. -Below is an example of configuration where the user will enter their +Below is an example of configuration where the user will enter their username and password via HTTP basic authentication. That information will then be checked against your User entity records in the database: @@ -379,7 +379,7 @@ For this example, the first three methods will return ``true`` whereas the use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Security\Core\User\AdvancedUserInterface; - class User implements AdvancedUserInterface, \Serializable + class User implements AdvancedUserInterface, \Serializable { // ... @@ -407,7 +407,7 @@ For this example, the first three methods will return ``true`` whereas the Now, if you try to authenticate as a user who's ``is_active`` database field is set to 0, you won't be allowed. -The next session will focus on how to write a custom entity provider +The next session will focus on how to write a custom entity provider to authenticate a user with their username or email address. Authenticating Someone with a Custom Entity Provider diff --git a/cookbook/service_container/event_listener.rst b/cookbook/service_container/event_listener.rst index 149c6184bc8..d0e7ae08831 100644 --- a/cookbook/service_container/event_listener.rst +++ b/cookbook/service_container/event_listener.rst @@ -8,7 +8,7 @@ Symfony has various events and hooks that can be used to trigger custom behavior in your application. Those events are thrown by the HttpKernel component and can be viewed in the :class:`Symfony\\Component\\HttpKernel\\KernelEvents` class. -To hook into an event and add your own custom logic, you have to create +To hook into an event and add your own custom logic, you have to create a service that will act as an event listener on that event. In this entry, you will create a service that will act as an Exception Listener, allowing you to modify how exceptions are shown by your application. The ``KernelEvents::EXCEPTION`` diff --git a/cookbook/session/sessions_directory.rst b/cookbook/session/sessions_directory.rst index 98353e75066..6ad7de0138d 100644 --- a/cookbook/session/sessions_directory.rst +++ b/cookbook/session/sessions_directory.rst @@ -20,7 +20,7 @@ that your current sessions aren't lost when you clear Symfony's cache. about storing sessions in the :doc:`database `. To change the directory in which Symfony saves session data, you only need -change the framework configuration. In this example, you will change the +change the framework configuration. In this example, you will change the session directory to ``app/sessions``: .. configuration-block:: diff --git a/cookbook/validation/custom_constraint.rst b/cookbook/validation/custom_constraint.rst index 9d76e0d3f42..ce4820ab36e 100644 --- a/cookbook/validation/custom_constraint.rst +++ b/cookbook/validation/custom_constraint.rst @@ -197,7 +197,7 @@ validator:: } As mentioned above, Symfony2 will automatically look for a class named after -the constraint, with ``Validator`` appended. If your constraint validator +the constraint, with ``Validator`` appended. If your constraint validator is defined as a service, it's important that you override the ``validatedBy()`` method to return the alias used when defining your service, otherwise Symfony2 won't use the constraint validator service, and will diff --git a/cookbook/web_services/php_soap_extension.rst b/cookbook/web_services/php_soap_extension.rst index d6668fc3c36..507906303d9 100644 --- a/cookbook/web_services/php_soap_extension.rst +++ b/cookbook/web_services/php_soap_extension.rst @@ -113,7 +113,7 @@ methods control `output buffering`_ which allows you to "trap" the echoed output of ``$server->handle()``. This is necessary because Symfony expects your controller to return a ``Response`` object with the output as its "content". You must also remember to set the "Content-Type" header to "text/xml", as -this is what the client will expect. So, you use ``ob_start()`` to start +this is what the client will expect. So, you use ``ob_start()`` to start buffering the STDOUT and use ``ob_get_clean()`` to dump the echoed output into the content of the Response and clear the output buffer. Finally, you're ready to return the ``Response``. diff --git a/glossary.rst b/glossary.rst index d147c61581e..21755d21e91 100644 --- a/glossary.rst +++ b/glossary.rst @@ -63,7 +63,7 @@ Glossary an application. Instead of creating services directly, the developer *trains* the service container (via configuration) on how to create the services. The service container takes care of lazily instantiating - and injecting dependent services. See :doc:`/book/service_container` + and injecting dependent services. See :doc:`/book/service_container` chapter. HTTP Specification @@ -122,7 +122,7 @@ Glossary YAML *YAML* is a recursive acronym for "YAML Ain't a Markup Language". It's a lightweight, humane data serialization language used extensively in - Symfony2's configuration files. See the :doc:`/components/yaml/introduction` + Symfony2's configuration files. See the :doc:`/components/yaml/introduction` chapter. diff --git a/quick_tour/the_architecture.rst b/quick_tour/the_architecture.rst index 90d59f7b92d..9ceb495bc2f 100644 --- a/quick_tour/the_architecture.rst +++ b/quick_tour/the_architecture.rst @@ -336,7 +336,5 @@ need to learn a lot to become a Symfony2 master. Ready to dig into these topics now? Look no further - go to the official :doc:`/book/index` and pick any topic you want. -.. _standards: http://symfony.com/PSR0 -.. _convention: http://pear.php.net/ .. _Composer: http://getcomposer.org .. _`Composer-Autoloader`: http://getcomposer.org/doc/01-basic-usage.md#autoloading diff --git a/reference/configuration/doctrine.rst b/reference/configuration/doctrine.rst index af309f4ac43..adbb0bd6d3c 100644 --- a/reference/configuration/doctrine.rst +++ b/reference/configuration/doctrine.rst @@ -252,7 +252,7 @@ certain classes, but those are for very advanced use-cases only. Caching Drivers ~~~~~~~~~~~~~~~ -For the caching drivers you can specify the values "array", "apc", "memcache", "memcached", +For the caching drivers you can specify the values "array", "apc", "memcache", "memcached", "xcache" or "service". The following example shows an overview of the caching configurations: diff --git a/reference/configuration/monolog.rst b/reference/configuration/monolog.rst index 3959f94b02e..d48f1465d49 100644 --- a/reference/configuration/monolog.rst +++ b/reference/configuration/monolog.rst @@ -29,7 +29,7 @@ MonologBundle Configuration ("monolog") type: service id: my_handler - # Default options and values for some "my_custom_handler" + # Default options and values for some "my_custom_handler" # Note: many of these options are specific to the "type". # For example, the "service" type doesn't use any options # except id and channels diff --git a/reference/constraints/Count.rst b/reference/constraints/Count.rst index 769e12f5db5..e972772fa08 100644 --- a/reference/constraints/Count.rst +++ b/reference/constraints/Count.rst @@ -71,9 +71,9 @@ you might add the following: - - - + + + @@ -140,5 +140,5 @@ exactMessage **type**: ``string`` **default**: ``This collection should contain exactly {{ limit }} elements.`` -The message that will be shown if min and max values are equal and the underlying collection elements +The message that will be shown if min and max values are equal and the underlying collection elements count is not exactly this value. diff --git a/reference/forms/types/birthday.rst b/reference/forms/types/birthday.rst index ea5c9278719..934c4334a66 100644 --- a/reference/forms/types/birthday.rst +++ b/reference/forms/types/birthday.rst @@ -24,7 +24,7 @@ option defaults to 120 years ago to the current year. +----------------------+-------------------------------------------------------------------------------+ | Inherited Options | - `widget`_ | | | - `input`_ | -| | - `empty_value`_ | +| | - `empty_value`_ | | | - `months`_ | | | - `days`_ | | | - `format`_ | @@ -50,7 +50,7 @@ years **type**: ``array`` **default**: 120 years ago to the current year -List of years available to the year field type. This option is only +List of years available to the year field type. This option is only relevant when the ``widget`` option is set to ``choice``. Inherited options diff --git a/reference/forms/types/collection.rst b/reference/forms/types/collection.rst index 018e3f50445..6e69966d6fd 100644 --- a/reference/forms/types/collection.rst +++ b/reference/forms/types/collection.rst @@ -34,9 +34,9 @@ forms, which is useful when creating forms that expose one-to-many relationships .. note:: - If you are working with a collection of Doctrine entities, pay special + If you are working with a collection of Doctrine entities, pay special attention to the `allow_add`_, `allow_delete`_ and `by_reference`_ options. - You can also see a complete example in the cookbook article + You can also see a complete example in the cookbook article :doc:`/cookbook/form/form_collections`. Basic Usage diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index 29b73c2b4af..7018ad8f20d 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -117,7 +117,7 @@ group_by **type**: ``string`` -This is a property path (e.g. ``author.name``) used to organize the +This is a property path (e.g. ``author.name``) used to organize the available choices in groups. It only works when rendered as a select tag and does so by adding optgroup tags around options. Choices that do not return a value for this property path are rendered directly under the diff --git a/reference/forms/types/integer.rst b/reference/forms/types/integer.rst index b11d906e4a4..a669a9f92a6 100644 --- a/reference/forms/types/integer.rst +++ b/reference/forms/types/integer.rst @@ -54,7 +54,7 @@ on the :class:`Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\Integ * ``IntegerToLocalizedStringTransformer::ROUND_FLOOR`` Rounding mode to round towards negative infinity. -* ``IntegerToLocalizedStringTransformer::ROUND_UP`` Rounding mode to round +* ``IntegerToLocalizedStringTransformer::ROUND_UP`` Rounding mode to round away from zero. * ``IntegerToLocalizedStringTransformer::ROUND_CEILING`` Rounding mode diff --git a/reference/forms/types/number.rst b/reference/forms/types/number.rst index 29f793cd866..ca2f5622df1 100644 --- a/reference/forms/types/number.rst +++ b/reference/forms/types/number.rst @@ -50,7 +50,7 @@ option is a constant on the :class:`Symfony\\Component\\Form\\Extension\\Core\\D * ``IntegerToLocalizedStringTransformer::ROUND_FLOOR`` Rounding mode to round towards negative infinity. -* ``IntegerToLocalizedStringTransformer::ROUND_UP`` Rounding mode to round +* ``IntegerToLocalizedStringTransformer::ROUND_UP`` Rounding mode to round away from zero. * ``IntegerToLocalizedStringTransformer::ROUND_CEILING`` Rounding mode diff --git a/reference/forms/types/options/data.rst.inc b/reference/forms/types/options/data.rst.inc index d04ec4e76d7..8b4b32c44be 100644 --- a/reference/forms/types/options/data.rst.inc +++ b/reference/forms/types/options/data.rst.inc @@ -3,7 +3,7 @@ data **type**: mixed **default**: Defaults to field of the underlying object (if there is one) -When you create a form, each field initially displays the value of the +When you create a form, each field initially displays the value of the corresponding property of the form's domain object (if an object is bound to the form). If you want to override the initial value for the form or just an individual field, you can set it in the data option:: diff --git a/reference/forms/types/options/days.rst.inc b/reference/forms/types/options/days.rst.inc index 75fb46f2086..a8034510665 100644 --- a/reference/forms/types/options/days.rst.inc +++ b/reference/forms/types/options/days.rst.inc @@ -3,7 +3,7 @@ days **type**: ``array`` **default**: 1 to 31 -List of days available to the day field type. This option is only relevant +List of days available to the day field type. This option is only relevant when the ``widget`` option is set to ``choice``:: 'days' => range(1,31) diff --git a/reference/forms/types/options/disabled.rst.inc b/reference/forms/types/options/disabled.rst.inc index df3b93a6357..3da476cc111 100644 --- a/reference/forms/types/options/disabled.rst.inc +++ b/reference/forms/types/options/disabled.rst.inc @@ -3,9 +3,9 @@ disabled .. versionadded:: 2.1 The ``disabled`` option is new in version 2.1 - + **type**: ``boolean`` **default**: ``false`` -If you don't want a user to modify the value of a field, you can set +If you don't want a user to modify the value of a field, you can set the disabled option to true. Any submitted value will be ignored. diff --git a/reference/forms/types/options/error_mapping.rst.inc b/reference/forms/types/options/error_mapping.rst.inc index e6b55fb0ff5..ba67e1d5cdb 100644 --- a/reference/forms/types/options/error_mapping.rst.inc +++ b/reference/forms/types/options/error_mapping.rst.inc @@ -9,7 +9,7 @@ error_mapping This option allows you to modify the target of a validation error. Imagine you have a custom method named ``matchingCityAndZipCode`` that validates -whether the city and zip code match. Unfortunately, there is no "matchingCityAndZipCode" +whether the city and zip code match. Unfortunately, there is no "matchingCityAndZipCode" field in your form, so all that Symfony can do is display the error on top of the form. diff --git a/reference/forms/types/options/label.rst.inc b/reference/forms/types/options/label.rst.inc index c6c56e45ebf..0cc7646ce02 100644 --- a/reference/forms/types/options/label.rst.inc +++ b/reference/forms/types/options/label.rst.inc @@ -3,9 +3,9 @@ label **type**: ``string`` **default**: The label is "guessed" from the field name -Sets the label that will be used when rendering the field. Setting to false +Sets the label that will be used when rendering the field. Setting to false will suppress the label. The label can also be directly set inside the template: - + .. code-block:: jinja - {{ form_label(form.name, 'Your name') }} \ No newline at end of file + {{ form_label(form.name, 'Your name') }} diff --git a/reference/forms/types/options/minutes.rst.inc b/reference/forms/types/options/minutes.rst.inc index 2104af875f8..e9e552ca047 100644 --- a/reference/forms/types/options/minutes.rst.inc +++ b/reference/forms/types/options/minutes.rst.inc @@ -3,5 +3,5 @@ minutes **type**: ``array`` **default**: 0 to 59 -List of minutes available to the minutes field type. This option is only -relevant when the ``widget`` option is set to ``choice``. \ No newline at end of file +List of minutes available to the minutes field type. This option is only +relevant when the ``widget`` option is set to ``choice``. diff --git a/reference/forms/types/options/property_path.rst.inc b/reference/forms/types/options/property_path.rst.inc index f28171fb265..797ea2a5784 100644 --- a/reference/forms/types/options/property_path.rst.inc +++ b/reference/forms/types/options/property_path.rst.inc @@ -6,11 +6,11 @@ property_path Fields display a property value of the form's domain object by default. When the form is submitted, the submitted value is written back into the object. -If you want to override the property that a field reads from and writes to, +If you want to override the property that a field reads from and writes to, you can set the ``property_path`` option. Its default value is the field's name. -If you wish the field to be ignored when reading or writing to the object +If you wish the field to be ignored when reading or writing to the object you can set the ``property_path`` option to ``false``, but using ``property_path`` for this purpose is deprecated, you should use the ``mapped`` option. diff --git a/reference/forms/types/options/years.rst.inc b/reference/forms/types/options/years.rst.inc index 7b4f30f2623..8a6e73a83a4 100644 --- a/reference/forms/types/options/years.rst.inc +++ b/reference/forms/types/options/years.rst.inc @@ -3,5 +3,5 @@ years **type**: ``array`` **default**: five years before to five years after the current year -List of years available to the year field type. This option is only relevant +List of years available to the year field type. This option is only relevant when the ``widget`` option is set to ``choice``. diff --git a/reference/forms/types/textarea.rst b/reference/forms/types/textarea.rst index 0b64c9205b5..7654be7c165 100644 --- a/reference/forms/types/textarea.rst +++ b/reference/forms/types/textarea.rst @@ -4,7 +4,7 @@ textarea Field Type =================== -Renders a ``textarea`` HTML element. +Renders a ``textarea`` HTML element. +-------------+------------------------------------------------------------------------+ | Rendered as | ``textarea`` tag | diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index cea66f56066..7fd3305f594 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -178,8 +178,8 @@ Those bundles can have other Twig extensions: * **Twig Extensions** includes some interesting extensions that do not belong to the Twig core. You can read more in `the official Twig Extensions documentation`_; -* **Assetic** adds the ``{% stylesheets %}``, ``{% javascripts %}`` and - ``{% image %}`` tags. You can read more about them in +* **Assetic** adds the ``{% stylesheets %}``, ``{% javascripts %}`` and + ``{% image %}`` tags. You can read more about them in :doc:`the Assetic Documentation `. .. _`the official Twig Extensions documentation`: http://twig.sensiolabs.org/doc/extensions/index.html