Skip to content

Commit 071183f

Browse files
authored
Merge pull request #212 from EJTJ3/develop
Enhancement: Add support for PHP 8.0 and updated minimal php version to 7.3
2 parents 26a8f23 + 01de34f commit 071183f

13 files changed

+56
-68
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,6 @@ tmp/
8282

8383
# PhpCs
8484
.php_cs*
85+
86+
# PHPUnit
87+
.phpunit.result.cache

composer.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^7.0.13",
23+
"php": "^7.3 || ^8.0",
24+
"composer-plugin-api": "~1.0 || ~2.0",
2425
"ext-curl": "*",
2526
"ext-json": "*",
2627
"ext-mbstring": "*",
27-
"guzzlehttp/guzzle": "~6"
28+
"guzzlehttp/guzzle": "~7"
2829
},
2930
"autoload": {
3031
"psr-4": {
@@ -37,22 +38,20 @@
3738
}
3839
},
3940
"require-dev": {
40-
"brianium/paratest": "^1.1",
41+
"composer/composer": "^1.10.11 || ^2.0.1",
4142
"friendsofphp/php-cs-fixer": "^2.4",
42-
"jakub-onderka/php-parallel-lint": "^0.9.2",
43-
"phpro/grumphp": "^0.11.6",
44-
"phpstan/phpstan": "^0.8",
45-
"phpunit/phpunit": "^6.0.13",
46-
"sebastian/phpcpd": "^3.0",
47-
"sensiolabs/security-checker": "^5.0"
43+
"php-parallel-lint/php-parallel-lint": "^1.2",
44+
"phpro/grumphp": "^v1.3.0",
45+
"phpstan/phpstan": "^0.12",
46+
"phpunit/phpunit": "^9.5"
4847
},
4948
"bin": [
5049
"bin/bunq-install"
5150
],
5251
"config": {
5352
"sort-packages": true,
5453
"platform": {
55-
"php": "7.0.13"
54+
"php": "7.3"
5655
}
5756
},
5857
"scripts": {

grumphp.yml

Lines changed: 22 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,43 @@
1-
parameters:
2-
bin_dir: "./vendor/bin"
3-
git_dir: "."
4-
hide_circumvention_tip: false
1+
grumphp:
52
hooks_dir: ~
63
hooks_preset: local
4+
git_hook_variables:
5+
VAGRANT_HOST_DIR: .
6+
VAGRANT_PROJECT_DIR: /var/www
7+
EXEC_GRUMPHP_COMMAND: exec
8+
stop_on_failure: false
79
ignore_unstaged_changes: false
8-
process_async_limit: 10
9-
process_async_wait: 1000
10+
hide_circumvention_tip: false
1011
process_timeout: 300
11-
stop_on_failure: true
12+
parallel:
13+
enabled: false
14+
fixer:
15+
enabled: true
16+
fix_by_default: false
17+
extensions: [ ]
1218
ascii:
1319
failed: ~
1420
succeeded: ~
1521
tasks:
16-
composer:
17-
file: ./composer.json
18-
no_check_all: false
19-
no_check_lock: false
20-
no_check_publish: false
21-
with_dependencies: false
22-
strict: true
22+
composer: ~
2323
git_blacklist:
2424
keywords:
2525
- "die("
2626
- "dump("
27-
- "exit;"
2827
- "print_r("
2928
- "print_rr("
3029
- "var_dump("
31-
triggered_by: ['php']
32-
phpcpd:
33-
directory: '.'
34-
exclude: ['vendor', 'src/Model/Generated']
35-
names_exclude: []
36-
fuzzy: false
37-
min_lines: 5
38-
min_tokens: 70
39-
triggered_by: ['php']
30+
- "exit;"
4031
phpcsfixer2:
4132
allow_risky: false
4233
cache_file: ~
43-
config: ~
44-
rules: []
45-
using_cache: true
46-
path_mode: ~
34+
config: .php_cs
35+
rules: [ ]
36+
using_cache: ~
37+
config_contains_finder: false
4738
verbose: true
39+
diff: false
40+
triggered_by: [ 'php' ]
4841
phplint:
4942
exclude: ['vendor']
5043
jobs: ~
@@ -55,13 +48,7 @@ parameters:
5548
group: []
5649
always_execute: false
5750
phpversion:
58-
project: '5.6'
59-
securitychecker:
60-
lockfile: ./composer.lock
61-
format: ~
62-
end_point: ~
63-
timeout: ~
64-
run_always: true
51+
project: '7.3'
6552
xmllint:
6653
ignore_patterns: []
6754
load_from_net: false

phpunit.xml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<phpunit
2-
bootstrap="./vendor/autoload.php"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd"
5-
cacheTokens="false">
1+
<?xml version="1.0"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
3+
<coverage>
4+
<include>
5+
<directory suffix=".php">./src</directory>
6+
</include>
7+
</coverage>
68
<testsuites>
79
<testsuite name="ParaTest Fixtures">
810
<directory>./tests/</directory>
@@ -11,9 +13,4 @@
1113
<directory>./tests</directory>
1214
</testsuite>
1315
</testsuites>
14-
<filter>
15-
<whitelist>
16-
<directory suffix=".php">./src</directory>
17-
</whitelist>
18-
</filter>
1916
</phpunit>

tests/BunqSdkTestBase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class BunqSdkTestBase extends TestCase
9191

9292
/**
9393
*/
94-
public static function setUpBeforeClass()
94+
public static function setUpBeforeClass(): void
9595
{
9696
static::createApiContext();
9797
BunqContext::loadApiContext(
@@ -111,7 +111,7 @@ protected static function createApiContext()
111111

112112
/**
113113
*/
114-
protected function setUp()
114+
protected function setUp(): void
115115
{
116116
$this->setSecondMonetaryAccountBank();
117117
$this->requestSpendingMoney();

tests/Http/PaginationScenarioTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function testApiScenarioPaymentListingWithPagination()
5555

5656
$paymentsActual = array_merge($responsePreviousNext->getValue(), $responsePrevious->getValue());
5757

58-
$this->assertEquals($paymentsExpected, $paymentsActual);
58+
static::assertEquals($paymentsExpected, $paymentsActual);
5959
}
6060

6161
/**

tests/Http/PaginationTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,11 @@ public function testGetUrlParamsNextPageFutureNoCount()
131131
}
132132

133133
/**
134-
* @expectedException \bunq\Exception\BunqException
135134
*/
136135
public function testGetUrlParamsPreviousPageFromPaginationWithNoPreviousPage()
137136
{
137+
$this->expectException('\bunq\Exception\BunqException');
138+
138139
$pagination = $this->createPaginationWithAllPropertiesSet();
139140
$pagination->setOlderId(null);
140141

@@ -143,10 +144,11 @@ public function testGetUrlParamsPreviousPageFromPaginationWithNoPreviousPage()
143144
}
144145

145146
/**
146-
* @expectedException \bunq\Exception\BunqException
147147
*/
148148
public function testGetUrlParamsNextPageFromPaginationWithNoNextPage()
149149
{
150+
$this->expectException('\bunq\Exception\BunqException');
151+
150152
$pagination = $this->createPaginationWithAllPropertiesSet();
151153
$pagination->setNewerId(null);
152154
$pagination->setFutureId(null);

tests/Model/Core/NotificationFilterTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ public function testNotificationFilterClear()
8282
static::assertEmpty($allCreatedNotificationFilterUrlUser);
8383
static::assertEmpty($allCreatedNotificationFilterUrlMonetaryAccount);
8484

85-
static::assertEquals(0, count(NotificationFilterPushUserInternal::listing()->getValue()));
86-
static::assertEquals(0, count(NotificationFilterUrlUserInternal::listing()->getValue()));
87-
static::assertEquals(0, count(NotificationFilterUrlMonetaryAccountInternal::listing()->getValue()));
85+
static::assertCount(0, NotificationFilterPushUserInternal::listing()->getValue());
86+
static::assertCount(0, NotificationFilterUrlUserInternal::listing()->getValue());
87+
static::assertCount(0, NotificationFilterUrlMonetaryAccountInternal::listing()->getValue());
8888
}
8989

9090
/**

tests/Model/Generated/Endpoint/CardDebitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class CardDebitTest extends BunqSdkTestBase
5555

5656
/**
5757
*/
58-
public static function setUpBeforeClass()
58+
public static function setUpBeforeClass(): void
5959
{
6060
parent::setUpBeforeClass();
6161
$cardNamesAllowed = CardName::listing()->getValue();

tests/Model/Generated/Endpoint/DraftShareInviteBankQrCodeContentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class DraftShareInviteBankQrCodeContentTest extends BunqSdkTestBase
3737

3838
/**
3939
*/
40-
public static function setUpBeforeClass()
40+
public static function setUpBeforeClass(): void
4141
{
4242
parent::setUpBeforeClass();
4343
static::$expirationDate = date(self::FORMAT_MICROTIME, strtotime(self::EXPIRATION_ADDED_TIME));

0 commit comments

Comments
 (0)