Skip to content

Commit b638361

Browse files
committed
Improved string length calculation
1 parent 1c59bfd commit b638361

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ the library's own API.
4242

4343
## Installation
4444

45-
**Opis JSON Schema** is available on [Packagist] and it can be installed from a
45+
**Opis JSON Schema** is available on [Packagist], and it can be installed from a
4646
command line interface by using [Composer].
4747

4848
```bash
@@ -54,7 +54,7 @@ Or you could directly reference it into your `composer.json` file as a dependenc
5454
```json
5555
{
5656
"require": {
57-
"opis/json-schema": "^2.4"
57+
"opis/json-schema": "^2.6"
5858
}
5959
}
6060
```

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"require": {
2424
"php": "^7.4 || ^8.0",
2525
"ext-json": "*",
26-
"opis/string": "^2.0",
26+
"opis/string": "^2.1",
2727
"opis/uri": "^1.0"
2828
},
2929
"require-dev": {

src/ValidationContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ public function getStringLength(): ?int
481481
$shared = $this->sharedObject();
482482

483483
if (!isset($shared->stringLength)) {
484-
$shared->stringLength = UnicodeString::from($this->currentData())->length();
484+
$shared->stringLength = UnicodeString::getStringLength($this->currentData());
485485
}
486486

487487
return $shared->stringLength;

0 commit comments

Comments
 (0)