Skip to content
This repository was archived by the owner on Feb 1, 2020. It is now read-only.

Upgrade herrera-io/json dependency to 2.* version #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"require": {
"php": ">=5.3.3",
"herrera-io/json": "1.*",
"herrera-io/json": "2.*",
"herrera-io/version": "1.*"
},
"require-dev": {
Expand Down
6 changes: 3 additions & 3 deletions src/lib/Herrera/Phar/Update/Manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Herrera\Phar\Update;

use Herrera\Json\Json;
use Herrera\Version\Comparator;
use Herrera\Version\Parser;
use Herrera\Version\Version;
use KHerGe\JSON\JSON;

/**
* Manages the contents of an updates manifest file.
Expand Down Expand Up @@ -87,7 +87,7 @@ public function getUpdates()
*/
public static function load($json)
{
$j = new Json();
$j = new JSON();

return self::create($j->decode($json), $j);
}
Expand All @@ -101,7 +101,7 @@ public static function load($json)
*/
public static function loadFile($file)
{
$json = new Json();
$json = new JSON();

return self::create($json->decodeFile($file), $json);
}
Expand Down
6 changes: 3 additions & 3 deletions src/tests/Herrera/Phar/Update/ManifestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace Herrera\Phar\Update\Tests;

use Herrera\Phar\Update\Manifest;
use Herrera\Json\Exception\JsonException;
use Herrera\Phar\Update\Update;
use Herrera\PHPUnit\TestCase;
use Herrera\Version\Parser;
use KHerGe\JSON\Exception\Exception as JSONException;

class ManifestTest extends TestCase
{
Expand Down Expand Up @@ -77,7 +77,7 @@ public function testLoad()

try {
$updates = Manifest::load($data)->getUpdates();
} catch (JsonException $exception) {
} catch (JSONException $exception) {
print_r($exception->getErrors());
throw $exception;
}
Expand Down Expand Up @@ -111,7 +111,7 @@ public function testLoadFile()

try {
$updates = Manifest::loadFile($file)->getUpdates();
} catch (JsonException $exception) {
} catch (JSONException $exception) {
print_r($exception->getErrors());
throw $exception;
}
Expand Down