From 91805f1212ce1d0bf244b65fc4e0d8cd23adfe89 Mon Sep 17 00:00:00 2001 From: WouterJ Date: Tue, 12 Jul 2016 17:35:51 +0200 Subject: [PATCH] Fix all references --- assetic/asset_management.rst | 4 +- assetic/yuicompressor.rst | 2 +- best_practices/configuration.rst | 6 +- best_practices/controllers.rst | 2 +- best_practices/creating-the-project.rst | 8 +-- best_practices/forms.rst | 2 +- best_practices/security.rst | 19 +++---- best_practices/web-assets.rst | 6 +- bundles.rst | 4 +- bundles/best_practices.rst | 8 +-- bundles/configuration.rst | 8 +-- bundles/extension.rst | 2 +- bundles/installation.rst | 2 +- bundles/override.rst | 8 +-- cache/varnish.rst | 4 +- components/asset.rst | 2 +- components/browser_kit.rst | 2 +- components/class_loader.rst | 2 +- components/console.rst | 2 +- components/console/logger.rst | 2 +- components/console/usage.rst | 2 +- components/debug.rst | 2 +- components/dependency_injection.rst | 6 +- .../dependency_injection/compilation.rst | 10 ++-- .../synthetic_services.rst | 2 +- components/dependency_injection/tags.rst | 2 +- components/event_dispatcher.rst | 6 +- .../container_aware_dispatcher.rst | 2 +- components/form.rst | 14 ++--- components/form/form_events.rst | 2 +- .../http_foundation/trusting_proxies.rst | 2 +- components/http_kernel.rst | 6 +- components/intl.rst | 2 +- components/map.rst.inc | 1 - components/options_resolver.rst | 1 - components/security/authentication.rst | 2 +- components/translation.rst | 2 +- configuration/configuration.rst | 4 +- configuration/configuration_organization.rst | 6 +- configuration/environments.rst | 8 +-- configuration/external_parameters.rst | 2 +- .../front_controllers_and_kernel.rst | 12 ++-- configuration/web_server_configuration.rst | 2 +- console/command_in_controller.rst | 4 +- console/console_command.rst | 4 +- console/logging.rst | 2 +- contributing/code/tests.rst | 2 +- contributing/documentation/format.rst | 10 ++-- controller.rst | 22 ++++---- controller/error_pages.rst | 5 +- controller/forwarding.rst | 2 +- controller/upload_file.rst | 4 +- create_framework/http_foundation.rst | 2 +- .../http_kernel_controller_resolver.rst | 2 +- .../http_kernel_httpkernelinterface.rst | 4 +- create_framework/introduction.rst | 2 +- create_framework/routing.rst | 2 +- deployment/azure-website.rst | 2 +- deployment/tools.rst | 6 +- doctrine.rst | 16 +++--- doctrine/common_extensions.rst | 2 +- doctrine/console.rst | 2 +- doctrine/dbal.rst | 2 +- doctrine/event_listeners_subscribers.rst | 2 +- doctrine/registration_form.rst | 6 +- email/cloud.rst | 2 +- email/email.rst | 2 +- email/testing.rst | 4 +- event_dispatcher/before_after_filters.rst | 4 +- event_dispatcher/event_listener.rst | 2 +- expressions/expressions.rst | 2 +- form/create_form_type_extension.rst | 4 +- form/data_transformers.rst | 2 +- form/dynamic_form_modification.rst | 4 +- form/form_customization.rst | 4 +- form/unit_testing.rst | 2 +- form/use_virtuals_forms.rst | 2 +- forms.rst | 44 +++++++-------- http_cache.rst | 7 ++- http_fundamentals.rst | 6 +- includes/_rewrite_rule_tip.rst.inc | 2 +- index.rst | 14 +---- install/unstable_versions.rst | 4 +- installation.rst | 4 +- introduction/from_flat_php_to_symfony2.rst | 28 +++++----- introduction/symfony1.rst | 2 +- logging/channels_handlers.rst | 2 +- page_creation.rst | 32 +++++------ profiler/data_collector.rst | 4 +- profiler/storage.rst | 2 +- quick_tour/the_architecture.rst | 4 +- quick_tour/the_big_picture.rst | 4 +- quick_tour/the_view.rst | 2 +- reference/configuration/debug.rst | 2 +- reference/configuration/framework.rst | 22 ++++---- reference/configuration/security.rst | 2 +- reference/configuration/swiftmailer.rst | 4 +- reference/configuration/twig.rst | 2 +- reference/constraints/Callback.rst | 2 +- reference/constraints/_payload-option.rst.inc | 2 +- reference/dic_tags.rst | 26 ++++----- reference/events.rst | 2 +- reference/forms/types/collection.rst | 2 +- reference/forms/types/entity.rst | 4 +- reference/forms/types/file.rst | 2 +- .../types/options/checkbox_empty_data.rst.inc | 2 +- .../forms/types/options/empty_data.rst.inc | 2 +- .../forms/types/options/inherit_data.rst.inc | 4 +- .../forms/types/options/label_format.rst.inc | 2 +- reference/forms/types/options/method.rst.inc | 2 +- reference/twig_reference.rst | 4 +- request/load_balancer_reverse_proxy.rst | 2 +- routing.rst | 28 +++++----- routing/external_resources.rst | 2 +- routing/method_parameters.rst | 2 +- routing/requirements.rst | 4 +- routing/scheme.rst | 2 +- routing/service_container_parameters.rst | 2 +- security.rst | 56 +++++++++---------- security/access_control.rst | 2 +- security/acl.rst | 2 +- security/api_key_authentication.rst | 8 +-- security/custom_authentication_provider.rst | 6 +- security/custom_password_authenticator.rst | 2 +- security/entity_provider.rst | 6 +- security/force_https.rst | 2 +- security/form_login.rst | 4 +- security/form_login_setup.rst | 6 +- security/host_restriction.rst | 2 +- security/impersonating_user.rst | 4 +- security/pre_authenticated.rst | 6 +- security/remember_me.rst | 2 +- security/securing_services.rst | 2 +- security/voters.rst | 2 +- service_container.rst | 14 +++-- service_container/scopes.rst | 2 +- .../service_container/expression_language.rst | 3 +- .../service_container/import.rst | 2 +- session/locale_sticky_session.rst | 2 +- session/proxy_examples.rst | 2 +- session/sessions_directory.rst | 4 +- templating.rst | 21 +++---- templating/render_without_controller.rst | 2 +- testing.rst | 13 +++-- testing/database.rst | 2 +- testing/profiling.rst | 4 +- testing/simulating_authentication.rst | 4 +- translation.rst | 6 +- upgrade/index.rst | 8 +-- upgrade/major_version.rst | 8 +-- upgrade/minor_version.rst | 4 +- upgrade/patch_version.rst | 2 +- validation.rst | 13 +++-- validation/severity.rst | 2 +- web_server/built_in.rst | 2 +- workflow/new_project_git.rst | 8 +-- workflow/new_project_svn.rst | 10 ++-- 157 files changed, 434 insertions(+), 439 deletions(-) diff --git a/assetic/asset_management.rst b/assetic/asset_management.rst index db06caf0aea..8cb017825ca 100644 --- a/assetic/asset_management.rst +++ b/assetic/asset_management.rst @@ -181,7 +181,7 @@ To include an image you can use the ``image`` tag. You can also use Assetic for image optimization. More information in -:doc:`/cookbook/assetic/jpeg_optimize`. +:doc:`/assetic/jpeg_optimize`. .. tip:: @@ -441,7 +441,7 @@ into your template: A more detailed guide about configuring and using Assetic filters as well as -details of Assetic's debug mode can be found in :doc:`/cookbook/assetic/uglifyjs`. +details of Assetic's debug mode can be found in :doc:`/assetic/uglifyjs`. Controlling the URL Used ------------------------ diff --git a/assetic/yuicompressor.rst b/assetic/yuicompressor.rst index 8602215a0c0..bfa36146e1d 100644 --- a/assetic/yuicompressor.rst +++ b/assetic/yuicompressor.rst @@ -8,7 +8,7 @@ How to Minify JavaScripts and Stylesheets with YUI Compressor The YUI Compressor is `no longer maintained by Yahoo`_. That's why you are **strongly advised to avoid using YUI utilities** unless strictly necessary. - Read :doc:`/cookbook/assetic/uglifyjs` for a modern and up-to-date alternative. + Read :doc:`/assetic/uglifyjs` for a modern and up-to-date alternative. Yahoo! provides an excellent utility for minifying JavaScripts and stylesheets so they travel over the wire faster, the `YUI Compressor`_. Thanks to Assetic, diff --git a/best_practices/configuration.rst b/best_practices/configuration.rst index 76aac62de31..8139c22e60a 100644 --- a/best_practices/configuration.rst +++ b/best_practices/configuration.rst @@ -78,7 +78,7 @@ add an extra layer of configuration that's not needed because you don't need or want these configuration values to change on each server. The configuration options defined in the ``config.yml`` file usually vary from -one :doc:`environment ` to another. That's +one :doc:`environment ` to another. That's why Symfony already includes ``app/config/config_dev.yml`` and ``app/config/config_prod.yml`` files so that you can override specific values for each environment. @@ -160,7 +160,7 @@ Semantic Configuration: Don't Do It Don't define a semantic dependency injection configuration for your bundles. -As explained in :doc:`/cookbook/bundles/extension` article, Symfony bundles +As explained in :doc:`/bundles/extension` article, Symfony bundles have two choices on how to handle configuration: normal service configuration through the ``services.yml`` file and semantic configuration through a special ``*Extension`` class. @@ -176,7 +176,7 @@ Moving Sensitive Options Outside of Symfony Entirely When dealing with sensitive options, like database credentials, we also recommend that you store them outside the Symfony project and make them available through environment variables. Learn how to do it in the following article: -:doc:`/cookbook/configuration/external_parameters` +:doc:`/configuration/external_parameters`. .. _`feature toggles`: https://en.wikipedia.org/wiki/Feature_toggle .. _`constant() function`: http://twig.sensiolabs.org/doc/functions/constant.html diff --git a/best_practices/controllers.rst b/best_practices/controllers.rst index 5c024786621..b30b27a15de 100644 --- a/best_practices/controllers.rst +++ b/best_practices/controllers.rst @@ -208,6 +208,6 @@ Pre and Post Hooks If you need to execute some code before or after the execution of your controllers, you can use the EventDispatcher component to -:doc:`set up before and after filters `. +:doc:`set up before and after filters `. .. _`ParamConverter`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html diff --git a/best_practices/creating-the-project.rst b/best_practices/creating-the-project.rst index 45dcc987220..e290a095500 100644 --- a/best_practices/creating-the-project.rst +++ b/best_practices/creating-the-project.rst @@ -12,7 +12,7 @@ Installer**, which has to be installed before creating your first project. Use the Symfony Installer to create new Symfony-based projects. -Read the :doc:`installation chapter ` of the Symfony Book to +Read the :doc:`installation chapter ` of the Symfony Book to learn how to install and use the Symfony Installer. .. _linux-and-mac-os-x-systems: @@ -119,7 +119,7 @@ Symfony documentation uses the AppBundle name. .. note:: Another reason to create a new bundle is when you're overriding something - in a vendor's bundle (e.g. a controller). See :doc:`/cookbook/bundles/inheritance`. + in a vendor's bundle (e.g. a controller). See :doc:`/bundles/inheritance`. All in all, this is the typical directory structure of a Symfony application that follows these best practices: @@ -154,7 +154,7 @@ Extending the Directory Structure If your project or infrastructure requires some changes to the default directory structure of Symfony, you can -:doc:`override the location of the main directories `: +:doc:`override the location of the main directories `: ``cache/``, ``logs/`` and ``web/``. In addition, Symfony3 will use a slightly different directory structure when @@ -181,4 +181,4 @@ the Symfony directory structure. .. _`Composer`: https://getcomposer.org/ .. _`Phar extension`: http://php.net/manual/en/intro.phar.php .. _`public checksums repository`: https://github.com/sensiolabs/checksums -.. _`these steps`: http://fabien.potencier.org/signing-project-releases.html \ No newline at end of file +.. _`these steps`: http://fabien.potencier.org/signing-project-releases.html diff --git a/best_practices/forms.rst b/best_practices/forms.rst index 968fb078bfc..1f342696234 100644 --- a/best_practices/forms.rst +++ b/best_practices/forms.rst @@ -171,7 +171,7 @@ all of the fields: If you need more control over how your fields are rendered, then you should remove the ``form_widget(form)`` function and render your fields individually. -See the :doc:`/cookbook/form/form_customization` cookbook article for more information +See the :doc:`/form/form_customization` cookbook article for more information on this and how you can control *how* the form renders at a global level using form theming. diff --git a/best_practices/security.rst b/best_practices/security.rst index eb3367da146..3191b3dfc14 100644 --- a/best_practices/security.rst +++ b/best_practices/security.rst @@ -5,9 +5,9 @@ Authentication and Firewalls (i.e. Getting the User's Credentials) ------------------------------------------------------------------ You can configure Symfony to authenticate your users using any method you -want and to load user information from any source. This is a complex topic, -but the :doc:`Security Cookbook Section ` has a -lot of information about this. +want and to load user information from any source. This is a complex topic, but +the :doc:`Security Cookbook Section ` has a lot of information about +this. Regardless of your needs, authentication is configured in ``security.yml``, primarily under the ``firewalls`` key. @@ -127,7 +127,7 @@ Using ``@Security``, this looks like: Using Expressions for Complex Security Restrictions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If your security logic is a little bit more complex, you can use an `expression`_ +If your security logic is a little bit more complex, you can use an :doc:`expression ` inside ``@Security``. In the following example, a user can only access the controller if their email matches the value returned by the ``getAuthorEmail`` method on the ``Post`` object: @@ -254,7 +254,7 @@ Security Voters If your security logic is complex and can't be centralized into a method like ``isAuthor()``, you should leverage custom voters. These are an order -of magnitude easier than :doc:`ACLs ` and will give +of magnitude easier than :doc:`ACLs ` and will give you the flexibility you need in almost all cases. First, create a voter class. The following example shows a voter that implements @@ -358,18 +358,17 @@ The `FOSUserBundle`_, developed by the Symfony community, adds support for a database-backed user system in Symfony. It also handles common tasks like user registration and forgotten password functionality. -Enable the :doc:`Remember Me feature ` to +Enable the :doc:`Remember Me feature ` to allow your users to stay logged in for a long period of time. When providing customer support, sometimes it's necessary to access the application as some *other* user so that you can reproduce the problem. Symfony provides -the ability to :doc:`impersonate users `. +the ability to :doc:`impersonate users `. If your company uses a user login method not supported by Symfony, you can -develop :doc:`your own user provider ` and -:doc:`your own authentication provider `. +develop :doc:`your own user provider ` and +:doc:`your own authentication provider `. .. _`ParamConverter`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/converters.html .. _`@Security annotation`: http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/annotations/security.html -.. _`expression`: http://symfony.com/doc/current/components/expression_language/introduction.html .. _`FOSUserBundle`: https://github.com/FriendsOfSymfony/FOSUserBundle diff --git a/best_practices/web-assets.rst b/best_practices/web-assets.rst index a4160d62e2e..62398ebed93 100644 --- a/best_practices/web-assets.rst +++ b/best_practices/web-assets.rst @@ -49,7 +49,7 @@ tools like GruntJS. Use Assetic to compile, combine and minimize web assets, unless you're comfortable with frontend tools like GruntJS. -:doc:`Assetic ` is an asset manager capable +:doc:`Assetic ` is an asset manager capable of compiling assets developed with a lot of different frontend technologies like LESS, Sass and CoffeeScript. Combining all your assets with Assetic is a matter of wrapping all the assets with a single Twig tag: @@ -87,8 +87,8 @@ Learn More about Assetic ------------------------ Assetic can also minimize CSS and JavaScript assets -:doc:`using UglifyCSS/UglifyJS ` to speed up your -websites. You can even :doc:`compress images ` +:doc:`using UglifyCSS/UglifyJS ` to speed up your +websites. You can even :doc:`compress images ` with Assetic to reduce their size before serving them to the user. Check out the `official Assetic documentation`_ to learn more about all the available features. diff --git a/bundles.rst b/bundles.rst index ff09cc6fc3e..e7c01cb2d66 100644 --- a/bundles.rst +++ b/bundles.rst @@ -16,8 +16,8 @@ in your application and to optimize them the way you want. .. note:: - While you'll learn the basics here, an entire cookbook entry is devoted - to the organization and best practices of :doc:`bundles `. + While you'll learn the basics here, an entire cookbook entry is devoted + to the organization and best practices of :doc:`bundles `. A bundle is simply a structured set of files within a directory that implement a single feature. You might create a BlogBundle, a ForumBundle or diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index 41d48d488e0..22706cc5d44 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -131,7 +131,7 @@ Templates ``Resources/views/`` Yes Unit and Functional Tests ``Tests/`` No =============================== ============================= ================ -[1] See :doc:`/cookbook/doctrine/mapping_model_classes` for how to handle the +[1] See :doc:`/doctrine/mapping_model_classes` for how to handle the mapping with a compiler pass. Classes @@ -362,7 +362,7 @@ Retrieve the configuration parameters in your code from the container:: $container->getParameter('acme_blog.author.email'); Even if this mechanism is simple enough, you should consider using the more -advanced :doc:`semantic bundle configuration `. +advanced :doc:`semantic bundle configuration `. Versioning ---------- @@ -381,7 +381,7 @@ be :ref:`defined as private `. .. seealso:: You can learn much more about service loading in bundles reading this article: - :doc:`How to Load Service Configuration inside a Bundle `. + :doc:`How to Load Service Configuration inside a Bundle `. Composer Metadata ----------------- @@ -466,7 +466,7 @@ API is being used. The following code, would work for *all* users:: Learn more from the Cookbook ---------------------------- -* :doc:`/cookbook/bundles/extension` +* :doc:`/bundles/extension` .. _`PSR-0`: http://www.php-fig.org/psr/psr-0/ .. _`PSR-4`: http://www.php-fig.org/psr/psr-4/ diff --git a/bundles/configuration.rst b/bundles/configuration.rst index 37d4bfe4ce9..02e141a50e5 100644 --- a/bundles/configuration.rst +++ b/bundles/configuration.rst @@ -104,7 +104,7 @@ bundle configuration would look like: .. seealso:: - Read more about the extension in :doc:`/cookbook/bundles/extension`. + Read more about the extension in :doc:`/bundles/extension`. .. tip:: @@ -118,14 +118,14 @@ bundle configuration would look like: .. seealso:: For parameter handling within a dependency injection container see - :doc:`/cookbook/configuration/using_parameters_in_dic`. + :doc:`/configuration/using_parameters_in_dic`. Processing the ``$configs`` Array ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ First things first, you have to create an extension class as explained in -:doc:`extension`. +:doc:`/bundles/extension`. Whenever a user includes the ``acme_social`` key (which is the DI alias) in a configuration file, the configuration under it is added to an array of @@ -285,7 +285,7 @@ to allow one ``Extension`` class to modify the configuration passed to another bundle's ``Extension`` class, as if the end-developer has actually placed that configuration in their ``app/config/config.yml`` file. This can be achieved using a prepend extension. For more details, see -:doc:`/cookbook/bundles/prepend_extension`. +:doc:`/bundles/prepend_extension`. Dump the Configuration ---------------------- diff --git a/bundles/extension.rst b/bundles/extension.rst index 9a48ae39221..811cae3bbdc 100644 --- a/bundles/extension.rst +++ b/bundles/extension.rst @@ -124,7 +124,7 @@ Using Configuration to Change the Services The Extension is also the class that handles the configuration for that particular bundle (e.g. the configuration in ``app/config/config.yml``). To -read more about it, see the ":doc:`/cookbook/bundles/configuration`" article. +read more about it, see the ":doc:`/bundles/configuration`" article. Adding Classes to Compile ------------------------- diff --git a/bundles/installation.rst b/bundles/installation.rst index 013ed4e4305..80dfafc008e 100644 --- a/bundles/installation.rst +++ b/bundles/installation.rst @@ -72,7 +72,7 @@ The only thing you need to do now is register the bundle in ``AppKernel``:: } In a few rare cases, you may want a bundle to be *only* enabled in the development -:doc:`environment `. For example, +:doc:`environment `. For example, the DoctrineFixturesBundle helps to load dummy data - something you probably only want to do while developing. To only load this bundle in the ``dev`` and ``test`` environments, register the bundle in this way:: diff --git a/bundles/override.rst b/bundles/override.rst index db60e778bba..c24f73eaab2 100644 --- a/bundles/override.rst +++ b/bundles/override.rst @@ -13,7 +13,7 @@ Templates For information on overriding templates, see * :ref:`overriding-bundle-templates`. -* :doc:`/cookbook/bundles/inheritance` +* :doc:`/bundles/inheritance` Routing ------- @@ -31,7 +31,7 @@ Controllers Assuming the third-party bundle involved uses non-service controllers (which is almost always the case), you can easily override controllers via bundle -inheritance. For more information, see :doc:`/cookbook/bundles/inheritance`. +inheritance. For more information, see :doc:`/bundles/inheritance`. If the controller is a service, see the next section on how to override it. Services & Configuration @@ -89,7 +89,7 @@ something beyond just the class name, you should use a compiler pass:: In this example you fetch the service definition of the original service, and set its class name to your own class. -See :doc:`/cookbook/service_container/compiler_passes` for information on how to use +See :doc:`/service_container/compiler_passes` for information on how to use compiler passes. If you want to do something beyond just overriding the class, like adding a method call, you can only use the compiler pass method. @@ -192,7 +192,7 @@ can override the translations from any translation file, as long as it is in sure that the bundle containing *your* translations is loaded after any bundle whose translations you're overriding. This is done in ``AppKernel``. - Translation files are also not aware of :doc:`bundle inheritance `. + Translation files are also not aware of :doc:`bundle inheritance `. If you want to override translations from the parent bundle, be sure that the parent bundle is loaded before the child bundle in the ``AppKernel`` class. diff --git a/cache/varnish.rst b/cache/varnish.rst index a044c43c972..b9ba532c35c 100644 --- a/cache/varnish.rst +++ b/cache/varnish.rst @@ -78,9 +78,9 @@ authentication, have Varnish remove the corresponding header from requests to prevent clients from bypassing the cache. In practice, you will need sessions at least for some parts of the site, e.g. when using forms with :ref:`CSRF Protection `. In this situation, make sure to -:doc:`only start a session when actually needed ` +:doc:`only start a session when actually needed ` and clear the session when it is no longer needed. Alternatively, you can look -into :doc:`/cookbook/cache/form_csrf_caching`. +into :doc:`/cache/form_csrf_caching`. Cookies created in JavaScript and used only in the frontend, e.g. when using Google Analytics, are nonetheless sent to the server. These cookies are not diff --git a/components/asset.rst b/components/asset.rst index 5b1f427c34d..a9b909c0dcc 100644 --- a/components/asset.rst +++ b/components/asset.rst @@ -177,7 +177,7 @@ that path over and over again:: Request Context Aware Assets ............................ -If you are also using the :doc:`HttpFoundation ` +If you are also using the :doc:`HttpFoundation ` component in your project (for instance, in a Symfony application), the ``PathPackage`` class can take into account the context of the current request:: diff --git a/components/browser_kit.rst b/components/browser_kit.rst index ec7d00751ed..25247c00685 100644 --- a/components/browser_kit.rst +++ b/components/browser_kit.rst @@ -48,7 +48,7 @@ This method accepts a request and should return a response:: For a simple implementation of a browser based on the HTTP layer, have a look at `Goutte`_. For an implementation based on ``HttpKernelInterface``, have a look at the :class:`Symfony\\Component\\HttpKernel\\Client` provided by -the :doc:`HttpKernel component `. +the :doc:`HttpKernel component `. Making Requests ~~~~~~~~~~~~~~~ diff --git a/components/class_loader.rst b/components/class_loader.rst index 03cc74fdf09..859cc432a18 100644 --- a/components/class_loader.rst +++ b/components/class_loader.rst @@ -34,7 +34,7 @@ Additionally, the Symfony ClassLoader component ships with a wrapper class which makes it possible :doc:`to cache the results of a class loader `. -When using the :doc:`Debug component `, you +When using the :doc:`Debug component `, you can also use a special :doc:`DebugClassLoader ` that eases debugging by throwing more helpful exceptions when a class could not be found by a class loader. diff --git a/components/console.rst b/components/console.rst index 15967d0218b..d06394aea43 100644 --- a/components/console.rst +++ b/components/console.rst @@ -264,7 +264,7 @@ without actually printing. The MonologBridge provides a :class:`Symfony\\Bridge\\Monolog\\Handler\\ConsoleHandler` class that allows you to display messages on the console. This is cleaner than wrapping your output calls in conditions. For an example use in - the Symfony Framework, see :doc:`/cookbook/logging/monolog_console`. + the Symfony Framework, see :doc:`/logging/monolog_console`. Using Command Arguments ----------------------- diff --git a/components/console/logger.rst b/components/console/logger.rst index 8a713189b05..d5fda564540 100644 --- a/components/console/logger.rst +++ b/components/console/logger.rst @@ -75,7 +75,7 @@ may not be sent to the :class:`Symfony\\Component\\Console\\Output\\OutputInterf instance. By default, the console logger behaves like the -:doc:`Monolog's Console Handler `. +:doc:`Monolog's Console Handler `. The association between the log level and the verbosity can be configured through the second parameter of the :class:`Symfony\\Component\\Console\\ConsoleLogger` constructor:: diff --git a/components/console/usage.rst b/components/console/usage.rst index f238de69eaf..67ac232c1ac 100644 --- a/components/console/usage.rst +++ b/components/console/usage.rst @@ -139,7 +139,7 @@ commands, then you can run ``help`` like this: If you have commands using ``:`` to namespace commands then you just have to type the shortest unambiguous text for each part. If you have created the -``demo:greet`` as shown in :doc:`/components/console/introduction` then you +``demo:greet`` as shown in :doc:`/components/console` then you can run it with: .. code-block:: bash diff --git a/components/debug.rst b/components/debug.rst index 8df091f9c32..3a0faebe15e 100644 --- a/components/debug.rst +++ b/components/debug.rst @@ -69,7 +69,7 @@ and more useful:: .. note:: - If the :doc:`HttpFoundation component ` is + If the :doc:`HttpFoundation component `. +:doc:`the Config component `. Loading an XML config file:: @@ -214,7 +214,7 @@ Loading a YAML config file:: .. note:: If you want to load YAML config files then you will also need to install - :doc:`the Yaml component `. + :doc:`the Yaml component `. If you *do* want to use PHP to create the services then you can move this into a separate config file and load it in a similar way:: diff --git a/components/dependency_injection/compilation.rst b/components/dependency_injection/compilation.rst index d3ccfd13a4c..a986e712dae 100644 --- a/components/dependency_injection/compilation.rst +++ b/components/dependency_injection/compilation.rst @@ -31,7 +31,7 @@ Managing Configuration with Extensions -------------------------------------- As well as loading configuration directly into the container as shown in -:doc:`/components/dependency_injection/introduction`, you can manage it +:doc:`/components/dependency_injection`, you can manage it by registering extensions with the container. The first step in the compilation process is to load configuration from any extension classes registered with the container. Unlike the configuration loaded directly, they are only processed @@ -154,7 +154,7 @@ will look like this:: ) Whilst you can manually manage merging the different files, it is much better -to use :doc:`the Config component ` to +to use :doc:`the Config component ` to merge and validate the config values. Using the configuration processing you could access the config value this way:: @@ -213,7 +213,7 @@ The XML version of the config would then look like this: In the Symfony full-stack Framework there is a base Extension class which implements these methods as well as a shortcut method for processing - the configuration. See :doc:`/cookbook/bundles/extension` for more details. + the configuration. See :doc:`/bundles/extension` for more details. The processed config value can now be added as container parameters as if it were listed in a ``parameters`` section of the config file but with the @@ -302,7 +302,7 @@ method is called by implementing } } -For more details, see :doc:`/cookbook/bundles/prepend_extension`, which +For more details, see :doc:`/bundles/prepend_extension`, which is specific to the Symfony Framework, but contains more details about this feature. @@ -350,7 +350,7 @@ will then be called when the container is compiled:: .. note:: Compiler passes are registered differently if you are using the full-stack - framework, see :doc:`/cookbook/service_container/compiler_passes` for + framework, see :doc:`/service_container/compiler_passes` for more details. Controlling the Pass Ordering diff --git a/components/dependency_injection/synthetic_services.rst b/components/dependency_injection/synthetic_services.rst index a950acbbc4f..3d800203479 100644 --- a/components/dependency_injection/synthetic_services.rst +++ b/components/dependency_injection/synthetic_services.rst @@ -7,7 +7,7 @@ How to Inject Instances into the Container When using the container in your application, you sometimes need to inject an instance instead of configuring the container to create a new instance. -For instance, if you're using the :doc:`HttpKernel ` +For instance, if you're using the :doc:`HttpKernel ` component with the DependencyInjection component, then the ``kernel`` service is injected into the container from within the ``Kernel`` class:: diff --git a/components/dependency_injection/tags.rst b/components/dependency_injection/tags.rst index c92cebaf3f8..53328101db4 100644 --- a/components/dependency_injection/tags.rst +++ b/components/dependency_injection/tags.rst @@ -172,7 +172,7 @@ run when the container is compiled:: .. note:: Compiler passes are registered differently if you are using the full-stack - framework. See :doc:`/cookbook/service_container/compiler_passes` for + framework. See :doc:`/service_container/compiler_passes` for more details. Adding Additional Attributes on Tags diff --git a/components/event_dispatcher.rst b/components/event_dispatcher.rst index 823cd54a8ed..a5c39f853e3 100644 --- a/components/event_dispatcher.rst +++ b/components/event_dispatcher.rst @@ -29,7 +29,7 @@ The Symfony EventDispatcher component implements the `Mediator`_ pattern in a simple and effective way to make all these things possible and to make your projects truly extensible. -Take a simple example from :doc:`the HttpKernel component `. +Take a simple example from :doc:`the HttpKernel component `. Once a ``Response`` object has been created, it may be useful to allow other elements in the system to modify it (e.g. add some cache headers) before it's actually used. To make this possible, the Symfony kernel throws an @@ -192,7 +192,7 @@ determine which instance is passed. When you are using the :class:`Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher` and the - :doc:`DependencyInjection component `, + :doc:`DependencyInjection component `, you can use the :class:`Symfony\\Component\\EventDispatcher\\DependencyInjection\\RegisterListenersPass` to tag services as event listeners:: @@ -510,7 +510,7 @@ with some other dispatchers: * :doc:`/components/event_dispatcher/container_aware_dispatcher` * :doc:`/components/event_dispatcher/immutable_dispatcher` * :doc:`/components/event_dispatcher/traceable_dispatcher` (provided by the - :doc:`HttpKernel component `) + :doc:`HttpKernel component `) .. _Mediator: https://en.wikipedia.org/wiki/Mediator_pattern .. _Closures: http://php.net/manual/en/functions.anonymous.php diff --git a/components/event_dispatcher/container_aware_dispatcher.rst b/components/event_dispatcher/container_aware_dispatcher.rst index 97077786bfd..245a1f44118 100644 --- a/components/event_dispatcher/container_aware_dispatcher.rst +++ b/components/event_dispatcher/container_aware_dispatcher.rst @@ -10,7 +10,7 @@ Introduction The :class:`Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher` is a special ``EventDispatcher`` implementation which is coupled to the service container that is part of -:doc:`the DependencyInjection component `. +:doc:`the DependencyInjection component `. It allows services to be specified as event listeners making the ``EventDispatcher`` extremely powerful. diff --git a/components/form.rst b/components/form.rst index a0b623bc443..b3306b24aed 100644 --- a/components/form.rst +++ b/components/form.rst @@ -53,7 +53,7 @@ support for very important features: The Symfony Form component relies on other libraries to solve these problems. Most of the time you will use Twig and the Symfony -:doc:`HttpFoundation `, +:doc:`HttpFoundation `, Translation and Validator components, but you can replace any of these with a different library of your choice. @@ -106,7 +106,7 @@ object to read data off of the correct PHP superglobals (i.e. ``$_POST`` or .. note:: For more information about the HttpFoundation component or how to - install it, see :doc:`/components/http_foundation/introduction`. + install it, see :doc:`/components/http_foundation`. CSRF Protection ~~~~~~~~~~~~~~~ @@ -221,7 +221,7 @@ To do this, you first need to create a :class:`Symfony\\Bridge\\Twig\\Form\\Twig where you define your :ref:`form themes ` (i.e. resources/files that define form HTML markup). -For general details on rendering forms, see :doc:`/cookbook/form/form_customization`. +For general details on rendering forms, see :doc:`/form/form_customization`. .. note:: @@ -244,7 +244,7 @@ with Symfony's Translation component, or add the 2 Twig filters yourself, via your own Twig extension. To use the built-in integration, be sure that your project has Symfony's -Translation and :doc:`Config ` components +Translation and :doc:`Config ` components installed. If you're using Composer, you could get the latest 2.7 version of each of these by adding the following to your ``composer.json`` file: @@ -285,7 +285,7 @@ to your ``Twig_Environment`` instance:: Depending on how your translations are being loaded, you can now add string keys, such as field labels, and their translations to your translation files. -For more details on translations, see :doc:`/book/translation`. +For more details on translations, see :doc:`/translation`. Validation ~~~~~~~~~~ @@ -308,7 +308,7 @@ install the latest 2.7 version, add this to your ``composer.json``: } If you're not familiar with Symfony's Validator component, read more about -it: :doc:`/book/validation`. The Form component comes with a +it: :doc:`/validation`. The Form component comes with a :class:`Symfony\\Component\\Form\\Extension\\Validator\\ValidatorExtension` class, which automatically applies validation to your data on bind. These errors are then mapped to the correct field and rendered. @@ -363,7 +363,7 @@ and then access it whenever you need to build a form. Exactly how you gain access to your one form factory is up to you. If you're using a service container (like provided with the -:doc:`DependencyInjection component `), +:doc:`DependencyInjection component `), then you should add the form factory to your container and grab it out whenever you need to. If your application uses global or static variables (not usually a good idea), then you can store the object on some static class or do something diff --git a/components/form/form_events.rst b/components/form/form_events.rst index d024cbdc3ea..79f6c2c2c2b 100644 --- a/components/form/form_events.rst +++ b/components/form/form_events.rst @@ -6,7 +6,7 @@ Form Events The Form component provides a structured process to let you customize your forms, by making use of the -:doc:`EventDispatcher component `. +:doc:`EventDispatcher component `. Using form events, you may modify information or fields at different steps of the workflow: from the population of the form to the submission of the data from the request. diff --git a/components/http_foundation/trusting_proxies.rst b/components/http_foundation/trusting_proxies.rst index cdfb38c2a6d..461d6ddac57 100644 --- a/components/http_foundation/trusting_proxies.rst +++ b/components/http_foundation/trusting_proxies.rst @@ -7,7 +7,7 @@ Trusting Proxies .. tip:: If you're using the Symfony Framework, start by reading - :doc:`/cookbook/request/load_balancer_reverse_proxy`. + :doc:`/request/load_balancer_reverse_proxy`. If you find yourself behind some sort of proxy - like a load balancer - then certain header information may be sent to you using special ``X-Forwarded-*`` diff --git a/components/http_kernel.rst b/components/http_kernel.rst index 36a796b89b5..ae909817d71 100644 --- a/components/http_kernel.rst +++ b/components/http_kernel.rst @@ -82,7 +82,7 @@ Framework - works. Initially, using the :class:`Symfony\\Component\\HttpKernel\\HttpKernel` is really simple and involves creating an -:doc:`event dispatcher ` and a +:doc:`event dispatcher ` and a :ref:`controller resolver ` (explained below). To complete your working kernel, you'll add more event listeners to the events discussed below:: @@ -182,7 +182,7 @@ attributes). This class executes the routing layer, which returns an *array* of information about the matched request, including the ``_controller`` and any placeholders that are in the route's pattern (e.g. ``{slug}``). See - :doc:`Routing component `. + :doc:`Routing component `. This array of information is stored in the :class:`Symfony\\Component\\HttpFoundation\\Request` object's ``attributes`` array. Adding the routing information here doesn't @@ -579,7 +579,7 @@ Creating an Event Listener As you've seen, you can create and attach event listeners to any of the events dispatched during the ``HttpKernel::handle`` cycle. Typically a listener is a PHP class with a method that's executed, but it can be anything. For more information -on creating and attaching event listeners, see :doc:`/components/event_dispatcher/introduction`. +on creating and attaching event listeners, see :doc:`/components/event_dispatcher`. The name of each of the "kernel" events is defined as a constant on the :class:`Symfony\\Component\\HttpKernel\\KernelEvents` class. Additionally, each diff --git a/components/intl.rst b/components/intl.rst index 48ea8152ebb..47e4b12b148 100644 --- a/components/intl.rst +++ b/components/intl.rst @@ -50,7 +50,7 @@ replace the intl classes: Composer automatically exposes these classes in the global namespace. If you don't use Composer but the -:doc:`Symfony ClassLoader component `, +:doc:`Symfony ClassLoader component `, you need to expose them manually by adding the following lines to your autoload code:: diff --git a/components/map.rst.inc b/components/map.rst.inc index 609de1dbc8b..04e9081d2bf 100644 --- a/components/map.rst.inc +++ b/components/map.rst.inc @@ -34,7 +34,6 @@ * :doc:`/components/dependency_injection` - * :doc:`/components/dependency_injection/introduction` * :doc:`/components/dependency_injection/types` * :doc:`/components/dependency_injection/parameters` * :doc:`/components/dependency_injection/definitions` diff --git a/components/options_resolver.rst b/components/options_resolver.rst index a782af10795..212b993d6bd 100644 --- a/components/options_resolver.rst +++ b/components/options_resolver.rst @@ -731,6 +731,5 @@ That's it! You now have all the tools and knowledge needed to easily process options in your code. .. _Packagist: https://packagist.org/packages/symfony/options-resolver -.. _Form component: http://symfony.com/doc/current/components/form/introduction.html .. _CHANGELOG: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/OptionsResolver/CHANGELOG.md#260 .. _`read the Symfony 2.5 documentation`: http://symfony.com/doc/2.5/components/options_resolver.html diff --git a/components/security/authentication.rst b/components/security/authentication.rst index 7fde11e169b..7360d898ea1 100644 --- a/components/security/authentication.rst +++ b/components/security/authentication.rst @@ -321,7 +321,7 @@ the ``switch_user`` firewall listener. .. seealso:: For more information on switching users, see - :doc:`/cookbook/security/impersonating_user`. + :doc:`/security/impersonating_user`. .. _`CVE-2013-5750`: https://symfony.com/blog/cve-2013-5750-security-issue-in-fosuserbundle-login-form .. _`BasePasswordEncoder::checkPasswordLength`: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php diff --git a/components/translation.rst b/components/translation.rst index 228597182b6..80bbc3a25f0 100644 --- a/components/translation.rst +++ b/components/translation.rst @@ -90,7 +90,7 @@ Loader too. The default loaders are: * :class:`Symfony\\Component\\Translation\\Loader\\JsonFileLoader` - to load catalogs from JSON files. * :class:`Symfony\\Component\\Translation\\Loader\\YamlFileLoader` - to load - catalogs from Yaml files (requires the :doc:`Yaml component`). + catalogs from Yaml files (requires the :doc:`Yaml component`). All file loaders require the :doc:`Config component `. diff --git a/configuration/configuration.rst b/configuration/configuration.rst index 6562832ef09..b8a3b8f1d93 100644 --- a/configuration/configuration.rst +++ b/configuration/configuration.rst @@ -132,7 +132,7 @@ The extension alias (configuration key) can also be used: .. note:: - See the cookbook article: :doc:`/cookbook/bundles/extension` for + See the cookbook article: :doc:`/bundles/extension` for information on adding configuration for your own bundle. .. index:: @@ -192,7 +192,7 @@ cached files and allow them to rebuild: .. note:: The ``test`` environment is used when running automated tests and cannot - be accessed directly through the browser. See the :doc:`testing chapter ` + be accessed directly through the browser. See the :doc:`testing chapter ` for more details. .. tip:: diff --git a/configuration/configuration_organization.rst b/configuration/configuration_organization.rst index 5473a4c06b1..093141f43e9 100644 --- a/configuration/configuration_organization.rst +++ b/configuration/configuration_organization.rst @@ -5,7 +5,7 @@ How to Organize Configuration Files =================================== The default Symfony Standard Edition defines three -:doc:`execution environments ` called +:doc:`execution environments ` called ``dev``, ``prod`` and ``test``. An environment simply represents a way to execute the same codebase with different configurations. @@ -211,7 +211,7 @@ Advanced Techniques ------------------- Symfony loads configuration files using the -:doc:`Config component `, which provides some +:doc:`Config component `, which provides some advanced features. Mix and Match Configuration Formats @@ -370,4 +370,4 @@ doesn't exist: As you've seen, there are lots of ways to organize your configuration files. You can choose one of these or even create your own custom way of organizing the files. Don't feel limited by the Standard Edition that comes with Symfony. For even -more customization, see ":doc:`/cookbook/configuration/override_dir_structure`". +more customization, see ":doc:`/configuration/override_dir_structure`". diff --git a/configuration/environments.rst b/configuration/environments.rst index 57526912886..641b1e5dada 100644 --- a/configuration/environments.rst +++ b/configuration/environments.rst @@ -140,7 +140,7 @@ either the ``app.php`` (for the ``prod`` environment) or the ``app_dev.php`` The given URLs assume that your web server is configured to use the ``web/`` directory of the application as its root. Read more in - :doc:`Installing Symfony `. + :doc:`Installing Symfony `. If you open up one of these files, you'll quickly see that the environment used by each is explicitly set:: @@ -179,7 +179,7 @@ this code and changing the environment string. and ``false`` for the ``prod`` environment. Internally, the value of the debug mode becomes the ``kernel.debug`` - parameter used inside the :doc:`service container `. + parameter used inside the :doc:`service container `. If you look inside the application configuration file, you'll see the parameter used, for example, to turn logging on or off when using the Doctrine DBAL: @@ -378,9 +378,9 @@ includes the following: .. note:: You can easily change the directory location and name. For more information - read the article :doc:`/cookbook/configuration/override_dir_structure`. + read the article :doc:`/configuration/override_dir_structure`. Going further ------------- -Read the article on :doc:`/cookbook/configuration/external_parameters`. +Read the article on :doc:`/configuration/external_parameters`. diff --git a/configuration/external_parameters.rst b/configuration/external_parameters.rst index 5807cf9dddd..ff8176f84e1 100644 --- a/configuration/external_parameters.rst +++ b/configuration/external_parameters.rst @@ -4,7 +4,7 @@ How to Set external Parameters in the Service Container ======================================================= -In the chapter :doc:`/cookbook/configuration/environments`, you learned how +In the chapter :doc:`/configuration/environments`, you learned how to manage your application configuration. At times, it may benefit your application to store certain credentials outside of your project code. Database configuration is one such example. The flexibility of the Symfony service container allows diff --git a/configuration/front_controllers_and_kernel.rst b/configuration/front_controllers_and_kernel.rst index cab5f41b427..66778a17ec8 100644 --- a/configuration/front_controllers_and_kernel.rst +++ b/configuration/front_controllers_and_kernel.rst @@ -5,7 +5,7 @@ Understanding how the Front Controller, Kernel and Environments Work together ============================================================================= -The section :doc:`/cookbook/configuration/environments` explained the basics +The section :doc:`/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 your application is bootstrapped. To hook into this process, you need to understand @@ -45,8 +45,8 @@ to `decorate`_ the kernel with additional features. Examples include: * Configuring the autoloader or adding additional autoloading mechanisms; * Adding HTTP level caching by wrapping the kernel with an instance of :ref:`AppCache `; -* Enabling (or skipping) the :doc:`ClassCache `; -* Enabling the :doc:`Debug Component `. +* Enabling (or skipping) the :doc:`ClassCache `; +* Enabling the :doc:`Debug Component `. The front controller can be chosen by requesting URLs like: @@ -67,7 +67,7 @@ as the default one. Pretty much every other web server should be able to achieve a behavior similar to that of the RewriteRule described above. Check your server documentation for details or see - :doc:`/cookbook/configuration/web_server_configuration`. + :doc:`/configuration/web_server_configuration`. .. note:: @@ -131,7 +131,7 @@ independently (for example, the admin UI, the front-end UI and database migratio .. note:: There's a lot more the ``AppKernel`` can be used for, for example - :doc:`overriding the default directory structure `. + :doc:`overriding the default directory structure `. But odds are high that you don't need to change things like this on the fly by having several ``AppKernel`` implementations. @@ -144,7 +144,7 @@ This method is responsible for loading the application's configuration from the right *environment*. Environments have been covered extensively -:doc:`in the previous chapter `, +:doc:`in the previous chapter `, and you probably remember that the Symfony Standard Edition comes with three of them - ``dev``, ``prod`` and ``test``. diff --git a/configuration/web_server_configuration.rst b/configuration/web_server_configuration.rst index 7912750e83a..e61e1a92ea9 100644 --- a/configuration/web_server_configuration.rst +++ b/configuration/web_server_configuration.rst @@ -5,7 +5,7 @@ Configuring a Web Server ======================== The preferred way to develop your Symfony application is to use -:doc:`PHP's internal web server `. However, +:doc:`PHP's internal web server `. However, when using an older PHP version or when running the application in the production environment, you'll need to use a fully-featured web server. This article describes several ways to use Symfony with Apache or Nginx. diff --git a/console/command_in_controller.rst b/console/command_in_controller.rst index 1b4081c4e3d..753e1e75511 100644 --- a/console/command_in_controller.rst +++ b/console/command_in_controller.rst @@ -4,7 +4,7 @@ How to Call a Command from a Controller ======================================= -The :doc:`Console component documentation ` +The :doc:`Console component documentation ` covers how to create a console command. This cookbook article covers how to use a console command directly from your controller. @@ -21,7 +21,7 @@ their code. Instead, you can execute the command directly. overhead. Imagine you want to send spooled Swift Mailer messages by -:doc:`using the swiftmailer:spool:send command `. +:doc:`using the swiftmailer:spool:send command `. Run this command from inside your controller via:: // src/AppBundle/Controller/SpoolController.php diff --git a/console/console_command.rst b/console/console_command.rst index 7b4940623f0..761d29d123e 100644 --- a/console/console_command.rst +++ b/console/console_command.rst @@ -4,7 +4,7 @@ How to Create a Console Command =============================== -The Console page of the Components section (:doc:`/components/console/introduction`) covers +The Console page of the Components section (:doc:`/components/console`) covers how to create a console command. This cookbook article covers the differences when creating console commands within the Symfony Framework. @@ -76,7 +76,7 @@ Register Commands in the Service Container ------------------------------------------- Just like controllers, commands can be declared as services. See the -:doc:`dedicated cookbook entry ` +:doc:`dedicated cookbook entry ` for details. Getting Services from the Service Container diff --git a/console/logging.rst b/console/logging.rst index 7f601f45df1..e3ce72ecd45 100644 --- a/console/logging.rst +++ b/console/logging.rst @@ -22,7 +22,7 @@ Manually Logging from a Console Command --------------------------------------- This one is really simple. When you create a console command within the full-stack -framework as described in ":doc:`/cookbook/console/console_command`", your command +framework as described in ":doc:`/console/console_command`", your command extends :class:`Symfony\\Bundle\\FrameworkBundle\\Command\\ContainerAwareCommand`. This means that you can simply access the standard logger service through the container and use it to do the logging:: diff --git a/contributing/code/tests.rst b/contributing/code/tests.rst index 597ef4ef575..38c55210eae 100644 --- a/contributing/code/tests.rst +++ b/contributing/code/tests.rst @@ -18,7 +18,7 @@ Before Running the Tests To run the Symfony test suite, install the external dependencies used during the tests, such as Doctrine, Twig and Monolog. To do so, -:doc:`install Composer ` and execute the following: +:doc:`install Composer ` and execute the following: .. code-block:: bash diff --git a/contributing/documentation/format.rst b/contributing/documentation/format.rst index 1850a06a380..1e224c9f19f 100644 --- a/contributing/documentation/format.rst +++ b/contributing/documentation/format.rst @@ -120,18 +120,18 @@ The page name should not include the file extension (``.rst``). For example: .. code-block:: rst - :doc:`/book/controller` + :doc:`/controller` - :doc:`/components/event_dispatcher/introduction` + :doc:`/components/event_dispatcher` - :doc:`/cookbook/configuration/environments` + :doc:`/configuration/environments` The title of the linked page will be automatically used as the text of the link. If you want to modify that title, use this alternative syntax: .. code-block:: rst - :doc:`Spooling Email ` + :doc:`Spooling Email ` .. note:: @@ -143,7 +143,7 @@ If you want to modify that title, use this alternative syntax: :doc:`controller` - :doc:`event_dispatcher/introduction` + :doc:`event_dispatcher` :doc:`environments` diff --git a/controller.rst b/controller.rst index 81de79769a1..6c886f94973 100644 --- a/controller.rst +++ b/controller.rst @@ -212,7 +212,7 @@ to the controller: return $collection; Now, you can go to ``/hello/ryan`` (e.g. ``http://localhost:8000/hello/ryan`` -if you're using the :doc:`built-in web server `) +if you're using the :doc:`built-in web server `) and Symfony will execute the ``HelloController::indexAction()`` controller and pass in ``ryan`` for the ``$name`` variable. Creating a "page" means simply creating a controller method and an associated route. @@ -361,7 +361,7 @@ Keep the following guidelines in mind while you develop. .. tip:: You can also pass other variables from your route to your controller - arguments. See :doc:`/cookbook/routing/extra_information`. + arguments. See :doc:`/routing/extra_information`. .. index:: @@ -442,7 +442,7 @@ To redirect to an *external* site, use ``redirect()`` and pass it the external U return $this->redirect('http://symfony.com/doc'); } -For more information, see the :doc:`Routing chapter `. +For more information, see the :doc:`Routing chapter `. .. tip:: @@ -487,7 +487,7 @@ To learn how to render different templating formats read the :ref:`template-form section of the Creating and Using Templates chapter. The Symfony templating engine is explained in great detail in the -:doc:`Creating and Using Templates chapter `. +:doc:`Creating and Using Templates chapter `. .. sidebar:: Templating Naming Pattern @@ -530,7 +530,7 @@ console command: .. versionadded:: 2.6 Prior to Symfony 2.6, this command was called ``container:debug``. -For more information, see the :doc:`/book/service_container` chapter. +For more information, see the :doc:`/service_container` chapter. .. tip:: @@ -583,7 +583,7 @@ error page is shown to the developer (i.e. when you're using the ``app_dev.php`` front controller - see :ref:`page-creation-environments`). You'll want to customize the error page your user sees. To do that, see -the ":doc:`/cookbook/controller/error_pages`" cookbook recipe. +the ":doc:`/controller/error_pages`" cookbook recipe. .. index:: single: Controller; The session @@ -808,8 +808,10 @@ In other chapters, you'll see how the controller can be used to persist and fetch objects from a database, process form submissions, handle caching and more. -Learn more from the Cookbook ----------------------------- +Learn more +---------- -* :doc:`/cookbook/controller/error_pages` -* :doc:`/cookbook/controller/service` +.. toctree:: + :glob: + + /controller/* diff --git a/controller/error_pages.rst b/controller/error_pages.rst index 5ae2fdcfbe5..fcf9df52b08 100644 --- a/controller/error_pages.rst +++ b/controller/error_pages.rst @@ -9,7 +9,7 @@ In Symfony applications, all errors are treated as exceptions, no matter if they are just a 404 Not Found error or a fatal error triggered by throwing some exception in your code. -In the :doc:`development environment `, +In the :doc:`development environment `, Symfony catches all the exceptions and displays a special **exception page** with lots of debug information to help you quickly discover the root problem: @@ -344,7 +344,7 @@ before, but also requires a thorough understanding of Symfony internals. Suppose that your code throws specialized exceptions with a particular meaning to your application domain. -:doc:`Writing your own event listener ` +:doc:`Writing your own event listener ` for the ``kernel.exception`` event allows you to have a closer look at the exception and take different actions depending on it. Those actions might include logging the exception, redirecting the user to another page or rendering specialized @@ -373,4 +373,3 @@ time and again, you can have just one (or several) listeners deal with them. .. _`WebfactoryExceptionsBundle`: https://github.com/webfactory/exceptions-bundle .. _`Symfony Standard Edition`: https://github.com/symfony/symfony-standard/ .. _`ExceptionListener`: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php -.. _`development environment`: http://symfony.com/doc/current/cookbook/configuration/environments.html diff --git a/controller/forwarding.rst b/controller/forwarding.rst index a261844f8d3..df8a4c685b1 100644 --- a/controller/forwarding.rst +++ b/controller/forwarding.rst @@ -8,7 +8,7 @@ Though not very common, you can also forward to another controller internally with the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::forward` method. Instead of redirecting the user's browser, this makes an "internal" sub-request and calls the defined controller. The ``forward()`` method returns -the :class:`Symfony\Component\HttpFoundation\Response` object that is returned +the :class:`Symfony\\Component\\HttpFoundation\\Response` object that is returned from *that* controller:: public function indexAction($name) diff --git a/controller/upload_file.rst b/controller/upload_file.rst index a81dabefacd..153c94d587f 100644 --- a/controller/upload_file.rst +++ b/controller/upload_file.rst @@ -84,7 +84,7 @@ Then, add a new ``brochure`` field to the form that manages the ``Product`` enti Now, update the template that renders the form to display the new ``brochure`` field (the exact template code to add depends on the method used by your application -to :doc:`customize form rendering `): +to :doc:`customize form rendering `): .. configuration-block:: @@ -313,7 +313,7 @@ Using a Doctrine Listener ------------------------- If you are using Doctrine to store the Product entity, you can create a -:doc:`Doctrine listener ` to +:doc:`Doctrine listener ` to automatically upload the file when persisting the entity:: // src/AppBundle/EventListener/BrochureUploadListener.php diff --git a/create_framework/http_foundation.rst b/create_framework/http_foundation.rst index 7c100cff3d4..fdaab5cfef8 100644 --- a/create_framework/http_foundation.rst +++ b/create_framework/http_foundation.rst @@ -76,7 +76,7 @@ unit test for the above code:: If our application were just slightly bigger, we would have been able to find even more problems. If you are curious about them, read the - :doc:`/book/from_flat_php_to_symfony2` chapter of the book. + :doc:`/introduction/from_flat_php_to_symfony2` chapter of the book. At this point, if you are not convinced that security and testing are indeed two very good reasons to stop writing code the old way and adopt a framework diff --git a/create_framework/http_kernel_controller_resolver.rst b/create_framework/http_kernel_controller_resolver.rst index b8fd79596db..463cf40d2e8 100644 --- a/create_framework/http_kernel_controller_resolver.rst +++ b/create_framework/http_kernel_controller_resolver.rst @@ -144,7 +144,7 @@ method is not defined, an argument has no matching attribute, ...). wonder why someone would want to create another one (why would there be an interface if not?). Two examples: in Symfony, ``getController()`` is enhanced to support - :doc:`controllers as services `; and in + :doc:`controllers as services `; and in `FrameworkExtraBundle`_, ``getArguments()`` is enhanced to support parameter converters, where request attributes are converted to objects automatically. diff --git a/create_framework/http_kernel_httpkernelinterface.rst b/create_framework/http_kernel_httpkernelinterface.rst index 8f64dd41376..dfc55be1bda 100644 --- a/create_framework/http_kernel_httpkernelinterface.rst +++ b/create_framework/http_kernel_httpkernelinterface.rst @@ -47,7 +47,7 @@ Update your framework so that it implements this interface:: } Even if this change looks trivial, it brings us a lot! Let's talk about one of -the most impressive one: transparent :doc:`HTTP caching ` support. +the most impressive one: transparent :doc:`HTTP caching ` support. The ``HttpCache`` class implements a fully-featured reverse proxy, written in PHP; it implements ``HttpKernelInterface`` and wraps another @@ -203,6 +203,6 @@ With the addition of a single interface, our framework can now benefit from the many features built into the HttpKernel component; HTTP caching being just one of them but an important one as it can make your applications fly! -.. _`HTTP caching`: http://symfony.com/doc/current/book/http_cache.html +.. _`HTTP caching`: http://symfony.com/doc/current/http_cache.html .. _`ESI`: https://en.wikipedia.org/wiki/Edge_Side_Includes .. _`Varnish`: https://www.varnish-cache.org/ diff --git a/create_framework/introduction.rst b/create_framework/introduction.rst index a69a4fc08d1..0edb10de8ae 100644 --- a/create_framework/introduction.rst +++ b/create_framework/introduction.rst @@ -94,7 +94,7 @@ Dependency Management To install the Symfony Components that you need for your framework, you are going to use `Composer`_, a project dependency manager for PHP. If you don't have it -yet, :doc:`download and install Composer ` now. +yet, :doc:`download and install Composer ` now. Our Project ----------- diff --git a/create_framework/routing.rst b/create_framework/routing.rst index 9823cb3b289..7a2b75c6fd2 100644 --- a/create_framework/routing.rst +++ b/create_framework/routing.rst @@ -71,7 +71,7 @@ of default values for route attributes (``array('name' => 'World')``). .. note:: Read the - :doc:`Routing component documentation ` to + :doc:`Routing component documentation ` to learn more about its many features like URL generation, attribute requirements, HTTP method enforcements, loaders for YAML or XML files, dumpers to PHP or Apache rewrite rules for enhanced performance and much diff --git a/deployment/azure-website.rst b/deployment/azure-website.rst index e24ed31409e..ccb5c1d5b97 100644 --- a/deployment/azure-website.rst +++ b/deployment/azure-website.rst @@ -392,7 +392,7 @@ MySQL database. This command builds the tables and indexes for your MySQL database. If your Symfony application is more complex than a basic Symfony Standard Edition, you -may have additional commands to execute for setup (see :doc:`/cookbook/deployment/tools`). +may have additional commands to execute for setup (see :doc:`/deployment/tools`). Make sure that your application is running by browsing the ``app.php`` front controller with your web browser and the following URL: diff --git a/deployment/tools.rst b/deployment/tools.rst index 40379502eaf..27539b3f1c8 100644 --- a/deployment/tools.rst +++ b/deployment/tools.rst @@ -98,9 +98,9 @@ Platform as a Service Providers The Symfony Cookbook includes detailed articles for some of the most well-known Platform as a Service (PaaS) providers: - * :doc:`Microsoft Azure ` - * :doc:`Heroku ` - * :doc:`Platform.sh ` + * :doc:`Microsoft Azure ` + * :doc:`Heroku ` + * :doc:`Platform.sh ` Common Post-Deployment Tasks ---------------------------- diff --git a/doctrine.rst b/doctrine.rst index bae62b71020..f3c349363d2 100644 --- a/doctrine.rst +++ b/doctrine.rst @@ -19,7 +19,7 @@ can be. This chapter is all about the Doctrine ORM, which aims to let you map objects to a relational database (such as *MySQL*, *PostgreSQL* or *Microsoft SQL*). If you prefer to use raw database queries, this is - easy, and explained in the ":doc:`/cookbook/doctrine/dbal`" cookbook entry. + easy, and explained in the ":doc:`/doctrine/dbal`" cookbook entry. You can also persist data to `MongoDB`_ using Doctrine ODM library. For more information, read the "`DoctrineMongoDBBundle`_" @@ -108,7 +108,7 @@ information. By convention, this information is usually configured in an easily keep different versions of the file on each server. You can also easily store database configuration (or any sensitive information) outside of your project, like inside your Apache configuration, for example. For - more information, see :doc:`/cookbook/configuration/external_parameters`. + more information, see :doc:`/configuration/external_parameters`. Now that Doctrine can connect to your database, the following command can automatically generate an empty ``test_project`` database for you: @@ -525,7 +525,7 @@ a controller, this is pretty easy. Add the following method to the method of the controller. This method is a shortcut to get the ``doctrine`` service. You can work with Doctrine anywhere else by injecting that service in the service. See - :doc:`/book/service_container` for more on creating your own services. + :doc:`/service_container` for more on creating your own services. Take a look at the previous example in more detail: @@ -1403,7 +1403,7 @@ Doctrine's `Lifecycle Events documentation`_. If you need to do some heavier lifting - like performing logging or sending an email - you should register an external class as an event listener or subscriber and give it access to whatever resources you need. For - more information, see :doc:`/cookbook/doctrine/event_listeners_subscribers`. + more information, see :doc:`/doctrine/event_listeners_subscribers`. .. _book-doctrine-field-types: @@ -1434,11 +1434,11 @@ lifecycle. Learn more ~~~~~~~~~~ -For more information about Doctrine, see the *Doctrine* section of the -:doc:`cookbook `. Some useful articles might be: +.. toctree:: + :glob: + + doctrine/* -* :doc:`/cookbook/doctrine/common_extensions` -* :doc:`/cookbook/doctrine/console` * `DoctrineFixturesBundle`_ * `DoctrineMongoDBBundle`_ diff --git a/doctrine/common_extensions.rst b/doctrine/common_extensions.rst index 0944fa5e7cb..01efd2c699a 100644 --- a/doctrine/common_extensions.rst +++ b/doctrine/common_extensions.rst @@ -14,7 +14,7 @@ functionality for `Sluggable`_, `Translatable`_, `Timestampable`_, `Loggable`_, The usage for each of these extensions is explained in that repository. However, to install/activate each extension you must register and activate an -:doc:`Event Listener `. +:doc:`Event Listener `. To do this, you have two options: #. Use the `StofDoctrineExtensionsBundle`_, which integrates the above library. diff --git a/doctrine/console.rst b/doctrine/console.rst index 0cfb7befca0..09eade986e3 100644 --- a/doctrine/console.rst +++ b/doctrine/console.rst @@ -34,7 +34,7 @@ Some notable or interesting tasks include: * ``doctrine:mapping:import`` - allows Doctrine to introspect an existing database and create mapping information. For more information, see - :doc:`/cookbook/doctrine/reverse_engineering`. + :doc:`/doctrine/reverse_engineering`. * ``doctrine:mapping:info`` - tells you all of the entities that Doctrine is aware of and whether or not there are any basic errors with the mapping. diff --git a/doctrine/dbal.rst b/doctrine/dbal.rst index 006c99371ef..7e911418d7b 100644 --- a/doctrine/dbal.rst +++ b/doctrine/dbal.rst @@ -9,7 +9,7 @@ How to Use Doctrine DBAL This article is about the Doctrine DBAL. Typically, you'll work with the higher level Doctrine ORM layer, which simply uses the DBAL behind the scenes to actually communicate with the database. To read more about - the Doctrine ORM, see ":doc:`/book/doctrine`". + the Doctrine ORM, see ":doc:`/doctrine`". The `Doctrine`_ Database Abstraction Layer (DBAL) is an abstraction layer that sits on top of `PDO`_ and offers an intuitive and flexible API for communicating diff --git a/doctrine/event_listeners_subscribers.rst b/doctrine/event_listeners_subscribers.rst index 64c8d79ab9a..ea3ae4bd589 100644 --- a/doctrine/event_listeners_subscribers.rst +++ b/doctrine/event_listeners_subscribers.rst @@ -8,7 +8,7 @@ How to Register Event Listeners and Subscribers Doctrine packages a rich event system that fires events when almost anything happens inside the system. For you, this means that you can create arbitrary -:doc:`services ` and tell Doctrine to notify those +:doc:`services ` and tell Doctrine to notify those objects whenever a certain action (e.g. ``prePersist``) happens within Doctrine. This could be useful, for example, to create an independent search index whenever an object in your database is saved. diff --git a/doctrine/registration_form.rst b/doctrine/registration_form.rst index 140f9f40aab..e010b34915d 100644 --- a/doctrine/registration_form.rst +++ b/doctrine/registration_form.rst @@ -16,7 +16,7 @@ example) and then save it. form and other user management functionality. If you don't already have a ``User`` entity and a working login system, -first start with :doc:`/cookbook/security/entity_provider`. +first start with :doc:`/security/entity_provider`. Your ``User`` entity will probably at least have the following fields: @@ -203,7 +203,7 @@ There are just three fields: ``email``, ``username`` and ``plainPassword`` .. tip:: To explore more things about the Form component, read the - :doc:`chapter about forms ` in the book. + :doc:`chapter about forms ` in the book. Handling the Form Submission ---------------------------- @@ -369,7 +369,7 @@ Next, create the template: end($form) ?> -See :doc:`/cookbook/form/form_customization` for more details. +See :doc:`/form/form_customization` for more details. Update your Database Schema --------------------------- diff --git a/email/cloud.rst b/email/cloud.rst index 3b2e67ad32c..640d50de040 100644 --- a/email/cloud.rst +++ b/email/cloud.rst @@ -7,7 +7,7 @@ How to Use the Cloud to Send Emails Requirements for sending emails from a production system differ from your development setup as you don't want to be limited in the number of emails, the sending rate or the sender address. Thus, -:doc:`using Gmail ` or similar services is not an +:doc:`using Gmail ` or similar services is not an option. If setting up and maintaining your own reliable mail server causes you a headache there's a simple solution: Leverage the cloud to send your emails. diff --git a/email/email.rst b/email/email.rst index ca0dbd4ea70..4e62ed72a9a 100644 --- a/email/email.rst +++ b/email/email.rst @@ -81,7 +81,7 @@ The following configuration attributes are available: * ``auth_mode`` (``plain``, ``login``, or ``cram-md5``) * ``spool`` - * ``type`` (how to queue the messages, ``file`` or ``memory`` is supported, see :doc:`/cookbook/email/spool`) + * ``type`` (how to queue the messages, ``file`` or ``memory`` is supported, see :doc:`/email/spool`) * ``path`` (where to store the messages) * ``delivery_address`` (an email address where to send ALL emails) * ``disable_delivery`` (set to true to disable delivery completely) diff --git a/email/testing.rst b/email/testing.rst index 270f7506895..40de382dd02 100644 --- a/email/testing.rst +++ b/email/testing.rst @@ -8,7 +8,7 @@ Sending emails with Symfony is pretty straightforward thanks to the SwiftmailerBundle, which leverages the power of the `Swift Mailer`_ library. To functionally test that an email was sent, and even assert the email subject, -content or any other headers, you can use :doc:`the Symfony Profiler `. +content or any other headers, you can use :doc:`the Symfony Profiler `. Start with an easy controller action that sends an email:: @@ -28,7 +28,7 @@ Start with an easy controller action that sends an email:: .. note:: - Don't forget to enable the profiler as explained in :doc:`/cookbook/testing/profiling`. + Don't forget to enable the profiler as explained in :doc:`/testing/profiling`. In your functional test, use the ``swiftmailer`` collector on the profiler to get information about the messages sent on the previous request:: diff --git a/event_dispatcher/before_after_filters.rst b/event_dispatcher/before_after_filters.rst index 2ae36f8a0de..b282159e638 100644 --- a/event_dispatcher/before_after_filters.rst +++ b/event_dispatcher/before_after_filters.rst @@ -11,7 +11,7 @@ or hooks. In symfony1, this was achieved with the preExecute and postExecute methods. Most major frameworks have similar methods but there is no such thing in Symfony. The good news is that there is a much better way to interfere with the -Request -> Response process using the :doc:`EventDispatcher component `. +Request -> Response process using the :doc:`EventDispatcher component `. Token Validation Example ------------------------ @@ -102,7 +102,7 @@ Creating an Event Listener Next, you'll need to create an event listener, which will hold the logic that you want executed before your controllers. If you're not familiar with -event listeners, you can learn more about them at :doc:`/cookbook/event_dispatcher/event_listener`:: +event listeners, you can learn more about them at :doc:`/event_dispatcher/event_listener`:: // src/AppBundle/EventListener/TokenListener.php namespace AppBundle\EventListener; diff --git a/event_dispatcher/event_listener.rst b/event_dispatcher/event_listener.rst index b48933e3af6..14385677bf6 100644 --- a/event_dispatcher/event_listener.rst +++ b/event_dispatcher/event_listener.rst @@ -132,7 +132,7 @@ they are listening to. In a given subscriber, different methods can listen to the same event. The order in which methods are executed is defined by the ``priority`` parameter of each method (the higher the priority the earlier the method is called). To learn more -about event subscribers, read :doc:`/components/event_dispatcher/introduction`. +about event subscribers, read :doc:`/components/event_dispatcher`. The following example shows an event subscriber that defines several methods which listen to the same ``kernel.exception`` event:: diff --git a/expressions/expressions.rst b/expressions/expressions.rst index 73e43745bb8..dcc722fcae2 100644 --- a/expressions/expressions.rst +++ b/expressions/expressions.rst @@ -4,7 +4,7 @@ How to use Expressions in Security, Routing, Services, and Validation ===================================================================== -In Symfony 2.4, a powerful :doc:`ExpressionLanguage ` +In Symfony 2.4, a powerful :doc:`ExpressionLanguage ` component was added to Symfony. This allows us to add highly customized logic inside configuration. diff --git a/form/create_form_type_extension.rst b/form/create_form_type_extension.rst index 4734f41d215..2d00f47f2f4 100644 --- a/form/create_form_type_extension.rst +++ b/form/create_form_type_extension.rst @@ -87,7 +87,7 @@ to override one of the following methods: * ``finishView()`` For more information on what those methods do, you can refer to the -:doc:`Creating Custom Field Types ` +:doc:`Creating Custom Field Types ` cookbook article. Registering your Form Type Extension as a Service @@ -134,7 +134,7 @@ Adding the extension Business Logic The goal of your extension is to display nice images next to file inputs (when the underlying model contains images). For that purpose, suppose that you use an approach similar to the one described in -:doc:`How to handle File Uploads with Doctrine `: +:doc:`How to handle File Uploads with Doctrine `: you have a Media model with a path property, corresponding to the image path in the database:: diff --git a/form/data_transformers.rst b/form/data_transformers.rst index e8542a85f2d..7ad2a781f6e 100644 --- a/form/data_transformers.rst +++ b/form/data_transformers.rst @@ -317,7 +317,7 @@ Creating a Reusable issue_selector Field In the above example, you applied the transformer to a normal ``text`` field. But if you do this transformation a lot, it might be better to -:doc:`create a custom field type `. +:doc:`create a custom field type `. that does this automatically. First, create the custom field type class:: diff --git a/form/dynamic_form_modification.rst b/form/dynamic_form_modification.rst index bc6022ec772..72d20f67751 100644 --- a/form/dynamic_form_modification.rst +++ b/form/dynamic_form_modification.rst @@ -67,7 +67,7 @@ a bare form class looks like:: .. note:: If this particular section of code isn't already familiar to you, you - probably need to take a step back and first review the :doc:`Forms chapter ` + probably need to take a step back and first review the :doc:`Forms chapter ` before proceeding. Assume for a moment that this form utilizes an imaginary "Product" class @@ -77,7 +77,7 @@ or if an existing product is being edited (e.g. a product fetched from the datab Suppose now, that you don't want the user to be able to change the ``name`` value once the object has been created. To do this, you can rely on Symfony's -:doc:`EventDispatcher component ` +:doc:`EventDispatcher component ` system to analyze the data on the object and modify the form based on the Product object's data. In this entry, you'll learn how to add this level of flexibility to your forms. diff --git a/form/form_customization.rst b/form/form_customization.rst index d9b2b10667e..1c8972997f0 100644 --- a/form/form_customization.rst +++ b/form/form_customization.rst @@ -754,7 +754,7 @@ You can also override the markup for an entire field row using the same method: How to Customize a Collection Prototype --------------------------------------- -When using a :doc:`collection of forms `, +When using a :doc:`collection of forms `, the prototype can be overridden with a completely custom prototype by overriding a block. For example, if your form field is named ``tasks``, you will be able to change the widget for each task as follows: @@ -811,7 +811,7 @@ Customizing Error Output The Form component only handles *how* the validation errors are rendered, and not the actual validation error messages. The error messages themselves are determined by the validation constraints you apply to your objects. - For more information, see the chapter on :doc:`validation `. + For more information, see the chapter on :doc:`validation `. There are many different ways to customize how errors are rendered when a form is submitted with errors. The error messages for a field are rendered diff --git a/form/unit_testing.rst b/form/unit_testing.rst index 6ab99830165..3638a9f7cac 100644 --- a/form/unit_testing.rst +++ b/form/unit_testing.rst @@ -162,7 +162,7 @@ Adding Custom Extensions ------------------------ It often happens that you use some options that are added by -:doc:`form extensions `. One of the +:doc:`form extensions `. One of the cases may be the ``ValidatorExtension`` with its ``invalid_message`` option. The ``TypeTestCase`` only loads the core form extension, which means an :class:`Symfony\\Component\\OptionsResolver\\Exception\\InvalidOptionsException` diff --git a/form/use_virtuals_forms.rst b/form/use_virtuals_forms.rst index 0de48e6ecb7..33b11c5eb2f 100644 --- a/form/use_virtuals_forms.rst +++ b/form/use_virtuals_forms.rst @@ -2,4 +2,4 @@ How to Use the virtual Form Field Option ======================================== As of Symfony 2.3, the ``virtual`` option is renamed to ``inherit_data``. You -can read everything about the new option in ":doc:`/cookbook/form/inherit_data_option`". +can read everything about the new option in ":doc:`/form/inherit_data_option`". diff --git a/forms.rst b/forms.rst index 6a7e472efd6..462272f2973 100644 --- a/forms.rst +++ b/forms.rst @@ -13,7 +13,7 @@ learning the most important features of the form library along the way. The Symfony Form component is a standalone library that can be used outside of Symfony projects. For more information, see the - :doc:`Form component documentation ` on + :doc:`Form component documentation ` on GitHub. .. index:: @@ -457,7 +457,7 @@ corresponding errors printed out with the form. )) ?> Validation is a very powerful feature of Symfony and has its own -:doc:`dedicated chapter `. +:doc:`dedicated chapter `. .. index:: single: Forms; Validation groups @@ -638,7 +638,7 @@ large or whether you tried to submit text in a number field. .. seealso:: To see how to use a service to resolve ``validation_groups`` dynamically - read the :doc:`/cookbook/validation/group_service_resolver` + read the :doc:`/validation/group_service_resolver` chapter in the cookbook. .. index:: @@ -655,7 +655,7 @@ the common form fields and data types you'll encounter: .. include:: /reference/forms/types/map.rst.inc You can also create your own custom field types. This topic is covered in -the ":doc:`/cookbook/form/create_custom_field_type`" article of the cookbook. +the ":doc:`/form/create_custom_field_type`" article of the cookbook. .. index:: single: Forms; Field type options @@ -1044,7 +1044,7 @@ to the ``form()`` or the ``form_start()`` helper: The form will be submitted in a normal POST request, but Symfony's router is capable of detecting the ``_method`` parameter and will interpret it as a PUT, PATCH or DELETE request. Read the cookbook chapter - ":doc:`/cookbook/routing/method_parameters`" for more information. + ":doc:`/routing/method_parameters`" for more information. .. index:: single: Forms; Creating form classes @@ -1174,7 +1174,7 @@ easy to use in your application. .. note:: Services and the service container will be handled - :doc:`later on in this book `. Things will be + :doc:`later on in this book `. Things will be more clear after reading that chapter. .. configuration-block:: @@ -1273,7 +1273,7 @@ you can fetch it from the form:: $task = $form->getData(); -For more information, see the :doc:`Doctrine ORM chapter `. +For more information, see the :doc:`Doctrine ORM chapter `. The key thing to understand is that when the form is submitted, the submitted data is transferred to the underlying object immediately. If you want to @@ -1433,7 +1433,7 @@ You can also embed a collection of forms into one form (imagine a ``Category`` 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 +For more information see the ":doc:`/form/form_collections`" cookbook entry and the :doc:`collection ` field type reference. .. index:: @@ -1532,7 +1532,7 @@ To customize any portion of a form, you just need to override the appropriate fragment. Knowing exactly which block or file to override is the subject of the next section. -For a more extensive discussion, see :doc:`/cookbook/form/form_customization`. +For a more extensive discussion, see :doc:`/form/form_customization`. .. index:: single: Forms; Template fragment naming @@ -1835,7 +1835,7 @@ section. CSRF tokens are meant to be different for every user. This is why you need to be cautious if you try to cache pages with forms including this kind of protection. For more information, see - :doc:`/cookbook/cache/form_csrf_caching`. + :doc:`/cache/form_csrf_caching`. .. index:: single: Forms; With no class @@ -1906,7 +1906,7 @@ The only missing piece is validation. Usually, when you call ``$form->isValid()` the object is validated by reading the constraints that you applied to that class. If your form is mapped to an object (i.e. you're using the ``data_class`` option or passing an object to your form), this is almost always the approach -you want to use. See :doc:`/book/validation` for more details. +you want to use. See :doc:`/validation` for more details. .. _form-option-constraints: @@ -1955,24 +1955,24 @@ HTML form so that the user can modify that data. The second goal of a form is to take the data submitted by the user and to re-apply it to the object. There's still much more to learn about the powerful world of forms, such as -how to handle :doc:`file uploads ` or how to +how to handle :doc:`file uploads ` or how to create a form where a dynamic number of sub-forms can be added (e.g. a todo list where you can keep adding more fields via JavaScript before submitting). See the cookbook for these topics. Also, be sure to lean on the :doc:`field type reference documentation `, which includes examples of how to use each field type and its options. -Learn more from the Cookbook ----------------------------- +Learn more +---------- + +.. toctree:: + :glob: + + /form/* -* :doc:`/cookbook/controller/upload_file` -* :doc:`File Field Reference ` -* :doc:`Creating Custom Field Types ` -* :doc:`/cookbook/form/form_customization` -* :doc:`/cookbook/form/dynamic_form_modification` -* :doc:`/cookbook/form/data_transformers` -* :doc:`/cookbook/security/csrf_in_login_form` -* :doc:`/cookbook/cache/form_csrf_caching` +* :doc:`/controller/upload_file` +* :doc:`/reference/forms/types` +* :doc:`/cache/form_csrf_caching` .. _`Symfony Form component`: https://github.com/symfony/form .. _`DateTime`: http://php.net/manual/en/class.datetime.php diff --git a/http_cache.rst b/http_cache.rst index a433d2a3b6d..076d26c3363 100644 --- a/http_cache.rst +++ b/http_cache.rst @@ -262,7 +262,7 @@ misses. your traffic increases. For more information on using Varnish with Symfony, see the - :doc:`How to use Varnish ` cookbook chapter. + :doc:`How to use Varnish ` cookbook chapter. .. note:: @@ -1245,7 +1245,10 @@ Varnish. Learn more from the Cookbook ---------------------------- -* :doc:`/cookbook/cache/varnish` +.. toctree:: + :glob: + + cache/* .. _`Things Caches Do`: http://2ndscale.com/writings/things-caches-do .. _`Cache Tutorial`: http://www.mnot.net/cache_docs/ diff --git a/http_fundamentals.rst b/http_fundamentals.rst index 0362676bbef..605036b69d0 100644 --- a/http_fundamentals.rst +++ b/http_fundamentals.rst @@ -271,7 +271,7 @@ and more. .. tip:: The ``Request`` and ``Response`` classes are part of a standalone component - called :doc:`symfony/http-foundation ` + called :doc:`symfony/http-foundation ` that you can use in *any* PHP project. This also contains classes for handling sessions, file uploads and more. @@ -321,7 +321,7 @@ handles every request coming into your application. For example: | ``/index.php/blog`` | executes ``index.php`` | +------------------------+------------------------+ -.. include:: includes/_rewrite_rule_tip.rst.inc +.. include:: /includes/_rewrite_rule_tip.rst.inc Now, every request is handled exactly the same way. Instead of individual URLs executing different PHP files, the front controller is *always* executed, @@ -365,7 +365,7 @@ to do: :align: center :alt: Symfony request flow - Incoming requests are interpreted by the :doc:`Routing component ` and + Incoming requests are interpreted by the :doc:`Routing component ` and passed to PHP functions that return ``Response`` objects. This may not make sense yet, but as you keep reading, you'll learn about :ref:`routes ` diff --git a/includes/_rewrite_rule_tip.rst.inc b/includes/_rewrite_rule_tip.rst.inc index 9566b7cadb5..a217c0b9b0b 100644 --- a/includes/_rewrite_rule_tip.rst.inc +++ b/includes/_rewrite_rule_tip.rst.inc @@ -1,6 +1,6 @@ .. tip:: By using rewrite rules in your - :doc:`web server configuration `, + :doc:`web server configuration `, the ``index.php`` won't be needed and you will have beautiful, clean URLs (e.g. ``/show``). diff --git a/index.rst b/index.rst index a3baef06342..7cdb2cac8b8 100644 --- a/index.rst +++ b/index.rst @@ -38,22 +38,12 @@ Book Dive into Symfony with the topical guides: -.. toctree:: - :hidden: - - book/index - -.. include:: /book/map.rst.inc +.. include:: /map.rst.inc Cookbook -------- -.. toctree:: - :hidden: - - cookbook/index - -Read the :doc:`Cookbook `. +Read the :doc:`Cookbook `. Best Practices -------------- diff --git a/install/unstable_versions.rst b/install/unstable_versions.rst index 6d8464c9489..e48868c33db 100644 --- a/install/unstable_versions.rst +++ b/install/unstable_versions.rst @@ -8,7 +8,7 @@ Creating a New Project Based on an Unstable Symfony Version ----------------------------------------------------------- Suppose that Symfony 2.7 version hasn't been released yet and you want to create -a new project to test its features. First, :doc:`install the Composer ` +a new project to test its features. First, :doc:`install the Composer ` package manager. Then, open a command console, enter your project's directory and execute the following command: @@ -56,7 +56,7 @@ If you prefer to test a Symfony beta version, replace the ``"2.7.*@dev"`` constr by ``"2.7.0-beta1"`` to install a specific beta number or ``2.7.*@beta`` to get the most recent beta version. -After upgrading the Symfony version, read the :doc:`Symfony Upgrading Guide ` +After upgrading the Symfony version, read the :doc:`Symfony Upgrading Guide ` to learn how you should proceed to update your application's code in case the new Symfony version has deprecated some of its features. diff --git a/installation.rst b/installation.rst index 3e4001d41da..05d29588509 100644 --- a/installation.rst +++ b/installation.rst @@ -100,7 +100,7 @@ can create Symfony applications with `Composer`_, the dependency manager used by modern PHP applications. If you don't have Composer installed in your computer, start by -:doc:`installing Composer globally `. Then, execute the +:doc:`installing Composer globally `. Then, execute the ``create-project`` command to create a new Symfony application based on its latest stable version: @@ -152,7 +152,7 @@ pressing ``Ctrl+C`` from the terminal or command console. PHP's internal web server is great for developing, but should **not** be used on production. Instead, use Apache or Nginx. - See :doc:`/cookbook/configuration/web_server_configuration`. + See :doc:`/configuration/web_server_configuration`. Checking Symfony Application Configuration and Setup ---------------------------------------------------- diff --git a/introduction/from_flat_php_to_symfony2.rst b/introduction/from_flat_php_to_symfony2.rst index 8d71b52df89..e5316ff6497 100644 --- a/introduction/from_flat_php_to_symfony2.rst +++ b/introduction/from_flat_php_to_symfony2.rst @@ -244,7 +244,7 @@ the ``templates/layout.php``: You now have a setup that will allow you to reuse the layout. Unfortunately, to accomplish this, you're forced to use a few ugly PHP functions (``ob_start()``, ``ob_get_clean()``) in the template. Symfony -uses a :doc:`Templating ` component +uses a :doc:`Templating ` component that allows this to be accomplished cleanly and easily. You'll see it in action shortly. @@ -534,8 +534,8 @@ a simple application. Along the way, you've made a simple routing system and a method using ``ob_start()`` and ``ob_get_clean()`` to render templates. If, for some reason, you needed to continue building this "framework" from scratch, you could at least use Symfony's standalone -:doc:`Routing ` and -:doc:`Templating ` components, which already +:doc:`Routing ` and +:doc:`Templating ` components, which already solve these problems. Instead of re-solving common problems, you can let Symfony take care of @@ -579,7 +579,7 @@ nice way to group related pages. The controller functions are also sometimes cal *actions*. The two controllers (or actions) are still lightweight. Each uses the -:doc:`Doctrine ORM library ` to retrieve objects from the +:doc:`Doctrine ORM library ` to retrieve objects from the database and the Templating component to render a template and return a ``Response`` object. The list ``list.php`` template is now quite a bit simpler: @@ -717,7 +717,7 @@ And rewriting ``layout.html.php`` template in Twig would look like this: Twig is well-supported in Symfony. And while PHP templates will always be supported in Symfony, the many advantages of Twig will continue to -be discussed. For more information, see the :doc:`templating chapter `. +be discussed. For more information, see the :doc:`templating chapter `. Where Symfony Delivers ---------------------- @@ -732,13 +732,13 @@ the blog from flat PHP to Symfony has improved life: * 100% of the code you write is for *your* application. You **don't need to develop or maintain low-level utilities** such as autoloading, - :doc:`routing `, or rendering :doc:`controllers `; + :doc:`routing `, or rendering :doc:`controllers `; * Symfony gives you **access to open source tools** such as `Doctrine`_ and the - :doc:`Templating `, - :doc:`Security `, - :doc:`Form `, `Validator`_ and - :doc:`Translation ` components (to name + :doc:`Templating `, + :doc:`Security `, + :doc:`Form `, `Validator`_ and + :doc:`Translation ` components (to name a few); * The application now enjoys **fully-flexible URLs** thanks to the Routing @@ -747,7 +747,7 @@ the blog from flat PHP to Symfony has improved life: * Symfony's HTTP-centric architecture gives you access to powerful tools such as **HTTP caching** powered by **Symfony's internal HTTP cache** or more powerful tools such as `Varnish`_. This is covered in a later chapter - all about :doc:`caching `. + all about :doc:`caching `. And perhaps best of all, by using Symfony, you now have access to a whole set of **high-quality open source tools developed by the Symfony community**! @@ -756,8 +756,8 @@ A good selection of Symfony community tools can be found on `KnpBundles.com`_. Learn more from the Cookbook ---------------------------- -* :doc:`/cookbook/templating/PHP` -* :doc:`/cookbook/controller/service` +* :doc:`/templating/PHP` +* :doc:`/controller/service` .. _`Model-View-Controller`: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller .. _`Doctrine`: http://www.doctrine-project.org @@ -767,4 +767,4 @@ Learn more from the Cookbook .. _`Validator`: https://github.com/symfony/validator .. _`Varnish`: https://www.varnish-cache.org/ .. _`KnpBundles.com`: http://knpbundles.com/ -.. _`Twig`: http://twig.sensiolabs.org \ No newline at end of file +.. _`Twig`: http://twig.sensiolabs.org diff --git a/introduction/symfony1.rst b/introduction/symfony1.rst index 61e8df489e5..41481ed9009 100644 --- a/introduction/symfony1.rst +++ b/introduction/symfony1.rst @@ -359,7 +359,7 @@ You can now access this from a controller, for example:: In reality, the Symfony2 configuration is much more powerful and is used primarily to configure objects that you can use. For more information, see -the chapter titled ":doc:`/book/service_container`". +the chapter titled ":doc:`/service_container`". .. _`Composer`: https://getcomposer.org .. _`Symfony Standard Edition`: https://github.com/symfony/symfony-standard diff --git a/logging/channels_handlers.rst b/logging/channels_handlers.rst index ffc486cf624..4c6a2c6b8ff 100644 --- a/logging/channels_handlers.rst +++ b/logging/channels_handlers.rst @@ -176,4 +176,4 @@ the automatically registered logger service ``monolog.logger.foo``. Learn more from the Cookbook ---------------------------- -* :doc:`/cookbook/logging/monolog` +* :doc:`/logging/monolog` diff --git a/page_creation.rst b/page_creation.rst index 0f1bb3067d2..edc6d409497 100644 --- a/page_creation.rst +++ b/page_creation.rst @@ -32,7 +32,7 @@ Creating a Page: Route and Controller .. tip:: - Before continuing, make sure you've read the :doc:`Installation ` + Before continuing, make sure you've read the :doc:`Installation ` chapter and can access your new Symfony app in the browser. Suppose you want to create a page - ``/lucky/number`` - that generates a lucky (well, @@ -77,7 +77,7 @@ you run off to play the lottery, check out how this works. The ``@Route`` above ``numberAction()`` is called an *annotation* and it defines the URL pattern. You can also write routes in YAML (or other formats): -read about this in the :doc:`routing ` chapter. Actually, most +read about this in the :doc:`routing ` chapter. Actually, most routing examples in the docs have tabs that show you how each format looks. The method below the annotation - ``numberAction`` - is called the *controller* @@ -253,7 +253,7 @@ The routing system can do a *lot* more, like supporting multiple placeholders (e.g. ``/blog/{category}/{page})``), making placeholders optional and forcing placeholder to match a regular expression (e.g. so that ``{count}`` *must* be a number). Find out about all of this and become a routing expert in the -:doc:`Routing ` chapter. +:doc:`Routing ` chapter. Rendering a Template (with the Service Container) ------------------------------------------------- @@ -281,7 +281,7 @@ Using the ``templating`` Service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This doesn't change anything, but it *does* give you access to Symfony's -:doc:`service container `: an array-like object that +:doc:`service container `: an array-like object that gives you access to *every* useful object in the system. These useful objects are called *services*, and Symfony ships with a service object that can render Twig templates, another that can log messages and many more. @@ -351,7 +351,7 @@ also get a lot of shortcut methods, like } You will learn more about these shortcut methods and how they work in the -:doc:`Controller ` chapter. +:doc:`Controller ` chapter. Create the Template ~~~~~~~~~~~~~~~~~~~ @@ -405,7 +405,7 @@ structure thanks to ``base.html.twig``. This is just the surface of Twig's power. When you're ready to master its syntax, loop over arrays, render other templates and other cool things, read -the :doc:`Templating ` chapter. +the :doc:`Templating ` chapter. Exploring the Project --------------------- @@ -438,7 +438,7 @@ and everything lives inside of it. A bundle is like a "plugin" and you can *your* code lives in a bundle - typically ``AppBundle`` (though there's nothing special about ``AppBundle``). To find out more about bundles and why you might create multiple bundles (hint: sharing code between projects), -see the :doc:`Bundles ` chapter. +see the :doc:`Bundles ` chapter. So what about the other directories in the project? @@ -454,7 +454,7 @@ So what about the other directories in the project? .. seealso:: Symfony is flexible. If you need to, you can easily override the default - directory structure. See :doc:`/cookbook/configuration/override_dir_structure`. + directory structure. See :doc:`/configuration/override_dir_structure`. Application Configuration ------------------------- @@ -545,7 +545,7 @@ use the handy ``app/console`` command: There's a lot more power behind Symfony's configuration system, including environments, imports and parameters. To learn all of it, see the -:doc:`Configuring Symfony (and Environments) ` chapter. +:doc:`/configuration/configuration` chapter. What's Next? ------------ @@ -555,16 +555,16 @@ way of building beautiful, functional, fast and maintainable apps. Ok, time to finish mastering the fundamentals by reading these chapters: -* :doc:`/book/controller` -* :doc:`/book/routing` -* :doc:`/book/templating` +* :doc:`/controller` +* :doc:`/routing` +* :doc:`/templating` -Then, in the :doc:`Symfony Book `, learn about the -:doc:`service container `, -the :doc:`form system `, using :doc:`Doctrine ` +Then, in the :doc:`Symfony Book `, learn about the +:doc:`service container `, +the :doc:`form system `, using :doc:`Doctrine ` (if you need to query a database) and more! -There's also a :doc:`Cookbook ` *packed* with more advanced +There's also a :doc:`Cookbook ` *packed* with more advanced "how to" articles to solve *a lot* of problems. Have fun! diff --git a/profiler/data_collector.rst b/profiler/data_collector.rst index 845aeebe40d..7f139a806df 100644 --- a/profiler/data_collector.rst +++ b/profiler/data_collector.rst @@ -4,7 +4,7 @@ How to Create a custom Data Collector ===================================== -The :doc:`Symfony Profiler ` delegates data collection +The :doc:`Symfony Profiler ` delegates data collection to some special classes called data collectors. Symfony comes bundled with a few of them, but you can easily create your own. @@ -24,7 +24,7 @@ The :method:`Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface::getName` method returns the name of the data collector and must be unique in the application. This value is also used to access the information later on (see -:doc:`/cookbook/testing/profiling` for instance). +:doc:`/testing/profiling` for instance). The :method:`Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface::collect` diff --git a/profiler/storage.rst b/profiler/storage.rst index 37463ae6fee..fa242f1d478 100644 --- a/profiler/storage.rst +++ b/profiler/storage.rst @@ -57,7 +57,7 @@ uses MySQL as the storage for the profiler with a lifetime of one hour: ), )); -The :doc:`HttpKernel component ` currently +The :doc:`HttpKernel component ` currently supports the following profiler storage drivers: * file diff --git a/quick_tour/the_architecture.rst b/quick_tour/the_architecture.rst index a7d4e244685..9498959533d 100644 --- a/quick_tour/the_architecture.rst +++ b/quick_tour/the_architecture.rst @@ -231,7 +231,7 @@ Extending Bundles ................. If you follow these conventions, then you can use -:doc:`bundle inheritance ` to override files, +:doc:`bundle inheritance ` to override files, controllers or templates. For example, you can create a bundle - NewBundle - and specify that it overrides AppBundle. When Symfony loads the ``AppBundle:Default:index`` controller, it will first look for the @@ -307,7 +307,7 @@ around as you see fit. And that's all for the quick tour. From testing to sending emails, you still need to learn a lot to become a Symfony master. Ready to dig into these -topics now? Look no further - go to the official :doc:`/book/index` and +topics now? Look no further - go to the official :doc:`/index` and pick any topic you want. .. _`Composer`: https://getcomposer.org diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index 8786945fe50..7c75f431bb3 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -14,7 +14,7 @@ Installing Symfony ------------------ Before continuing reading this chapter, make sure to have installed both PHP -and Symfony as explained in the :doc:`installation chapter ` +and Symfony as explained in the :doc:`installation chapter ` of the Symfony book. Understanding the Fundamentals @@ -129,7 +129,7 @@ of the ``Default`` controller when the user browses the ``/`` path of the applic In addition to PHP annotations, routes can be configured in YAML, XML or PHP files, as explained in - :doc:`the Routing chapter of the Symfony book `. This + :doc:`the Routing chapter of the Symfony book `. This flexibility is one of the main features of Symfony, a framework that never imposes a particular configuration format on you. diff --git a/quick_tour/the_view.rst b/quick_tour/the_view.rst index e419be70ade..6302d3b17ed 100644 --- a/quick_tour/the_view.rst +++ b/quick_tour/the_view.rst @@ -262,7 +262,7 @@ Symfony provides the ``asset()`` function to deal with them easily: The ``asset()`` function looks for the web assets inside the ``web/`` directory. If you store them in another directory, read -:doc:`this article ` +:doc:`this article ` to learn how to manage web assets. Using the ``asset()`` function, your application is more portable. The reason diff --git a/reference/configuration/debug.rst b/reference/configuration/debug.rst index 1f09def2f4a..0b6c4bf195c 100644 --- a/reference/configuration/debug.rst +++ b/reference/configuration/debug.rst @@ -5,7 +5,7 @@ DebugBundle Configuration ("debug") =================================== The DebugBundle allows greater integration of the -:doc:`VarDumper component ` in the +:doc:`VarDumper component ` in the Symfony full-stack framework and can be configured under the ``debug`` key in your application configuration. When using XML, you must use the ``http://symfony.com/schema/dic/debug`` namespace. diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 2472be2aac1..fb57284d961 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -117,7 +117,7 @@ recommended length is around 32 characters. In practice, Symfony uses this value for generating the :ref:`CSRF tokens `, for encrypting the cookies used in the -:doc:`remember me functionality ` and for +:doc:`remember me functionality ` and for creating signed URIs when using :ref:`ESI (Edge Side Includes) `. This option becomes the service container parameter named ``kernel.secret``, @@ -148,7 +148,7 @@ named ``kernel.http_method_override``. .. seealso:: - For more information, see :doc:`/cookbook/routing/method_parameters`. + For more information, see :doc:`/routing/method_parameters`. .. caution:: @@ -176,7 +176,7 @@ trusted_proxies **type**: ``array`` Configures the IP addresses that should be trusted as proxies. For more -details, see :doc:`/cookbook/request/load_balancer_reverse_proxy`. +details, see :doc:`/request/load_balancer_reverse_proxy`. .. versionadded:: 2.3 CIDR notation support was introduced in Symfony 2.3, so you can whitelist @@ -289,7 +289,7 @@ setting should be present in your ``test`` environment (usually via .. seealso:: - For more information, see :doc:`/book/testing`. + For more information, see :doc:`/testing`. default_locale ~~~~~~~~~~~~~~ @@ -403,7 +403,7 @@ settings is configured. .. seealso:: - For more details, see :doc:`/book/forms`. + For more details, see :doc:`/forms`. csrf_protection ~~~~~~~~~~~~~~~ @@ -582,7 +582,7 @@ The DSN where to store the profiling information. .. seealso:: - See :doc:`/cookbook/profiler/storage` for more information about the + See :doc:`/profiler/storage` for more information about the profiler storage. username @@ -615,7 +615,7 @@ instance, based on the `ip`_ or :ref:`path `. .. seealso:: - See :doc:`/cookbook/profiler/matchers` for more information about using + See :doc:`/profiler/matchers` for more information about using matchers to enable/disable the profiler. ip @@ -724,7 +724,7 @@ installation. .. seealso:: You can see an example of the usage of this in - :doc:`/cookbook/doctrine/pdo_session_storage`. + :doc:`/doctrine/pdo_session_storage`. name .... @@ -812,7 +812,7 @@ save_path This determines the argument to be passed to the save handler. If you choose the default file handler, this is the path where the session files are created. -For more information, see :doc:`/cookbook/session/sessions_directory`. +For more information, see :doc:`/session/sessions_directory`. You can also set this value to the ``save_path`` of your ``php.ini`` by setting the value to ``null``: @@ -1285,7 +1285,7 @@ found. .. seealso:: - For more details, see :doc:`/book/translation`. + For more details, see :doc:`/translation`. .. _reference-framework-translator-logging: @@ -1395,7 +1395,7 @@ API. The ``api`` option is used to switch between the different implementations: The support for the native 2.4 API has been dropped since Symfony 2.7. To capture these logs in the ``prod`` environment, configure a -:doc:`channel handler ` in ``config_prod.yml`` for +:doc:`channel handler ` in ``config_prod.yml`` for the ``translation`` channel and set its ``level`` to ``debug``. annotations diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index fd92dbabe9f..054c78c7928 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -250,7 +250,7 @@ Form Login Configuration When using the ``form_login`` authentication listener beneath a firewall, there are several common options for configuring the "form login" experience. -For even more details, see :doc:`/cookbook/security/form_login`. +For even more details, see :doc:`/security/form_login`. The Login Form and Process ~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/reference/configuration/swiftmailer.rst b/reference/configuration/swiftmailer.rst index f3e99a3b9fa..3a14323f181 100644 --- a/reference/configuration/swiftmailer.rst +++ b/reference/configuration/swiftmailer.rst @@ -45,7 +45,7 @@ transport The exact transport method to use to deliver emails. Valid values are: * smtp -* gmail (see :doc:`/cookbook/email/gmail`) +* gmail (see :doc:`/email/gmail`) * mail * sendmail * null (same as setting `disable_delivery`_ to ``true``) @@ -98,7 +98,7 @@ values are ``plain``, ``login``, ``cram-md5``, or ``null``. spool ~~~~~ -For details on email spooling, see :doc:`/cookbook/email/spool`. +For details on email spooling, see :doc:`/email/spool`. type .... diff --git a/reference/configuration/twig.rst b/reference/configuration/twig.rst index ddfcf7a7c02..15844c0349f 100644 --- a/reference/configuration/twig.rst +++ b/reference/configuration/twig.rst @@ -223,7 +223,7 @@ This is the controller that is activated after an exception is thrown anywhere in your application. The default controller (:class:`Symfony\\Bundle\\TwigBundle\\Controller\\ExceptionController`) is what's responsible for rendering specific templates under different error -conditions (see :doc:`/cookbook/controller/error_pages`). Modifying this +conditions (see :doc:`/controller/error_pages`). Modifying this option is advanced. If you need to customize an error page you should use the previous link. If you need to perform some behavior on an exception, you should add a listener to the ``kernel.exception`` event (see :ref:`dic-tags-kernel-event-listener`). diff --git a/reference/constraints/Callback.rst b/reference/constraints/Callback.rst index 13897ba1673..eea2f4f0b76 100644 --- a/reference/constraints/Callback.rst +++ b/reference/constraints/Callback.rst @@ -246,7 +246,7 @@ You can then use the following configuration to invoke this validator: The Callback constraint does *not* support global callback functions nor is it possible to specify a global function or a service method as callback. To validate using a service, you should - :doc:`create a custom validation constraint ` + :doc:`create a custom validation constraint ` and add that new constraint to your class. When configuring the constraint via PHP, you can also pass a closure to the diff --git a/reference/constraints/_payload-option.rst.inc b/reference/constraints/_payload-option.rst.inc index 30c6d46bbc8..99b9df8d9a1 100644 --- a/reference/constraints/_payload-option.rst.inc +++ b/reference/constraints/_payload-option.rst.inc @@ -11,6 +11,6 @@ The configured payload is not used by the Validator component, but its processin is completely up to you. For example, you may want to use -:doc:`several error levels ` to present failed +:doc:`several error levels ` to present failed constraints differently in the front-end depending on the severity of the error. diff --git a/reference/dic_tags.rst b/reference/dic_tags.rst index 2d847f0a1aa..5a284940f7c 100644 --- a/reference/dic_tags.rst +++ b/reference/dic_tags.rst @@ -187,7 +187,7 @@ Finally, apply the filter: {% endjavascripts %} You can also apply your filter via the ``assetic.filters.my_filter.apply_to`` -config option as it's described here: :doc:`/cookbook/assetic/apply_to_option`. +config option as it's described here: :doc:`/assetic/apply_to_option`. In order to do that, you must define your filter service in a separate xml config file and point to this file's path via the ``assetic.filters.my_filter.resource`` configuration key. @@ -359,7 +359,7 @@ data_collector **Purpose**: Create a class that collects custom data for the profiler For details on creating your own custom data collection, read the cookbook -article: :doc:`/cookbook/profiler/data_collector`. +article: :doc:`/profiler/data_collector`. doctrine.event_listener ----------------------- @@ -367,7 +367,7 @@ doctrine.event_listener **Purpose**: Add a Doctrine event listener For details on creating Doctrine event listeners, read the cookbook article: -:doc:`/cookbook/doctrine/event_listeners_subscribers`. +:doc:`/doctrine/event_listeners_subscribers`. doctrine.event_subscriber ------------------------- @@ -375,7 +375,7 @@ doctrine.event_subscriber **Purpose**: Add a Doctrine event subscriber For details on creating Doctrine event subscribers, read the cookbook article: -:doc:`/cookbook/doctrine/event_listeners_subscribers`. +:doc:`/doctrine/event_listeners_subscribers`. .. _dic-tags-form-type: @@ -385,7 +385,7 @@ form.type **Purpose**: Create a custom form field type For details on creating your own custom form type, read the cookbook article: -:doc:`/cookbook/form/create_custom_field_type`. +:doc:`/form/create_custom_field_type`. form.type_extension ------------------- @@ -393,7 +393,7 @@ form.type_extension **Purpose**: Create a custom "form extension" For details on creating Form type extensions, read the cookbook article: -:doc:`/cookbook/form/create_form_type_extension` +:doc:`/form/create_form_type_extension` .. _reference-dic-type_guesser: @@ -583,7 +583,7 @@ During the execution of a Symfony application, different events are triggered and you can also dispatch custom events. This tag allows you to *hook* your own classes into any of those events. -For a full example of this listener, read the :doc:`/cookbook/event_dispatcher/event_listener` +For a full example of this listener, read the :doc:`/event_dispatcher/event_listener` cookbook entry. Core Event Listener Reference @@ -879,7 +879,7 @@ of your configuration and tag it with ``routing.loader``: ->addTag('routing.loader') ; -For more information, see :doc:`/cookbook/routing/custom_route_loader`. +For more information, see :doc:`/routing/custom_route_loader`. routing.expression_language_provider ------------------------------------ @@ -934,7 +934,7 @@ When you call ``isGranted`` on Symfony's authorization checker, a system of "vot is used behind the scenes to determine if the user should have access. The ``security.voter`` tag allows you to add your own custom voter to that system. -For more information, read the cookbook article: :doc:`/cookbook/security/voters`. +For more information, read the cookbook article: :doc:`/security/voters`. .. _reference-dic-tags-serializer-encoder: @@ -946,7 +946,7 @@ serializer.encoder The class that's tagged should implement the :class:`Symfony\\Component\\Serializer\\Encoder\\EncoderInterface` and :class:`Symfony\\Component\\Serializer\\Encoder\\DecoderInterface`. -For more details, see :doc:`/cookbook/serializer`. +For more details, see :doc:`/serializer`. .. _reference-dic-tags-serializer-normalizer: @@ -958,7 +958,7 @@ serializer.normalizer The class that's tagged should implement the :class:`Symfony\\Component\\Serializer\\Normalizer\\NormalizerInterface` and :class:`Symfony\\Component\\Serializer\\Normalizer\\DenormalizerInterface`. -For more details, see :doc:`/cookbook/serializer`. +For more details, see :doc:`/serializer`. swiftmailer.default.plugin -------------------------- @@ -1290,7 +1290,7 @@ configuration and tag it with ``twig.extension``: For information on how to create the actual Twig Extension class, see `Twig's documentation`_ on the topic or read the cookbook article: -:doc:`/cookbook/templating/twig_extension`. +:doc:`/templating/twig_extension`. Before writing your own extensions, have a look at the `Twig official extension repository`_ which already includes several @@ -1387,7 +1387,7 @@ validator.constraint_validator **Purpose**: Create your own custom validation constraint This tag allows you to create and register your own custom validation constraint. -For more information, read the cookbook article: :doc:`/cookbook/validation/custom_constraint`. +For more information, read the cookbook article: :doc:`/validation/custom_constraint`. validator.initializer --------------------- diff --git a/reference/events.rst b/reference/events.rst index 7d2d0bf7241..b415282d8db 100644 --- a/reference/events.rst +++ b/reference/events.rst @@ -4,7 +4,7 @@ Symfony Framework Events When the Symfony Framework (or anything using the :class:`Symfony\\Component\\HttpKernel\\HttpKernel`) handles a request, a few core events are dispatched so that you can add listeners throughout the process. These are called the "kernel events". -For a larger explanation, see :doc:`/components/http_kernel/introduction`. +For a larger explanation, see :doc:`/components/http_kernel`. Kernel Events ------------- diff --git a/reference/forms/types/collection.rst b/reference/forms/types/collection.rst index 02913dcd6d7..b0f39cedcff 100644 --- a/reference/forms/types/collection.rst +++ b/reference/forms/types/collection.rst @@ -43,7 +43,7 @@ photos). 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 - :doc:`/cookbook/form/form_collections`. + :doc:`/form/form_collections`. Basic Usage ----------- diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index bb73ca7958c..dc10e032316 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -151,7 +151,7 @@ more details, see the main :ref:`choice_label ` doc When passing a string, the ``choice_label`` option is a property path. So you can use anything supported by the - :doc:`PropertyAccessor component ` + :doc:`PropertyAccessor component ` For example, if the translations property is actually an associative array of objects, each with a name property, then you could do this:: @@ -244,7 +244,7 @@ type: helpful to read the documentation for the :doc:`/reference/forms/types/collection` as well. In addition, there is a complete example in the cookbook article - :doc:`/cookbook/form/form_collections`. + :doc:`/form/form_collections`. .. include:: /reference/forms/types/options/placeholder.rst.inc diff --git a/reference/forms/types/file.rst b/reference/forms/types/file.rst index 5a254ed6cab..42799bd157b 100644 --- a/reference/forms/types/file.rst +++ b/reference/forms/types/file.rst @@ -77,7 +77,7 @@ could have been manipulated by the end-user. Moreover, it can contain characters that are not allowed in file names. You should sanitize the name before using it directly. -Read the :doc:`cookbook ` for an example +Read the :doc:`cookbook ` for an example of how to manage a file upload associated with a Doctrine entity. Field Options diff --git a/reference/forms/types/options/checkbox_empty_data.rst.inc b/reference/forms/types/options/checkbox_empty_data.rst.inc index 62bd00c58d0..324489f13fb 100644 --- a/reference/forms/types/options/checkbox_empty_data.rst.inc +++ b/reference/forms/types/options/checkbox_empty_data.rst.inc @@ -5,4 +5,4 @@ empty_data This option determines what value the field will return when the ``placeholder`` choice is selected. In the checkbox and the radio type, the value of ``empty_data`` -is overriden by the value returned by the data transformer (see :doc:`/cookbook/form/data_transformers`). +is overriden by the value returned by the data transformer (see :doc:`/form/data_transformers`). diff --git a/reference/forms/types/options/empty_data.rst.inc b/reference/forms/types/options/empty_data.rst.inc index e1baeb1e7ce..4e81ed4f291 100644 --- a/reference/forms/types/options/empty_data.rst.inc +++ b/reference/forms/types/options/empty_data.rst.inc @@ -29,4 +29,4 @@ selected, you can do it like this:: .. note:: If you want to set the ``empty_data`` option for your entire form class, - see the cookbook article :doc:`/cookbook/form/use_empty_data`. + see the cookbook article :doc:`/form/use_empty_data`. diff --git a/reference/forms/types/options/inherit_data.rst.inc b/reference/forms/types/options/inherit_data.rst.inc index c65ff78c7e3..ba34845e196 100644 --- a/reference/forms/types/options/inherit_data.rst.inc +++ b/reference/forms/types/options/inherit_data.rst.inc @@ -9,11 +9,11 @@ inherit_data This option determines if the form will inherit data from its parent form. This can be useful if you have a set of fields that are duplicated across -multiple forms. See :doc:`/cookbook/form/inherit_data_option`. +multiple forms. See :doc:`/form/inherit_data_option`. .. caution:: When a field has the ``inherit_data`` option set, it uses the data of the parent form as is. This means that - :doc:`Data Transformers ` won't be + :doc:`Data Transformers ` won't be applied to that field. diff --git a/reference/forms/types/options/label_format.rst.inc b/reference/forms/types/options/label_format.rst.inc index 73f7eee0e7e..f007a1d439d 100644 --- a/reference/forms/types/options/label_format.rst.inc +++ b/reference/forms/types/options/label_format.rst.inc @@ -44,4 +44,4 @@ The default value (``null``) results in a The ``label_format`` option is evaluated in the form theme. Make sure to update your templates in case you - :doc:`customized form theming `. + :doc:`customized form theming `. diff --git a/reference/forms/types/options/method.rst.inc b/reference/forms/types/options/method.rst.inc index 55cf3118775..8cf5a1a3f4a 100644 --- a/reference/forms/types/options/method.rst.inc +++ b/reference/forms/types/options/method.rst.inc @@ -22,7 +22,7 @@ is used to decide whether to process the form submission in the When the method is PUT, PATCH, or DELETE, Symfony will automatically render a ``_method`` hidden field in your form. This is used to "fake" these HTTP methods, as they're not supported on standard browsers. For - more information, see :doc:`/cookbook/routing/method_parameters`. + more information, see :doc:`/routing/method_parameters`. .. note:: diff --git a/reference/twig_reference.rst b/reference/twig_reference.rst index 227bb8d0774..715a8d0f975 100644 --- a/reference/twig_reference.rst +++ b/reference/twig_reference.rst @@ -642,7 +642,7 @@ form_theme Sets the resources to override the form theme for the given form view instance. You can use ``_self`` as resources to set it to the current resource. More -information in :doc:`/cookbook/form/form_customization`. +information in :doc:`/form/form_customization`. trans ~~~~~ @@ -758,7 +758,7 @@ Those bundles can have other Twig extensions: documentation`_; * **Assetic** adds the ``{% stylesheets %}``, ``{% javascripts %}`` and ``{% image %}`` tags. You can read more about them in - :doc:`the Assetic Documentation `. + :doc:`the Assetic Documentation `. .. _`Twig Reference`: http://twig.sensiolabs.org/documentation#reference .. _`the official Twig Extensions documentation`: http://twig.sensiolabs.org/doc/extensions/index.html diff --git a/request/load_balancer_reverse_proxy.rst b/request/load_balancer_reverse_proxy.rst index 26d96cbc1e7..aa93fa87bdc 100644 --- a/request/load_balancer_reverse_proxy.rst +++ b/request/load_balancer_reverse_proxy.rst @@ -3,7 +3,7 @@ How to Configure Symfony to Work behind a Load Balancer or a Reverse Proxy When you deploy your application, you may be behind a load balancer (e.g. an AWS Elastic Load Balancer) or a reverse proxy (e.g. Varnish for -:doc:`caching`). +:doc:`caching`). For the most part, this doesn't cause any problems with Symfony. But, when a request passes through a proxy, certain request information is sent using diff --git a/routing.rst b/routing.rst index 09abb05f6c0..1cc97b4616d 100644 --- a/routing.rst +++ b/routing.rst @@ -149,6 +149,8 @@ which controller should be executed. The whole process looks like this: .. index:: single: Routing; Creating routes +.. _routing-creating-routes: + Creating Routes --------------- @@ -463,7 +465,7 @@ a slash. URLs matching this route might look like: Sometimes you want to make certain parts of your routes globally configurable. Symfony provides you with a way to do this by leveraging service container - parameters. Read more about this in ":doc:`/cookbook/routing/service_container_parameters`". + parameters. Read more about this in ":doc:`/routing/service_container_parameters`". Special Routing Parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -535,7 +537,7 @@ more flexibility. In addition to using the logical name or the fully-qualified class name, Symfony supports a third way of referring to a controller. This method uses just one colon separator (e.g. ``service_name:indexAction``) and - refers to the controller as a service (see :doc:`/cookbook/controller/service`). + refers to the controller as a service (see :doc:`/controller/service`). Route Parameters and Controller Arguments ----------------------------------------- @@ -575,7 +577,7 @@ see :ref:`route-parameters-controller-arguments`. You can even add extra information to your route definition and access it within your controller. For more information on this topic, -see :doc:`/cookbook/routing/extra_information`. +see :doc:`/routing/extra_information`. .. index:: single: Routing; Generating URLs @@ -752,7 +754,7 @@ to ``generate()``: The host that's used when generating an absolute URL is automatically detected using the current ``Request`` object. When generating absolute URLs from outside the web context (for instance in a console command) this - doesn't work. See :doc:`/cookbook/console/request_context` to learn how to + doesn't work. See :doc:`/console/request_context` to learn how to solve this problem. Summary @@ -764,16 +766,12 @@ to specify beautiful URLs and keeps the functionality of your application decoupled from those URLs. Routing is a bidirectional mechanism, meaning that it should also be used to generate URLs. -Learn more from the Cookbook ----------------------------- - -* :doc:`/cookbook/routing/scheme` -* :doc:`/cookbook/routing/slash_in_parameter` -* :doc:`/cookbook/routing/redirect_in_config` -* :doc:`/cookbook/routing/method_parameters` -* :doc:`/cookbook/routing/service_container_parameters` -* :doc:`/cookbook/routing/custom_route_loader` -* :doc:`/cookbook/routing/redirect_trailing_slash` -* :doc:`/cookbook/routing/extra_information` +Learn more +---------- + +.. toctree:: + :glob: + + routing/* .. _`FOSJsRoutingBundle`: https://github.com/FriendsOfSymfony/FOSJsRoutingBundle diff --git a/routing/external_resources.rst b/routing/external_resources.rst index afb84e8d7bd..4bde4c245f5 100644 --- a/routing/external_resources.rst +++ b/routing/external_resources.rst @@ -5,7 +5,7 @@ How to Include External Routing Resources ========================================= All routes are loaded via a single configuration file - usually ``app/config/routing.yml`` -(see `Creating Routes`_ above). However, if you use routing annotations, +(see :ref:`routing-creating-routes`). However, if you use routing annotations, you'll need to point the router to the controllers with the annotations. This can be done by "importing" directories into the routing configuration: diff --git a/routing/method_parameters.rst b/routing/method_parameters.rst index 8395b0694c9..13f41b5b66c 100644 --- a/routing/method_parameters.rst +++ b/routing/method_parameters.rst @@ -6,7 +6,7 @@ How to Use HTTP Methods beyond GET and POST in Routes The HTTP method of a request is one of the requirements that can be checked when seeing if it matches a route. This is introduced in the routing chapter -of the book ":doc:`/book/routing`" with examples using GET and POST. You can +of the book ":doc:`/routing`" with examples using GET and POST. You can also use other HTTP verbs in this way. For example, if you have a blog post entry then you could use the same URL path to show it, make changes to it and delete it by matching on GET, PUT and DELETE. diff --git a/routing/requirements.rst b/routing/requirements.rst index f8bada52972..1f5bf2f3ad2 100644 --- a/routing/requirements.rst +++ b/routing/requirements.rst @@ -264,12 +264,12 @@ Path Parameters .. tip:: The route requirements can also include container parameters, as explained - in :doc:`this article `. + in :doc:`this article `. This comes in handy when the regular expression is very complex and used repeatedly in your application. .. index:: -single: Routing; Method requirement + single: Routing; Method requirement Adding HTTP Method Requirements ------------------------------- diff --git a/routing/scheme.rst b/routing/scheme.rst index 927b6e3900d..bca7813fd96 100644 --- a/routing/scheme.rst +++ b/routing/scheme.rst @@ -70,4 +70,4 @@ to always use ``http``. the ``requires_channel`` setting. This alternative method is better suited to secure an "area" of your website (all URLs under ``/admin``) or when you want to secure URLs defined in a third party bundle (see - :doc:`/cookbook/security/force_https` for more details). + :doc:`/security/force_https` for more details). diff --git a/routing/service_container_parameters.rst b/routing/service_container_parameters.rst index 0b219537c46..dcfe60f8650 100644 --- a/routing/service_container_parameters.rst +++ b/routing/service_container_parameters.rst @@ -128,4 +128,4 @@ path): .. seealso:: For parameter handling within a Dependency Injection Class see - :doc:`/cookbook/configuration/using_parameters_in_dic`. + :doc:`/configuration/using_parameters_in_dic`. diff --git a/security.rst b/security.rst index 64e7c9f66d3..401f5a471d8 100644 --- a/security.rst +++ b/security.rst @@ -103,7 +103,7 @@ by your security. .. tip:: You can also match a request against other details of the request (e.g. host). For more - information and examples read :doc:`/cookbook/security/firewall_restriction`. + information and examples read :doc:`/security/firewall_restriction`. All other URLs will be handled by the ``default`` firewall (no ``pattern`` key means it matches *all* URLs). You can think of the firewall like your @@ -277,9 +277,9 @@ But who can you login as? Where do users come from? .. tip:: - Want to use a traditional login form? Great! See :doc:`/cookbook/security/form_login_setup`. + Want to use a traditional login form? Great! See :doc:`/security/form_login_setup`. What other methods are supported? See the :doc:`Configuration Reference ` - or :doc:`build your own `. + or :doc:`build your own `. .. tip:: @@ -295,8 +295,8 @@ B) Configuring how Users are Loaded When you type in your username, Symfony needs to load that user's information from somewhere. This is called a "user provider", and you're in charge of configuring it. Symfony has a built-in way to -:doc:`load users from the database `, -or you can :doc:`create your own user provider `. +:doc:`load users from the database `, +or you can :doc:`create your own user provider `. The easiest (but most limited) way, is to configure Symfony to load hardcoded users directly from the ``security.yml`` file itself. This is called an "in memory" @@ -371,7 +371,7 @@ probably only need one. If you *do* have multiple, you can configure which .. seealso:: - See :doc:`/cookbook/security/multiple_user_providers` for + See :doc:`/security/multiple_user_providers` for all the details about multiple providers setup. Try to login using username ``admin`` and password ``kitten``. You should @@ -425,8 +425,8 @@ To fix this, add an ``encoders`` key: )); User providers load user information and put it into a ``User`` object. If -you :doc:`load users from the database ` -or :doc:`some other source `, you'll +you :doc:`load users from the database ` +or :doc:`some other source `, you'll use your own custom User class. But when you use the "in memory" provider, it gives you a ``Symfony\Component\Security\Core\User\User`` object. @@ -449,7 +449,7 @@ Loading Users from the Database ............................... If you'd like to load your users via the Doctrine ORM, that's easy! See -:doc:`/cookbook/security/entity_provider` for all the details. +:doc:`/security/entity_provider` for all the details. .. _book-security-encoding-user-password: .. _c-encoding-the-users-password: @@ -511,7 +511,7 @@ else, you'll want to encode their passwords. The best algorithm to use is // ... )); -.. include:: /cookbook/security/_ircmaxwell_password-compat.rst.inc +.. include:: /security/_ircmaxwell_password-compat.rst.inc Of course, your users' passwords now need to be encoded with this exact algorithm. For hardcoded users, since 2.7 you can use the built-in command: @@ -602,7 +602,7 @@ before inserting them into the database? Don't worry, see for examples. It's also possible to use different hashing algorithms on a user-by-user - basis. See :doc:`/cookbook/security/named_encoders` for more details. + basis. See :doc:`/security/named_encoders` for more details. D) Configuration Done! ~~~~~~~~~~~~~~~~~~~~~~ @@ -613,10 +613,10 @@ basic auth and loads users right from the ``security.yml`` file. Your next steps depend on your setup: * Configure a different way for your users to login, like a :ref:`login form ` - or :doc:`something completely custom `; + or :doc:`something completely custom `; -* Load users from a different source, like the :doc:`database ` - or :doc:`some other source `; +* Load users from a different source, like the :doc:`database ` + or :doc:`some other source `; * Learn how to deny access, load the User object and deal with roles in the :ref:`Authorization ` section. @@ -823,7 +823,7 @@ the ``^``) would match ``/admin/foo`` but would also match URLs like ``/foo/admi host name and HTTP methods. It can also be used to redirect a user to the ``https`` version of a URL pattern. - To learn about all of this, see :doc:`/cookbook/security/access_control`. + To learn about all of this, see :doc:`/security/access_control`. .. _`book-security-securing-controller`: @@ -928,7 +928,7 @@ used to secure a controller. For example, suppose you have a service (i.e. a PHP class) whose job is to send emails. You can restrict use of this class - no matter where it's being used from - to only certain users. -For more information see :doc:`/cookbook/security/securing_services`. +For more information see :doc:`/security/securing_services`. Checking to see if a User is Logged In (IS_AUTHENTICATED_FULLY) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -959,7 +959,7 @@ special attributes like this: * ``IS_AUTHENTICATED_REMEMBERED``: *All* logged in users have this, even if they are logged in because of a "remember me cookie". Even if you don't - use the :doc:`remember me functionality `, + use the :doc:`remember me functionality `, you can use this to check if the user is logged in. * ``IS_AUTHENTICATED_FULLY``: This is similar to ``IS_AUTHENTICATED_REMEMBERED``, @@ -968,7 +968,7 @@ special attributes like this: * ``IS_AUTHENTICATED_ANONYMOUSLY``: *All* users (even anonymous ones) have this - this is useful when *whitelisting* URLs to guarantee access - some - details are in :doc:`/cookbook/security/access_control`. + details are in :doc:`/security/access_control`. .. _book-security-template-expression: @@ -1006,12 +1006,12 @@ other users. Also, as the admin user, you yourself want to be able to edit To accomplish this you have 2 options: -* :doc:`Voters ` allow you to write own business logic +* :doc:`Voters ` allow you to write own business logic (e.g. the user can edit this post because they were the creator) to determine access. You'll probably want this option - it's flexible enough to solve the above situation. -* :doc:`ACLs ` allow you to create a database structure +* :doc:`ACLs ` allow you to create a database structure where you can assign *any* arbitrary user *any* access (e.g. EDIT, VIEW) to *any* object in your system. Use this if you need an admin user to be able to grant customized access across your system via some admin interface. @@ -1415,7 +1415,7 @@ parts are when you have custom requirements: like a custom authentication strategy (e.g. API tokens), complex authorization logic and many other things (because security is complex!). -Fortunately, there are a lot of :doc:`Security Cookbook Articles ` +Fortunately, there are a lot of :doc:`Security Cookbook Articles ` aimed at describing many of these situations. Also, see the :doc:`Security Reference Section `. Many of the options don't have specific details, but seeing the full possible @@ -1423,15 +1423,13 @@ configuration tree may be useful. Good luck! -Learn More from the Cookbook ----------------------------- +Learn More +---------- -* :doc:`Forcing HTTP/HTTPS ` -* :doc:`Impersonating a User ` -* :doc:`/cookbook/security/voters` -* :doc:`Access Control Lists (ACLs) ` -* :doc:`/cookbook/security/remember_me` -* :doc:`/cookbook/security/multiple_user_providers` +.. toctree:: + :glob: + + security/* .. _`frameworkextrabundle documentation`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html .. _`security advisories database`: https://github.com/FriendsOfPHP/security-advisories diff --git a/security/access_control.rst b/security/access_control.rst index 00b73837be6..a6586257937 100644 --- a/security/access_control.rst +++ b/security/access_control.rst @@ -146,7 +146,7 @@ options: If access is denied, the system will try to authenticate the user if not already (e.g. redirect the user to the login page). If the user is already logged in, the 403 "access denied" error page will be shown. See - :doc:`/cookbook/controller/error_pages` for more information. + :doc:`/controller/error_pages` for more information. .. _book-security-securing-ip: diff --git a/security/acl.rst b/security/acl.rst index b881393d91b..41cedf4ffe5 100644 --- a/security/acl.rst +++ b/security/acl.rst @@ -14,7 +14,7 @@ the ACL system comes in. Using ACL's isn't trivial, and for simpler use cases, it may be overkill. If your permission logic could be described by just writing some code (e.g. to check if a Blog is owned by the current User), then consider using - :doc:`voters `. A voter is passed the object + :doc:`voters `. A voter is passed the object being voted on, which you can use to make complex decisions and effectively implement your own ACL. Enforcing authorization (e.g. the ``isGranted`` part) will look similar to what you see in this entry, but your voter diff --git a/security/api_key_authentication.rst b/security/api_key_authentication.rst index a33e30449f9..01ba1e6a638 100644 --- a/security/api_key_authentication.rst +++ b/security/api_key_authentication.rst @@ -143,7 +143,7 @@ user provider. The User Provider ~~~~~~~~~~~~~~~~~ -The ``$userProvider`` can be any user provider (see :doc:`/cookbook/security/custom_provider`). +The ``$userProvider`` can be any user provider (see :doc:`/security/custom_provider`). In this example, the ``$apiKey`` is used to somehow find the username for the user. This work is done in a ``getUsernameForApiKey()`` method, which is created entirely custom for this use-case (i.e. this isn't a method that's @@ -234,7 +234,7 @@ Now register your user provider as a service: .. note:: Read the dedicated article to learn - :doc:`how to create a custom user provider `. + :doc:`how to create a custom user provider `. The logic inside ``getUsernameForApiKey()`` is up to you. You may somehow transform the API key (e.g. ``37b51d``) into a username (e.g. ``jondoe``) by looking @@ -340,7 +340,7 @@ First, register it as a service. $definition->setPublic(false); $container->setDefinition('apikey_authenticator', $definition); -Now, activate it and your custom user provider (see :doc:`/cookbook/security/custom_provider`) +Now, activate it and your custom user provider (see :doc:`/security/custom_provider`) in the ``firewalls`` section of your security configuration using the ``simple_preauth`` and ``provider`` keys respectively: @@ -634,7 +634,7 @@ of the user to make sure it's not out-of-date. But regardless of your requiremen You'll also want to make sure that your ``User`` object is being serialized correctly. If your ``User`` object has private properties, PHP can't serialize those. In this case, you may get back a User object that has a ``null`` - value for each property. For an example, see :doc:`/cookbook/security/entity_provider`. + value for each property. For an example, see :doc:`/security/entity_provider`. Only Authenticating for Certain URLs ------------------------------------ diff --git a/security/custom_authentication_provider.rst b/security/custom_authentication_provider.rst index 11e5e01bcf5..16674be9faa 100644 --- a/security/custom_authentication_provider.rst +++ b/security/custom_authentication_provider.rst @@ -10,12 +10,12 @@ How to Create a custom Authentication Provider you through that process. But depending on your needs, you may be able to solve your problem in a simpler, or via a community bundle: - * :doc:`/cookbook/security/custom_password_authenticator` - * :doc:`/cookbook/security/api_key_authentication` + * :doc:`/security/custom_password_authenticator` + * :doc:`/security/api_key_authentication` * To authenticate via OAuth using a third-party service such as Google, Facebook or Twitter, try using the `HWIOAuthBundle`_ community bundle. -If you have read the chapter on :doc:`/book/security`, you understand the +If you have read the chapter on :doc:`/security`, you understand the distinction Symfony makes between authentication and authorization in the implementation of security. This chapter discusses the core classes involved in the authentication process, and how to implement a custom authentication diff --git a/security/custom_password_authenticator.rst b/security/custom_password_authenticator.rst index c8d54869c11..5b53825182d 100644 --- a/security/custom_password_authenticator.rst +++ b/security/custom_password_authenticator.rst @@ -250,4 +250,4 @@ option, but with the additional ``authenticator`` key that points to the new service. For details, see :ref:`reference-security-firewall-form-login`. If creating a login form in general is new to you or you don't understand -the ``check_path`` or ``login_path`` options, see :doc:`/cookbook/security/form_login`. +the ``check_path`` or ``login_path`` options, see :doc:`/security/form_login`. diff --git a/security/entity_provider.rst b/security/entity_provider.rst index e92d3ca255c..32abbc87e35 100644 --- a/security/entity_provider.rst +++ b/security/entity_provider.rst @@ -291,12 +291,12 @@ name ``our_db_provider`` isn't important: it just needs to match the value of the ``provider`` key under your firewall. Or, if you don't set the ``provider`` key under your firewall, the first "user provider" is automatically used. -.. include:: /cookbook/security/_ircmaxwell_password-compat.rst.inc +.. include:: /security/_ircmaxwell_password-compat.rst.inc Creating your First User ~~~~~~~~~~~~~~~~~~~~~~~~ -To add users, you can implement a :doc:`registration form ` +To add users, you can implement a :doc:`registration form ` or add some `fixtures`_. This is just a normal entity, so there's nothing tricky, *except* that you need to encode each user's password. But don't worry, Symfony gives you a service that will do this for you. See :ref:`security-encoding-password` @@ -411,7 +411,7 @@ template to customize them further). not be deserialized correctly from the session on each request. Congrats! Your database-loading security system is all setup! Next, add a -true :doc:`login form ` instead of HTTP Basic +true :doc:`login form ` instead of HTTP Basic or keep reading for other topics. .. _authenticating-someone-with-a-custom-entity-provider: diff --git a/security/force_https.rst b/security/force_https.rst index eba38055b34..f06136a5255 100644 --- a/security/force_https.rst +++ b/security/force_https.rst @@ -104,4 +104,4 @@ role: )); It is also possible to specify using HTTPS in the routing configuration, -see :doc:`/cookbook/routing/scheme` for more details. +see :doc:`/routing/scheme` for more details. diff --git a/security/form_login.rst b/security/form_login.rst index 6d5f7c64f14..38ec7ed182d 100644 --- a/security/form_login.rst +++ b/security/form_login.rst @@ -4,7 +4,7 @@ How to Customize your Form Login ================================ -Using a :doc:`form login ` for authentication +Using a :doc:`form login ` for authentication is a common, and flexible, method for handling authentication in Symfony. Pretty much every aspect of the form login can be customized. The full, default configuration is shown in the next section. @@ -37,7 +37,7 @@ in several ways. requested. Sometimes, this can cause problems, like if a background Ajax request "appears" to be the last visited URL, causing the user to be redirected there. For information on controlling this behavior, see - :doc:`/cookbook/security/target_path`. + :doc:`/security/target_path`. Changing the default Page ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/security/form_login_setup.rst b/security/form_login_setup.rst index 482f1b12eab..95f250cae33 100644 --- a/security/form_login_setup.rst +++ b/security/form_login_setup.rst @@ -255,7 +255,7 @@ The form can look like anything, but has a few requirements: .. caution:: This login form is currently not protected against CSRF attacks. Read - :doc:`/cookbook/security/csrf_in_login_form` on how to protect your login + :doc:`/security/csrf_in_login_form` on how to protect your login form. And that's it! When you submit the form, the security system will automatically @@ -284,7 +284,7 @@ can all be customized, allowing you to, for example, redirect the user to a specific URL. For more details on this and how to customize the form login process in general, -see :doc:`/cookbook/security/form_login`. +see :doc:`/security/form_login`. .. _book-security-common-pitfalls: @@ -467,7 +467,7 @@ main firewall is enough. As routing is done *before* security, 404 error pages are not covered by any firewall. This means you can't check for security or even access the -user object on these pages. See :doc:`/cookbook/controller/error_pages` +user object on these pages. See :doc:`/controller/error_pages` for more details. .. _`FOSUserBundle`: https://github.com/FriendsOfSymfony/FOSUserBundle diff --git a/security/host_restriction.rst b/security/host_restriction.rst index 0ee0d334e30..c10de8bc2dc 100644 --- a/security/host_restriction.rst +++ b/security/host_restriction.rst @@ -3,4 +3,4 @@ How to Restrict Firewalls to a Specific Host As of Symfony 2.5, more possibilities to restrict firewalls have been added. You can read everything about all the possibilities (including ``host``) -in ":doc:`/cookbook/security/firewall_restriction`". +in ":doc:`/security/firewall_restriction`". diff --git a/security/impersonating_user.rst b/security/impersonating_user.rst index 9dbc6aa96c4..ad9103b39ef 100644 --- a/security/impersonating_user.rst +++ b/security/impersonating_user.rst @@ -11,7 +11,7 @@ to understand a bug a user sees that you can't reproduce). .. caution:: User impersonation is not compatible with - :doc:`pre authenticated firewalls `. The + :doc:`pre authenticated firewalls `. The reason is that impersonation requires the authentication state to be maintained server-side, but pre-authenticated information (``SSL_CLIENT_S_DN_Email``, ``REMOTE_USER`` or other) is sent in each request. @@ -184,7 +184,7 @@ is completed. The :class:`Symfony\\Component\\Security\\Http\\Event\\SwitchUserE passed to the listener, and you can use this to get the user that you are now impersonating. The cookbook article about -:doc:`Making the Locale "Sticky" during a User's Session ` +:doc:`Making the Locale "Sticky" during a User's Session ` does not update the locale when you impersonate a user. The following code sample will show how to change the sticky locale: diff --git a/security/pre_authenticated.rst b/security/pre_authenticated.rst index 024a29da02a..a2d951d1b1f 100644 --- a/security/pre_authenticated.rst +++ b/security/pre_authenticated.rst @@ -13,7 +13,7 @@ authenticated when reaching your application. .. caution:: - :doc:`User impersonation ` is not + :doc:`User impersonation ` is not compatible with pre-authenticated firewalls. The reason is that impersonation requires the authentication state to be maintained server-side, but pre-authenticated information (``SSL_CLIENT_S_DN_Email``, ``REMOTE_USER`` @@ -94,8 +94,8 @@ in the x509 firewall configuration respectively. object of your choice. For more information on creating or configuring a user provider, see: - * :doc:`/cookbook/security/custom_provider` - * :doc:`/cookbook/security/entity_provider` + * :doc:`/security/custom_provider` + * :doc:`/security/entity_provider` REMOTE_USER Based Authentication -------------------------------- diff --git a/security/remember_me.rst b/security/remember_me.rst index 77a69965d0d..216da7fa687 100644 --- a/security/remember_me.rst +++ b/security/remember_me.rst @@ -287,4 +287,4 @@ your controller using annotations: they are not, yet, fully authenticated. For more information on securing services or methods in this way, -see :doc:`/cookbook/security/securing_services`. +see :doc:`/security/securing_services`. diff --git a/security/securing_services.rst b/security/securing_services.rst index 8b013620bc5..82f0b24cbd8 100644 --- a/security/securing_services.rst +++ b/security/securing_services.rst @@ -22,7 +22,7 @@ checking the current user's role:: You can also secure *any* service by injecting the ``security.authorization_checker`` service into it. For a general introduction to injecting dependencies into -services see the :doc:`/book/service_container` chapter of the book. For +services see the :doc:`/service_container` chapter of the book. For example, suppose you have a ``NewsletterManager`` class that sends out emails and you want to restrict its use to only users who have some ``ROLE_NEWSLETTER_ADMIN`` role. Before you add security, the class looks diff --git a/security/voters.rst b/security/voters.rst index c9866d586c4..153fc4a89a2 100644 --- a/security/voters.rst +++ b/security/voters.rst @@ -5,7 +5,7 @@ How to Use Voters to Check User Permissions =========================================== In Symfony, you can check the permission to access data by using the -:doc:`ACL module `, which is a bit overwhelming +:doc:`ACL module `, which is a bit overwhelming for many applications. A much easier solution is to work with custom voters, which are like simple conditional statements. diff --git a/service_container.rst b/service_container.rst index 538000f4081..93e9480b915 100644 --- a/service_container.rst +++ b/service_container.rst @@ -31,7 +31,7 @@ the service container makes writing good code so easy. .. tip:: If you want to know a lot more after reading this chapter, check out - the :doc:`DependencyInjection component documentation `. + the :doc:`DependencyInjection component documentation `. .. index:: single: Service Container; What is a service? @@ -145,7 +145,7 @@ As a bonus, the ``Mailer`` service is only created once and the same instance is returned each time you ask for the service. This is almost always the behavior you'll need (it's more flexible and powerful), but you'll learn later how you can configure a service that has multiple instances in the -":doc:`/cookbook/service_container/scopes`" cookbook article. +":doc:`/service_container/scopes`" cookbook article. .. note:: @@ -456,15 +456,17 @@ Injecting the dependency by the setter method just needs a change of syntax: Learn more ---------- +.. toctree:: + :glob: + + /service_container/* + /service_container/service_container/* + * :doc:`/components/dependency_injection/parameters` * :doc:`/components/dependency_injection/compilation` * :doc:`/components/dependency_injection/definitions` * :doc:`/components/dependency_injection/factories` * :doc:`/components/dependency_injection/parentservices` -* :doc:`/components/dependency_injection/tags` -* :doc:`/cookbook/controller/service` -* :doc:`/cookbook/service_container/scopes` -* :doc:`/cookbook/service_container/compiler_passes` * :doc:`/components/dependency_injection/advanced` .. _`service-oriented architecture`: https://en.wikipedia.org/wiki/Service-oriented_architecture diff --git a/service_container/scopes.rst b/service_container/scopes.rst index 93227b0dd8f..8e83009c5fc 100644 --- a/service_container/scopes.rst +++ b/service_container/scopes.rst @@ -5,7 +5,7 @@ How to Work with Scopes ======================= This article is all about scopes, a somewhat advanced topic related to the -:doc:`/book/service_container`. If you've ever gotten an error mentioning +:doc:`/service_container`. If you've ever gotten an error mentioning "scopes" when creating services, then this article is for you. .. note:: diff --git a/service_container/service_container/expression_language.rst b/service_container/service_container/expression_language.rst index f14a8d4ccba..8bb2e12bc61 100644 --- a/service_container/service_container/expression_language.rst +++ b/service_container/service_container/expression_language.rst @@ -15,7 +15,8 @@ which has a ``getMailerMethod()`` method on it, which will return a string like ``sendmail`` based on some configuration. Remember that the first argument to the ``my_mailer`` service is the simple string ``sendmail``: -.. include:: includes/_service_container_my_mailer.rst.inc +.. + .. include:: includes/_service_container_my_mailer.rst.inc But instead of hardcoding this, how could we get this value from the ``getMailerMethod()`` of the new ``mailer_configuration`` service? One way is to use an expression: diff --git a/service_container/service_container/import.rst b/service_container/service_container/import.rst index c7dfb1900c3..8ead3a67147 100644 --- a/service_container/service_container/import.rst +++ b/service_container/service_container/import.rst @@ -198,4 +198,4 @@ available for the core bundles can be found inside the :doc:`Reference Guide `. +register a :doc:`new event listener `. The listener will look something like this. Typically, ``_locale`` is used as a routing parameter to signify the locale, though it doesn't really matter how you determine the desired locale from the request:: diff --git a/session/proxy_examples.rst b/session/proxy_examples.rst index 361096d4c92..f360d0e5e22 100644 --- a/session/proxy_examples.rst +++ b/session/proxy_examples.rst @@ -62,7 +62,7 @@ Symfony to use your own session handler instead of the default one: xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - + diff --git a/session/sessions_directory.rst b/session/sessions_directory.rst index 1c6f4c46abf..fd167f8ccd4 100644 --- a/session/sessions_directory.rst +++ b/session/sessions_directory.rst @@ -94,8 +94,8 @@ that your current sessions aren't lost when you clear Symfony's cache. method of session management available within Symfony. See :doc:`/components/http_foundation/session_configuration` for a discussion of session save handlers. There are also entries in the cookbook - about storing sessions in a :doc:`relational database ` - or a :doc:`NoSQL database `. + about storing sessions in a :doc:`relational database ` + or a :doc:`NoSQL 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 diff --git a/templating.rst b/templating.rst index 68ac9f4198f..a13bbb71748 100644 --- a/templating.rst +++ b/templating.rst @@ -4,7 +4,7 @@ Creating and Using Templates ============================ -As you know, the :doc:`controller ` is responsible for +As you know, the :doc:`controller ` is responsible for handling each request that comes into a Symfony application. In reality, the controller delegates most of the heavy work to other places so that code can be tested and reused. When a controller needs to generate HTML, @@ -683,7 +683,7 @@ Whenever you find that you need a variable or a piece of information that you don't have access to in a template, consider rendering a controller. Controllers are fast to execute and promote good code organization and reuse. Of course, like all controllers, they should ideally be "skinny", meaning -that as much code as possible lives in reusable :doc:`services `. +that as much code as possible lives in reusable :doc:`services `. .. _book-templating-hinclude: @@ -1092,7 +1092,7 @@ advantage of Symfony's template inheritance. and JavaScript assets in Symfony. Symfony also packages another library, called Assetic, which follows this philosophy but allows you to do much more interesting things with those assets. For more information on - using Assetic see :doc:`/cookbook/assetic/asset_management`. + using Assetic see :doc:`/assetic/asset_management`. Start by adding two blocks to your base template that will hold your assets: one called ``stylesheets`` inside the ``head`` tag and another called ``javascripts`` @@ -1244,7 +1244,7 @@ automatically: .. tip:: You can add your own global template variables. See the cookbook example - on :doc:`Global Variables `. + on :doc:`Global Variables `. .. index:: single: Templating; The templating service @@ -1388,7 +1388,7 @@ subdirectory. .. note:: You can also override templates from within a bundle by using bundle - inheritance. For more information, see :doc:`/cookbook/bundles/inheritance`. + inheritance. For more information, see :doc:`/bundles/inheritance`. .. _templating-overriding-core-templates: @@ -1701,12 +1701,13 @@ Overall, the topic of templating should be thought of as a powerful tool that's at your disposal. In some cases, you may not need to render a template, and in Symfony, that's absolutely fine. -Learn more from the Cookbook ----------------------------- +Learn more +---------- -* :doc:`/cookbook/templating/PHP` -* :doc:`/cookbook/controller/error_pages` -* :doc:`/cookbook/templating/twig_extension` +.. toctree:: + :glob: + + /templating/* .. _`Twig`: http://twig.sensiolabs.org .. _`KnpBundles.com`: http://knpbundles.com diff --git a/templating/render_without_controller.rst b/templating/render_without_controller.rst index d2a602ae4eb..2c3cca4e438 100644 --- a/templating/render_without_controller.rst +++ b/templating/render_without_controller.rst @@ -130,7 +130,7 @@ other variables in your route, you can control exactly how your page is cached: The ``maxAge`` and ``sharedAge`` values are used to modify the Response object created in the controller. For more information on caching, see -:doc:`/book/http_cache`. +:doc:`/http_cache`. There is also a ``private`` variable (not shown here). By default, the Response will be made public, as long as ``maxAge`` or ``sharedAge`` are passed. diff --git a/testing.rst b/testing.rst index 4e3257885e1..022b7b59dae 100644 --- a/testing.rst +++ b/testing.rst @@ -498,7 +498,7 @@ To get the Profiler for the last request, do the following:: $profile = $client->getProfile(); For specific details on using the profiler inside a test, see the -:doc:`/cookbook/testing/profiling` cookbook entry. +:doc:`/testing/profiling` cookbook entry. Redirecting ~~~~~~~~~~~ @@ -716,7 +716,7 @@ their type:: Adding and Removing Forms to a Collection ......................................... -If you use a :doc:`Collection of Forms `, +If you use a :doc:`Collection of Forms `, you can't add fields to an existing form with ``$form['task[tags][0][name]'] = 'foo';``. This results in an error ``Unreachable field "…"`` because ``$form`` can only be used in order to @@ -916,13 +916,14 @@ section: Learn more ---------- +.. toctree:: + :glob: + + testing/* + * :doc:`The chapter about tests in the Symfony Framework Best Practices ` * :doc:`/components/dom_crawler` * :doc:`/components/css_selector` -* :doc:`/cookbook/testing/http_authentication` -* :doc:`/cookbook/testing/insulating_clients` -* :doc:`/cookbook/testing/profiling` -* :doc:`/cookbook/testing/bootstrap` .. _`$_SERVER`: http://php.net/manual/en/reserved.variables.server.php .. _`documentation`: https://phpunit.de/manual/current/en/ diff --git a/testing/database.rst b/testing/database.rst index 04c8d07ee48..0504d450797 100644 --- a/testing/database.rst +++ b/testing/database.rst @@ -13,7 +13,7 @@ your test always has the same data to work with. .. note:: - If you want to test your queries directly, see :doc:`/cookbook/testing/doctrine`. + If you want to test your queries directly, see :doc:`/testing/doctrine`. Mocking the ``Repository`` in a Unit Test ----------------------------------------- diff --git a/testing/profiling.rst b/testing/profiling.rst index 1789c69dbc9..61d682584e1 100644 --- a/testing/profiling.rst +++ b/testing/profiling.rst @@ -9,7 +9,7 @@ you write functional tests that monitor your production servers, you might want to write tests on the profiling data as it gives you a great way to check various things and enforce some metrics. -:doc:`The Symfony Profiler ` gathers a lot of data for +:doc:`The Symfony Profiler ` gathers a lot of data for each request. Use this data to check the number of database calls, the time spent in the framework, etc. But before writing assertions, enable the profiler and check that the profiler is indeed available (it is enabled by default in @@ -72,7 +72,7 @@ finish. It's easy to achieve if you embed the token in the error message:: .. tip:: - Read the API for built-in :doc:`data collectors ` + Read the API for built-in :doc:`data collectors ` to learn more about their interfaces. Speeding up Tests by not Collecting Profiler Data diff --git a/testing/simulating_authentication.rst b/testing/simulating_authentication.rst index e13881029e9..0d54776823f 100644 --- a/testing/simulating_authentication.rst +++ b/testing/simulating_authentication.rst @@ -9,7 +9,7 @@ It could become an issue especially when ``form_login`` is used, since it requires additional requests to fill in and submit the form. One of the solutions is to configure your firewall to use ``http_basic`` in -the test environment as explained in :doc:`/cookbook/testing/http_authentication`. +the test environment as explained in :doc:`/testing/http_authentication`. Another way would be to create a token yourself and store it in a session. While doing this, you have to make sure that an appropriate cookie is sent with a request. The following example demonstrates this technique:: @@ -58,5 +58,5 @@ with a request. The following example demonstrates this technique:: .. note:: - The technique described in :doc:`/cookbook/testing/http_authentication` + The technique described in :doc:`/testing/http_authentication` is cleaner and therefore the preferred way. diff --git a/translation.rst b/translation.rst index 7ea2cdc28ab..3c907632dbd 100644 --- a/translation.rst +++ b/translation.rst @@ -44,7 +44,7 @@ to learn even more. Overall, the process has several steps: #. Determine, :ref:`set and manage the user's locale ` for the request and optionally - :doc:`on the user's entire session `. + :doc:`on the user's entire session `. .. _book-translation-configuration: @@ -443,7 +443,7 @@ need it:: $request->setLocale($locale); } -Read :doc:`/cookbook/session/locale_sticky_session` for more information on making +Read :doc:`/session/locale_sticky_session` for more information on making the user's locale "sticky" to their session. .. note:: @@ -529,7 +529,7 @@ in your application. .. tip:: - Read :doc:`/cookbook/routing/service_container_parameters` to learn how to + Read :doc:`/routing/service_container_parameters` to learn how to avoid hardcoding the ``_locale`` requirement in all your routes. .. index:: diff --git a/upgrade/index.rst b/upgrade/index.rst index 27785a07b09..cf51b47017e 100644 --- a/upgrade/index.rst +++ b/upgrade/index.rst @@ -13,7 +13,7 @@ There are three types of upgrades, all needing a little different preparation: .. toctree:: :maxdepth: 2 - /cookbook/upgrade/patch_version - /cookbook/upgrade/minor_version - /cookbook/upgrade/major_version - /cookbook/upgrade/bundles + /upgrade/patch_version + /upgrade/minor_version + /upgrade/major_version + /upgrade/bundles diff --git a/upgrade/major_version.rst b/upgrade/major_version.rst index 978dac1c3ae..01e9339cef5 100644 --- a/upgrade/major_version.rst +++ b/upgrade/major_version.rst @@ -25,7 +25,7 @@ There are a couple of steps to upgrading a major version: During the lifecycle of a major release, new features are added and method signatures and public API usages are changed. However, -:doc:`minor versions ` should not contain any +:doc:`minor versions ` should not contain any backwards incompatible changes. To accomplish this, the "old" (e.g. functions, classes, etc) code still works, but is marked as *deprecated*, indicating that it will be removed/changed in the future and that you should stop using it. @@ -37,7 +37,7 @@ using these deprecated features in the last version before the major (e.g. To help you with this, deprecation notices are triggered whenever you end up using a deprecated feature. When visiting your application in the -:doc:`dev environment ` +:doc:`dev environment ` in your browser, these notices are shown in the web dev toolbar: .. image:: /images/cookbook/deprecations-in-profiler.png @@ -136,9 +136,9 @@ Next, use Composer to download new versions of the libraries: $ composer update symfony/symfony -.. include:: /cookbook/upgrade/_update_dep_errors.rst.inc +.. include:: /upgrade/_update_dep_errors.rst.inc -.. include:: /cookbook/upgrade/_update_all_packages.rst.inc +.. include:: /upgrade/_update_all_packages.rst.inc .. _upgrade-major-symfony-after: diff --git a/upgrade/minor_version.rst b/upgrade/minor_version.rst index 78f829e2a3b..1079fbff361 100644 --- a/upgrade/minor_version.rst +++ b/upgrade/minor_version.rst @@ -41,9 +41,9 @@ Next, use Composer to download new versions of the libraries: $ composer update symfony/symfony -.. include:: /cookbook/upgrade/_update_dep_errors.rst.inc +.. include:: /upgrade/_update_dep_errors.rst.inc -.. include:: /cookbook/upgrade/_update_all_packages.rst.inc +.. include:: /upgrade/_update_all_packages.rst.inc .. _`upgrade-minor-symfony-code`: diff --git a/upgrade/patch_version.rst b/upgrade/patch_version.rst index 2968aa22c77..4402ecb45e3 100644 --- a/upgrade/patch_version.rst +++ b/upgrade/patch_version.rst @@ -23,4 +23,4 @@ update. It is recommended to update to a new patch version as soon as possible, as important bugs and security leaks may be fixed in these new releases. -.. include:: /cookbook/upgrade/_update_all_packages.rst.inc +.. include:: /upgrade/_update_all_packages.rst.inc diff --git a/validation.rst b/validation.rst index 90893e54f8b..b809ce1196f 100644 --- a/validation.rst +++ b/validation.rst @@ -249,7 +249,7 @@ workflow looks like the following from inside a controller:: This example uses an ``AuthorType`` form class, which is not shown here. -For more information, see the :doc:`Forms ` chapter. +For more information, see the :doc:`Forms ` chapter. .. index:: pair: Validation; Configuration @@ -320,7 +320,7 @@ Symfony packages many of the most commonly-needed constraints: .. include:: /reference/constraints/map.rst.inc You can also create your own custom constraints. This topic is covered in -the ":doc:`/cookbook/validation/custom_constraint`" article of the cookbook. +the ":doc:`/validation/custom_constraint`" article of the cookbook. .. index:: single: Validation; Constraints configuration @@ -1297,10 +1297,13 @@ getter methods of your object. And while you'll most commonly use the validation framework indirectly when using forms, remember that it can be used anywhere to validate any object. -Learn more from the Cookbook ----------------------------- +Learn more +---------- + +.. toctree:: + :glob: -* :doc:`/cookbook/validation/custom_constraint` + /validation/* .. _Validator: https://github.com/symfony/validator .. _JSR303 Bean Validation specification: http://jcp.org/en/jsr/detail?id=303 diff --git a/validation/severity.rst b/validation/severity.rst index 22cb267d6c3..865e5ce6399 100644 --- a/validation/severity.rst +++ b/validation/severity.rst @@ -166,4 +166,4 @@ so that the severity is added as an additional HTML class: .. seealso:: - For more information on customizing form rendering, see :doc:`/cookbook/form/form_customization`. + For more information on customizing form rendering, see :doc:`/form/form_customization`. diff --git a/web_server/built_in.rst b/web_server/built_in.rst index 70ba0de0cbe..01d71fe71ec 100644 --- a/web_server/built_in.rst +++ b/web_server/built_in.rst @@ -12,7 +12,7 @@ Since PHP 5.4 the CLI SAPI comes with a `built-in web server`_. It can be used to run your PHP applications locally during development, for testing or for application demonstrations. This way, you don't have to bother configuring a full-featured web server such as -:doc:`Apache or Nginx `. +:doc:`Apache or Nginx `. .. caution:: diff --git a/workflow/new_project_git.rst b/workflow/new_project_git.rst index 9204f3cadc2..5e23d9545a6 100644 --- a/workflow/new_project_git.rst +++ b/workflow/new_project_git.rst @@ -11,7 +11,7 @@ How to Create and Store a Symfony Project in Git Though this entry is specifically about Git, the same generic principles will apply if you're storing your project in Subversion. -Once you've read through :doc:`/book/page_creation` and become familiar with +Once you've read through :doc:`/page_creation` and become familiar with using Symfony, you'll no-doubt be ready to start your own project. In this cookbook article, you'll learn the best way to start a new Symfony project that's stored using the `Git`_ source control management system. @@ -20,7 +20,7 @@ Initial Project Setup --------------------- To get started, you'll need to download Symfony and get things running. See -the :doc:`/book/installation` chapter for details. +the :doc:`/installation` chapter for details. Once your project is running, just follow these simple steps: @@ -63,14 +63,14 @@ At this point, you have a fully-functional Symfony project that's correctly committed to Git. You can immediately begin development, committing the new changes to your Git repository. -You can continue to follow along with the :doc:`/book/page_creation` chapter +You can continue to follow along with the :doc:`/page_creation` chapter to learn more about how to configure and develop inside your application. .. tip:: The Symfony Standard Edition comes with some example functionality. To remove the sample code, follow the instructions in the - ":doc:`/cookbook/bundles/remove`" article. + ":doc:`/bundles/remove`" article. .. _cookbook-managing-vendor-libraries: diff --git a/workflow/new_project_svn.rst b/workflow/new_project_svn.rst index 8fe7e9eacd9..0830aef71cb 100644 --- a/workflow/new_project_svn.rst +++ b/workflow/new_project_svn.rst @@ -9,9 +9,9 @@ How to Create and Store a Symfony Project in Subversion .. tip:: This entry is specifically about Subversion, and based on principles found - in :doc:`/cookbook/workflow/new_project_git`. + in :doc:`/workflow/new_project_git`. -Once you've read through :doc:`/book/page_creation` and become familiar with +Once you've read through :doc:`/page_creation` and become familiar with using Symfony, you'll no-doubt be ready to start your own project. The preferred method to manage Symfony projects is using `Git`_ but some prefer to use `Subversion`_ which is totally fine!. In this cookbook article, you'll @@ -48,7 +48,7 @@ Initial Project Setup To get started, you'll need to download Symfony and get the basic Subversion setup. First, download and get your Symfony project running by following the -:doc:`Installation ` chapter. +:doc:`Installation ` chapter. Once you have your new project directory and things are working, follow along with these steps: @@ -105,14 +105,14 @@ At this point, you have a fully-functional Symfony project stored in your Subversion repository. The development can start with commits in the Subversion repository. -You can continue to follow along with the :doc:`/book/page_creation` chapter +You can continue to follow along with the :doc:`/page_creation` chapter to learn more about how to configure and develop inside your application. .. tip:: The Symfony Standard Edition comes with some example functionality. To remove the sample code, follow the instructions in the - ":doc:`/cookbook/bundles/remove`" article. + ":doc:`/bundles/remove`" article. .. include:: _vendor_deps.rst.inc