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
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ jobs:

strategy:
matrix:
php-version: [7.3.x, 7.4.x, 8.1.x, 8.2.x]
php-version: ['8.1', '8.2', '8.3', '8.4', '8.5']

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug

- name: Install dependencies
run: composer install
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog

All notable changes to this project will be documented in this file.

## [2.0.0] - 2026-02-13

### Changed
- Minimum PHP version raised from 7.1 to 8.1.
- Updated PHPUnit from ^8.5|^9.6 to ^10.5|^11.5.
- Updated php-mock-phpunit from ^2.7 to ^2.10.
- Updated php-coveralls from ^2.6 to ^2.7.
- Updated phpunit.xml configuration to PHPUnit 10+ format.
- Updated Dockerfile default PHP version to 8.5.
- Updated GitHub Actions workflow to test PHP 8.1, 8.2, 8.3, 8.4, and 8.5.
- Updated GitHub Actions checkout action from v2 to v4.

### Fixed
- Removed deprecated `curl_close()` call (no effect since PHP 8.0).
- Removed deprecated `ReflectionMethod::setAccessible()` and `ReflectionProperty::setAccessible()` calls in tests (no effect since PHP 8.1).

### Removed
- Dropped support for PHP 7.x.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VERSION=8.3
ARG VERSION=8.5
FROM php:$VERSION-alpine
ARG APP_DIR=/application
WORKDIR $APP_DIR
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Alternatively keep reading below.

#### Prerequisites

- Minimum PHP 7.1+
- Working on PHP 8.2.10
- Minimum PHP 8.1+
- Working on PHP 8.5
- Free or Paid account with CurrencyApi.net
- Composer or clone this repo

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": ">=7.1.0|^8",
"php": "^8.1",
"ext-curl": "*",
"ext-json": "*",
"ext-simplexml": "*"
Expand All @@ -25,8 +25,8 @@
}
},
"require-dev": {
"phpunit/phpunit": "^8.5|^9.6",
"php-mock/php-mock-phpunit": "^2.7",
"php-coveralls/php-coveralls": "^2.6"
"phpunit/phpunit": "^10.5|^11.5",
"php-mock/php-mock-phpunit": "^2.10",
"php-coveralls/php-coveralls": "^2.7"
}
}
6 changes: 3 additions & 3 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd">
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
<exclude>
<directory suffix=".php">src/Exceptions/</directory>
</exclude>
</coverage>
</source>
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
Expand Down
1 change: 0 additions & 1 deletion src/CurrencyApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ protected function get(string $url, int $timeout = 5) : array
throw new BadRequestException($message, $code);
}

curl_close($ch);
return $response;
}
}
2 changes: 0 additions & 2 deletions tests/CurrencyApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public function invokeMethod(&$object, $methodName, array $parameters = array())
{
$reflection = new ReflectionClass(get_class($object));
$method = $reflection->getMethod($methodName);
$method->setAccessible(true);

return $method->invokeArgs($object, $parameters);
}
Expand All @@ -47,7 +46,6 @@ public function getProtectedProperty($object, $property)
{
$reflection = new \ReflectionClass($object);
$reflection_property = $reflection->getProperty($property);
$reflection_property->setAccessible(true);
return $reflection_property->getValue($object);
}

Expand Down