EntityConstraintViolationList::addAll doesn't reset groupings

Created on 29 November 2024, 19 days ago

Problem/Motivation

\Symfony\Component\Validator\ConstraintViolationList::addAll simply adds to the existing violations property and doesn't call the individual ::add method.
This means calling addAll on \Drupal\Core\Entity\EntityConstraintViolationList doesn't reset violationOffsetsByField and entityViolationOffsets like calling ::add does

Steps to reproduce

Proposed resolution

Implement ::addAll in \Drupal\Core\Entity\EntityConstraintViolationList and have it reset the two properties then call the parent
Write a test to validate it works

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

entity system

Created by

🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024