Commit e3c9bcc
Backports for 5.2.0 (#368)
* Add URI translation for retrieval & add local copies of spec schema
* Add use line for InvalidArgumentException & adjust scope (#372)
Fixes issue #371
* add quiet option (#382)
* add quiet option
* use verbose instead of quiet
* add quiet option
* always output dump-schema
* always output dump-schema-url
* fix typo and ws
* [BUGFIX] Add provided schema under a dummy / internal URI (fixes #376) (#378)
* Add provided schema under a dummy / internal URI (fixes #376)
In order to resolve internal $ref references within a user-provided
schema, SchemaStorage needs to know about the schema. As user-supplied
schemas do not have an associated URI, use a dummy / internal one instead.
* Remove dangling use
* Change URI to class constant on SchemaStorage
* Add option to disable validation of "format" constraint (#383)
* Add more unit tests (#366)
* Add test coverage for coercion API
* Complete test coverage for SchemaStorage
* Add test coverage for ObjectIterator
* Add exception test for JsonPointer
* MabeEnum\Enum appears to use singletons - add testing const
* Don't check this line for coverage
mbstring is on all test platforms, so this line will never be reached.
* Add test for TypeConstraint::validateTypeNameWording()
* Add test for exception on TypeConstraint::validateType()
* PHPunit doesn't like an explanation with its @codeCoverageIgnore...
* Add various tests for UriRetriever
* Add tests for FileGetContents
* Add tests for JsonSchema\Uri\Retrievers\Curl
* Add missing bad-syntax test file
* Restrict ignore to the exception line only
* Fix exception scope
* Allow the schema to be an associative array (#389)
* Allow the schema to be an associative array
Implements #388.
* Use json_decode(json_encode()) for array -> object cast
* Skip exception check on PHP versions < 5.5.0
* Skip test on HHVM, as it's happy to encode resources
* Enable FILTER_FLAG_EMAIL_UNICODE for email format if present (#398)
* Don't throw exceptions until after checking anyOf / oneOf (#394)
Fixes #393
* Fix infinite recursion on some schemas when setting defaults (#359) (#365)
* Don't try to fetch files that don't exist
Throws an exception when the ref can't be resolved to a useful file URI,
rather than waiting for something further down the line to fail after
the fact.
* Refactor defaults code to use LooseTypeCheck where appropriate
* Test for not treating non-containers like arrays
* Update comments
* Rename variable for clarity
* Add CHECK_MODE_ONLY_REQUIRED_DEFAULTS
If CHECK_MODE_ONLY_REQUIRED_DEFAULTS is set, then only apply defaults
if they are marked as required.
* Workaround for $this scope issue on PHP-5.3
* Fix infinite recursion via $ref when applying defaults
* Add missing second test for array case
* Add test for setting a default value for null
* Also fix infinite recursion via $ref for array defaults
* Move nested closure into separate method
* $parentSchema will always be set when $name is, so don't check it
* Handle nulls properly - fixes issue #377
* Add option to also validate the schema (#357)
* Remove stale files from #357 (obviated by #362) (#400)
* Stop #386 sneaking in alongside another PR backport1 parent ef3ee83 commit e3c9bcc
File tree
68 files changed
+1742
-601
lines changed- bin
- dist/schema
- src/JsonSchema
- Constraints
- Entity
- Exception
- Uri
- Retrievers
- tests
- Constraints
- Drafts
- Entity
- Iterators
- Uri
- Retrievers
- fixtures
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
68 files changed
+1742
-601
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
190 | 191 | | |
| 192 | + | |
| 193 | + | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
32 | 74 | | |
33 | 75 | | |
34 | 76 | | |
| |||
44 | 86 | | |
45 | 87 | | |
46 | 88 | | |
47 | | - | |
| 89 | + | |
48 | 90 | | |
49 | 91 | | |
50 | 92 | | |
| |||
84 | 126 | | |
85 | 127 | | |
86 | 128 | | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
101 | 138 | | |
102 | 139 | | |
103 | 140 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | 141 | | |
130 | 142 | | |
131 | 143 | | |
| |||
141 | 153 | | |
142 | 154 | | |
143 | 155 | | |
144 | | - | |
| 156 | + | |
145 | 157 | | |
146 | 158 | | |
147 | 159 | | |
148 | 160 | | |
149 | 161 | | |
150 | 162 | | |
151 | | - | |
| 163 | + | |
152 | 164 | | |
153 | 165 | | |
154 | 166 | | |
| |||
182 | 194 | | |
183 | 195 | | |
184 | 196 | | |
185 | | - | |
186 | | - | |
187 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
188 | 200 | | |
189 | 201 | | |
190 | 202 | | |
| |||
202 | 214 | | |
203 | 215 | | |
204 | 216 | | |
205 | | - | |
206 | | - | |
207 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
208 | 220 | | |
209 | 221 | | |
210 | 222 | | |
| |||
221 | 233 | | |
222 | 234 | | |
223 | 235 | | |
224 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
225 | 239 | | |
226 | | - | |
| 240 | + | |
227 | 241 | | |
228 | | - | |
| 242 | + | |
229 | 243 | | |
230 | 244 | | |
231 | 245 | | |
232 | 246 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
236 | 250 | | |
237 | 251 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
0 commit comments