Skip to content

Commit 4e52243

Browse files
committed
Merge branch '6.3' into 6.4
* 6.3: Prefer placing services before query parameters [Console] Fix a typo after symfony#18739 [Validator] add section for overridden properties
2 parents 3a2d65b + 839f8b3 commit 4e52243

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

console.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ tools capable of helping you with different tasks:
602602
* :doc:`/components/console/helpers/table`: displays tabular data as a table
603603
* :doc:`/components/console/helpers/debug_formatter`: provides functions to
604604
output debug information when running an external program
605-
* :doc:`/components/console/helpers/processhelper`: allows to run processes using ``DebugProcessHelper``
605+
* :doc:`/components/console/helpers/processhelper`: allows to run processes using ``DebugFormatterHelper``
606606
* :doc:`/components/console/helpers/cursor`: allows to manipulate the cursor in the terminal
607607

608608
.. _`exit status`: https://en.wikipedia.org/wiki/Exit_status

doctrine.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ and injected by the dependency injection container::
539539
class ProductController extends AbstractController
540540
{
541541
#[Route('/product/{id}', name: 'product_show')]
542-
public function show(int $id, ProductRepository $productRepository): Response
542+
public function show(ProductRepository $productRepository, int $id): Response
543543
{
544544
$product = $productRepository
545545
->find($id);

validation.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,20 @@ constraint that's applied to the class itself. When that class is validated,
638638
methods specified by that constraint are simply executed so that each can
639639
provide more custom validation.
640640

641+
Validating Object With Inheritance
642+
----------------------------------
643+
644+
When you validate an object that extends another class, the validator
645+
automatically validates constraints defined in the parent class as well.
646+
647+
**The constraints defined in the parent properties will be applied to the child
648+
properties even if the child properties override those constraints**. Symfony
649+
will always merge the parent constraints for each property.
650+
651+
You can't change this behavior, but you can overcome it by defining the parent
652+
and the child contraints in different :doc:`validation groups </validation/groups>`
653+
and then select the appropriate group when validating each object.
654+
641655
Debugging the Constraints
642656
-------------------------
643657

0 commit comments

Comments
 (0)