Skip to content
Merged
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 .github/workflows/method_sync_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: "${{ matrix.operating-system }}"
strategy:
matrix:
php-version: ["8.0"]
php-version: ["8.5"]
operating-system: ["ubuntu-latest"]
composer-args: [ "" ]
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: "${{ matrix.operating-system }}"
strategy:
matrix:
php-version: ["8.0"]
php-version: ["8.5"]
operating-system: ["ubuntu-latest"]
composer-args: [ "" ]
fail-fast: false
Expand Down
6 changes: 5 additions & 1 deletion src/Http/Transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ public function post(string $urn, array $data, array $options = []): Response
$this->logger->log(...$log);
}

curl_close($curl);
// PHP 8.5+ automatically closes the handle
// for lower versions we need to close it manually
if(PHP_VERSION_ID < 80500){
curl_close($curl);
};

if ($e != '') {
throw new ComgateException("Request failed: {$e}", 0);
Expand Down
6 changes: 5 additions & 1 deletion tests/Integration/PaymentMethodSyncCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ private function getRemoteMethods(): array
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$result = curl_exec($ch);
curl_close($ch);
// PHP 8.5+ automatically closes the handle
// for lower versions we need to close it manually
if(PHP_VERSION_ID < 80500){
curl_close($ch);
};

$parsed = yaml_parse($result);
$availableMethods = array_keys($parsed['paths']);
Expand Down
Loading