• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wol-soft / php-json-schema-model-generator-production / 28736035699

05 Jul 2026 09:19AM UTC coverage: 17.373% (-0.1%) from 17.482%
28736035699

push

github

wol-soft
Add jsonPointer arg to unevaluated + contains exceptions

Follow-up coordination after b484f42 landed jsonPointer on every
ValidationException subclass on master: five exception classes added
after that PR on the jsonSchemaDraft2019 branch — UnevaluatedItems,
UnevaluatedProperties, RegularPropertyAsUnevaluatedProperty,
MinContains, MaxContains — still used the pre-pointer three-arg
signature. Since AbstractPropertyValidator::getExceptionParams() on
the generator side now unconditionally prepends the pointer after the
property name, those constructors rejected the call as a TypeError
whenever the corresponding validator fired.

Constructors now follow the master-side ordering: providedValue,
propertyName, jsonPointer, keyword-specific fields. The parent
ValidationException receives jsonPointer as its fourth argument, so
getJsonPointer() returns the schema keyword location that produced
the rejection (e.g. /properties/tags/unevaluatedItems).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

0 of 15 new or added lines in 5 files covered. (0.0%)

5 existing lines in 5 files now uncovered.

168 of 967 relevant lines covered (17.37%)

0.58 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Exception/Object/UnevaluatedPropertiesException.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace PHPModelGenerator\Exception\Object;
6

7
use PHPModelGenerator\Exception\ValidationException;
8

9
/**
10
 * Class UnevaluatedPropertiesException
11
 *
12
 * @package PHPModelGenerator\Exception\Object
13
 */
14
class UnevaluatedPropertiesException extends ValidationException
15
{
16
    /**
17
     * @param $providedValue
18
     * @param string[] $unevaluatedProperties
19
     */
NEW
20
    public function __construct(
×
21
        $providedValue,
22
        string $propertyName,
23
        string $jsonPointer,
24
        protected array $unevaluatedProperties,
25
    ) {
26
        parent::__construct(
×
27
            "Provided JSON for $propertyName contains not allowed unevaluated properties [" .
×
28
                join(", ", $unevaluatedProperties) . ']',
×
29
            $propertyName,
×
NEW
30
            $providedValue,
×
NEW
31
            $jsonPointer,
×
UNCOV
32
        );
×
33
    }
34

35
    /**
36
     * @return string[]
37
     */
38
    public function getUnevaluatedProperties(): array
×
39
    {
40
        return $this->unevaluatedProperties;
×
41
    }
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc