Skip to content

Commit 02b92b5

Browse files
authored
Merge pull request #773 from Adyen/8.4-compatibility
PHP 8.4 compatibility
2 parents 25ca422 + 7aa1481 commit 02b92b5

File tree

113 files changed

+415
-7504
lines changed

Some content is hidden

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

113 files changed

+415
-7504
lines changed

.devcontainer/devcontainer.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/php
3+
{
4+
"name": "PHP",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/php:1-8.4-bullseye",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
// "features": {},
10+
11+
// Configure tool-specific properties.
12+
// "customizations": {},
13+
14+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
15+
"forwardPorts": [8080]
16+
17+
// Use 'postCreateCommand' to run commands after the container is created.
18+
// "postCreateCommand": "sudo chmod a+x \"$(pwd)\" && sudo rm -rf /var/www/html && sudo ln -s \"$(pwd)\" /var/www/html"
19+
20+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
21+
// "remoteUser": "root"
22+
}

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "devcontainers"
10+
directory: "/"
11+
schedule:
12+
interval: weekly

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ The library supports all APIs under the following services:
1212
| API | Description | Service Name | Supported version |
1313
|------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|--------------------------|
1414
| [BIN Lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | [Binlookup](src/Adyen/Service/BinLookupApi.php) | **v54** |
15-
| [Capital API](https://docs.adyen.com/api-explorer/capital/3/overview) | Adyen Capital allows you to build an embedded financing offering for your users to serve their operational needs. | [Capital](src/Adyen/Service/CapitalApi.php) | **v3** |
1615
| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/71/overview) | Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. You can use the same integration for payments made with cards (including 3D Secure), mobile wallets, and local payment methods (for example, iDEAL and Sofort). | [Checkout](src/Adyen/Service/Checkout) | **v71** |
1716
| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | [BalancePlatform](src/Adyen/Service/BalancePlatform/) | **v2** |
1817
| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](src/Adyen/Service/DataProtectionApi.php) | **v1** |

src/Adyen/HttpClient/CurlClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,8 @@ public function requestHttp(Service $service, $requestUrl, $params, $method, $re
365365

366366
// Result in array or json
367367
if ($config->getOutputType() == 'array') {
368-
// Transform to PHP Array
369-
$result = json_decode($result, true);
368+
// Transform to PHP Array if $result is a valid JSON string
369+
$result = is_string($result) ? json_decode($result, true) : null;
370370
}
371371

372372
return $result;

src/Adyen/Model/BinLookup/Amount.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* Amount Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class Amount implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -235,7 +232,7 @@ public function getModelName()
235232
* @param mixed[] $data Associated array of property values
236233
* initializing the model
237234
*/
238-
public function __construct(array $data = null)
235+
public function __construct(?array $data = null)
239236
{
240237
$this->setIfExists('currency', $data ?? [], null);
241238
$this->setIfExists('value', $data ?? [], null);

src/Adyen/Model/BinLookup/BinDetail.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* BinDetail Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class BinDetail implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -229,7 +226,7 @@ public function getModelName()
229226
* @param mixed[] $data Associated array of property values
230227
* initializing the model
231228
*/
232-
public function __construct(array $data = null)
229+
public function __construct(?array $data = null)
233230
{
234231
$this->setIfExists('issuerCountry', $data ?? [], null);
235232
}

src/Adyen/Model/BinLookup/CardBin.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* CardBin Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class CardBin implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -289,7 +286,7 @@ public function getModelName()
289286
* @param mixed[] $data Associated array of property values
290287
* initializing the model
291288
*/
292-
public function __construct(array $data = null)
289+
public function __construct(?array $data = null)
293290
{
294291
$this->setIfExists('bin', $data ?? [], null);
295292
$this->setIfExists('commercial', $data ?? [], null);

src/Adyen/Model/BinLookup/CostEstimateAssumptions.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* CostEstimateAssumptions Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class CostEstimateAssumptions implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -241,7 +238,7 @@ public function getModelName()
241238
* @param mixed[] $data Associated array of property values
242239
* initializing the model
243240
*/
244-
public function __construct(array $data = null)
241+
public function __construct(?array $data = null)
245242
{
246243
$this->setIfExists('assume3DSecureAuthenticated', $data ?? [], null);
247244
$this->setIfExists('assumeLevel3Data', $data ?? [], null);

src/Adyen/Model/BinLookup/CostEstimateRequest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* CostEstimateRequest Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class CostEstimateRequest implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -301,7 +298,7 @@ public function getShopperInteractionAllowableValues()
301298
* @param mixed[] $data Associated array of property values
302299
* initializing the model
303300
*/
304-
public function __construct(array $data = null)
301+
public function __construct(?array $data = null)
305302
{
306303
$this->setIfExists('amount', $data ?? [], null);
307304
$this->setIfExists('assumptions', $data ?? [], null);

src/Adyen/Model/BinLookup/CostEstimateResponse.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
/**
2222
* CostEstimateResponse Class Doc Comment
2323
*
24-
* @category Class
2524
* @package Adyen
26-
* @author OpenAPI Generator team
27-
* @link https://openapi-generator.tech
2825
* @implements \ArrayAccess<string, mixed>
2926
*/
3027
class CostEstimateResponse implements ModelInterface, ArrayAccess, \JsonSerializable
@@ -247,7 +244,7 @@ public function getModelName()
247244
* @param mixed[] $data Associated array of property values
248245
* initializing the model
249246
*/
250-
public function __construct(array $data = null)
247+
public function __construct(?array $data = null)
251248
{
252249
$this->setIfExists('cardBin', $data ?? [], null);
253250
$this->setIfExists('costEstimateAmount', $data ?? [], null);

0 commit comments

Comments
 (0)