justinrainbow/json-schema version 3/4#27
justinrainbow/json-schema version 3/4#27thewilkybarkid wants to merge 1 commit intowebmozart:masterfrom
Conversation
90cce2c to
572dd7c
Compare
| $this->validator->validate((object) array('name' => 'Bernhard'), 12345); | ||
| } | ||
|
|
||
| /** |
There was a problem hiding this comment.
Why did you remove these tests? How does the validator behave now in these cases?
There was a problem hiding this comment.
get_object_vars() expects parameter 1 to be object, string given in justinrainbow/json-schema/src/JsonSchema/SchemaStorage.php:103. Don't think there's a way to fix it here.
composer.json
Outdated
| "require": { | ||
| "php": "^5.3.3|^7.0", | ||
| "justinrainbow/json-schema": "^2.0", | ||
| "justinrainbow/json-schema": "^3.0", |
There was a problem hiding this comment.
Is there a reason not to allow both versions 2.x and 3.x?
There was a problem hiding this comment.
thanks for the hint @staabm! I think it would indeed be good to support all three branches. @thewilkybarkid could you adapt the PR?
6290407 to
5b861a7
Compare
|
This now supports versions 2, 3 and 4, though it's getting quite messy internally. |
|
@webmozart, can we get this merged? I just ran into an incompatibility issue and this would help me greatly. |
|
Ping @webmozart. I now have a schema that v2 appears to fail on, but I can't update due to this library (which is a dependency of Puli, I'm not actually using it myself). |
|
What is the latest here, is there something outstanding? @webmozart the unit tests are all passing |
Following the advice in jsonrainbow/json-schema#301 I've tried to update the library to v3's way of resolving references.
I've had to remove two tests as I don't think there's a way (as it stands) to make them pass. An upstream change to throw an exception would work, but it doesn't look to be a trivial change.