Skip to content

Commit 2a626e7

Browse files
authored
Fix PHP version check (#100)
1 parent 93e8b6e commit 2a626e7

File tree

4 files changed

+33
-30
lines changed

4 files changed

+33
-30
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77

8+
## [0.12.27] - 2020-01-26
9+
10+
### Fixed
11+
- PHP version check for empty property name support.
12+
813
## [0.12.26] - 2020-01-24
914

1015
### Fixed

composer.lock

Lines changed: 26 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Schema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ private function processObject($data, Context $options, $path, $result = null)
798798
* @var mixed $value
799799
*/
800800
foreach ($array as $key => $value) {
801-
if ($key === '' && PHP_VERSION_ID < 71000) {
801+
if ($key === '' && PHP_VERSION_ID < 70100) {
802802
$this->fail(new InvalidValue('Empty property name'), $path);
803803
}
804804

tests/src/PHPUnit/Constraint/AdditionalItemsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testEmptyPropertyName()
3030
$schema = new Schema();
3131
$schema->additionalProperties = Schema::integer();
3232

33-
if (PHP_VERSION_ID < 71000) {
33+
if (PHP_VERSION_ID < 70100) {
3434
$this->setExpectedException(get_class(new InvalidValue()), 'Empty property name');
3535
}
3636

0 commit comments

Comments
 (0)