diff --git a/README.md b/README.md index 018d09c..f22df27 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ the library's own API. ## Installation -**Opis JSON Schema** is available on [Packagist] and it can be installed from a +**Opis JSON Schema** is available on [Packagist], and it can be installed from a command line interface by using [Composer]. ```bash @@ -54,7 +54,7 @@ Or you could directly reference it into your `composer.json` file as a dependenc ```json { "require": { - "opis/json-schema": "^2.4" + "opis/json-schema": "^2.6" } } ``` diff --git a/composer.json b/composer.json index 6bb70ba..39c796d 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "require": { "php": "^7.4 || ^8.0", "ext-json": "*", - "opis/string": "^2.0", + "opis/string": "^2.1", "opis/uri": "^1.0" }, "require-dev": { diff --git a/src/ValidationContext.php b/src/ValidationContext.php index 9e22b3e..8918f1b 100644 --- a/src/ValidationContext.php +++ b/src/ValidationContext.php @@ -481,7 +481,7 @@ public function getStringLength(): ?int $shared = $this->sharedObject(); if (!isset($shared->stringLength)) { - $shared->stringLength = UnicodeString::from($this->currentData())->length(); + $shared->stringLength = UnicodeString::getStringLength($this->currentData()); } return $shared->stringLength;