From 3910c1905811beb91af2d0a9d6a0d3e209daa505 Mon Sep 17 00:00:00 2001 From: elghailani Date: Fri, 10 Jul 2020 02:17:16 +0100 Subject: [PATCH 1/3] Update best_practices.rst --- best_practices.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/best_practices.rst b/best_practices.rst index a0a08c46f6c..71ee3b046df 100644 --- a/best_practices.rst +++ b/best_practices.rst @@ -307,7 +307,7 @@ Define Validation Constraints on the Underlying Object ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Attaching :doc:`validation constraints ` to form fields -instead of to the mapped object prevents the validation from being reused in +instead of to the mapped object prevents the validation from being checked in other forms or other places where the object is used. .. _best-practice-handle-form: @@ -318,7 +318,7 @@ Use a Single Action to Render and Process the Form :ref:`Rendering forms ` and :ref:`processing forms ` are two of the main tasks when handling forms. Both are too similar (most of the times, almost identical), so it's much simpler to let a single controller action -handle everything. +handle both. Internationalization -------------------- @@ -327,8 +327,8 @@ Use the XLIFF Format for Your Translation Files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Of all the translation formats supported by Symfony (PHP, Qt, ``.po``, ``.mo``, -JSON, CSV, INI, etc.) XLIFF and gettext have the best support in the tools used -by professional translators. And since it's based on XML, you can validate XLIFF +JSON, CSV, INI, etc.), ``XLIFF`` and ``gettext`` have the best support in the tools used +by professional translators. And since it's based on XML, you can validate ``XLIFF`` file contents as you write them. Symfony also supports notes in XLIFF files, making them more user-friendly for From a91e3715d28d274da0c474cff5d2bdbe5266d0cc Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 25 Sep 2020 17:47:41 +0200 Subject: [PATCH 2/3] Tweak --- best_practices.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/best_practices.rst b/best_practices.rst index 71ee3b046df..02434a7c812 100644 --- a/best_practices.rst +++ b/best_practices.rst @@ -307,7 +307,7 @@ Define Validation Constraints on the Underlying Object ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Attaching :doc:`validation constraints ` to form fields -instead of to the mapped object prevents the validation from being checked in +instead of to the mapped object prevents the validation from being reused in other forms or other places where the object is used. .. _best-practice-handle-form: From e21ed7c6f705b4e4cc07081cf2d7ad5d4757671a Mon Sep 17 00:00:00 2001 From: Charly Poppins Date: Mon, 28 Sep 2020 01:02:34 +0200 Subject: [PATCH 3/3] minor [#14292] UserProvider::supportsClass https://github.com/symfony/maker-bundle/pull/532 --- security/user_provider.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/user_provider.rst b/security/user_provider.rst index b64f689ac48..28193a51297 100644 --- a/security/user_provider.rst +++ b/security/user_provider.rst @@ -413,7 +413,7 @@ command will generate a nice skeleton to get you started:: */ public function supportsClass($class) { - return User::class === $class; + return User::class === $class || is_subclass_of($class, User::class); } }