ComplexDataConstraintValidator should pass on data using the canonical representation

Created on 1 April 2015, over 9 years ago
Updated 6 March 2024, 8 months ago

ComplexDataConstraintValidator contains the following code - but the $property instanceof ListInterface can never be true because the class is not used.

      $is_container = $property instanceof ComplexDataInterface || $property instanceof ListInterface;
      if (!$is_container) {
        $property = $property->getValue();
      }
      elseif ($property->isEmpty()) {
        // @see \Drupal\Core\TypedData\Validation\PropertyContainerMetadata::accept();
        $property = NULL;
      }

Since this is not failing anything maybe we can just remove the check.

πŸ› Bug report
Status

Closed: outdated

Version

11.0 πŸ”₯

Component
EntityΒ  β†’

Last updated about 13 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States Kristen Pol Santa Cruz, CA, USA

    Thanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.

    As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)". This issue was marked "Postponed (maintainer needs more info)" almost a year ago and there has been no activity since that time.

    Since we need more information to move forward with this issue, I am keeping the status at Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

  • Status changed to Closed: outdated 8 months ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    More information was asked 2 years ago and none has been supplied. I see that the code in the patch was removed in #2343035: Upgrade validator integration for Symfony versions 2.5+ β†’ . Base on that and #22 I am closing this as outdated.

    Thanks

Production build 0.71.5 2024