Skip to content
Snippets Groups Projects

Add NoEntitiesExistYetWithHigherCardinality valdator from parent issue

1 unresolved thread

Closes #3513035

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Joris Vercammen
  • Björn Brala resolved all threads

    resolved all threads

  • Björn Brala added 1 commit

    added 1 commit

    • 94ff5c8e - doc: fix some comments as per feedback. Those were copied from another class...

    Compare with previous version

  • Björn Brala added 1 commit

    added 1 commit

    • 52260984 - doc: fix some comments as per feedback. Those were copied from another class...

    Compare with previous version

  • Björn Brala added 1 commit

    added 1 commit

    Compare with previous version

  • Björn Brala added 119 commits

    added 119 commits

    • 92ed9fb4...d171bb91 - 108 commits from branch project:11.x
    • a0c7fa5f - 1 earlier commit
    • b1428109 - Issue #3513035: Implement NoEntitiesExistYetWithHigherCardinality tests
    • d6a8fd71 - Issue #3513035: phpcs fix
    • f14dae53 - #3513035 Phpcs fix.
    • 7fcf3bab - Small update from parent issue in the order of the validate function.
    • 7fda1e21 - Small phpcs fix
    • d70d52db - fix: Deprecation test of installing a field without an installed schema fails....
    • 71310647 - fix: Don't check NoEntitiesExistYetWithHigherCardinalityValidator when custom_storage is involved
    • 47b4e3da - build: codestyle fixes
    • c038907b - doc: fix some comments as per feedback. Those were copied from another class...
    • 848ad1c9 - build: fix missing docblock

    Compare with previous version

  • 18 * Validates the NoEntitiesExistYetWithHigherCardinality constraint.
    19 *
    20 * This validator checks whether existing entities of a specified type have more
    21 * field values than allowed by the given cardinality limit. It performs an
    22 * aggregate query to find the maximum delta (number of field values) for the
    23 * specified field across all entities of the given type, and compares it
    24 * against the provided cardinality.
    25 *
    26 * The validation:
    27 * - Skips if cardinality is unlimited (-1)
    28 * - Skips if the field storage configuration doesn't exist
    29 * - Uses EntityTypeManager to query the maximum field delta
    30 * - Adds a violation if the maximum delta exceeds the cardinality
    31 *
    32 * This validator implements ContainerInjectionInterface to access the entity
    33 * type manager service from the Drupal service container.
    • Comment on lines +32 to +33

      not sure how much value this provides, I feel like it is likely to get out of date

    • Author Developer

      I started to explain a little more in comments lately in these issues to help review and understanding the validation. If you rather have it removed I'll do that.

    • Please register or sign in to reply
    Please register or sign in to reply
    Loading