Skip to content
Snippets Groups Projects
Unverified Commit 4eb755b4 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3516348 by bbrala, longwave, andypost, larowlan, jackfoust, mlubbers:...

Issue #3516348 by bbrala, longwave, andypost, larowlan, jackfoust, mlubbers: Allow 6.x version of justinrainbow/json-schema

(cherry picked from commit 65683671)
parent a66d9a73
No related branches found
No related tags found
14 merge requests!12812Issue #3527142 by andypost, catch, longwave, xjm: Update Composer and...,!12811Issue #3527142 by andypost, catch, longwave, xjm: Update Composer and...,!12686Draft: Issue #3535330: Assets paths in CSS no longer rewritten when aggregation is enabled,!12661Issue #3255804 by godotislate, longwave, berdir, alexpott, catch, andypost,...,!12660Issue #3255804 by godotislate, longwave, berdir, alexpott, catch, andypost,...,!12618Issue #3522970 by longwave, smustgrave: Remove unused BrowserTestBase::$originalContainer,!12486Resolve #3532360 "Check for session",!12473Issue #3521639 by mstrelan, smustgrave for 11.2,!12462Issue #3523109 by ghost of drupal past, donquixote, nicxvan, dww, larowlan,...,!12357Issue #3529639 by mradcliffe, smustgrave, solomon.yifru: replacing a depricated css,!12209#3526180 Ensure displace runs with new navigation module.,!9103Issue #3150540 by kriboogh: Configuration langcode is forced to site default language,!8811Issue #3129179: Provide some way to rebuild the persistent bundle field map,!7916Remove taxonomy dependency on node module - 11.x
Pipeline #496069 passed with warnings
Pipeline: drupal

#496076

    ......@@ -4,7 +4,7 @@
    "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
    "This file is @generated automatically"
    ],
    "content-hash": "e359f7a4bb5e2c4520dd885d47b22963",
    "content-hash": "53d1316a007b7c509b5bda590321ed8f",
    "packages": [
    {
    "name": "asm89/stack-cors",
    ......
    ......@@ -12,7 +12,7 @@
    "colinodell/psr-testlogger": "^1.2",
    "composer/composer": "^2.8.1",
    "drupal/coder": "^8.3.10",
    "justinrainbow/json-schema": "^5.2",
    "justinrainbow/json-schema": "^5.2 || ^6.3",
    "lullabot/mink-selenium2-driver": "^1.7.3",
    "lullabot/php-webdriver": "^2.0.5",
    "mglaman/phpstan-drupal": "^1.2.11 || ^2.0.4",
    ......
    ......@@ -199,7 +199,9 @@ public function validateProps(array $context, Component $component): bool {
    $errors = array_filter(
    $this->validator->getErrors(),
    function (array $error) use ($context): bool {
    if (($error['constraint'] ?? '') !== 'type') {
    // Support 5.0 ($error['constraint']) and 6.0
    // ($error['constraint']['name']) at the same time.
    if (($error['constraint']['name'] ?? $error['constraint'] ?? '') !== 'type') {
    return TRUE;
    }
    return !Element::isRenderArray($context[$error['property']] ?? NULL);
    ......
    ......@@ -9,6 +9,7 @@
    use Drupal\Core\Theme\Component\ComponentValidator;
    use Drupal\Core\Render\Component\Exception\InvalidComponentException;
    use Drupal\Core\Plugin\Component;
    use JsonSchema\ConstraintError;
    use JsonSchema\Constraints\Factory;
    use JsonSchema\Constraints\FormatConstraint;
    use JsonSchema\Entity\JsonPointer;
    ......@@ -359,8 +360,14 @@ public function check(&$element, $schema = NULL, ?JsonPointer $path = NULL, $i =
    }
    if ($schema->format === 'uri') {
    if (\is_string($element) && !UrlHelper::isValid($element)) {
    if (class_exists(ConstraintError::class)) {
    $this->addError(ConstraintError::FORMAT_URL(), $path, ['format' => $schema->format]);
    }
    else {
    // @todo Remove when we no longer support justinrainbow/json-schema v5.
    $this->addError($path, 'Invalid URL format', 'format', ['format' => $schema->format]);
    }
    }
    return;
    }
    parent::check($element, $schema, $path, $i);
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment