Skip to content

Commit 7823388

Browse files
### 0.3.4 - Fix incorrect json_decoder and encoder
1 parent 0e27f6c commit 7823388

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,5 @@
9292
### 0.3.2 - Response and Request handler can now be defined as a class member
9393

9494
### 0.3.3 - Fix logger path
95+
96+
### 0.3.4 - Fix incorrect json_decoder and encoder

src/support/forge/api/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ protected function setDescription($descriptionOptions = [])
145145
$description = [];
146146

147147
if (!empty($jsonPath)) {
148-
$description = \GuzzleHttp\json_decode(file_get_contents($jsonPath), true);
148+
$description = json_decode(file_get_contents($jsonPath), true);
149149
}
150150
if (empty($description)) {
151151
$description = [];

src/support/forge/api/Traits/Import/Parsers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected function parseParams($url = [], $bodyRaw = '', $meta = [])
111111
}
112112
}
113113

114-
$rawParams = \GuzzleHttp\json_decode($bodyRaw, true);
114+
$rawParams = json_decode($bodyRaw, true);
115115
if (!empty($rawParams)) {
116116
foreach ($rawParams as $paramName => $paramItem) {
117117
$params[$paramName] = [

src/support/forge/api/Traits/Import/Writers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protected function readJson($filePath)
2323
$filePath = $this->rootPath . '/' . $filePath;
2424
}
2525

26-
$json = \GuzzleHttp\json_decode(file_get_contents($filePath), true);
26+
$json = json_decode(file_get_contents($filePath), true);
2727

2828
return $json;
2929
}
@@ -52,7 +52,7 @@ public function writeDefinition($path = '', $options = [])
5252
$this->sourceData];
5353
$data = $this->applyFilter('APIDefinitionFinalJson', $data, $filterParams);
5454

55-
$json = \GuzzleHttp\json_encode($data, JSON_PRETTY_PRINT | JSON_ERROR_NONE | JSON_UNESCAPED_SLASHES);
55+
$json = json_encode($data, JSON_PRETTY_PRINT | JSON_ERROR_NONE | JSON_UNESCAPED_SLASHES);
5656

5757
// $options['skipDocs'] = true;
5858
$pathWihtoutExtension = preg_replace('/\.[^.]+?$/', '', $path);

0 commit comments

Comments
 (0)