Skip to content

Commit b339dbe

Browse files
committed
Fix PHP 8.1 warning: passing null to string parameter
1 parent 7db8ffe commit b339dbe

File tree

3 files changed

+65
-3
lines changed

3 files changed

+65
-3
lines changed

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
},
5454
"scripts": {
5555
"cs-fix": "php-cs-fixer fix --path-mode=intersection --config=./.php_cs.dist --ansi .",
56-
"cs-check": "php-cs-fixer fix --path-mode=intersection --config=.php_cs.dist --ansi --dry-run --diff --diff-format=udiff .",
56+
"cs-check": "php-cs-fixer fix --path-mode=intersection --config=.php_cs.dist --ansi --dry-run --diff --diff-format=udiff .",
5757
"test": "atoum --force-terminal && ./vendor/bin/behat --suite pickle --colors"
5858
},
5959
"extra": {
@@ -66,6 +66,9 @@
6666
},
6767
"hoa/stream:1.17.02.21": {
6868
"PHP 8 fixes": "patches/hoa/stream/0001-Fix-PHP-8-compatibility.patch"
69+
},
70+
"justinrainbow/json-schema:5.2.10": {
71+
"PHP 8.1 fixes": "patches/justinrainbow/json-schema/0001-PHP-8.1-fixes.patch"
6972
}
7073
}
7174
}

composer.lock

Lines changed: 41 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
From: Michele Locati <[email protected]>
2+
Date: Tue, 29 Jun 2021 18:08:46 +0200
3+
Subject: [PATCH] PHP 8.1 patched
4+
5+
---
6+
src/JsonSchema/Constraints/Constraint.php | 2 +-
7+
1 file changed, 1 insertion(+), 1 deletion(-)
8+
9+
diff --git a/src/JsonSchema/Constraints/Constraint.php b/src/JsonSchema/Constraints/Constraint.php
10+
--- a/src/JsonSchema/Constraints/Constraint.php
11+
+++ b/src/JsonSchema/Constraints/Constraint.php
12+
@@ -45,7 +45,7 @@ abstract class Constraint extends BaseConstraint implements ConstraintInterface
13+
$path = $path->withPropertyPaths(
14+
array_merge(
15+
$path->getPropertyPaths(),
16+
- array_filter(array($i), 'strlen')
17+
+ array_filter(array((string) $i), 'strlen')
18+
)
19+
);
20+

0 commit comments

Comments
 (0)