Skip to content

Commit 03a089c

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Reworded the note about supressing form validation Update web_server_configuration.rst Update http_foundation.rst
2 parents 82e6823 + 89ab51e commit 03a089c

File tree

3 files changed

+6
-31
lines changed

3 files changed

+6
-31
lines changed

create_framework/http_foundation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,15 +285,15 @@ the wheel.
285285

286286
I've almost forgot to talk about one added benefit: using the HttpFoundation
287287
component is the start of better interoperability between all frameworks and
288-
applications using it (like `Symfony`_, `Drupal 8`_, `phpBB 4`_, `ezPublish
288+
applications using it (like `Symfony`_, `Drupal 8`_, `phpBB 3`_, `ezPublish
289289
5`_, `Laravel`_, `Silex`_ and `more`_).
290290

291291
.. _`Twig`: http://twig.sensiolabs.org/
292292
.. _`HTTP specification`: http://tools.ietf.org/wg/httpbis/
293293
.. _`audited`: https://symfony.com/blog/symfony2-security-audit
294294
.. _`Symfony`: https://symfony.com/
295295
.. _`Drupal 8`: https://drupal.org/
296-
.. _`phpBB 4`: https://www.phpbb.com/
296+
.. _`phpBB 3`: https://www.phpbb.com/
297297
.. _`ezPublish 5`: http://ez.no/
298298
.. _`Laravel`: http://laravel.com/
299299
.. _`Silex`: http://silex.sensiolabs.org/

form/dynamic_form_modification.rst

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -663,30 +663,5 @@ code from above to generate the submitted form can be reused.
663663
Suppressing Form Validation
664664
---------------------------
665665

666-
To suppress form validation you can use the ``POST_SUBMIT`` event and prevent
667-
the :class:`Symfony\\Component\\Form\\Extension\\Validator\\EventListener\\ValidationListener`
668-
from being called.
669-
670-
The reason for needing to do this is that even if you set ``validation_groups``
671-
to ``false`` there are still some integrity checks executed. For example
672-
an uploaded file will still be checked to see if it is too large and the form
673-
will still check to see if non-existing fields were submitted. To disable
674-
all of this, use a listener::
675-
676-
use Symfony\Component\Form\FormBuilderInterface;
677-
use Symfony\Component\Form\FormEvents;
678-
use Symfony\Component\Form\FormEvent;
679-
680-
public function buildForm(FormBuilderInterface $builder, array $options)
681-
{
682-
$builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
683-
$event->stopPropagation();
684-
}, 900); // Always set a higher priority than ValidationListener
685-
686-
// ...
687-
}
688-
689-
.. caution::
690-
691-
By doing this, you may accidentally disable something more than just form
692-
validation, since the ``POST_SUBMIT`` event may have other listeners.
666+
To suppress form validation, set ``validation_groups`` to ``false`` or an empty
667+
array.

setup/web_server_configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ The **minimum configuration** to get your application running under Nginx is:
274274
# This rule should only be placed on your development environment
275275
# In production, don't include this and don't deploy app_dev.php or config.php
276276
location ~ ^/(app_dev|config)\.php(/|$) {
277-
fastcgi_pass unix:/var/run/php7.1-fpm.sock;
277+
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
278278
fastcgi_split_path_info ^(.+\.php)(/.*)$;
279279
include fastcgi_params;
280280
# When you are using symlinks to link the document root to the
@@ -289,7 +289,7 @@ The **minimum configuration** to get your application running under Nginx is:
289289
}
290290
# PROD
291291
location ~ ^/app\.php(/|$) {
292-
fastcgi_pass unix:/var/run/php7.1-fpm.sock;
292+
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
293293
fastcgi_split_path_info ^(.+\.php)(/.*)$;
294294
include fastcgi_params;
295295
# When you are using symlinks to link the document root to the

0 commit comments

Comments
 (0)