Skip to content

Commit 0df603a

Browse files
authored
v5.5.1 (#17)
- Suppress deprecated warnings in PHP 8.1. Added attribute which signals that a mismatching tentative return type should not emit a deprecation notice
1 parent 0a98382 commit 0df603a

File tree

106 files changed

+2311
-4
lines changed

Some content is hidden

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

106 files changed

+2311
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ or add the following to `composer.json`:
1919
```json
2020
{
2121
"require": {
22-
"pandadoc/php-client": "5.5.0"
22+
"pandadoc/php-client": "5.5.1"
2323
}
2424
}
2525
```

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pandadoc/php-client",
3-
"version": "5.5.0",
3+
"version": "5.5.1",
44
"description": "The Official PandaDoc PHP client SDK",
55
"keywords": [
66
"openapi",

src/ApiException.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public function __construct($message = "", $code = 0, $responseHeaders = [], $re
7979
*
8080
* @return string[]|null HTTP response header
8181
*/
82+
#[\ReturnTypeWillChange]
8283
public function getResponseHeaders()
8384
{
8485
return $this->responseHeaders;
@@ -89,6 +90,7 @@ public function getResponseHeaders()
8990
*
9091
* @return \stdClass|string|null HTTP body of the server response either as \stdClass or string
9192
*/
93+
#[\ReturnTypeWillChange]
9294
public function getResponseBody()
9395
{
9496
return $this->responseBody;
@@ -111,6 +113,7 @@ public function setResponseObject($obj)
111113
*
112114
* @return mixed the deserialized response object
113115
*/
116+
#[\ReturnTypeWillChange]
114117
public function getResponseObject()
115118
{
116119
return $this->responseObject;

src/Configuration.php

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class Configuration
8888
*
8989
* @var string
9090
*/
91-
protected $userAgent = 'pandadoc_php_client/5.5.0';
91+
protected $userAgent = 'pandadoc_php_client/5.5.1';
9292

9393
/**
9494
* Debug switch (default set to false)
@@ -127,6 +127,7 @@ public function __construct()
127127
*
128128
* @return $this
129129
*/
130+
#[\ReturnTypeWillChange]
130131
public function setApiKey($apiKeyIdentifier, $key)
131132
{
132133
$this->apiKeys[$apiKeyIdentifier] = $key;
@@ -140,6 +141,7 @@ public function setApiKey($apiKeyIdentifier, $key)
140141
*
141142
* @return null|string API key or token
142143
*/
144+
#[\ReturnTypeWillChange]
143145
public function getApiKey($apiKeyIdentifier)
144146
{
145147
return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null;
@@ -153,6 +155,7 @@ public function getApiKey($apiKeyIdentifier)
153155
*
154156
* @return $this
155157
*/
158+
#[\ReturnTypeWillChange]
156159
public function setApiKeyPrefix($apiKeyIdentifier, $prefix)
157160
{
158161
$this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix;
@@ -166,6 +169,7 @@ public function setApiKeyPrefix($apiKeyIdentifier, $prefix)
166169
*
167170
* @return null|string
168171
*/
172+
#[\ReturnTypeWillChange]
169173
public function getApiKeyPrefix($apiKeyIdentifier)
170174
{
171175
return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null;
@@ -178,6 +182,7 @@ public function getApiKeyPrefix($apiKeyIdentifier)
178182
*
179183
* @return $this
180184
*/
185+
#[\ReturnTypeWillChange]
181186
public function setAccessToken($accessToken)
182187
{
183188
$this->accessToken = $accessToken;
@@ -189,6 +194,7 @@ public function setAccessToken($accessToken)
189194
*
190195
* @return string Access token for OAuth
191196
*/
197+
#[\ReturnTypeWillChange]
192198
public function getAccessToken()
193199
{
194200
return $this->accessToken;
@@ -201,6 +207,7 @@ public function getAccessToken()
201207
*
202208
* @return $this
203209
*/
210+
#[\ReturnTypeWillChange]
204211
public function setUsername($username)
205212
{
206213
$this->username = $username;
@@ -212,6 +219,7 @@ public function setUsername($username)
212219
*
213220
* @return string Username for HTTP basic authentication
214221
*/
222+
#[\ReturnTypeWillChange]
215223
public function getUsername()
216224
{
217225
return $this->username;
@@ -224,6 +232,7 @@ public function getUsername()
224232
*
225233
* @return $this
226234
*/
235+
#[\ReturnTypeWillChange]
227236
public function setPassword($password)
228237
{
229238
$this->password = $password;
@@ -235,6 +244,7 @@ public function setPassword($password)
235244
*
236245
* @return string Password for HTTP basic authentication
237246
*/
247+
#[\ReturnTypeWillChange]
238248
public function getPassword()
239249
{
240250
return $this->password;
@@ -247,6 +257,7 @@ public function getPassword()
247257
*
248258
* @return $this
249259
*/
260+
#[\ReturnTypeWillChange]
250261
public function setHost($host)
251262
{
252263
$this->host = $host;
@@ -258,6 +269,7 @@ public function setHost($host)
258269
*
259270
* @return string Host
260271
*/
272+
#[\ReturnTypeWillChange]
261273
public function getHost()
262274
{
263275
return $this->host;
@@ -271,6 +283,7 @@ public function getHost()
271283
* @throws \InvalidArgumentException
272284
* @return $this
273285
*/
286+
#[\ReturnTypeWillChange]
274287
public function setUserAgent($userAgent)
275288
{
276289
if (!is_string($userAgent)) {
@@ -286,6 +299,7 @@ public function setUserAgent($userAgent)
286299
*
287300
* @return string user agent
288301
*/
302+
#[\ReturnTypeWillChange]
289303
public function getUserAgent()
290304
{
291305
return $this->userAgent;
@@ -298,6 +312,7 @@ public function getUserAgent()
298312
*
299313
* @return $this
300314
*/
315+
#[\ReturnTypeWillChange]
301316
public function setDebug($debug)
302317
{
303318
$this->debug = $debug;
@@ -309,6 +324,7 @@ public function setDebug($debug)
309324
*
310325
* @return bool
311326
*/
327+
#[\ReturnTypeWillChange]
312328
public function getDebug()
313329
{
314330
return $this->debug;
@@ -321,6 +337,7 @@ public function getDebug()
321337
*
322338
* @return $this
323339
*/
340+
#[\ReturnTypeWillChange]
324341
public function setDebugFile($debugFile)
325342
{
326343
$this->debugFile = $debugFile;
@@ -332,6 +349,7 @@ public function setDebugFile($debugFile)
332349
*
333350
* @return string
334351
*/
352+
#[\ReturnTypeWillChange]
335353
public function getDebugFile()
336354
{
337355
return $this->debugFile;
@@ -344,6 +362,7 @@ public function getDebugFile()
344362
*
345363
* @return $this
346364
*/
365+
#[\ReturnTypeWillChange]
347366
public function setTempFolderPath($tempFolderPath)
348367
{
349368
$this->tempFolderPath = $tempFolderPath;
@@ -355,6 +374,7 @@ public function setTempFolderPath($tempFolderPath)
355374
*
356375
* @return string Temp folder path
357376
*/
377+
#[\ReturnTypeWillChange]
358378
public function getTempFolderPath()
359379
{
360380
return $this->tempFolderPath;
@@ -365,6 +385,7 @@ public function getTempFolderPath()
365385
*
366386
* @return Configuration
367387
*/
388+
#[\ReturnTypeWillChange]
368389
public static function getDefaultConfiguration()
369390
{
370391
if (self::$defaultConfiguration === null) {
@@ -381,6 +402,7 @@ public static function getDefaultConfiguration()
381402
*
382403
* @return void
383404
*/
405+
#[\ReturnTypeWillChange]
384406
public static function setDefaultConfiguration(Configuration $config)
385407
{
386408
self::$defaultConfiguration = $config;
@@ -391,13 +413,14 @@ public static function setDefaultConfiguration(Configuration $config)
391413
*
392414
* @return string The report for debugging
393415
*/
416+
#[\ReturnTypeWillChange]
394417
public static function toDebugReport()
395418
{
396419
$report = 'PHP SDK (PandaDoc\Client) Debug Report:' . PHP_EOL;
397420
$report .= ' OS: ' . php_uname() . PHP_EOL;
398421
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
399422
$report .= ' The version of the OpenAPI document: 5.5.0' . PHP_EOL;
400-
$report .= ' SDK Package Version: 5.5.0' . PHP_EOL;
423+
$report .= ' SDK Package Version: 5.5.1' . PHP_EOL;
401424
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
402425

403426
return $report;
@@ -410,6 +433,7 @@ public static function toDebugReport()
410433
*
411434
* @return null|string API key with the prefix
412435
*/
436+
#[\ReturnTypeWillChange]
413437
public function getApiKeyWithPrefix($apiKeyIdentifier)
414438
{
415439
$prefix = $this->getApiKeyPrefix($apiKeyIdentifier);
@@ -433,6 +457,7 @@ public function getApiKeyWithPrefix($apiKeyIdentifier)
433457
*
434458
* @return array an array of host settings
435459
*/
460+
#[\ReturnTypeWillChange]
436461
public function getHostSettings()
437462
{
438463
return [
@@ -450,6 +475,7 @@ public function getHostSettings()
450475
* @param array|null $variables hash of variable and the corresponding value (optional)
451476
* @return string URL based on host settings
452477
*/
478+
#[\ReturnTypeWillChange]
453479
public function getHostFromSettings($index, $variables = null)
454480
{
455481
if (null === $variables) {

src/HeaderSelector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class HeaderSelector
4343
* @param string[] $contentTypes
4444
* @return array
4545
*/
46+
#[\ReturnTypeWillChange]
4647
public function selectHeaders($accept, $contentTypes)
4748
{
4849
$headers = [];
@@ -60,6 +61,7 @@ public function selectHeaders($accept, $contentTypes)
6061
* @param string[] $accept
6162
* @return array
6263
*/
64+
#[\ReturnTypeWillChange]
6365
public function selectHeadersForMultipart($accept)
6466
{
6567
$headers = $this->selectHeaders($accept, []);
@@ -75,6 +77,7 @@ public function selectHeadersForMultipart($accept)
7577
*
7678
* @return null|string Accept (e.g. application/json)
7779
*/
80+
#[\ReturnTypeWillChange]
7881
private function selectAcceptHeader($accept)
7982
{
8083
if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) {
@@ -93,6 +96,7 @@ private function selectAcceptHeader($accept)
9396
*
9497
* @return string Content-Type (e.g. application/json)
9598
*/
99+
#[\ReturnTypeWillChange]
96100
private function selectContentTypeHeader($contentType)
97101
{
98102
if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) {

0 commit comments

Comments
 (0)