Skip to content

Commit a0d54d2

Browse files
Merge pull request #27 from RusticiSoftware/v4.0-release
Update library to v4.0.0 with recent API changes
2 parents ba97823 + f0f0b30 commit a0d54d2

File tree

155 files changed

+2761
-1404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+2761
-1404
lines changed

.swagger-codegen/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.4.12
1+
2.4.27

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ REST API used for SCORM Cloud integrations.
44
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
55

66
- API version: 2.0
7-
- Package version: 3.0.0
7+
- Package version: 4.0.0
88
- Build package: io.swagger.codegen.languages.PhpClientCodegen
99

1010
## Requirements
11-
PHP 7.4 and later
11+
PHP 8.0 and later
1212

1313
## Installation
1414
### Composer

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rustici-software/scormcloud-api-v2-client-php",
3-
"version": "3.0.0",
3+
"version": "4.0.0",
44
"description": "",
55
"keywords": [
66
"scorm",
@@ -19,7 +19,7 @@
1919
}
2020
],
2121
"require": {
22-
"php": ">=7.4",
22+
"php": ">=8.0",
2323
"ext-curl": "*",
2424
"ext-json": "*",
2525
"ext-mbstring": "*",

src/Api/AboutApi.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,11 @@ protected function getAboutRequest()
287287
if($headers['Content-Type'] === 'application/json') {
288288
// \stdClass has no __toString(), so we should encode it manually
289289
if ($httpBody instanceof \stdClass) {
290-
$httpBody = \GuzzleHttp\json_encode($httpBody);
290+
$httpBody = \GuzzleHttp\Utils::jsonEncode($httpBody);
291291
}
292292
// array has no __toString(), so we should encode it manually
293293
if(is_array($httpBody)) {
294-
$httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));
294+
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($httpBody));
295295
}
296296
}
297297
} elseif (count($formParams) > 0) {
@@ -307,7 +307,7 @@ protected function getAboutRequest()
307307
$httpBody = new MultipartStream($multipartContents);
308308

309309
} elseif ($headers['Content-Type'] === 'application/json') {
310-
$httpBody = \GuzzleHttp\json_encode($formParams);
310+
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
311311

312312
} else {
313313
// for HTTP post (form)

src/Api/ApplicationManagementApi.php

Lines changed: 47 additions & 47 deletions
Large diffs are not rendered by default.

src/Api/AuthenticationApi.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,11 @@ protected function getAppTokenRequest($scope, $expiration = '300')
319319
if($headers['Content-Type'] === 'application/json') {
320320
// \stdClass has no __toString(), so we should encode it manually
321321
if ($httpBody instanceof \stdClass) {
322-
$httpBody = \GuzzleHttp\json_encode($httpBody);
322+
$httpBody = \GuzzleHttp\Utils::jsonEncode($httpBody);
323323
}
324324
// array has no __toString(), so we should encode it manually
325325
if(is_array($httpBody)) {
326-
$httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));
326+
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($httpBody));
327327
}
328328
}
329329
} elseif (count($formParams) > 0) {
@@ -339,7 +339,7 @@ protected function getAppTokenRequest($scope, $expiration = '300')
339339
$httpBody = new MultipartStream($multipartContents);
340340

341341
} elseif ($headers['Content-Type'] === 'application/json') {
342-
$httpBody = \GuzzleHttp\json_encode($formParams);
342+
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
343343

344344
} else {
345345
// for HTTP post (form)

src/Api/ContentConnectorsApi.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,11 @@ protected function createConnectorRequest($connector)
305305
if($headers['Content-Type'] === 'application/json') {
306306
// \stdClass has no __toString(), so we should encode it manually
307307
if ($httpBody instanceof \stdClass) {
308-
$httpBody = \GuzzleHttp\json_encode($httpBody);
308+
$httpBody = \GuzzleHttp\Utils::jsonEncode($httpBody);
309309
}
310310
// array has no __toString(), so we should encode it manually
311311
if(is_array($httpBody)) {
312-
$httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));
312+
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($httpBody));
313313
}
314314
}
315315
} elseif (count($formParams) > 0) {
@@ -325,7 +325,7 @@ protected function createConnectorRequest($connector)
325325
$httpBody = new MultipartStream($multipartContents);
326326

327327
} elseif ($headers['Content-Type'] === 'application/json') {
328-
$httpBody = \GuzzleHttp\json_encode($formParams);
328+
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
329329

330330
} else {
331331
// for HTTP post (form)
@@ -561,11 +561,11 @@ protected function deleteConnectorRequest($connector_id)
561561
if($headers['Content-Type'] === 'application/json') {
562562
// \stdClass has no __toString(), so we should encode it manually
563563
if ($httpBody instanceof \stdClass) {
564-
$httpBody = \GuzzleHttp\json_encode($httpBody);
564+
$httpBody = \GuzzleHttp\Utils::jsonEncode($httpBody);
565565
}
566566
// array has no __toString(), so we should encode it manually
567567
if(is_array($httpBody)) {
568-
$httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));
568+
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($httpBody));
569569
}
570570
}
571571
} elseif (count($formParams) > 0) {
@@ -581,7 +581,7 @@ protected function deleteConnectorRequest($connector_id)
581581
$httpBody = new MultipartStream($multipartContents);
582582

583583
} elseif ($headers['Content-Type'] === 'application/json') {
584-
$httpBody = \GuzzleHttp\json_encode($formParams);
584+
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
585585

586586
} else {
587587
// for HTTP post (form)
@@ -836,11 +836,11 @@ protected function getConnectorsListRequest($include_additional_instance_informa
836836
if($headers['Content-Type'] === 'application/json') {
837837
// \stdClass has no __toString(), so we should encode it manually
838838
if ($httpBody instanceof \stdClass) {
839-
$httpBody = \GuzzleHttp\json_encode($httpBody);
839+
$httpBody = \GuzzleHttp\Utils::jsonEncode($httpBody);
840840
}
841841
// array has no __toString(), so we should encode it manually
842842
if(is_array($httpBody)) {
843-
$httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));
843+
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($httpBody));
844844
}
845845
}
846846
} elseif (count($formParams) > 0) {
@@ -856,7 +856,7 @@ protected function getConnectorsListRequest($include_additional_instance_informa
856856
$httpBody = new MultipartStream($multipartContents);
857857

858858
} elseif ($headers['Content-Type'] === 'application/json') {
859-
$httpBody = \GuzzleHttp\json_encode($formParams);
859+
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
860860

861861
} else {
862862
// for HTTP post (form)
@@ -1102,11 +1102,11 @@ protected function updateConnectorRequest($connector_id, $connector)
11021102
if($headers['Content-Type'] === 'application/json') {
11031103
// \stdClass has no __toString(), so we should encode it manually
11041104
if ($httpBody instanceof \stdClass) {
1105-
$httpBody = \GuzzleHttp\json_encode($httpBody);
1105+
$httpBody = \GuzzleHttp\Utils::jsonEncode($httpBody);
11061106
}
11071107
// array has no __toString(), so we should encode it manually
11081108
if(is_array($httpBody)) {
1109-
$httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));
1109+
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($httpBody));
11101110
}
11111111
}
11121112
} elseif (count($formParams) > 0) {
@@ -1122,7 +1122,7 @@ protected function updateConnectorRequest($connector_id, $connector)
11221122
$httpBody = new MultipartStream($multipartContents);
11231123

11241124
} elseif ($headers['Content-Type'] === 'application/json') {
1125-
$httpBody = \GuzzleHttp\json_encode($formParams);
1125+
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
11261126

11271127
} else {
11281128
// for HTTP post (form)

0 commit comments

Comments
 (0)