8000 Merge branch '3.4' into 4.0 · symfony/symfony-docs@1865baf · GitHub
[go: up one dir, main page]

Skip to content
10000

Commit 1865baf

Browse files
committed
Merge branch '3.4' into 4.0
* 3.4: Added Symfony\Component\Security\Guard\Authenticator\AbstractFormLoginAuthenticator Reworded the note about supressing form validation [PropertyInfo] Fixed doc about PhpDocExtractor Update web_server_configuration.rst Update http_foundation.rst
2 parents d19ade7 + c35d58a commit 1865baf

File tree

4 files changed

+8
-32
lines changed

4 files changed

+8
-32
lines changed

components/property_info.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ PhpDocExtractor
379379

380380
.. note::
381381

382-
This extractor depends on the `phpdocumentor/reflection`_ library.
382+
This extractor depends on the `phpdocumentor/reflection-docblock`_ library.
383383

384384
Using `phpDocumentor Reflection`_ to parse property and method annotations,
385385
the :class:`Symfony\\Component\\PropertyInfo\\Extractor\\PhpDocExtractor`
@@ -481,8 +481,8 @@ service by defining it as a service with one or more of the following
481481
* ``property_info.access_extractor`` if it provides access information.
482482

483483
.. _Packagist: https://packagist.org/packages/symfony/property-info
484-
.. _`phpDocumentor Reflection`: https://github.com/phpDocumentor/Reflection
485-
.. _`phpdocumentor/reflection`: https://packagist.org/packages/phpdocumentor/reflection
484+
.. _`phpDocumentor Reflection`: https://github.com/phpDocumentor/ReflectionDocBlock
485+
.. _`phpdocumentor/reflection-docblock`: https://packagist.org/packages/phpdocumentor/reflection-docblock
486486
.. _`Doctrine ORM`: http://www.doctrine-project.org/projects/orm.html
487487
.. _`symfony/serializer`: https://packagist.org/packages/symfony/serializer
488488
.. _`symfony/doctrine-bridge`: https://packagist.org/packages/symfony/doctrine-bridge

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
8000
Original file line numberDiff line numberDiff line change
@@ -620,30 +620,5 @@ code from above to generate the submitted form can be reused.
620620
Suppressing Form Validation
621621
---------------------------
622622

623-
To suppress form validation you can use the ``POST_SUBMIT`` event and prevent
624-
the :class:`Symfony\\Component\\Form\\Extension\\Validator\\EventListener\\ValidationListener`
625-
from being called.
626-
627-
The reason for needing to do this is that even if you set ``validation_groups``
628-
to ``false`` there are still some integrity checks executed. For example
629-
an uploaded file will still be checked to see if it is too large and the form
630-
will still check to see if non-existing fields were submitted. To disable
631-
all of this, use a listener::
632-
633-
use Symfony\Component\Form\FormBuilderInterface;
634-
use Symfony\Component\Form\FormEvents;
635-
use Symfony\Component\Form\FormEvent;
636-
637-
public function buildForm(FormBuilderInterface $builder, array $options)
638-
{
639-
$builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
640-
$event->stopPropagation();
641-
}, 900); // Always set a higher priority than ValidationListener
642-
643-
// ...
644-
}
645-
646-
.. caution::
647-
648-
By doing this, you may accidentally disable something more than just form
649-
validation, since the ``POST_SUBMIT`` event may have other listeners.
623+
To suppress form validation, set ``validation_groups`` to ``false`` or an empty
624+
array.

security/guard_authentication.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ service to be passed) and add the following logic::
496496
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
497497
use Symfony\Component\Security\Csrf\CsrfToken;
498498
use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException;
499+
use Symfony\Component\Security\Guard\Authenticator\AbstractFormLoginAuthenticator;
499500

500501
class ExampleFormAuthenticator extends AbstractFormLoginAuthenticator
501502
{

0 commit comments

Comments
 (0)
0