Skip to content

Commit 6313ec5

Browse files
committed
Composer update; Add more output to ValidatorDebugger; Add last errors to Validator
1 parent a31c213 commit 6313ec5

File tree

8 files changed

+525
-684
lines changed

8 files changed

+525
-684
lines changed

README.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,19 @@
11
# PHP Json Schema Validator
22

33
[![Release](https://img.shields.io/github/v/release/ixnode/php-json-schema-validator)](https://github.com/ixnode/php-json-schema-validator/releases)
4-
[![PHP](https://img.shields.io/badge/PHP-^8.0-777bb3.svg?logo=php&logoColor=white&labelColor=555555&style=flat)](https://www.php.net/supported-versions.php)
4+
[![](https://img.shields.io/github/release-date/ixnode/php-json-schema-validator)](https://github.com/ixnode/php-json-schema-validator/releases)
5+
![](https://img.shields.io/github/repo-size/ixnode/php-json-schema-validator.svg)
6+
[![PHP](https://img.shields.io/badge/PHP-^8.2-777bb3.svg?logo=php&logoColor=white&labelColor=555555&style=flat)](https://www.php.net/supported-versions.php)
57
[![PHPStan](https://img.shields.io/badge/PHPStan-Level%20Max-brightgreen.svg?style=flat)](https://phpstan.org/user-guide/rule-levels)
8+
[![PHPUnit](https://img.shields.io/badge/PHPUnit-Unit%20Tests-6b9bd2.svg?style=flat)](https://phpunit.de)
69
[![PHPCS](https://img.shields.io/badge/PHPCS-PSR12-brightgreen.svg?style=flat)](https://www.php-fig.org/psr/psr-12/)
10+
[![PHPMD](https://img.shields.io/badge/PHPMD-ALL-364a83.svg?style=flat)](https://github.com/phpmd/phpmd)
11+
[![Rector - Instant Upgrades and Automated Refactoring](https://img.shields.io/badge/Rector-PHP%208.2-73a165.svg?style=flat)](https://github.com/rectorphp/rector)
712
[![LICENSE](https://img.shields.io/github/license/ixnode/php-json-schema-validator)](https://github.com/ixnode/php-json-schema-validator/blob/master/LICENSE)
813

914
> An easy-to-use PHP Json Schema Validator on top of [opis/json-schema](https://github.com/opis/json-schema).
1015
11-
## Installation
12-
13-
```bash
14-
composer require ixnode/php-json-schema-validator
15-
```
16-
17-
```bash
18-
vendor/bin/php-json-schema-validator -V
19-
```
20-
21-
```bash
22-
php-json-schema-validator 0.1.0 (12-31-2022 15:51:08) - Björn Hempel <bjoern@hempel.li>
23-
```
24-
25-
## Usage
16+
## 1. Usage
2617

2718
```php
2819
use Ixnode\PhpJsonSchemaValidator\Validator;
@@ -38,9 +29,24 @@ $schema = [
3829
$validator = new Validator(new Json($data), new Json($schema));
3930

4031
$valid = $validator->validate();
32+
// (bool) true
33+
```
34+
35+
## 2. Installation
36+
37+
```bash
38+
composer require ixnode/php-json-schema-validator
39+
```
40+
41+
```bash
42+
vendor/bin/php-json-schema-validator -V
43+
```
44+
45+
```bash
46+
php-json-schema-validator 0.1.0 (12-31-2022 15:51:08) - Björn Hempel <bjoern@hempel.li>
4147
```
4248

43-
## Development
49+
## 3. Library development
4450

4551
```bash
4652
git clone git@github.com:ixnode/php-json-schema-validator.git && cd php-json-schema-validator
@@ -54,6 +60,6 @@ composer install
5460
composer test
5561
```
5662

57-
## License
63+
## 4. License
5864

5965
This tool is licensed under the MIT License - see the [LICENSE](/LICENSE) file for details

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
}
2323
},
2424
"require": {
25-
"php": "^8.0",
26-
"ixnode/php-naming-conventions": "^0.1.1",
25+
"php": "^8.2",
2726
"opis/json-schema": "^2.3",
28-
"ixnode/php-container": "^0.1.2",
29-
"ixnode/php-checker": "^0.1.3",
30-
"ixnode/php-exception": "^0.1.11"
27+
"ixnode/php-naming-conventions": "^0.1",
28+
"ixnode/php-container": "^0.1",
29+
"ixnode/php-checker": "^0.1",
30+
"ixnode/php-exception": "^0.1"
3131
},
3232
"require-dev": {
3333
"phpunit/phpunit": "^9.5",

0 commit comments

Comments
 (0)