385 Commits

Author SHA1 Message Date
David Porter
8cd1dbe696 Merge pull request #159 from Maks3w/patch-1
Promote HHVM.
2015-07-01 10:25:33 -05:00
samkeen
a71086d68b For missing properties, the key for that error in set to ""
- Expected bahavior is that the key would be set to the poperty name.
- added tests to ensure the "property" is populated regardless
of required attribute is completely missing or has empty value.
2015-06-16 15:45:20 -07:00
Maks3w
34f9ae1d8b Add constraint factory
This factory can be injected and allow extend built-in constraint types with custom ones.
2015-06-14 22:32:02 +02:00
Maks3w
630d7493be Promote HHVM.
This repo has a coverage bigger than 85% and tests works with HHVM. This means HHVM support is enough stable for to make it officially supported.
2015-06-14 22:30:16 +02:00
David Porter
7dfe4f1db8 Merge pull request #157 from Maks3w/patch-2
Scrutinizer-CI is not used
1.4.2
2015-06-14 15:01:28 -05:00
David Porter
90c70b82bb Merge pull request #155 from bighappyface/fix-phpdoc-failures
chore(travis): remove phpdoc ext and ignore output
2015-06-14 14:59:00 -05:00
David Porter
c437d933a9 Merge pull request #156 from Maks3w/patch-1
[travis-ci] Add PHP 7 to build matrix
2015-06-14 14:58:45 -05:00
David Porter
7f55a9727e Merge pull request #153 from alecsammon/missingFileWarning
Fix warning on file_get_contents
2015-06-14 14:57:49 -05:00
Maks3w
71ada7be02 Scrutinizer-CI is not used
Initial experiment is 2 years old

https://scrutinizer-ci.com/g/justinrainbow/json-schema/inspections
2015-06-13 10:50:34 +02:00
Maks3w
9afdf150ad [travis-ci] Add PHP 7 to build matrix
Any failure is allowed until PHP 7 become stable
2015-06-13 10:48:26 +02:00
David Porter
c76301b61e Merge pull request #152 from alecsammon/refArrayJson
Fetching JSON Array from URI
2015-06-12 22:59:41 -05:00
bighappyface
803bbb9e90 chore(travis): remove phpdoc ext and ignore output 2015-06-12 22:57:29 -05:00
Alec Sammon
15ce6bfead Fix warning on file_get_contents
Fixes #153
2015-06-11 06:49:49 +01:00
Alec Sammon
f092588502 Fix for retrieving a JSON array from a uri
Fixes #152
2015-06-11 06:21:13 +01:00
David Porter
1ffdea0e23 Merge pull request #125 from ArDeveloppement/master
Do not throw errors when using unknown/custom format
2015-06-10 20:47:03 -05:00
David Porter
c0387d3f58 Merge pull request #150 from hhamon/better-error-message
[Constraints] make error messages better.
2015-06-10 20:44:25 -05:00
David Porter
35c54358e7 Merge pull request #96 from siwinski/pr-update-min-php-version-to-5-3-2
Update minimum PHP version to 5.3.2
2015-06-10 20:36:56 -05:00
Hugo Hamon
65c4134455 [Constraints] make error messages better. 2015-05-08 07:00:09 -04:00
Shawn Iwinski
d81a42b98c Update minimum PHP version to 5.3.2
bin/validate-json uses stream_resolve_include_path()
which is only available in PHP >= 5.3.2
2015-04-20 17:43:07 -04:00
Laurent Wiesel
c112d67f23 Do not throw errors when using unknown format 2015-04-07 10:22:10 +02:00
David Porter
1235d2e210 Merge pull request #109 from siwinski/pr-php-lt-5-4-0-compat
PHP < 5.4.0 compatibility for "--dump-schema"
2015-03-31 11:01:45 -05:00
Shawn Iwinski
1fc065c8d7 JSON_PRETTY_PRINT compatibility for PHP < 5.4.0 ("--dump-schema") 2015-03-30 16:40:29 -04:00
David Porter
34e298213d Merge pull request #105 from hakre/patch-2
Fix URI generic syntax delimit path components by slash ("`/`")
2015-03-28 12:07:22 -05:00
hakre
0f3ca84c3b Fix URI generic syntax delimit path components by slash ("/")
Parts of justinrainbow/json-schema are using the backslash ("`\`") in
error on occasion.

This fixes the issue in **UriResolver** as well as in **UriRetriever**.

With this commit, the *overall* usage of that DIRECTORY_SEPARATOR
constant has been redacted out of this project.

Additionally in a refactoring duplicate code has been removed from the
classes afterwards and some minor CS fixes have been applied.
2015-03-28 02:08:23 +01:00
David Porter
0c16b51b9c Merge pull request #139 from keradus/composer_lock
remove composer.lock
2015-03-27 17:00:19 -05:00
Dariusz Ruminski
fd3c137df5 remove composer.lock 2015-03-27 22:41:18 +01:00
David Porter
2465fe486c Merge pull request #132 from loucho/patch-1
Make the enum element comparison strict
1.4.1
2015-03-27 11:41:39 -05:00
loucho
14443c5bca Check the element type before making the comparison (== for objects, === for everything else) 2015-03-26 17:17:48 -06:00
loucho
ceddfdf2be Merge branch 'patch-1' of https://github.com/loucho/json-schema into patch-1 2015-03-26 17:06:53 -06:00
loucho
a177c2d314 Make the enum element comparison strict
The current check is matching numeric strings that are not equal ( like "604.1" == "604.10" because of PHP's == behavior that converts numeric strings to numbers and then performs a numeric comparison), even if type is checked before the comparison, the value should be identic
2015-03-26 17:06:35 -06:00
Justin Rainbow
680d026082 Merge pull request #136 from lsv/php7-reserved-names
[Proposal] new constraints name - for PHP7
1.4.0
2015-03-23 13:38:38 -07:00
Martin Aarhof
dc310ac54c proposal on new constraints name 2015-03-19 15:09:03 +01:00
loucho
33c5c616d7 Make the enum element comparison strict
The current check is matching numeric strings that are not equal ( like "604.1" == "604.10" because of PHP's == behavior that converts numeric strings to numbers and then performs a numeric comparison), even if type is checked before the comparison, the value should be identic
2015-03-06 14:10:54 -06:00
Justin Rainbow
87b54b460f Merge pull request #106 from openfryer/uriretriever-uriresolverexception
Fix UriRetriever::combineRelativePathWithBasePath() does not qualify UriResolverException
1.3.7
2014-08-24 19:48:14 -07:00
Justin Rainbow
d98033f1c5 Merge pull request #104 from hakre/patch-1
Constraint::check() uses wrong indefinite article in error message to express the type constraint
2014-08-24 19:37:48 -07:00
Justin Rainbow
3bf210b876 Merge pull request #101 from alexmmm/replace-directory-separator-references
replace  invalid filesystem dependent directory separator  references
2014-08-24 19:35:45 -07:00
Justin Rainbow
1c84802884 Merge pull request #107 from Nyholm/patch-1
Added PHP 5.6 and HHVM to travis.yml
2014-08-24 19:35:12 -07:00
Justin Rainbow
c587f9b13f Merge pull request #99 from xanagi/multibyte_strlen
Use mb_strlen instead of strlen when mbstring extension is available.
2014-08-24 19:33:27 -07:00
Justin Rainbow
04fed3677d Merge pull request #98 from alexmmm/fix-constraint-errors-getter
Fix constraint errors getter
2014-08-24 19:32:30 -07:00
Justin Rainbow
99fa58a849 Merge pull request #100 from alexmmm/fix-basic-types-test
minor fix of BasicTypeTests
2014-08-24 19:32:01 -07:00
Justin Rainbow
252e023d9b Merge pull request #103 from alexmmm/fix-required-property-validation
Fix required property validation
2014-08-24 19:31:42 -07:00
Tobias Nyholm
7eef0affe5 Added PHP 5.6 and HHVM to travis.yml 2014-07-09 12:17:36 +02:00
Leif Meyer
150cbaee08 Fix UriRetriever::combineRelativePathWithBasePath() does not qualify UriResolverException
Added full qualification to UriResolverException in
UriRetriever::combineRelativePathWithBasePath().
Added a test to verify that a UriResolverException is thrown when a
relative path contains more level-ups than the base path segments.
2014-06-12 17:06:34 -06:00
hakre
069fec2cea Fixes #104: Constraint::check() uses wrong indefinite article in ...
...error message to express the type constraint

Type::check() used a wrong indefinte article on occasion.

This has been fixed by providing a map of types and their wording so that
the correct indefinite article is used, always.

- https://github.com/justinrainbow/json-schema/pull/104
- https://github.com/composer/composer/issues/1616
2014-06-09 16:01:06 +02:00
hakre
3bbbc37b79 Add test-case for Type error messages 2014-06-09 15:37:48 +02:00
alexmmm
e8a72f0018 dont validate draft4 required attribute when value is undefined
- fixes regression introduced by 61059b2
2014-05-05 11:43:34 +02:00
alexmmm
31401668ff add unit tests to validate issue #102 2014-05-05 11:43:22 +02:00
alexmmm
7d8c945ea2 replace invalid filesystem dependent DIRECTORY_SEPARATOR references in uri mechanics by forward slashes
- fixes failing UriResolver tests on windows systems
2014-05-02 19:18:12 +02:00
alexmmm
cd0d3a9e26 split composite invalid case into independent testcases
- the composite case proved that one type check failed not all of them
2014-05-02 17:45:13 +02:00
Tomonori Kusanagi
3996ce742b Use mb_strlen instead of stlen when mbstring extension is available. 2014-05-02 01:45:31 +09:00