Problem/Motivation

In the

function hook_validation_constraint_alter(array &$definitions) {
  $definitions['Null']['class'] = '\Drupal\mymodule\Validator\Constraints\MyClass';
}

"\Validator\" should be replaced by "\Plugin\Validation\"

Proposed resolution

The function should become

function hook_validation_constraint_alter(array &$definitions) {
  $definitions['Null']['class'] = '\Drupal\mymodule\Plugin\Validation\Constraints\MyClass';
}

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

le72 created an issue. See original summary.

le72’s picture

Issue summary: View changes
cilefen’s picture

Status: Needs review » Active

There is not a diff or a branch to review, so I am setting this back to "Active".

larowlan’s picture

Issue tags: +Novice
MeenakshiG’s picture

Assigned: Unassigned » MeenakshiG
Shashwat Purav’s picture

Status: Active » Needs review
FileSize
527 bytes

Patch added.

Abhijith S’s picture

FileSize
65.99 KB

Applied patch #6 in 9.1.x.The path of validator is changed by this patch.

after

MeenakshiG’s picture

Assigned: MeenakshiG » Unassigned
le72’s picture

Status: Needs review » Reviewed & tested by the community

Thank you for creating a patch file. Changing status to reviewed.

ilgnerfagundes’s picture

FileSize
64.62 KB

The patch works correctly, RTBC +1

  • catch committed 3824b36 on 9.2.x
    Issue #3197135 by Shashwat Purav, ilgnerfagundes, le72:...

  • catch committed a7eaf5d on 9.1.x
    Issue #3197135 by Shashwat Purav, ilgnerfagundes, le72:...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!

alexpott’s picture

@ilgnerfagundes as per #3189587-8: Add documentation for taxonomy terms source plugins and elsewhere, thank you for looking into this issue , but posting screenshots of your codebase or CLI does not advance the issue, since the automated testing infrastructure tells us whether the patch applies correctly.

So, I've removed the issue credit for that screenshot. In the future, you can get credit for issues by reading the issue to understand its purpose, and posting your review or testing of that purpose. Thank you!

ilgnerfagundes’s picture

but alex i just put the screenshot to prove that i downloaded the patch, i ran it and did the tests, people above didn't even put any print and still proved it worked and i didn't?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.