Problem/Motivation
In #3420990: Convert Constraint plugin discovery to attributes, \Drupal\Core\Validation\Annotation\Constraint
plugins were converted to Attributes. MediaMappingsConstraint
landed after that in #3271688: Remove source from media mappings and did not used Attributes.
Steps to reproduce
Proposed resolution
Use attribute for MediaMappingsConstraint