diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index 260ba56..125b538 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -38,6 +38,7 @@ jobs:
run: |
vendor/bin/phpcs src tests
vendor/bin/phpstan analyse -c phpstan.neon
+ vendor/bin/composer-dependency-analyser
- name: Run tests
run: |
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8a21aa6..0a7a64c 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased](https://github.com/inspirum/balikobot-php/compare/v7.8.0...master)
+### Added
+- Added support for new options from documentation **v1.991** (2024-01-04)
+ - Added **customs_indicator** attributes
+- Added **ZASILKOVNA_EE_VENIPAK_HD** service type
+- Added **ZASILKOVNA_EE_VENIPAK_PP** service type
+- Added **ZASILKOVNA_EE_VENIPAK_BOX** service type
+- Added **ZASILKOVNA_FI_MATKAHUOLTO_HD** service type
+- Added **ZASILKOVNA_FI_MATKAHUOLTO_PP** service type
+- Added **ZASILKOVNA_FI_MATKAHUOLTO_BOX** service type
+- Added **ZASILKOVNA_LV_VENIPAK_HD** service type
+- Added **ZASILKOVNA_LV_VENIPAK_PP** service type
+- Added **ZASILKOVNA_LV_VENIPAK_BOX** service type
+- Added **ZASILKOVNA_LT_VENIPAK_HD** service type
+- Added **ZASILKOVNA_LT_VENIPAK_PP** service type
+- Added **ZASILKOVNA_LT_VENIPAK_BOX** service type
+### Changed
+- Changed **ZASILKOVNA_HU_EXPRESS_ONE_HD** service type value
## [v7.8.0 (2024-04-04)](https://github.com/inspirum/balikobot-php/compare/v7.7.0...v7.8.0)
diff --git a/composer.json b/composer.json
index 384692f..0c930e4 100755
--- a/composer.json
+++ b/composer.json
@@ -26,7 +26,8 @@
"require-dev": {
"inspirum/coding-standard": "^1.4",
"phpstan/phpstan": "^1.10",
- "phpunit/phpunit": "^10.5",
+ "phpunit/phpunit": "^10.3",
+ "shipmonk/composer-dependency-analyser": "^1.5",
"squizlabs/php_codesniffer": "^3.9"
},
"autoload": {
@@ -52,8 +53,7 @@
"@test:unit",
"@style:phpstan",
"@test:integration",
- "@check:requirement",
- "@check:unused"
+ "@check:dependency"
],
"test:test": [
"@test:unit",
@@ -71,9 +71,6 @@
"test:unit:coverage": [
"@phpunit --testsuite=Unit --coverage-text --coverage-html=var/phpunit/coverage"
],
- "test:infection": [
- "@infection"
- ],
"style:phpcs": [
"@phpcs"
],
@@ -87,18 +84,13 @@
"style:fix": [
"@phpcbf src tests"
],
- "check:requirement": [
- "@composerRequireChecker"
- ],
- "check:unused": [
- "@composerUnused"
+ "check:dependency": [
+ "@composer-dependency-analyser"
],
"phpunit": "./vendor/bin/phpunit",
"phpcs": "./vendor/bin/phpcs -p -s --extensions=php --colors --report-width=140",
"phpstan": "./vendor/bin/phpstan analyse -c phpstan.neon",
"phpcbf": "./vendor/bin/phpcbf -p --extensions=php",
- "infection": "./tools/infection",
- "composerRequireChecker": "./tools/composer-require-checker check",
- "composerUnused": "./tools/composer-unused"
+ "composer-dependency-analyser": "./vendor/bin/composer-dependency-analyser"
}
}
diff --git a/phive.xml b/phive.xml
deleted file mode 100644
index d0830f6..0000000
--- a/phive.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/phpstan.neon b/phpstan.neon
index fcc6209..557be65 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -12,7 +12,7 @@ parameters:
count: 1
path: src/Model/BasePerCarrierCollection.php
-
- message: '#^Parameter \#1 \$ of callable callable\(TValue\): bool expects TValue of Inspirum\\Arrayable\\Arrayable&Inspirum\\Balikobot\\Model\\WithCarrierId, Inspirum\\Arrayable\\Arrayable&Inspirum\\Balikobot\\Model\\WithCarrierId given\.$#'
+ message: '#^Parameter \#1 of callable callable\(TValue\): bool expects TValue of Inspirum\\Arrayable\\Arrayable&Inspirum\\Balikobot\\Model\\WithCarrierId, Inspirum\\Arrayable\\Arrayable&Inspirum\\Balikobot\\Model\\WithCarrierId given\.$#'
count: 1
path: src/Model/BasePerCarrierCollection.php
-
diff --git a/tests/Integration/ChangesSupportTest.php b/tests/Integration/ChangesSupportTest.php
index 11a1f30..b1a1302 100644
--- a/tests/Integration/ChangesSupportTest.php
+++ b/tests/Integration/ChangesSupportTest.php
@@ -27,7 +27,7 @@ public function testLatestChangesSupport(): void
$changelog = $infoService->getChangelog();
- $expected = (float) '1.990';
+ $expected = (float) '1.996';
$actual = (float) $changelog->getLatestVersion();
if ($actual > $expected) {
diff --git a/tests/Unit/Client/DefaultClientTest.php b/tests/Unit/Client/DefaultClientTest.php
index e1a7fb7..64fee73 100644
--- a/tests/Unit/Client/DefaultClientTest.php
+++ b/tests/Unit/Client/DefaultClientTest.php
@@ -202,7 +202,6 @@ public static function providesTestCall(): iterable
'test' => 1596,
],
'gzip' => true,
- 'warning' => 'Unsupported decompression (update to "guzzlehttp/psr7:^2.0")',
];
yield 'compressed_gz_error' => [
diff --git a/tests/Unit/Model/Status/DefaultStatusFactoryTest.php b/tests/Unit/Model/Status/DefaultStatusFactoryTest.php
index 60f9b76..1440a71 100644
--- a/tests/Unit/Model/Status/DefaultStatusFactoryTest.php
+++ b/tests/Unit/Model/Status/DefaultStatusFactoryTest.php
@@ -23,11 +23,11 @@
final class DefaultStatusFactoryTest extends BaseTestCase
{
/**
- * @param array $carrierId
+ * @param array $carrierIds
* @param array $data
*/
#[DataProvider('providesTestCreateCollection')]
- public function testCreateCollection(string $carrier, array $carrierId, array $data, StatusesCollection|Throwable $result): void
+ public function testCreateCollection(string $carrier, array $carrierIds, array $data, StatusesCollection|Throwable $result): void
{
if ($result instanceof Throwable) {
$this->expectException($result::class);
@@ -36,7 +36,7 @@ public function testCreateCollection(string $carrier, array $carrierId, array $d
$factory = $this->newDefaultStatusFactory();
- $collection = $factory->createCollection($carrier, $carrierId, $data);
+ $collection = $factory->createCollection($carrier, $carrierIds, $data);
self::assertEquals($result, $collection);
}
@@ -162,7 +162,7 @@ public static function providesTestCreateCollection(): iterable
yield 'package_index_error' => [
'carrier' => 'cp',
'carrierIds' => ['3', '4', '5'],
- 'response' => [
+ 'data' => [
'packages' => [
0 => [
'carrier_id' => '3',
@@ -223,7 +223,7 @@ public static function providesTestCreateCollection(): iterable
yield 'package_index_missing_error' => [
'carrier' => 'ppl',
'carrierIds' => ['1', '3'],
- 'response' => [
+ 'data' => [
'status' => 200,
'packages' => [
1 => [
@@ -249,7 +249,7 @@ public static function providesTestCreateCollection(): iterable
yield 'package_status_error' => [
'carrier' => 'ppl',
'carrierIds' => ['1', '3'],
- 'response' => [
+ 'data' => [
'status' => 200,
'packages' => [
0 => [
@@ -280,7 +280,7 @@ public static function providesTestCreateCollection(): iterable
yield 'package_status_data_error' => [
'carrier' => 'cp',
'carrierIds' => ['1', '2'],
- 'response' => [
+ 'data' => [
'status' => 200,
'packages' => [
0 => [
@@ -317,11 +317,11 @@ public static function providesTestCreateCollection(): iterable
}
/**
- * @param array $carrierId
+ * @param array $carrierIds
* @param array $data
*/
#[DataProvider('providesTestCreateLastStatusCollection')]
- public function testCreateLastStatusCollection(string $carrier, array $carrierId, array $data, StatusCollection|Throwable $result): void
+ public function testCreateLastStatusCollection(string $carrier, array $carrierIds, array $data, StatusCollection|Throwable $result): void
{
if ($result instanceof Throwable) {
$this->expectException($result::class);
@@ -330,7 +330,7 @@ public function testCreateLastStatusCollection(string $carrier, array $carrierId
$factory = $this->newDefaultStatusFactory();
- $collection = $factory->createLastStatusCollection($carrier, $carrierId, $data);
+ $collection = $factory->createLastStatusCollection($carrier, $carrierIds, $data);
self::assertEquals($result, $collection);
}
@@ -343,7 +343,7 @@ public static function providesTestCreateLastStatusCollection(): iterable
yield 'valid' => [
'carrier' => 'cp',
'carrierIds' => ['1', '2'],
- 'response' => [
+ 'data' => [
'packages' => [
0 => [
'carrier_id' => '1',
@@ -387,7 +387,7 @@ public static function providesTestCreateLastStatusCollection(): iterable
yield 'missing_data_error' => [
'carrier' => 'cp',
'carrierIds' => ['1', '2'],
- 'response' => [
+ 'data' => [
'status' => 200,
],
'result' => new BadRequestException([], 400),
@@ -396,7 +396,7 @@ public static function providesTestCreateLastStatusCollection(): iterable
yield 'package_index_error' => [
'carrier' => 'cp',
'carrierIds' => ['3', '4'],
- 'response' => [
+ 'data' => [
'packages' => [
0 => [
'carrier_id' => '1',
@@ -418,7 +418,7 @@ public static function providesTestCreateLastStatusCollection(): iterable
yield 'package_index_missing_error' => [
'carrier' => 'ppl',
'carrierIds' => ['1', '3'],
- 'response' => [
+ 'data' => [
'status' => 200,
'packages' => [
0 => [
@@ -435,7 +435,7 @@ public static function providesTestCreateLastStatusCollection(): iterable
yield 'package_status_error' => [
'carrier' => 'ppl',
'carrierIds' => ['1', '3'],
- 'response' => [
+ 'data' => [
'status' => 200,
'packages' => [
0 => [
@@ -480,7 +480,7 @@ public static function providesTestCreate(): iterable
yield 'v2' => [
'carrier' => 'cp',
'carrierId' => '1',
- 'data' => [
+ 'data' => [
'date' => '2018-11-07 14:15:01',
'name' => 'Doručení',
'name_internal' => 'Zásilka byla doručena příjemci.',
@@ -501,7 +501,7 @@ public static function providesTestCreate(): iterable
yield 'missing_data' => [
'carrier' => 'cp',
'carrierId' => '2',
- 'data' => [
+ 'data' => [
'name' => 'Doručení',
'status_id' => 2,
],
@@ -519,7 +519,7 @@ public static function providesTestCreate(): iterable
yield 'v3' => [
'carrier' => 'cp',
'carrierId' => '3',
- 'data' => [
+ 'data' => [
'date' => '2018-11-08 14:18:01',
'name' => 'Doručení',
'name_balikobot' => 'Zásilka byla doručena příjemci.',
@@ -564,7 +564,7 @@ public static function providesTestCreateLastStatus(): iterable
{
yield 'valid' => [
'carrier' => 'cp',
- 'data' => [
+ 'data' => [
'carrier_id' => '1',
'status' => 200,
'status_id' => 1.2,
@@ -583,7 +583,7 @@ public static function providesTestCreateLastStatus(): iterable
yield 'invalid' => [
'carrier' => 'cp',
- 'data' => [
+ 'data' => [
'status' => 200,
],
'result' => new BadRequestException([], 400),