diff --git a/components/form.rst b/components/form.rst index dfbcfdfdcb4..bd9df171d5d 100644 --- a/components/form.rst +++ b/components/form.rst @@ -648,14 +648,15 @@ method: This defines a common form "workflow", which contains 3 different possibilities: -1) On the initial GET request (i.e. when the user "surfs" to your page), +#. On the initial GET request (i.e. when the user "surfs" to your page), build your form and render it; -If the request is a POST, process the submitted data (via :method:`Symfony\\Component\\Form\\Form::handleRequest`). -Then: + If the request is a POST, process the submitted data (via :method:`Symfony\\Component\\Form\\Form::handleRequest`). -2) if the form is invalid, re-render the form (which will now contain errors); -3) if the form is valid, perform some action and redirect. + Then: + +#. if the form is invalid, re-render the form (which will now contain errors); +#. if the form is valid, perform some action and redirect. Luckily, you don't need to decide whether or not a form has been submitted. Just pass the current request to the :method:`Symfony\\Component\\Form\\Form::handleRequest` diff --git a/configuration/secrets.rst b/configuration/secrets.rst index ba0c05bb278..845a2106af7 100644 --- a/configuration/secrets.rst +++ b/configuration/secrets.rst @@ -240,32 +240,32 @@ Deploy Secrets to Production Due to the fact that decryption keys should never be committed, you will need to manually store this file somewhere and deploy it. There are 2 ways to do that: -1) Uploading the file: +#. Uploading the file -The first option is to copy the **production decryption key** - -``config/secrets/prod/prod.decrypt.private.php`` to your server. + The first option is to copy the **production decryption key** - + ``config/secrets/prod/prod.decrypt.private.php`` to your server. -2) Using an Environment Variable +#. Using an Environment Variable -The second way is to set the ``SYMFONY_DECRYPTION_SECRET`` environment variable -to the base64 encoded value of the **production decryption key**. A fancy way to -fetch the value of the key is: + The second way is to set the ``SYMFONY_DECRYPTION_SECRET`` environment variable + to the base64 encoded value of the **production decryption key**. A fancy way to + fetch the value of the key is: -.. code-block:: terminal + .. code-block:: terminal - # this command only gets the value of the key; you must also set an env var - # in your system with this value (e.g. `export SYMFONY_DECRYPTION_SECRET=...`) - $ php -r 'echo base64_encode(require "config/secrets/prod/prod.decrypt.private.php");' + # this command only gets the value of the key; you must also set an env var + # in your system with this value (e.g. `export SYMFONY_DECRYPTION_SECRET=...`) + $ php -r 'echo base64_encode(require "config/secrets/prod/prod.decrypt.private.php");' -To improve performance (i.e. avoid decrypting secrets at runtime), you can decrypt -your secrets during deployment to the "local" vault: + To improve performance (i.e. avoid decrypting secrets at runtime), you can decrypt + your secrets during deployment to the "local" vault: -.. code-block:: terminal + .. code-block:: terminal - $ php bin/console secrets:decrypt-to-local --force --env=prod + $ php bin/console secrets:decrypt-to-local --force --env=prod -This will write all the decrypted secrets into the ``.env.prod.local`` file. -After doing this, the decryption key does *not* need to remain on the server(s). + This will write all the decrypted secrets into the ``.env.prod.local`` file. + After doing this, the decryption key does *not* need to remain on the server(s). Rotating Secrets ----------------