diff --git a/CHANGELOG.md b/CHANGELOG.md index 31ecc436..93132a7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix pugx badges in README ([#742](https://github.com/jsonrainbow/json-schema/pull/742)) - Add missing property in UriResolverTest ([#743](https://github.com/jsonrainbow/json-schema/pull/743)) - Correct casing of paths used in tests ([#745](https://github.com/jsonrainbow/json-schema/pull/745)) +- Resolve deprecations of optional parameter ([#752](https://github.com/jsonrainbow/json-schema/pull/752)) ### Changed - Bump to minimum PHP 7.2 ([#746](https://github.com/jsonrainbow/json-schema/pull/746)) diff --git a/src/JsonSchema/Constraints/Constraint.php b/src/JsonSchema/Constraints/Constraint.php index bc20e97b..2390bf90 100644 --- a/src/JsonSchema/Constraints/Constraint.php +++ b/src/JsonSchema/Constraints/Constraint.php @@ -40,7 +40,7 @@ abstract class Constraint extends BaseConstraint implements ConstraintInterface * * @return JsonPointer; */ - protected function incrementPath(?JsonPointer $path = null, $i) + protected function incrementPath(?JsonPointer $path, $i) { $path = $path ?: new JsonPointer(''); diff --git a/src/JsonSchema/Constraints/ObjectConstraint.php b/src/JsonSchema/Constraints/ObjectConstraint.php index 36daf77d..5b7d1d00 100644 --- a/src/JsonSchema/Constraints/ObjectConstraint.php +++ b/src/JsonSchema/Constraints/ObjectConstraint.php @@ -52,7 +52,7 @@ public function check(&$element, $schema = null, ?JsonPointer $path = null, $pro $this->validateElement($element, $matches, $schema, $path, $properties, $additionalProp); } - public function validatePatternProperties($element, ?JsonPointer $path = null, $patternProperties) + public function validatePatternProperties($element, ?JsonPointer $path, $patternProperties) { $matches = []; foreach ($patternProperties as $pregex => $schema) {