Skip to content

Commit 3f99633

Browse files
authored
Merge pull request #51 from swlodarski-sumoheavy/2.2.x-php-8.5
[#50] Add support for PHP 8.5
2 parents 8464239 + 8784643 commit 3f99633

13 files changed

Lines changed: 41 additions & 50 deletions

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88

99
strategy:
1010
matrix:
11-
php-version: ["8.1", "8.2", "8.3", "8.4"]
11+
php-version: ["8.1", "8.2", "8.3", "8.4", "8.5"]
1212

1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v6
1515
- uses: php-actions/composer@v6
1616
with:
1717
php_version: ${{ matrix.php-version }}
@@ -21,14 +21,14 @@ jobs:
2121
configuration: phpunit.xml
2222
php_version: ${{ matrix.php-version }}
2323
php_extensions: bcmath gmp xdebug
24-
version: 10.5.27
24+
version: 10.5.63
2525
env:
2626
XDEBUG_MODE: coverage
2727
phpcs:
2828
runs-on: ubuntu-latest
2929

3030
steps:
31-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@v6
3232
- uses: php-actions/composer@v6
3333
with:
3434
php_version: 8.1

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Add to your composer.json file by hand.
2727
...
2828
"require": {
2929
...
30-
"bitpay/key-utils": "~2.0"
30+
"bitpay/key-utils": "~2.2"
3131
}
3232
...
3333
}
@@ -42,7 +42,7 @@ php composer.phar update bitpay/key-utils
4242
### Install using composer
4343

4444
```bash
45-
php composer.phar require bitpay/key-utils:~2.0
45+
php composer.phar require bitpay/key-utils:~2.2
4646
```
4747

4848
# Usage
@@ -96,4 +96,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
9696
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
9797
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
9898
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
99-
SOFTWARE.
99+
SOFTWARE.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121
},
2222
"require": {
23-
"php": "^8.1 || ^8.2 || ^8.3 || ^8.4",
23+
"php": "^8.1 || ^8.2 || ^8.3 || ^8.4 || ^8.5",
2424
"ext-bcmath": "*",
2525
"ext-openssl": "*",
2626
"ext-curl": "*",
@@ -33,4 +33,4 @@
3333
"suggest": {
3434
"ext-gmp": "GMP provides better performance than BCMath"
3535
}
36-
}
36+
}

composer.lock

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676

7777
$result = curl_exec($curlCli);
7878
$resultData = json_decode($result, TRUE);
79-
curl_close($curlCli);
8079

8180
if (array_key_exists('error', $resultData)) {
8281
echo $resultData['error'];

test/unit/BitPayKeyUtils/KeyHelper/KeyTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ public function testIsGenerated(): void
8989
private function setProtectedPropertyValue(&$instance, $propertyName, $propertyValue): void
9090
{
9191
$reflection = new \ReflectionProperty(get_class($instance), $propertyName);
92-
$reflection->setAccessible(true);
9392
$reflection->setValue($instance, $propertyValue);
9493
}
9594

@@ -107,4 +106,4 @@ public function isValid(): bool
107106
}
108107
};
109108
}
110-
}
109+
}

test/unit/BitPayKeyUtils/KeyHelper/PrivateKeyTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,7 @@ private function accessProtected($obj, $prop)
202202
{
203203
$reflection = new \ReflectionClass($obj);
204204
$property = $reflection->getProperty($prop);
205-
$property->setAccessible(true);
206205

207206
return $property->getValue($obj);
208207
}
209-
}
208+
}

test/unit/BitPayKeyUtils/KeyHelper/PublicKeyTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,12 @@ private function accessProtected($obj, $prop)
161161
{
162162
$reflection = new \ReflectionClass($obj);
163163
$property = $reflection->getProperty($prop);
164-
$property->setAccessible(true);
165164
return $property->getValue($obj);
166165
}
167166

168167
private function setProtectedPropertyValue(&$instance, $propertyName, $propertyValue): void
169168
{
170169
$reflection = new \ReflectionProperty(get_class($instance), $propertyName);
171-
$reflection->setAccessible(true);
172170
$reflection->setValue($instance, $propertyValue);
173171
}
174172

test/unit/BitPayKeyUtils/KeyHelper/SinKeyTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ private function getAccessibleProperty(string $class, string $property): \Reflec
8181
{
8282
$reflection = new \ReflectionClass($class);
8383
$property = $reflection->getProperty($property);
84-
$property->setAccessible(true);
8584

8685
return $property;
8786
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
O:7:"KeyMock":0:{}
1+
O:8:"KeyMock1":0:{}

0 commit comments

Comments
 (0)