Skip to content

Commit d9d665f

Browse files
refactor: cleanup redundant checks (#796)
Fixes #793 removing PHP 5.5 and HHVM checks
1 parent b62fea7 commit d9d665f

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121
### Changed
2222
- Used PHPStan's int-mask-of<T> type where applicable ([#779](https://github.com/jsonrainbow/json-schema/pull/779))
2323
- Fixed some PHPStan errors ([#781](https://github.com/jsonrainbow/json-schema/pull/781))
24+
- Cleanup redundant checks ([#796](https://github.com/jsonrainbow/json-schema/pull/796))
2425

2526
## [6.1.0] - 2025-02-04
2627
### Added

tests/ValidatorTest.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace JsonSchema\Tests;
44

5+
use JsonSchema\Exception\InvalidArgumentException;
56
use JsonSchema\Validator;
67
use PHPUnit\Framework\TestCase;
78

@@ -31,18 +32,12 @@ public function testValidateWithAssocSchemaWithRelativeRefs(): void
3132

3233
public function testBadAssocSchemaInput(): void
3334
{
34-
if (version_compare(phpversion(), '5.5.0', '<')) {
35-
$this->markTestSkipped('PHP versions < 5.5.0 trigger an error on json_encode issues');
36-
}
37-
if (defined('HHVM_VERSION')) {
38-
$this->markTestSkipped('HHVM has no problem with encoding resources');
39-
}
40-
$schema = ['propertyOne' => fopen('php://stdout', 'w')];
35+
$schema = ['propertyOne' => fopen('php://stdout', 'wb')];
4136
$data = json_decode('{"propertyOne":[42]}', true);
4237

4338
$validator = new Validator();
4439

45-
$this->expectException('\JsonSchema\Exception\InvalidArgumentException');
40+
$this->expectException(InvalidArgumentException::class);
4641
$validator->validate($data, $schema);
4742
}
4843

0 commit comments

Comments
 (0)