diff --git a/best_practices.rst b/best_practices.rst index a0a08c46f6c..02434a7c812 100644 --- a/best_practices.rst +++ b/best_practices.rst @@ -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 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); } }