You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thus, using the addError method on a JsonSchema\Validator instance throws an error :
php > require_once "target/vendor/autoload.php";
php > $validator = new JsonSchema\Validator();
php > $validator->addError(null,'An error message.');
PHP Warning: Uncaught Error: Call to undefined method JsonSchema\Validator::convertJsonPointerIntoPropertyPath() in /home/nanu/git/rtms/libraries/core/target/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/BaseConstraint.php:49
Stack trace:
#0 php shell code(1): JsonSchema\Constraints\BaseConstraint->addError()
#1 {main}
thrown in /home/nanu/git/rtms/libraries/core/target/vendor/justinrainbow/json-schema/src/JsonSchema/Constraints/BaseConstraint.php on line 49
Note that the convertJsonPointerIntoPropertyPath() method is defined in the JsonSchema\Constraints\Constraint abstract class. The latter extends JsonSchema\Constraints\BaseConstraint. Moving the method in this class solves the issue.
The text was updated successfully, but these errors were encountered:
The class
JsonSchema\Constraints\BaseConstraint
uses a methodconvertJsonPointerIntoPropertyPath()
that is not defined though the class is not abstract and it does not extend any other.See https://github.com/justinrainbow/json-schema/blob/f4f0c3457811006f861c466a10c6c24f3e92f9ae/src/JsonSchema/Constraints/BaseConstraint.php#L52
Thus, using the
addError
method on aJsonSchema\Validator
instance throws an error :Note that the
convertJsonPointerIntoPropertyPath()
method is defined in theJsonSchema\Constraints\Constraint
abstract class. The latter extendsJsonSchema\Constraints\BaseConstraint
. Moving the method in this class solves the issue.The text was updated successfully, but these errors were encountered: