Loading core/lib/Drupal/Core/Theme/Component/ComponentValidator.php +1 −3 Original line number Diff line number Diff line Loading @@ -208,9 +208,7 @@ public function validateProps(array $context, Component $component): bool { $errors = array_filter( $this->validator->getErrors(), function (array $error) use ($context): bool { // Support 5.0 ($error['constraint']) and 6.0 // ($error['constraint']['name']) at the same time. if (($error['constraint']['name'] ?? $error['constraint'] ?? '') !== 'type') { if ($error['constraint']['name'] !== 'type') { return TRUE; } return !Element::isRenderArray($context[$error['property']] ?? NULL); Loading core/modules/jsonapi/tests/modules/jsonapi_response_validator/src/EventSubscriber/ResourceResponseValidator.php +1 −2 Original line number Diff line number Diff line Loading @@ -117,8 +117,7 @@ protected function validateResponse(Response $response, Request $request): bool * TRUE if the string is a valid instance of the schema. FALSE otherwise. */ protected function validateSchema(object $schema, mixed $response_data): bool { // @phpstan-ignore method.deprecated $this->validator->check($response_data, $schema); $this->validator->validate($response_data, $schema); $is_valid = $this->validator->isValid(); if (!$is_valid) { $this->logger->debug("Response failed validation.\nResponse:\n@data\n\nErrors:\n@errors", [ Loading Loading
core/lib/Drupal/Core/Theme/Component/ComponentValidator.php +1 −3 Original line number Diff line number Diff line Loading @@ -208,9 +208,7 @@ public function validateProps(array $context, Component $component): bool { $errors = array_filter( $this->validator->getErrors(), function (array $error) use ($context): bool { // Support 5.0 ($error['constraint']) and 6.0 // ($error['constraint']['name']) at the same time. if (($error['constraint']['name'] ?? $error['constraint'] ?? '') !== 'type') { if ($error['constraint']['name'] !== 'type') { return TRUE; } return !Element::isRenderArray($context[$error['property']] ?? NULL); Loading
core/modules/jsonapi/tests/modules/jsonapi_response_validator/src/EventSubscriber/ResourceResponseValidator.php +1 −2 Original line number Diff line number Diff line Loading @@ -117,8 +117,7 @@ protected function validateResponse(Response $response, Request $request): bool * TRUE if the string is a valid instance of the schema. FALSE otherwise. */ protected function validateSchema(object $schema, mixed $response_data): bool { // @phpstan-ignore method.deprecated $this->validator->check($response_data, $schema); $this->validator->validate($response_data, $schema); $is_valid = $this->validator->isValid(); if (!$is_valid) { $this->logger->debug("Response failed validation.\nResponse:\n@data\n\nErrors:\n@errors", [ Loading