From 39cc38e719c981a30755c9d2ebc006ba0d469bcd Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Thu, 30 Nov 2017 13:00:57 +0100 Subject: [PATCH] Fixed some *.yml file extensions --- bundles/best_practices.rst | 6 ++--- bundles/override.rst | 4 ++-- bundles/prepend_extension.rst | 24 ++++++++++---------- configuration/configuration_organization.rst | 2 +- doctrine/custom_dql_functions.rst | 6 ++--- doctrine/dbal.rst | 2 +- doctrine/registration_form.rst | 6 ++--- reference/configuration/framework.rst | 2 +- routing/hostname_pattern.rst | 2 +- security/remember_me.rst | 2 +- serializer/custom_encoders.rst | 2 +- templating/debug.rst | 8 +++---- testing/http_authentication.rst | 6 ++--- translation.rst | 2 +- translation/lint.rst | 2 +- validation.rst | 4 ++-- 16 files changed, 40 insertions(+), 40 deletions(-) diff --git a/bundles/best_practices.rst b/bundles/best_practices.rst index 2e997beefe8..3daade32f62 100644 --- a/bundles/best_practices.rst +++ b/bundles/best_practices.rst @@ -363,13 +363,13 @@ The end user can provide values in any configuration file: .. code-block:: yaml - # app/config/config.yml + # config/services.yaml parameters: acme_blog.author.email: 'fabien@example.com' .. code-block:: xml - + setParameter('acme_blog.author.email', 'fabien@example.com'); Retrieve the configuration parameters in your code from the container:: diff --git a/bundles/override.rst b/bundles/override.rst index 2928bb354d9..7dc8446fc78 100644 --- a/bundles/override.rst +++ b/bundles/override.rst @@ -26,7 +26,7 @@ Routing Routing is never automatically imported in Symfony. If you want to include the routes from any bundle, then they must be manually imported from somewhere -in your application (e.g. ``config/routes.yml``). +in your application (e.g. ``config/routes.yaml``). The easiest way to "override" a bundle's routing is to never import it at all. Instead of importing a third-party bundle's routing, simply copy @@ -101,7 +101,7 @@ to a new validation group: .. code-block:: yaml - # src/Acme/UserBundle/Resources/config/validation.yml + # src/Acme/UserBundle/Resources/config/validation.yaml FOS\UserBundle\Model\User: properties: plainPassword: diff --git a/bundles/prepend_extension.rst b/bundles/prepend_extension.rst index 28610a27154..3cd9d7504b7 100644 --- a/bundles/prepend_extension.rst +++ b/bundles/prepend_extension.rst @@ -12,11 +12,10 @@ users to choose to remove functionality they are not using. Creating multiple bundles has the drawback that configuration becomes more tedious and settings often need to be repeated for various bundles. -It is possible to remove the disadvantage of the multiple bundle approach -by enabling a single Extension to prepend the settings for any bundle. -It can use the settings defined in the ``app/config/config.yml`` -to prepend settings just as if they had been written explicitly by -the user in the application configuration. +It is possible to remove the disadvantage of the multiple bundle approach by +enabling a single Extension to prepend the settings for any bundle. It can use +the settings defined in the ``config/*`` files to prepend settings just as if +they had been written explicitly by the user in the application configuration. For example, this could be used to configure the entity manager name to use in multiple bundles. Or it can be used to enable an optional feature that depends @@ -50,7 +49,7 @@ prepend settings to a bundle extension developers can use the :method:`Symfony\\Component\\DependencyInjection\\ContainerBuilder::prependExtensionConfig` method on the :class:`Symfony\\Component\\DependencyInjection\\ContainerBuilder` instance. As this method only prepends settings, any other settings done explicitly -inside the ``app/config/config.yml`` would override these prepended settings. +inside the ``config/*`` files would override these prepended settings. The following example illustrates how to prepend a configuration setting in multiple bundles as well as disable a flag in multiple bundles @@ -73,7 +72,7 @@ in case a specific other bundle is not registered:: // acme_something and acme_other // // note that if the user manually configured - // use_acme_goodbye to true in app/config/config.yml + // use_acme_goodbye to true in config/services.yaml // then the setting would in the end be true and not false $container->prependExtensionConfig($name, $config); break; @@ -96,14 +95,15 @@ in case a specific other bundle is not registered:: } The above would be the equivalent of writing the following into the -``app/config/config.yml`` in case AcmeGoodbyeBundle is not registered and the -``entity_manager_name`` setting for ``acme_hello`` is set to ``non_default``: +``config/packages/acme_something.yaml`` in case AcmeGoodbyeBundle is not +registered and the ``entity_manager_name`` setting for ``acme_hello`` is set to +``non_default``: .. configuration-block:: .. code-block:: yaml - # app/config/config.yml + # config/packages/acme_something.yaml acme_something: # ... use_acme_goodbye: false @@ -115,7 +115,7 @@ The above would be the equivalent of writing the following into the .. code-block:: xml - + loadFromExtension('acme_something', array( // ... 'use_acme_goodbye' => false, diff --git a/configuration/configuration_organization.rst b/configuration/configuration_organization.rst index 6bc48e12a65..11f8c2aaede 100644 --- a/configuration/configuration_organization.rst +++ b/configuration/configuration_organization.rst @@ -78,7 +78,7 @@ Mix and Match Configuration Formats ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Configuration files can import files defined with any other built-in configuration -format (``.yml``, ``.xml``, ``.php``, ``.ini``): +format (``.yaml`` or ``.yml``, ``.xml``, ``.php``, ``.ini``): .. configuration-block:: diff --git a/doctrine/custom_dql_functions.rst b/doctrine/custom_dql_functions.rst index e63e1437865..4c7d0a5ecd5 100644 --- a/doctrine/custom_dql_functions.rst +++ b/doctrine/custom_dql_functions.rst @@ -86,7 +86,7 @@ In Symfony, you can register your custom DQL functions as follows: .. code-block:: yaml - # app/config/config.yml + # config/packages/doctrine.yaml doctrine: orm: # ... @@ -99,7 +99,7 @@ In Symfony, you can register your custom DQL functions as follows: .. code-block:: xml - # app/config/config.xml + loadFromExtension('doctrine', array( diff --git a/doctrine/dbal.rst b/doctrine/dbal.rst index 43f387de802..4620f52a147 100644 --- a/doctrine/dbal.rst +++ b/doctrine/dbal.rst @@ -117,7 +117,7 @@ mapping type: .. code-block:: yaml - # config/packages/doctrine.yml + # config/packages/doctrine.yaml doctrine: dbal: mapping_types: diff --git a/doctrine/registration_form.rst b/doctrine/registration_form.rst index b423850ab2f..9c305de0f3a 100644 --- a/doctrine/registration_form.rst +++ b/doctrine/registration_form.rst @@ -147,7 +147,7 @@ With some validation added, your class may look something like this:: } The :class:`Symfony\\Component\\Security\\Core\\User\\UserInterface` requires -a few other methods and your ``security.yml`` file needs to be configured +a few other methods and your ``security.yaml`` file needs to be configured properly to work with the ``User`` entity. For a more complete example, see the :ref:`Entity Provider ` article. @@ -277,7 +277,7 @@ encoder in the security configuration: .. code-block:: yaml - # config/packages/security.yml + # config/packages/security.yaml security: encoders: App\Entity\User: bcrypt @@ -364,7 +364,7 @@ return the ``email`` property:: // ... } -Next, just update the ``providers`` section of your ``security.yml`` file +Next, just update the ``providers`` section of your ``security.yaml`` file so that Symfony knows how to load your users via the ``email`` property on login. See :ref:`authenticating-someone-with-a-custom-entity-provider`. diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 7c5721870c3..1741e3ac998 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -649,7 +649,7 @@ type The type of the resource to hint the loaders about the format. This isn't needed when you use the default routers with the expected file extensions -(``.xml``, ``.yml`` / ``.yaml``, ``.php``). +(``.xml``, ``.yml`` or ``.yaml``, ``.php``). http_port ......... diff --git a/routing/hostname_pattern.rst b/routing/hostname_pattern.rst index a1086c1a3b6..fc1bdf8313c 100644 --- a/routing/hostname_pattern.rst +++ b/routing/hostname_pattern.rst @@ -393,7 +393,7 @@ You can also set the host option on imported routes: # config/routes.yaml app_hello: - resource: '@ThirdPartyBundle/Resources/config/routing.yml' + resource: '@ThirdPartyBundle/Resources/config/routing.yaml' host: "hello.example.com" .. code-block:: xml diff --git a/security/remember_me.rst b/security/remember_me.rst index d964127a7d3..2691d18ad90 100644 --- a/security/remember_me.rst +++ b/security/remember_me.rst @@ -84,7 +84,7 @@ The ``remember_me`` firewall defines the following configuration options: ``secret`` (**required**) The value used to encrypt the cookie's content. It's common to use the - ``secret`` value defined in the ``app/config/parameters.yml`` file. + ``secret`` value defined in the ``APP_SECRET`` environment variable. ``name`` (default value: ``REMEMBERME``) The name of the cookie used to keep the user logged in. If you enable the diff --git a/serializer/custom_encoders.rst b/serializer/custom_encoders.rst index 24ca040292e..cb5f7aa81b9 100644 --- a/serializer/custom_encoders.rst +++ b/serializer/custom_encoders.rst @@ -52,7 +52,7 @@ Registering it in your app -------------------------- If you use the Symfony Framework. then you probably want to register this encoder -as a service in your app. If you're using the :ref:`default services.yml configuration `, +as a service in your app. If you're using the :ref:`default services.yaml configuration `, that's done automatically! .. tip:: diff --git a/templating/debug.rst b/templating/debug.rst index 4a6b352998b..f6c5b5f662c 100644 --- a/templating/debug.rst +++ b/templating/debug.rst @@ -53,7 +53,7 @@ The same mechanism can be used in Twig templates thanks to ``dump()`` function: {% endfor %} By design, the ``dump()`` function is only available if the ``kernel.debug`` -setting (in ``config.yml``) is ``true``, to avoid leaking sensitive information -in production. In fact, trying to use the ``dump()`` function when ``kernel.debug`` -is ``false`` (for example in the ``prod`` environment) will result in an -application error. +setting is ``true`` (which is usually set via the ``APP_DEBUG`` environment +variable), to avoid leaking sensitive information in production. In fact, trying +to use the ``dump()`` function when ``kernel.debug`` is ``false`` (for example +in the ``prod`` environment) will result in an application error. diff --git a/testing/http_authentication.rst b/testing/http_authentication.rst index 99c68486ed5..ff1f0d49a90 100644 --- a/testing/http_authentication.rst +++ b/testing/http_authentication.rst @@ -27,7 +27,7 @@ firewall, but only in the configuration file used by tests: .. code-block:: yaml - # app/config/config_test.yml + # config/packages/test/security.yaml security: firewalls: # replace 'main' by the name of your own firewall @@ -36,7 +36,7 @@ firewall, but only in the configuration file used by tests: .. code-block:: xml - + @@ -46,7 +46,7 @@ firewall, but only in the configuration file used by tests: .. code-block:: php - // app/config/config_test.php + // config/packages/test/security.php $container->loadFromExtension('security', array( 'firewalls' => array( // replace 'main' by the name of your own firewall diff --git a/translation.rst b/translation.rst index b3684fb1bf3..c579158527e 100644 --- a/translation.rst +++ b/translation.rst @@ -157,7 +157,7 @@ different formats, XLIFF being the recommended format: .. code-block:: yaml - # translations/messages.fr.yml + # translations/messages.fr.yaml Symfony is great: J'aime Symfony .. code-block:: php diff --git a/translation/lint.rst b/translation/lint.rst index 9fce4198f8a..bbd1f2e2428 100644 --- a/translation/lint.rst +++ b/translation/lint.rst @@ -15,7 +15,7 @@ translation file using the ``lint:yaml`` and ``lint:xliff`` commands: .. code-block:: terminal # lint a single file - $ ./bin/console lint:yaml translations/messages.en.yml + $ ./bin/console lint:yaml translations/messages.en.yaml $ ./bin/console lint:xliff translations/messages.en.xlf # lint a whole directory diff --git a/validation.rst b/validation.rst index 412676a908b..7fa2a08764a 100644 --- a/validation.rst +++ b/validation.rst @@ -259,7 +259,7 @@ previous configuration by the following: .. code-block:: yaml - # config/packages/framework.yml + # config/packages/framework.yaml framework: validation: { enable_annotations: true } @@ -439,7 +439,7 @@ options can be specified in this way. .. code-block:: yaml - # config/validator/validation.yml + # config/validator/validation.yaml App\Entity\Author: properties: genre: