Skip to content

Commit

Permalink
Fix: Mark check() and coerce() as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Dec 30, 2017
1 parent dfdcb5b commit 8cf5b90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/validate-json
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ if (isset($arOptions['--dump-schema'])) {

try {
$validator = new JsonSchema\Validator();
$validator->check($data, $schema);
$validator->validate($data, $schema);

if ($validator->isValid()) {
if(isset($arOptions['--verbose'])) {
Expand Down
4 changes: 4 additions & 0 deletions src/JsonSchema/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public function validate(&$value, $schema = null, $checkMode = null)

/**
* Alias to validate(), to maintain backwards-compatibility with the previous API
*
* @deprecated
*/
public function check($value, $schema)
{
Expand All @@ -82,6 +84,8 @@ public function check($value, $schema)

/**
* Alias to validate(), to maintain backwards-compatibility with the previous API
*
* @deprecated
*/
public function coerce(&$value, $schema)
{
Expand Down

0 comments on commit 8cf5b90

Please sign in to comment.