* Validates the LangcodeRequiredIfTranslatableValues constraint.
@@ -22,8 +21,13 @@ public function validate(mixed $value, Constraint $constraint): void {
$mapping=$this->context->getObject();
assert($mappinginstanceofMapping);
if($mapping!==$this->context->getRoot()){
thrownewLogicException('The LangcodeRequiredIfTranslatableValues constraint can only operate on the root object being validated.');
$root=$this->context->getRoot();
if($mapping!==$root){
@trigger_error(sprintf(
'The LangcodeRequiredIfTranslatableValues constraint can only be applied to the root object being validated, using the \'config_object\' schema type on \'%s\' is deprecated in drupal:10.3.0 and will trigger a \LogicException in drupal:11.0.0. See https://www.drupal.org/node/3459863',
$this->expectDeprecation('The LangcodeRequiredIfTranslatableValues constraint can only be applied to the root object being validated, using the \'config_object\' schema type on \'config_test.foo::broken_langcode_required\' is deprecated in drupal:10.3.0 and will trigger a \LogicException in drupal:11.0.0. See https://www.drupal.org/node/3459863');