diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 3502db0..ac643ac 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -22,18 +22,18 @@ on: env: CONSUL_HTTP_ADDR: "127.0.0.1:8500" - CONSUL_VERSION: '1.16.1' + CONSUL_VERSION: '1.17.2' jobs: tests: runs-on: ubuntu-22.04 strategy: matrix: - php-version: ["7.4", "8.0", "8.1", "8.2"] + php-version: ["8.0", "8.1", "8.2"] name: Tests - PHP ${{ matrix.php-version }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: shivammathur/setup-php@v2 with: diff --git a/composer.json b/composer.json index 981ab75..c7180b7 100644 --- a/composer.json +++ b/composer.json @@ -16,9 +16,9 @@ "php-consul-api" ], "require": { - "php": "7.4.* || 8.*", + "php": "8.*", "ext-json": "*", - "dcarbone/gotime": "v0.4.* || v0.5.*", + "dcarbone/gotime": "v0.5.*", "dcarbone/gohttp": "v0.3.*", "guzzlehttp/guzzle": "^7.4", "guzzlehttp/psr7": "^2.4" diff --git a/composer.lock b/composer.lock index f06ad9b..ba12eb5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "267cd1295c5db221783e7080b4783252", + "content-hash": "7d5a3eed8b593d15e1a1323a35bf6fd2", "packages": [ { "name": "dcarbone/gohttp", @@ -109,22 +109,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.7.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", - "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104", + "reference": "41042bc7ab002487b876a0683fc8dce04ddce104", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -133,11 +133,11 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "phpunit/phpunit": "^8.5.36 || ^9.6.15", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -215,7 +215,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.7.0" + "source": "https://github.com/guzzle/guzzle/tree/7.8.1" }, "funding": [ { @@ -231,28 +231,28 @@ "type": "tidelift" } ], - "time": "2023-05-21T14:04:53+00:00" + "time": "2023-12-03T20:35:24+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", - "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223", + "reference": "bbff78d96034045e58e13dedd6ad91b5d1253223", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "type": "library", "extra": { @@ -298,7 +298,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.1" + "source": "https://github.com/guzzle/promises/tree/2.0.2" }, "funding": [ { @@ -314,20 +314,20 @@ "type": "tidelift" } ], - "time": "2023-08-03T15:11:55+00:00" + "time": "2023-12-03T20:19:20+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.6.0", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "8bd7c33a0734ae1c5d074360512beb716bef3f77" + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/8bd7c33a0734ae1c5d074360512beb716bef3f77", - "reference": "8bd7c33a0734ae1c5d074360512beb716bef3f77", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221", + "reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221", "shasum": "" }, "require": { @@ -341,9 +341,9 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.1", + "bamarni/composer-bin-plugin": "^1.8.2", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.29 || ^9.5.23" + "phpunit/phpunit": "^8.5.36 || ^9.6.15" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -414,7 +414,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.6.0" + "source": "https://github.com/guzzle/psr7/tree/2.6.2" }, "funding": [ { @@ -430,20 +430,20 @@ "type": "tidelift" } ], - "time": "2023-08-03T15:06:02+00:00" + "time": "2023-12-03T20:05:35+00:00" }, { "name": "psr/http-client", - "version": "1.0.2", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", - "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", "shasum": "" }, "require": { @@ -480,9 +480,9 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/1.0.2" + "source": "https://github.com/php-fig/http-client" }, - "time": "2023-04-10T20:12:12+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", @@ -638,7 +638,7 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", @@ -685,7 +685,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -766,25 +766,27 @@ }, { "name": "nikic/php-parser", - "version": "v4.17.1", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", - "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -792,7 +794,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -816,9 +818,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" }, - "time": "2023-08-13T19:53:39+00:00" + "time": "2024-01-07T17:17:35+00:00" }, { "name": "phar-io/manifest", @@ -933,35 +935,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "10.1.3", + "version": "11.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "be1fe461fdc917de2a29a452ccf2657d325b443d" + "reference": "5e238e4b982cb272bf9faeee6f33af83d465d0e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/be1fe461fdc917de2a29a452ccf2657d325b443d", - "reference": "be1fe461fdc917de2a29a452ccf2657d325b443d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5e238e4b982cb272bf9faeee6f33af83d465d0e2", + "reference": "5e238e4b982cb272bf9faeee6f33af83d465d0e2", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.15", - "php": ">=8.1", - "phpunit/php-file-iterator": "^4.0", - "phpunit/php-text-template": "^3.0", - "sebastian/code-unit-reverse-lookup": "^3.0", - "sebastian/complexity": "^3.0", - "sebastian/environment": "^6.0", - "sebastian/lines-of-code": "^2.0", - "sebastian/version": "^4.0", + "nikic/php-parser": "^5.0", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.0", + "phpunit/php-text-template": "^4.0", + "sebastian/code-unit-reverse-lookup": "^4.0", + "sebastian/complexity": "^4.0", + "sebastian/environment": "^7.0", + "sebastian/lines-of-code": "^3.0", + "sebastian/version": "^5.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^10.1" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -970,7 +972,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.1-dev" + "dev-main": "11.0-dev" } }, "autoload": { @@ -999,7 +1001,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.3" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.0" }, "funding": [ { @@ -1007,32 +1009,32 @@ "type": "github" } ], - "time": "2023-07-26T13:45:28+00:00" + "time": "2024-02-02T06:03:46+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "4.0.2", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "5647d65443818959172645e7ed999217360654b6" + "reference": "99e95c94ad9500daca992354fa09d7b99abe2210" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/5647d65443818959172645e7ed999217360654b6", - "reference": "5647d65443818959172645e7ed999217360654b6", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/99e95c94ad9500daca992354fa09d7b99abe2210", + "reference": "99e95c94ad9500daca992354fa09d7b99abe2210", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1060,7 +1062,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.0.2" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.0.0" }, "funding": [ { @@ -1068,28 +1070,28 @@ "type": "github" } ], - "time": "2023-05-07T09:13:23+00:00" + "time": "2024-02-02T06:05:04+00:00" }, { "name": "phpunit/php-invoker", - "version": "4.0.0", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" + "reference": "5d8d9355a16d8cc5a1305b0a85342cfa420612be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", - "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5d8d9355a16d8cc5a1305b0a85342cfa420612be", + "reference": "5d8d9355a16d8cc5a1305b0a85342cfa420612be", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-pcntl": "*" @@ -1097,7 +1099,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1123,7 +1125,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.0" }, "funding": [ { @@ -1131,32 +1134,32 @@ "type": "github" } ], - "time": "2023-02-03T06:56:09+00:00" + "time": "2024-02-02T06:05:50+00:00" }, { "name": "phpunit/php-text-template", - "version": "3.0.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d" + "reference": "d38f6cbff1cdb6f40b03c9811421561668cc133e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/9f3d3709577a527025f55bcf0f7ab8052c8bb37d", - "reference": "9f3d3709577a527025f55bcf0f7ab8052c8bb37d", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/d38f6cbff1cdb6f40b03c9811421561668cc133e", + "reference": "d38f6cbff1cdb6f40b03c9811421561668cc133e", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1182,7 +1185,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.0" }, "funding": [ { @@ -1190,32 +1194,32 @@ "type": "github" } ], - "time": "2023-02-03T06:56:46+00:00" + "time": "2024-02-02T06:06:56+00:00" }, { "name": "phpunit/php-timer", - "version": "6.0.0", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" + "reference": "8a59d9e25720482ee7fcdf296595e08795b84dc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", - "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8a59d9e25720482ee7fcdf296595e08795b84dc5", + "reference": "8a59d9e25720482ee7fcdf296595e08795b84dc5", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1241,7 +1245,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.0" }, "funding": [ { @@ -1249,20 +1254,20 @@ "type": "github" } ], - "time": "2023-02-03T06:57:52+00:00" + "time": "2024-02-02T06:08:01+00:00" }, { "name": "phpunit/phpunit", - "version": "10.3.2", + "version": "11.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0dafb1175c366dd274eaa9a625e914451506bcd1" + "reference": "de24e7e7c67fbf437f7b6cd7bc919f2dc6fd89d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0dafb1175c366dd274eaa9a625e914451506bcd1", - "reference": "0dafb1175c366dd274eaa9a625e914451506bcd1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de24e7e7c67fbf437f7b6cd7bc919f2dc6fd89d4", + "reference": "de24e7e7c67fbf437f7b6cd7bc919f2dc6fd89d4", "shasum": "" }, "require": { @@ -1275,23 +1280,22 @@ "myclabs/deep-copy": "^1.10.1", "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.1", - "phpunit/php-file-iterator": "^4.0", - "phpunit/php-invoker": "^4.0", - "phpunit/php-text-template": "^3.0", - "phpunit/php-timer": "^6.0", - "sebastian/cli-parser": "^2.0", - "sebastian/code-unit": "^2.0", - "sebastian/comparator": "^5.0", - "sebastian/diff": "^5.0", - "sebastian/environment": "^6.0", - "sebastian/exporter": "^5.0", - "sebastian/global-state": "^6.0.1", - "sebastian/object-enumerator": "^5.0", - "sebastian/recursion-context": "^5.0", - "sebastian/type": "^4.0", - "sebastian/version": "^4.0" + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0", + "phpunit/php-file-iterator": "^5.0", + "phpunit/php-invoker": "^5.0", + "phpunit/php-text-template": "^4.0", + "phpunit/php-timer": "^7.0", + "sebastian/cli-parser": "^3.0", + "sebastian/code-unit": "^3.0", + "sebastian/comparator": "^6.0", + "sebastian/diff": "^6.0", + "sebastian/environment": "^7.0", + "sebastian/exporter": "^6.0", + "sebastian/global-state": "^7.0", + "sebastian/object-enumerator": "^6.0", + "sebastian/type": "^5.0", + "sebastian/version": "^5.0" }, "suggest": { "ext-soap": "To be able to generate mocks based on WSDL files" @@ -1302,7 +1306,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "10.3-dev" + "dev-main": "11.0-dev" } }, "autoload": { @@ -1334,7 +1338,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.3.2" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.0.3" }, "funding": [ { @@ -1350,32 +1354,32 @@ "type": "tidelift" } ], - "time": "2023-08-15T05:34:23+00:00" + "time": "2024-02-10T06:31:16+00:00" }, { "name": "sebastian/cli-parser", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae" + "reference": "efd6ce5bb8131fe981e2f879dbd47605fbe0cc6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efdc130dbbbb8ef0b545a994fd811725c5282cae", - "reference": "efdc130dbbbb8ef0b545a994fd811725c5282cae", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efd6ce5bb8131fe981e2f879dbd47605fbe0cc6f", + "reference": "efd6ce5bb8131fe981e2f879dbd47605fbe0cc6f", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1398,7 +1402,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.0" }, "funding": [ { @@ -1406,32 +1411,32 @@ "type": "github" } ], - "time": "2023-02-03T06:58:15+00:00" + "time": "2024-02-02T05:48:04+00:00" }, { "name": "sebastian/code-unit", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" + "reference": "6634549cb8d702282a04a774e36a7477d2bd9015" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", - "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6634549cb8d702282a04a774e36a7477d2bd9015", + "reference": "6634549cb8d702282a04a774e36a7477d2bd9015", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1454,7 +1459,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.0" }, "funding": [ { @@ -1462,32 +1468,32 @@ "type": "github" } ], - "time": "2023-02-03T06:58:43+00:00" + "time": "2024-02-02T05:50:41+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "3.0.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" + "reference": "df80c875d3e459b45c6039e4d9b71d4fbccae25d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", - "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/df80c875d3e459b45c6039e4d9b71d4fbccae25d", + "reference": "df80c875d3e459b45c6039e4d9b71d4fbccae25d", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1509,7 +1515,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.0" }, "funding": [ { @@ -1517,36 +1524,36 @@ "type": "github" } ], - "time": "2023-02-03T06:59:15+00:00" + "time": "2024-02-02T05:52:17+00:00" }, { "name": "sebastian/comparator", - "version": "5.0.1", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2db5010a484d53ebf536087a70b4a5423c102372" + "reference": "bd0f2fa5b9257c69903537b266ccb80fcf940db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2db5010a484d53ebf536087a70b4a5423c102372", - "reference": "2db5010a484d53ebf536087a70b4a5423c102372", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/bd0f2fa5b9257c69903537b266ccb80fcf940db8", + "reference": "bd0f2fa5b9257c69903537b266ccb80fcf940db8", "shasum": "" }, "require": { "ext-dom": "*", "ext-mbstring": "*", - "php": ">=8.1", - "sebastian/diff": "^5.0", - "sebastian/exporter": "^5.0" + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^10.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1586,7 +1593,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.1" + "source": "https://github.com/sebastianbergmann/comparator/tree/6.0.0" }, "funding": [ { @@ -1594,33 +1601,33 @@ "type": "github" } ], - "time": "2023-08-14T13:18:12+00:00" + "time": "2024-02-02T05:53:45+00:00" }, { "name": "sebastian/complexity", - "version": "3.0.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6" + "reference": "88a434ad86150e11a606ac4866b09130712671f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/e67d240970c9dc7ea7b2123a6d520e334dd61dc6", - "reference": "e67d240970c9dc7ea7b2123a6d520e334dd61dc6", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/88a434ad86150e11a606ac4866b09130712671f0", + "reference": "88a434ad86150e11a606ac4866b09130712671f0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", - "php": ">=8.1" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1643,7 +1650,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.0" }, "funding": [ { @@ -1651,33 +1659,33 @@ "type": "github" } ], - "time": "2023-02-03T06:59:47+00:00" + "time": "2024-02-02T05:55:19+00:00" }, { "name": "sebastian/diff", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" + "reference": "3e3f502419518897a923aa1c64d51f9def2e0aff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", - "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3e3f502419518897a923aa1c64d51f9def2e0aff", + "reference": "3e3f502419518897a923aa1c64d51f9def2e0aff", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0", + "phpunit/phpunit": "^11.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1710,7 +1718,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.0" }, "funding": [ { @@ -1718,27 +1726,27 @@ "type": "github" } ], - "time": "2023-05-01T07:48:21+00:00" + "time": "2024-02-02T05:56:35+00:00" }, { "name": "sebastian/environment", - "version": "6.0.1", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951" + "reference": "100d8b855d7180f79f9a9a5c483f2d960581c3ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/43c751b41d74f96cbbd4e07b7aec9675651e2951", - "reference": "43c751b41d74f96cbbd4e07b7aec9675651e2951", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/100d8b855d7180f79f9a9a5c483f2d960581c3ea", + "reference": "100d8b855d7180f79f9a9a5c483f2d960581c3ea", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-posix": "*" @@ -1746,7 +1754,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1774,7 +1782,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/environment/tree/7.0.0" }, "funding": [ { @@ -1782,34 +1790,34 @@ "type": "github" } ], - "time": "2023-04-11T05:39:26+00:00" + "time": "2024-02-02T05:57:54+00:00" }, { "name": "sebastian/exporter", - "version": "5.0.0", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0" + "reference": "d0c0a93fc746b0c066037f1e7d09104129e868ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", - "reference": "f3ec4bf931c0b31e5b413f5b4fc970a7d03338c0", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d0c0a93fc746b0c066037f1e7d09104129e868ff", + "reference": "d0c0a93fc746b0c066037f1e7d09104129e868ff", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": ">=8.1", - "sebastian/recursion-context": "^5.0" + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1851,7 +1859,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.0.0" }, "funding": [ { @@ -1859,35 +1868,35 @@ "type": "github" } ], - "time": "2023-02-03T07:06:49+00:00" + "time": "2024-02-02T05:58:52+00:00" }, { "name": "sebastian/global-state", - "version": "6.0.1", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4" + "reference": "590e7cbc6565fa2e26c3df4e629a34bb0bc00c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/7ea9ead78f6d380d2a667864c132c2f7b83055e4", - "reference": "7ea9ead78f6d380d2a667864c132c2f7b83055e4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/590e7cbc6565fa2e26c3df4e629a34bb0bc00c17", + "reference": "590e7cbc6565fa2e26c3df4e629a34bb0bc00c17", "shasum": "" }, "require": { - "php": ">=8.1", - "sebastian/object-reflector": "^3.0", - "sebastian/recursion-context": "^5.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1906,14 +1915,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.0" }, "funding": [ { @@ -1921,33 +1930,33 @@ "type": "github" } ], - "time": "2023-07-19T07:19:23+00:00" + "time": "2024-02-02T05:59:33+00:00" }, { "name": "sebastian/lines-of-code", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130" + "reference": "376c5b3f6b43c78fdc049740bca76a7c846706c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/17c4d940ecafb3d15d2cf916f4108f664e28b130", - "reference": "17c4d940ecafb3d15d2cf916f4108f664e28b130", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/376c5b3f6b43c78fdc049740bca76a7c846706c0", + "reference": "376c5b3f6b43c78fdc049740bca76a7c846706c0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.10", - "php": ">=8.1" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1970,7 +1979,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.0" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.0" }, "funding": [ { @@ -1978,34 +1988,34 @@ "type": "github" } ], - "time": "2023-02-03T07:08:02+00:00" + "time": "2024-02-02T06:00:36+00:00" }, { "name": "sebastian/object-enumerator", - "version": "5.0.0", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" + "reference": "f75f6c460da0bbd9668f43a3dde0ec0ba7faa678" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", - "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f75f6c460da0bbd9668f43a3dde0ec0ba7faa678", + "reference": "f75f6c460da0bbd9668f43a3dde0ec0ba7faa678", "shasum": "" }, "require": { - "php": ">=8.1", - "sebastian/object-reflector": "^3.0", - "sebastian/recursion-context": "^5.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2027,7 +2037,8 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.0" }, "funding": [ { @@ -2035,32 +2046,32 @@ "type": "github" } ], - "time": "2023-02-03T07:08:32+00:00" + "time": "2024-02-02T06:01:29+00:00" }, { "name": "sebastian/object-reflector", - "version": "3.0.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" + "reference": "bb2a6255d30853425fd38f032eb64ced9f7f132d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", - "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/bb2a6255d30853425fd38f032eb64ced9f7f132d", + "reference": "bb2a6255d30853425fd38f032eb64ced9f7f132d", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -2082,7 +2093,8 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.0" }, "funding": [ { @@ -2090,32 +2102,32 @@ "type": "github" } ], - "time": "2023-02-03T07:06:18+00:00" + "time": "2024-02-02T06:02:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "5.0.0", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "05909fb5bc7df4c52992396d0116aed689f93712" + "reference": "b75224967b5a466925c6d54e68edd0edf8dd4ed4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", - "reference": "05909fb5bc7df4c52992396d0116aed689f93712", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b75224967b5a466925c6d54e68edd0edf8dd4ed4", + "reference": "b75224967b5a466925c6d54e68edd0edf8dd4ed4", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2145,7 +2157,8 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.0" }, "funding": [ { @@ -2153,32 +2166,32 @@ "type": "github" } ], - "time": "2023-02-03T07:05:40+00:00" + "time": "2024-02-02T06:08:48+00:00" }, { "name": "sebastian/type", - "version": "4.0.0", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" + "reference": "b8502785eb3523ca0dd4afe9ca62235590020f3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", - "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8502785eb3523ca0dd4afe9ca62235590020f3f", + "reference": "b8502785eb3523ca0dd4afe9ca62235590020f3f", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^10.0" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2201,7 +2214,8 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.0.0" }, "funding": [ { @@ -2209,29 +2223,29 @@ "type": "github" } ], - "time": "2023-02-03T07:10:45+00:00" + "time": "2024-02-02T06:09:34+00:00" }, { "name": "sebastian/version", - "version": "4.0.1", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" + "reference": "13999475d2cb1ab33cb73403ba356a814fdbb001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", - "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/13999475d2cb1ab33cb73403ba356a814fdbb001", + "reference": "13999475d2cb1ab33cb73403ba356a814fdbb001", "shasum": "" }, "require": { - "php": ">=8.1" + "php": ">=8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2254,7 +2268,8 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.0" }, "funding": [ { @@ -2262,20 +2277,20 @@ "type": "github" } ], - "time": "2023-02-07T11:34:05+00:00" + "time": "2024-02-02T06:10:47+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -2304,7 +2319,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -2312,7 +2327,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" } ], "aliases": [], @@ -2323,9 +2338,9 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "7.4.* || 8.*", + "php": "8.*", "ext-json": "*" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/src/ACL/ACLAuthMethod.php b/src/ACL/ACLAuthMethod.php index ca3e200..68d852b 100644 --- a/src/ACL/ACLAuthMethod.php +++ b/src/ACL/ACLAuthMethod.php @@ -54,6 +54,8 @@ class ACLAuthMethod extends AbstractModel private const FIELD_NAMESPACE_RULES = 'NamespaceRules'; private const FIELD_NAMESPACE = 'Namespace'; + /** @var string */ + public string $ID = ''; /** @var string */ public string $Name = ''; /** @var string */ @@ -89,6 +91,24 @@ public function __construct(?array $data = null) } } + /** + * @return string + */ + public function getID(): string + { + return $this->ID; + } + + /** + * @param string $ID + * @return ACLAuthMethod + */ + public function setID(string $ID): ACLAuthMethod + { + $this->ID = $ID; + return $this; + } + /** * @return string */ @@ -170,10 +190,10 @@ public function getMaxTokenTTL(): Time\Duration } /** - * @param \DCarbone\Go\Time\Duration|int|string $MaxTokenTTL + * @param int|string|\DCarbone\Go\Time\Duration $MaxTokenTTL * @return \DCarbone\PHPConsulAPI\ACL\ACLAuthMethod */ - public function setMaxTokenTTL($MaxTokenTTL): self + public function setMaxTokenTTL(int|string|Time\Duration $MaxTokenTTL): self { $this->MaxTokenTTL = Time::ParseDuration($MaxTokenTTL); return $this; diff --git a/src/ACL/ACLAuthMethodListEntryQueryResponse.php b/src/ACL/ACLAuthMethodListEntryQueryResponse.php index bf524cb..ddf681f 100644 --- a/src/ACL/ACLAuthMethodListEntryQueryResponse.php +++ b/src/ACL/ACLAuthMethodListEntryQueryResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?array /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLAuthMethodListEntries = []; foreach ($decodedData as $datum) { diff --git a/src/ACL/ACLAuthMethodQueryResponse.php b/src/ACL/ACLAuthMethodQueryResponse.php index 3685990..ef672b0 100644 --- a/src/ACL/ACLAuthMethodQueryResponse.php +++ b/src/ACL/ACLAuthMethodQueryResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?ACLAuthMethod /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLAuthMethod = new ACLAuthMethod((array)$decodedData); } diff --git a/src/ACL/ACLAuthMethodWriteResponse.php b/src/ACL/ACLAuthMethodWriteResponse.php index dffec9e..ba4d875 100644 --- a/src/ACL/ACLAuthMethodWriteResponse.php +++ b/src/ACL/ACLAuthMethodWriteResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?ACLAuthMethod /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLAuthMethod = new ACLAuthMethod((array)$decodedData); } diff --git a/src/ACL/ACLBindingRuleQueryResponse.php b/src/ACL/ACLBindingRuleQueryResponse.php index 458d533..a1203cd 100644 --- a/src/ACL/ACLBindingRuleQueryResponse.php +++ b/src/ACL/ACLBindingRuleQueryResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?ACLBindingRule /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLBindingRule = new ACLBindingRule((array)$decodedData); } diff --git a/src/ACL/ACLBindingRuleWriteResponse.php b/src/ACL/ACLBindingRuleWriteResponse.php index f6d6c0a..671e378 100644 --- a/src/ACL/ACLBindingRuleWriteResponse.php +++ b/src/ACL/ACLBindingRuleWriteResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?ACLBindingRule /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLBindingRule = new ACLBindingRule((array)$decodedData); } diff --git a/src/ACL/ACLBindingRulesQueryResponse.php b/src/ACL/ACLBindingRulesQueryResponse.php index a43475d..1c7b391 100644 --- a/src/ACL/ACLBindingRulesQueryResponse.php +++ b/src/ACL/ACLBindingRulesQueryResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?array /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLBindingRules = []; foreach ($decodedData as $datum) { diff --git a/src/ACL/ACLEntriesResponse.php b/src/ACL/ACLEntriesResponse.php index 5140096..615d21f 100644 --- a/src/ACL/ACLEntriesResponse.php +++ b/src/ACL/ACLEntriesResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?array /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { foreach ($decodedData as $entry) { $this->ACLEntries[] = new ACLEntry($entry); diff --git a/src/ACL/ACLLoginParams.php b/src/ACL/ACLLoginParams.php index 4e249f0..7da35fb 100644 --- a/src/ACL/ACLLoginParams.php +++ b/src/ACL/ACLLoginParams.php @@ -90,7 +90,7 @@ public function getMeta(): ?FakeMap * @param mixed $Meta * @return \DCarbone\PHPConsulAPI\ACL\ACLLoginParams */ - public function setMeta($Meta): self + public function setMeta(mixed $Meta): self { $this->Meta = FakeMap::parse($Meta); return $this; diff --git a/src/ACL/ACLOIDCAuthURLParams.php b/src/ACL/ACLOIDCAuthURLParams.php index 85060de..5f78c82 100644 --- a/src/ACL/ACLOIDCAuthURLParams.php +++ b/src/ACL/ACLOIDCAuthURLParams.php @@ -110,7 +110,7 @@ public function getMeta(): ?FakeMap * @param mixed $Meta * @return \DCarbone\PHPConsulAPI\ACL\ACLOIDCAuthURLParams */ - public function setMeta($Meta): self + public function setMeta(mixed $Meta): self { $this->Meta = FakeMap::parse($Meta); return $this; diff --git a/src/ACL/ACLPolicyListEntryQueryResponse.php b/src/ACL/ACLPolicyListEntryQueryResponse.php index 49077ea..05cbc4e 100644 --- a/src/ACL/ACLPolicyListEntryQueryResponse.php +++ b/src/ACL/ACLPolicyListEntryQueryResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?array /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLPolicyListEntries = []; foreach ($decodedData as $datum) { diff --git a/src/ACL/ACLPolicyQueryResponse.php b/src/ACL/ACLPolicyQueryResponse.php index d9dff8e..cc36318 100644 --- a/src/ACL/ACLPolicyQueryResponse.php +++ b/src/ACL/ACLPolicyQueryResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?ACLPolicy /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLPolicy = new ACLPolicy((array)$decodedData); } diff --git a/src/ACL/ACLPolicyWriteResponse.php b/src/ACL/ACLPolicyWriteResponse.php index df5f268..94484d6 100644 --- a/src/ACL/ACLPolicyWriteResponse.php +++ b/src/ACL/ACLPolicyWriteResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?ACLPolicy /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLPolicy = new ACLPolicy((array)$decodedData); } diff --git a/src/ACL/ACLReplicationStatusResponse.php b/src/ACL/ACLReplicationStatusResponse.php index bae4d0b..cb2b543 100644 --- a/src/ACL/ACLReplicationStatusResponse.php +++ b/src/ACL/ACLReplicationStatusResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?ACLReplicationStatus /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLReplicationStatus = new ACLReplicationStatus((array)$decodedData); } diff --git a/src/ACL/ACLRoleQueryResponse.php b/src/ACL/ACLRoleQueryResponse.php index d33d5bf..00868cc 100644 --- a/src/ACL/ACLRoleQueryResponse.php +++ b/src/ACL/ACLRoleQueryResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?ACLRole /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLRole = new ACLRole((array)$decodedData); } diff --git a/src/ACL/ACLRoleWriteResponse.php b/src/ACL/ACLRoleWriteResponse.php index fe67c96..b0f3891 100644 --- a/src/ACL/ACLRoleWriteResponse.php +++ b/src/ACL/ACLRoleWriteResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?ACLRole /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLRole = new ACLRole((array)$decodedData); } diff --git a/src/ACL/ACLRolesQueryResponse.php b/src/ACL/ACLRolesQueryResponse.php index 433d29b..a2969c8 100644 --- a/src/ACL/ACLRolesQueryResponse.php +++ b/src/ACL/ACLRolesQueryResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?array /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLRoles = []; foreach ($decodedData as $datum) { diff --git a/src/ACL/ACLTokenListEntryQueryResponse.php b/src/ACL/ACLTokenListEntryQueryResponse.php index b9f127f..a09499f 100644 --- a/src/ACL/ACLTokenListEntryQueryResponse.php +++ b/src/ACL/ACLTokenListEntryQueryResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?array /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLTokenListEntries = []; foreach ($decodedData as $datum) { diff --git a/src/ACL/ACLTokenQueryResponse.php b/src/ACL/ACLTokenQueryResponse.php index b021753..65822c6 100644 --- a/src/ACL/ACLTokenQueryResponse.php +++ b/src/ACL/ACLTokenQueryResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?ACLToken /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLToken = new ACLToken((array)$decodedData); } diff --git a/src/ACL/ACLTokenWriteResponse.php b/src/ACL/ACLTokenWriteResponse.php index 752154d..6efb934 100644 --- a/src/ACL/ACLTokenWriteResponse.php +++ b/src/ACL/ACLTokenWriteResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?ACLToken /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ACLToken = new ACLToken((array)$decodedData); } diff --git a/src/AbstractClient.php b/src/AbstractClient.php index 97776ee..e8ea68e 100644 --- a/src/AbstractClient.php +++ b/src/AbstractClient.php @@ -97,7 +97,7 @@ protected function _buildGuzzleRequestOptions(Request $r): array * @param \DCarbone\PHPConsulAPI\RequestOptions|null $opts * @return \DCarbone\PHPConsulAPI\Request */ - protected function _newRequest(string $method, string $path, $body, ?RequestOptions $opts): Request + protected function _newRequest(string $method, string $path, mixed $body, ?RequestOptions $opts): Request { $r = new Request($method, $path, $this->_config, $body); $r->applyOptions($opts); @@ -110,7 +110,7 @@ protected function _newRequest(string $method, string $path, $body, ?RequestOpti * @param \DCarbone\PHPConsulAPI\RequestOptions|null $opts * @return \DCarbone\PHPConsulAPI\Request */ - protected function _newPostRequest(string $path, $body, ?RequestOptions $opts): Request + protected function _newPostRequest(string $path, mixed $body, ?RequestOptions $opts): Request { return $this->_newRequest(HTTP\MethodPost, $path, $body, $opts); } @@ -121,7 +121,7 @@ protected function _newPostRequest(string $path, $body, ?RequestOptions $opts): * @param \DCarbone\PHPConsulAPI\RequestOptions|null $opts * @return \DCarbone\PHPConsulAPI\Request */ - protected function _newPutRequest(string $path, $body, ?RequestOptions $opts): Request + protected function _newPutRequest(string $path, mixed $body, ?RequestOptions $opts): Request { return $this->_newRequest(HTTP\MethodPut, $path, $body, $opts); } @@ -279,7 +279,7 @@ protected function _doGet(string $path, ?QueryOptions $opts): RequestResponse * @throws \GuzzleHttp\Exception\GuzzleException * @return \DCarbone\PHPConsulAPI\RequestResponse */ - protected function _doPost(string $path, $body, ?RequestOptions $opts): RequestResponse + protected function _doPost(string $path, mixed $body, ?RequestOptions $opts): RequestResponse { return $this->_do($this->_newPostRequest($path, $body, $opts)); } @@ -291,7 +291,7 @@ protected function _doPost(string $path, $body, ?RequestOptions $opts): RequestR * @throws \GuzzleHttp\Exception\GuzzleException * @return \DCarbone\PHPConsulAPI\RequestResponse */ - protected function _doPut(string $path, $body, ?RequestOptions $opts): RequestResponse + protected function _doPut(string $path, mixed $body, ?RequestOptions $opts): RequestResponse { return $this->_do($this->_newPutRequest($path, $body, $opts)); } @@ -340,7 +340,7 @@ protected function _decodeBody(StreamInterface $body): DecodedBody * @throws \Exception * @return \DCarbone\PHPConsulAPI\WriteResponse */ - protected function _executePut(string $path, $body, ?WriteOptions $opts): WriteResponse + protected function _executePut(string $path, mixed $body, ?WriteOptions $opts): WriteResponse { $resp = $this->_requireOK($this->_doPut($path, $body, $opts)); $ret = new WriteResponse(); @@ -356,7 +356,7 @@ protected function _executePut(string $path, $body, ?WriteOptions $opts): WriteR * @throws \Exception * @return \DCarbone\PHPConsulAPI\WriteResponse */ - protected function _executePost(string $path, $body, ?WriteOptions $opts): WriteResponse + protected function _executePost(string $path, mixed $body, ?WriteOptions $opts): WriteResponse { $resp = $this->_requireOK($this->_doPost($path, $body, $opts)); $ret = new WriteResponse(); @@ -387,7 +387,7 @@ protected function _executeDelete(string $path, ?WriteOptions $opts): WriteRespo * @throws \Exception * @return \DCarbone\PHPConsulAPI\ValuedWriteStringResponse */ - protected function _executePutValuedStr(string $path, $body, ?WriteOptions $opts): ValuedWriteStringResponse + protected function _executePutValuedStr(string $path, mixed $body, ?WriteOptions $opts): ValuedWriteStringResponse { $r = $this->_newPutRequest($path, $body, $opts); $resp = $this->_requireOK($this->_do($r)); diff --git a/src/AbstractModel.php b/src/AbstractModel.php index 5aa296c..e3d6152 100644 --- a/src/AbstractModel.php +++ b/src/AbstractModel.php @@ -60,9 +60,12 @@ public function __set(string $field, $value): void $this->_dyn[$field] = $value; } - public function __get(string $field) + public function &__get(string $field) { - return $this->_dyn[$field] ?? null; + if (!array_key_exists($field, $this->_dyn)) { + $this->_dyn[$field] = null; + } + return $this->_dyn[$field]; } /** diff --git a/src/AbstractResponse.php b/src/AbstractResponse.php index 60256a5..a5f70eb 100644 --- a/src/AbstractResponse.php +++ b/src/AbstractResponse.php @@ -28,7 +28,7 @@ abstract class AbstractResponse implements \ArrayAccess /** * @param mixed $offset */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { throw new \BadMethodCallException(sprintf('Calling %s on class %s is forbidden', __METHOD__, static::class)); } @@ -37,7 +37,7 @@ public function offsetUnset($offset): void * @param mixed $offset * @param mixed $value */ - public function offsetSet($offset, $value): void + public function offsetSet(mixed $offset, mixed $value): void { throw new \BadMethodCallException(sprintf('Calling %s on class %s is forbidden', __METHOD__, static::class)); } @@ -46,7 +46,7 @@ public function offsetSet($offset, $value): void * @param mixed $offset * @return \OutOfRangeException */ - protected function _newOutOfRangeException($offset): \OutOfRangeException + protected function _newOutOfRangeException(mixed $offset): \OutOfRangeException { return new \OutOfRangeException(sprintf('Offset %s does not exist', $offset)); } diff --git a/src/AbstractValuedQueryResponse.php b/src/AbstractValuedQueryResponse.php index f7febea..98e35a0 100644 --- a/src/AbstractValuedQueryResponse.php +++ b/src/AbstractValuedQueryResponse.php @@ -32,7 +32,7 @@ abstract class AbstractValuedQueryResponse extends AbstractResponse implements V * @param mixed $offset * @return bool */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return \is_int($offset) && 0 <= $offset && $offset < 3; } @@ -41,8 +41,7 @@ public function offsetExists($offset): bool * @param mixed $offset * @return \DCarbone\PHPConsulAPI\Error|\DCarbone\PHPConsulAPI\QueryMeta|mixed|null */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset): mixed { if (0 === $offset) { return $this->getValue(); diff --git a/src/AbstractValuedResponse.php b/src/AbstractValuedResponse.php index 4a793e2..65410ef 100644 --- a/src/AbstractValuedResponse.php +++ b/src/AbstractValuedResponse.php @@ -31,7 +31,7 @@ abstract class AbstractValuedResponse extends AbstractResponse implements Valued * @param mixed $offset * @return bool */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return \is_int($offset) && 0 <= $offset && $offset < 2; } @@ -40,8 +40,7 @@ public function offsetExists($offset): bool * @param mixed $offset * @return \DCarbone\PHPConsulAPI\Error|mixed|null */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset): mixed { if (0 === $offset) { return $this->getValue(); diff --git a/src/AbstractValuedWriteResponse.php b/src/AbstractValuedWriteResponse.php index 0dbbc65..0ba1da2 100644 --- a/src/AbstractValuedWriteResponse.php +++ b/src/AbstractValuedWriteResponse.php @@ -32,7 +32,7 @@ abstract class AbstractValuedWriteResponse extends AbstractResponse implements V * @param mixed $offset * @return bool */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return \is_int($offset) && 0 <= $offset && $offset < 3; } @@ -41,8 +41,7 @@ public function offsetExists($offset): bool * @param mixed $offset * @return \DCarbone\PHPConsulAPI\Error|\DCarbone\PHPConsulAPI\WriteMeta|mixed|null */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset): mixed { if (0 === $offset) { return $this->getValue(); diff --git a/src/Agent/AgentCheck.php b/src/Agent/AgentCheck.php index d8ce171..edd18c4 100644 --- a/src/Agent/AgentCheck.php +++ b/src/Agent/AgentCheck.php @@ -277,6 +277,6 @@ public function setNamespace(string $Namespace): self */ public function __toString(): string { - return (string)$this->CheckID; + return $this->CheckID; } } diff --git a/src/Agent/AgentChecksResponse.php b/src/Agent/AgentChecksResponse.php index 64af705..1817be6 100644 --- a/src/Agent/AgentChecksResponse.php +++ b/src/Agent/AgentChecksResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?array /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->Checks = []; foreach ($decodedData as $k => $v) { diff --git a/src/Agent/AgentClient.php b/src/Agent/AgentClient.php index 260e69b..6bc00be 100644 --- a/src/Agent/AgentClient.php +++ b/src/Agent/AgentClient.php @@ -185,20 +185,12 @@ public function AgentHealthServiceByID(string $id): AgentHealthServiceResponse return new AgentHealthServiceResponse(Consul::HealthCritical, null, $dec->Err); } - switch ($resp->Response->getStatusCode()) { - case HTTP\StatusOK: - $status = Consul::HealthPassing; - break; - case HTTP\StatusTooManyRequests: - $status = Consul::HealthWarning; - break; - case HTTP\StatusServiceUnavailable: - $status = Consul::HealthCritical; - break; - - default: - $status = Consul::HealthCritical; - } + $status = match ($resp->Response->getStatusCode()) { + HTTP\StatusOK => Consul::HealthPassing, + HTTP\StatusTooManyRequests => Consul::HealthWarning, + HTTP\StatusServiceUnavailable => Consul::HealthCritical, + default => Consul::HealthCritical, + }; return new AgentHealthServiceResponse($status, $dec->Decoded, null); } @@ -227,20 +219,12 @@ public function AgentHealthServiceByName(string $service): AgentHealthServicesRe return new AgentHealthServicesResponse(Consul::HealthCritical, null, $dec->Err); } - switch ($resp->Response->getStatusCode()) { - case HTTP\StatusOK: - $status = Consul::HealthPassing; - break; - case HTTP\StatusTooManyRequests: - $status = Consul::HealthWarning; - break; - case HTTP\StatusServiceUnavailable: - $status = Consul::HealthCritical; - break; - - default: - $status = Consul::HealthCritical; - } + $status = match ($resp->Response->getStatusCode()) { + HTTP\StatusOK => Consul::HealthPassing, + HTTP\StatusTooManyRequests => Consul::HealthWarning, + HTTP\StatusServiceUnavailable => Consul::HealthCritical, + default => Consul::HealthCritical, + }; return new AgentHealthServicesResponse($status, $dec->Decoded, null); } diff --git a/src/Agent/AgentHealthServiceResponse.php b/src/Agent/AgentHealthServiceResponse.php index 80b3b4d..d968ff7 100644 --- a/src/Agent/AgentHealthServiceResponse.php +++ b/src/Agent/AgentHealthServiceResponse.php @@ -71,16 +71,16 @@ public function getAgentServiceChecksInfos(): ?AgentServiceChecksInfo * @param mixed $offset * @return bool */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return \is_int($offset) && 0 <= $offset && $offset < 3; } /** * @param mixed $offset - * @return array|\DCarbone\PHPConsulAPI\Agent\AgentServiceChecksInfo[]|\DCarbone\PHPConsulAPI\Error|mixed|string|null + * @return \DCarbone\PHPConsulAPI\Error|string|AgentServiceChecksInfo|null */ - public function offsetGet($offset) + public function offsetGet(mixed $offset): Error|string|null|AgentServiceChecksInfo { if (0 === $offset) { return $this->AggregatedStatus; diff --git a/src/Agent/AgentHealthServicesResponse.php b/src/Agent/AgentHealthServicesResponse.php index b1750c1..ab2eb2c 100644 --- a/src/Agent/AgentHealthServicesResponse.php +++ b/src/Agent/AgentHealthServicesResponse.php @@ -74,7 +74,7 @@ public function getAgentServiceChecksInfos(): ?array * @param mixed $offset * @return bool */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return \is_int($offset) && 0 <= $offset && $offset < 3; } @@ -83,7 +83,7 @@ public function offsetExists($offset): bool * @param mixed $offset * @return array|\DCarbone\PHPConsulAPI\Agent\AgentServiceChecksInfo[]|\DCarbone\PHPConsulAPI\Error|mixed|string|null */ - public function offsetGet($offset) + public function offsetGet(mixed $offset): mixed { if (0 === $offset) { return $this->AggregatedStatus; diff --git a/src/Agent/AgentMember.php b/src/Agent/AgentMember.php index 8f42662..ac772c2 100644 --- a/src/Agent/AgentMember.php +++ b/src/Agent/AgentMember.php @@ -137,16 +137,12 @@ public function getDelegateCur(): int */ public function ACLMode(): string { - switch ($this->Tags[Consul::MemberTagKeyACLMode] ?? null) { - case Consul::ACLModeDisabled: - return Consul::ACLModeDisabled; - case Consul::ACLModeEnabled: - return Consul::ACLModeEnabled; - case Consul::ACLModeLegacy: - return Consul::ACLModeLegacy; - default: - return Consul::ACLModeUnknown; - } + return match ($this->Tags[Consul::MemberTagKeyACLMode] ?? null) { + Consul::ACLModeDisabled => Consul::ACLModeDisabled, + Consul::ACLModeEnabled => Consul::ACLModeEnabled, + Consul::ACLModeLegacy => Consul::ACLModeLegacy, + default => Consul::ACLModeUnknown, + }; } /** diff --git a/src/Agent/AgentMembersResponse.php b/src/Agent/AgentMembersResponse.php index 0b623f4..5b26a5b 100644 --- a/src/Agent/AgentMembersResponse.php +++ b/src/Agent/AgentMembersResponse.php @@ -34,7 +34,7 @@ class AgentMembersResponse extends AbstractValuedResponse implements Unmarshalle /** * @return \DCarbone\PHPConsulAPI\Agent\AgentMember[]|null */ - public function getValue() + public function getValue(): ?array { return $this->Members; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->Members = []; foreach ($decodedData as $member) { diff --git a/src/Agent/AgentServiceConnectProxyConfig.php b/src/Agent/AgentServiceConnectProxyConfig.php index f0edb36..e63092b 100644 --- a/src/Agent/AgentServiceConnectProxyConfig.php +++ b/src/Agent/AgentServiceConnectProxyConfig.php @@ -23,6 +23,7 @@ use DCarbone\PHPConsulAPI\AbstractModel; use DCarbone\PHPConsulAPI\ConfigEntry\ExposeConfig; use DCarbone\PHPConsulAPI\ConfigEntry\MeshGatewayConfig; +use DCarbone\PHPConsulAPI\FakeMap; use DCarbone\PHPConsulAPI\Transcoding; /** @@ -41,11 +42,7 @@ class AgentServiceConnectProxyConfig extends AbstractModel self::FIELD_DESTINATION_SERVICE_ID => Transcoding::OMITEMPTY_STRING_FIELD, self::FIELD_LOCAL_SERVICE_ADDRESS => Transcoding::OMITEMPTY_STRING_FIELD, self::FIELD_LOCAL_SERVICE_PORT => Transcoding::OMITEMPTY_INTEGER_FIELD, - self::FIELD_CONFIG => [ - Transcoding::FIELD_TYPE => Transcoding::ARRAY, - Transcoding::FIELD_ARRAY_TYPE => Transcoding::MIXED, - Transcoding::FIELD_OMITEMPTY => true, - ], + self::FIELD_CONFIG => Transcoding::OMITEMPTY_MAP_FIELD, self::FIELD_UPSTREAMS => [ Transcoding::FIELD_TYPE => Transcoding::ARRAY, Transcoding::FIELD_CLASS => Upstream::class, @@ -83,6 +80,8 @@ class AgentServiceConnectProxyConfig extends AbstractModel public string $LocalServiceAddress = ''; /** @var int */ public int $LocalServicePort = 0; + /** @var \DCarbone\PHPConsulAPI\FakeMap|null */ + public ?FakeMap $Config = null; /** @var string */ public string $LocalServiceSocketPath = ''; /** @var string */ @@ -265,6 +264,24 @@ public function setTransparentProxy(?TransparentProxyConfig $TransparentProxy): return $this; } + /** + * @return \DCarbone\PHPConsulAPI\FakeMap|null + */ + public function getConfig(): ?FakeMap + { + return $this->Config; + } + + /** + * @param array|\DCarbone\PHPConsulAPI\FakeMap|\stdClass|null $Config + * @return AgentServiceConnectProxyConfig + */ + public function setConfig(array|FakeMap|\stdClass|null $Config): self + { + $this->Config = FakeMap::parse($Config); + return $this; + } + /** * @return \DCarbone\PHPConsulAPI\Agent\Upstream[] */ diff --git a/src/Agent/AgentServiceResponse.php b/src/Agent/AgentServiceResponse.php index e1e67ef..a6af0d8 100644 --- a/src/Agent/AgentServiceResponse.php +++ b/src/Agent/AgentServiceResponse.php @@ -34,7 +34,7 @@ class AgentServiceResponse extends AbstractValuedResponse implements Unmarshalle /** * @return \DCarbone\PHPConsulAPI\Agent\AgentService|null */ - public function getValue() + public function getValue(): ?AgentService { return $this->Service; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->Service = new AgentService((array)$decodedData); } diff --git a/src/Agent/AgentServicesResponse.php b/src/Agent/AgentServicesResponse.php index e36108e..d77ec5e 100644 --- a/src/Agent/AgentServicesResponse.php +++ b/src/Agent/AgentServicesResponse.php @@ -34,7 +34,7 @@ class AgentServicesResponse extends AbstractValuedResponse implements Unmarshall /** * @return \DCarbone\PHPConsulAPI\Agent\AgentService[]|null */ - public function getValue() + public function getValue(): ?array { return $this->Services; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->Services = []; foreach ($decodedData as $k => $service) { diff --git a/src/Agent/EnvoyExtension.php b/src/Agent/EnvoyExtension.php index 4df7d45..fe534a3 100644 --- a/src/Agent/EnvoyExtension.php +++ b/src/Agent/EnvoyExtension.php @@ -36,13 +36,21 @@ class EnvoyExtension extends AbstractModel public string $Name = ''; /** @var bool */ public bool $Required = false; - /** @var \DCarbone\PHPConsulAPI\FakeMap|null */ - public ?FakeMap $Arguments = null; + /** @var \DCarbone\PHPConsulAPI\FakeMap */ + public FakeMap $Arguments; /** @var string */ public string $ConsulVersion = ''; /** @var string */ public string $EnvoyVersion = ''; + public function __construct(?array $data = []) + { + parent::__construct($data); + if (!isset($this->Arguments)) { + $this->Arguments = new FakeMap(null); + } + } + /** * @return string */ @@ -55,7 +63,7 @@ public function getName(): string * @param string $Name * @return EnvoyExtension */ - public function setName(string $Name): EnvoyExtension + public function setName(string $Name): self { $this->Name = $Name; return $this; @@ -73,7 +81,7 @@ public function isRequired(): bool * @param bool $Required * @return EnvoyExtension */ - public function setRequired(bool $Required): EnvoyExtension + public function setRequired(bool $Required): self { $this->Required = $Required; return $this; @@ -88,12 +96,12 @@ public function getArguments(): ?FakeMap } /** - * @param \DCarbone\PHPConsulAPI\FakeMap|null $Arguments + * @param array|\DCarbone\PHPConsulAPI\FakeMap|\stdClass|null $Arguments * @return EnvoyExtension */ - public function setArguments(?FakeMap $Arguments): EnvoyExtension + public function setArguments(array|FakeMap|\stdClass|null $Arguments): self { - $this->Arguments = $Arguments; + $this->Arguments = FakeMap::parse($Arguments); return $this; } @@ -109,7 +117,7 @@ public function getConsulVersion(): string * @param string $ConsulVersion * @return EnvoyExtension */ - public function setConsulVersion(string $ConsulVersion): EnvoyExtension + public function setConsulVersion(string $ConsulVersion): self { $this->ConsulVersion = $ConsulVersion; return $this; @@ -127,7 +135,7 @@ public function getEnvoyVersion(): string * @param string $EnvoyVersion * @return EnvoyExtension */ - public function setEnvoyVersion(string $EnvoyVersion): EnvoyExtension + public function setEnvoyVersion(string $EnvoyVersion): self { $this->EnvoyVersion = $EnvoyVersion; return $this; diff --git a/src/Agent/MetricsInfoResponse.php b/src/Agent/MetricsInfoResponse.php index 0f34586..e2a533c 100644 --- a/src/Agent/MetricsInfoResponse.php +++ b/src/Agent/MetricsInfoResponse.php @@ -34,7 +34,7 @@ class MetricsInfoResponse extends AbstractValuedResponse implements Unmarshalled /** * @return \DCarbone\PHPConsulAPI\Agent\MetricsInfo|null */ - public function getValue() + public function getValue(): ?MetricsInfo { return $this->MetricsInfo; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->MetricsInfo = new MetricsInfo((array)$decodedData); } diff --git a/src/Catalog/CatalogNodeResponse.php b/src/Catalog/CatalogNodeResponse.php index 9b3c983..0e700a9 100644 --- a/src/Catalog/CatalogNodeResponse.php +++ b/src/Catalog/CatalogNodeResponse.php @@ -34,7 +34,7 @@ class CatalogNodeResponse extends AbstractValuedQueryResponse implements Unmarsh /** * @return \DCarbone\PHPConsulAPI\Catalog\CatalogNode|null */ - public function getValue() + public function getValue(): ?CatalogNode { return $this->Node; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->Node = new CatalogNode((array)$decodedData); } diff --git a/src/Catalog/CatalogNodeServicesListResponse.php b/src/Catalog/CatalogNodeServicesListResponse.php index e7ee5ab..b01832d 100644 --- a/src/Catalog/CatalogNodeServicesListResponse.php +++ b/src/Catalog/CatalogNodeServicesListResponse.php @@ -34,7 +34,7 @@ class CatalogNodeServicesListResponse extends AbstractValuedQueryResponse implem /** * @return \DCarbone\PHPConsulAPI\Catalog\CatalogNodeServiceList|null */ - public function getValue() + public function getValue(): ?CatalogNodeServiceList { return $this->CatalogNodeServiceList; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->CatalogNodeServiceList = new CatalogNodeServiceList((array)$decodedData); } diff --git a/src/Catalog/CatalogServicesResponse.php b/src/Catalog/CatalogServicesResponse.php index 32f554a..4d03544 100644 --- a/src/Catalog/CatalogServicesResponse.php +++ b/src/Catalog/CatalogServicesResponse.php @@ -34,7 +34,7 @@ class CatalogServicesResponse extends AbstractValuedQueryResponse implements Unm /** * @return \DCarbone\PHPConsulAPI\Catalog\CatalogService[]|null */ - public function getValue() + public function getValue(): ?array { return $this->Services; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->Services = []; foreach ($decodedData as $node) { diff --git a/src/Catalog/GatewayServicesResponse.php b/src/Catalog/GatewayServicesResponse.php index a95dc66..74267c8 100644 --- a/src/Catalog/GatewayServicesResponse.php +++ b/src/Catalog/GatewayServicesResponse.php @@ -34,7 +34,7 @@ class GatewayServicesResponse extends AbstractValuedQueryResponse implements Unm /** * @return \DCarbone\PHPConsulAPI\Catalog\GatewayService[]|mixed|null */ - public function getValue() + public function getValue(): mixed { return $this->GatewayServices; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->GatewayServices = []; foreach ($decodedData as $service) { diff --git a/src/Catalog/NodesResponse.php b/src/Catalog/NodesResponse.php index d7babdd..428dcc0 100644 --- a/src/Catalog/NodesResponse.php +++ b/src/Catalog/NodesResponse.php @@ -34,7 +34,7 @@ class NodesResponse extends AbstractValuedQueryResponse implements UnmarshalledR /** * @return \DCarbone\PHPConsulAPI\Catalog\Node[]|mixed|null */ - public function getValue() + public function getValue(): mixed { return $this->Nodes; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->Nodes = []; foreach ($decodedData as $node) { diff --git a/src/Config.php b/src/Config.php index c5a5527..5a99521 100644 --- a/src/Config.php +++ b/src/Config.php @@ -339,7 +339,7 @@ public function getWaitTime(): Time\Duration * @param mixed $waitTime * @return \DCarbone\PHPConsulAPI\Config */ - public function setWaitTime($waitTime): self + public function setWaitTime(mixed $waitTime): self { $this->WaitTime = Time::Duration($waitTime); return $this; @@ -411,7 +411,7 @@ public function getHttpAuth(): HttpAuth * @param \DCarbone\PHPConsulAPI\HttpAuth|string $httpAuth * @return \DCarbone\PHPConsulAPI\Config */ - public function setHttpAuth($httpAuth): self + public function setHttpAuth(HttpAuth|string $httpAuth): self { if (\is_string($httpAuth)) { $colon = strpos($httpAuth, ':'); diff --git a/src/ConfigEntry/ConfigEntryTrait.php b/src/ConfigEntry/ConfigEntryTrait.php index 4c3ab08..7d20839 100644 --- a/src/ConfigEntry/ConfigEntryTrait.php +++ b/src/ConfigEntry/ConfigEntryTrait.php @@ -106,7 +106,7 @@ public function getMeta(): ?FakeMap * @param mixed $Meta * @return ProxyConfigEntry */ - public function setMeta($Meta): ProxyConfigEntry + public function setMeta(mixed $Meta): ProxyConfigEntry { $this->Meta = FakeMap::parse($Meta); return $this; diff --git a/src/ConfigEntry/ProxyConfigEntry.php b/src/ConfigEntry/ProxyConfigEntry.php index a7e3f08..c16dc59 100644 --- a/src/ConfigEntry/ProxyConfigEntry.php +++ b/src/ConfigEntry/ProxyConfigEntry.php @@ -117,7 +117,7 @@ public function getConfig(): ?FakeMap * @param mixed $Config * @return ProxyConfigEntry */ - public function setConfig($Config): self + public function setConfig(mixed $Config): self { $this->Config = FakeMap::parse($Config); return $this; diff --git a/src/ConfigEntry/ServiceRouteHTTPMatchHeader.php b/src/ConfigEntry/ServiceRouteHTTPMatchHeader.php index 74d80b3..a7aab30 100644 --- a/src/ConfigEntry/ServiceRouteHTTPMatchHeader.php +++ b/src/ConfigEntry/ServiceRouteHTTPMatchHeader.php @@ -170,7 +170,7 @@ public function setRegex(string $Regex): self /** * @return bool|string */ - public function getInvert() + public function getInvert(): bool|string { return $this->Invert; } @@ -179,7 +179,7 @@ public function getInvert() * @param bool|string $Invert * @return ServiceRouteHTTPMatchHeader */ - public function setInvert($Invert) + public function setInvert(bool|string $Invert): static { $this->Invert = $Invert; return $this; diff --git a/src/Coordinate/Coordinate.php b/src/Coordinate/Coordinate.php index e7088be..e23c9d4 100644 --- a/src/Coordinate/Coordinate.php +++ b/src/Coordinate/Coordinate.php @@ -101,7 +101,7 @@ public function getHeight(): float * * @return \DCarbone\PHPConsulAPI\Coordinate\Coordinate */ - public function Clone() + public function Clone(): Coordinate|static { return clone $this; } diff --git a/src/Coordinate/CoordinateDatacentersResponse.php b/src/Coordinate/CoordinateDatacentersResponse.php index 80b1296..420c5ca 100644 --- a/src/Coordinate/CoordinateDatacentersResponse.php +++ b/src/Coordinate/CoordinateDatacentersResponse.php @@ -34,7 +34,7 @@ class CoordinateDatacentersResponse extends AbstractValuedResponse implements Un /** * @return \DCarbone\PHPConsulAPI\Coordinate\CoordinateDatacenterMap[]|null */ - public function getValue() + public function getValue(): ?array { return $this->DatacenterMap; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->DatacenterMap = []; foreach ($decodedData as $item) { diff --git a/src/Coordinate/CoordinateEntriesResponse.php b/src/Coordinate/CoordinateEntriesResponse.php index ef8b7cb..aaf4faa 100644 --- a/src/Coordinate/CoordinateEntriesResponse.php +++ b/src/Coordinate/CoordinateEntriesResponse.php @@ -34,7 +34,7 @@ class CoordinateEntriesResponse extends AbstractValuedQueryResponse implements U /** * @return \DCarbone\PHPConsulAPI\Coordinate\CoordinateEntry[]|null */ - public function getValue() + public function getValue(): ?array { return $this->Nodes; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->Nodes = []; foreach ($decodedData as $node) { diff --git a/src/Coordinate/DimensionalityConflictException.php b/src/Coordinate/DimensionalityConflictException.php index 36ace96..782bd63 100644 --- a/src/Coordinate/DimensionalityConflictException.php +++ b/src/Coordinate/DimensionalityConflictException.php @@ -33,7 +33,7 @@ class DimensionalityConflictException extends \DomainException * @param int $code * @param \Throwable|null $previous */ - public function __construct($message = '', $code = 0, \Throwable $previous = null) + public function __construct(string $message = '', int $code = 0, \Throwable $previous = null) { parent::__construct('' === $message ? static::DefaultMessage : $message, $code, $previous); } diff --git a/src/Coordinate/funcs.php b/src/Coordinate/funcs.php index c947c4d..ce3a24d 100644 --- a/src/Coordinate/funcs.php +++ b/src/Coordinate/funcs.php @@ -37,7 +37,7 @@ function unitVectorAt(array $vec1, array $vec2): array $ret = diff($vec1, $vec2); if (($mag = magnitude($ret)) && $mag > ZeroThreshold) { - return [mul($ret, 1.0 / $mag), (float) $mag]; + return [mul($ret, 1.0 / $mag), $mag]; } foreach ($ret as $k => &$v) { diff --git a/src/DecodedBody.php b/src/DecodedBody.php index 76058e5..1ee0f6b 100644 --- a/src/DecodedBody.php +++ b/src/DecodedBody.php @@ -28,14 +28,14 @@ final class DecodedBody use ErrorContainer; /** @var mixed */ - public $Decoded = null; + public mixed $Decoded = null; /** * DecodedBody constructor. * @param mixed $decoded * @param \DCarbone\PHPConsulAPI\Error|null $err */ - public function __construct($decoded, ?Error $err) + public function __construct(mixed $decoded, ?Error $err) { $this->Decoded = $decoded; $this->Err = $err; @@ -44,7 +44,7 @@ public function __construct($decoded, ?Error $err) /** * @return mixed */ - public function getDecoded() + public function getDecoded(): mixed { return $this->Decoded; } diff --git a/src/Event/EventClient.php b/src/Event/EventClient.php index 67df991..6d0f1f5 100644 --- a/src/Event/EventClient.php +++ b/src/Event/EventClient.php @@ -64,7 +64,7 @@ public function Fire(UserEvent $event, ?WriteOptions $opts = null): UserEventRes public function List(string $name = '', ?QueryOptions $opts = null): UserEventsResponse { $r = $this->_newGetRequest('v1/event/list', $opts); - if ('' !== (string) $name) { + if ('' !== $name) { $r->params->set('name', $name); } $resp = $this->_requireOK($this->_do($r)); diff --git a/src/Event/UserEventResponse.php b/src/Event/UserEventResponse.php index 628638e..3ec5a16 100644 --- a/src/Event/UserEventResponse.php +++ b/src/Event/UserEventResponse.php @@ -34,7 +34,7 @@ class UserEventResponse extends AbstractValuedWriteResponse implements Unmarshal /** * @return \DCarbone\PHPConsulAPI\Event\UserEvent|null */ - public function getValue() + public function getValue(): ?UserEvent { return $this->UserEvent; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->UserEvent = new UserEvent((array)$decodedData); } diff --git a/src/Event/UserEventsResponse.php b/src/Event/UserEventsResponse.php index aa518a1..6a62c5b 100644 --- a/src/Event/UserEventsResponse.php +++ b/src/Event/UserEventsResponse.php @@ -34,7 +34,7 @@ class UserEventsResponse extends AbstractValuedQueryResponse implements Unmarsha /** * @return \DCarbone\PHPConsulAPI\Event\UserEvent[]|null */ - public function getValue() + public function getValue(): ?array { return $this->UserEvents; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->UserEvents = []; foreach ($decodedData as $datum) { diff --git a/src/FakeMap.php b/src/FakeMap.php index e18306e..ac730a0 100644 --- a/src/FakeMap.php +++ b/src/FakeMap.php @@ -23,7 +23,7 @@ /** * Class FakeMap */ -class FakeMap implements \ArrayAccess, \Countable, \Iterator, \JsonSerializable +class FakeMap extends \ArrayIterator implements \ArrayAccess, \Countable, \Iterator, \JsonSerializable { /** @var array */ private array $_map = []; @@ -41,16 +41,19 @@ public function __construct(?array $data) } /** - * @param mixed $input + * @param array|\DCarbone\PHPConsulAPI\FakeMap|\stdClass|null $input * @return \DCarbone\PHPConsulAPI\FakeMap|null */ - public static function parse($input): ?self + public static function parse(array|FakeMap|\stdClass|null $input): ?self { if (null === $input) { return null; } - if (\is_object($input) && $input instanceof self) { - return $input; + if (\is_object($input)) { + if ($input instanceof self) { + return $input; + } + return new self((array)$input); } if (\is_array($input)) { return new self($input); @@ -60,11 +63,10 @@ public static function parse($input): ?self ); } - #[\ReturnTypeWillChange] /** * @return mixed */ - public function current() + public function current(): mixed { return current($this->_map); } @@ -74,11 +76,10 @@ public function next(): void next($this->_map); } - #[\ReturnTypeWillChange] /** - * @return bool|float|int|string|null + * @return int|string|null */ - public function key() + public function key(): int|string|null { return key($this->_map); } @@ -100,17 +101,16 @@ public function rewind(): void * @param mixed $offset * @return bool */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->_map[$offset]) || \array_key_exists($offset, $this->_map); } - #[\ReturnTypeWillChange] /** * @param mixed $offset * @return mixed */ - public function offsetGet($offset) + public function offsetGet(mixed $offset): mixed { return $this->_map[$offset] ?? null; } @@ -119,7 +119,7 @@ public function offsetGet($offset) * @param mixed $offset * @param mixed $value */ - public function offsetSet($offset, $value): void + public function offsetSet(mixed $offset, mixed $value): void { $this->_map[$offset] = $value; } @@ -127,7 +127,7 @@ public function offsetSet($offset, $value): void /** * @param mixed $offset */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { unset($this->_map[$offset]); } @@ -145,6 +145,6 @@ public function count(): int */ public function jsonSerialize(): object { - return (object)$this->_map; + return (object)$this->getArrayCopy(); } } diff --git a/src/FakeSlice.php b/src/FakeSlice.php index 10f1168..2a59fd3 100644 --- a/src/FakeSlice.php +++ b/src/FakeSlice.php @@ -60,7 +60,7 @@ public function __construct(?array $children = []) /** * @param array|\DCarbone\PHPConsulAPI\AbstractModel|null $value */ - public function append($value): void + public function append(array|AbstractModel|null $value): void { // validate provided value is either null or instance of allowed child class $value = $this->_validateValue($value); @@ -75,8 +75,7 @@ public function append($value): void /** * @return \DCarbone\PHPConsulAPI\AbstractModel|false */ - #[\ReturnTypeWillChange] - public function current() + public function current(): bool|AbstractModel { return current($this->_list); } @@ -111,7 +110,7 @@ public function rewind(): void * @param mixed $offset * @return bool */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return \is_int($offset) && isset($this->_list[$offset]); } @@ -120,13 +119,9 @@ public function offsetExists($offset): bool * @param mixed $offset * @return \DCarbone\PHPConsulAPI\AbstractModel|null */ - public function offsetGet($offset): ?AbstractModel + public function offsetGet(mixed $offset): ?AbstractModel { $this->_validateOffset($offset); - if (isset($this->_list[$offset])) { - return $this->_list[$offset]; - } - return $this->_list[$offset]; } @@ -134,7 +129,7 @@ public function offsetGet($offset): ?AbstractModel * @param mixed $offset * @param mixed $value */ - public function offsetSet($offset, $value): void + public function offsetSet(mixed $offset, mixed $value): void { // if incoming offset is null, assume [] (append) operation. if (null === $offset) { @@ -152,7 +147,7 @@ public function offsetSet($offset, $value): void /** * @param mixed $offset */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { // validate provided offset value $this->_validateOffset($offset); @@ -198,7 +193,7 @@ abstract protected function newChild(array $data): AbstractModel; /** * @param mixed $offset */ - private function _validateOffset($offset): void + private function _validateOffset(mixed $offset): void { if (!\is_int($offset)) { throw new \InvalidArgumentException( @@ -218,7 +213,7 @@ private function _validateOffset($offset): void * @param mixed $value * @return \DCarbone\PHPConsulAPI\AbstractModel|null */ - private function _validateValue($value): ?AbstractModel + private function _validateValue(mixed $value): ?AbstractModel { // fast path for null values if (null === $value) { diff --git a/src/HasSettableStringTags.php b/src/HasSettableStringTags.php index ea052af..680908a 100644 --- a/src/HasSettableStringTags.php +++ b/src/HasSettableStringTags.php @@ -29,7 +29,7 @@ trait HasSettableStringTags * @param array $tags * @return $this */ - public function setTags(array $tags) + public function setTags(array $tags): static { $this->Tags = $tags; return $this; @@ -39,7 +39,7 @@ public function setTags(array $tags) * @param string $tag * @return $this */ - public function addTag(string $tag) + public function addTag(string $tag): static { $this->Tags[] = $tag; return $this; diff --git a/src/Health/HealthChecksResponse.php b/src/Health/HealthChecksResponse.php index 3d8da06..96d728d 100644 --- a/src/Health/HealthChecksResponse.php +++ b/src/Health/HealthChecksResponse.php @@ -34,7 +34,7 @@ class HealthChecksResponse extends AbstractValuedQueryResponse implements Unmars /** * @return \DCarbone\PHPConsulAPI\Health\HealthChecks|null */ - public function getValue() + public function getValue(): ?HealthChecks { return $this->HealthChecks; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->HealthChecks = new HealthChecks((array)$decodedData); } diff --git a/src/Health/HealthClient.php b/src/Health/HealthClient.php index 948358c..e962a64 100644 --- a/src/Health/HealthClient.php +++ b/src/Health/HealthClient.php @@ -160,8 +160,9 @@ public function Connect( /** * @param string $state * @param \DCarbone\PHPConsulAPI\QueryOptions|null $opts - * @throws \GuzzleHttp\Exception\GuzzleException * @return \DCarbone\PHPConsulAPI\Health\HealthChecksResponse + * @throws \Exception + * @throws \GuzzleHttp\Exception\GuzzleException */ public function State(string $state, ?QueryOptions $opts = null): HealthChecksResponse { @@ -215,16 +216,11 @@ private function _getServiceEntries( ?QueryOptions $opts, string $healthType ): ServiceEntriesResponse { - switch ($healthType) { - case self::connectHealth: - $uri = 'v1/health/connect/%s'; - break; - case self::ingressHealth: - $uri = 'v1/health/ingress/%s'; - break; - default: - $uri = 'v1/health/service/%s'; - } + $uri = match ($healthType) { + self::connectHealth => 'v1/health/connect/%s', + self::ingressHealth => 'v1/health/ingress/%s', + default => 'v1/health/service/%s', + }; $r = $this->_newGetRequest(sprintf($uri, $service), $opts); if ([] !== $tags) { diff --git a/src/Health/ServiceEntriesResponse.php b/src/Health/ServiceEntriesResponse.php index 560af35..a9a05c8 100644 --- a/src/Health/ServiceEntriesResponse.php +++ b/src/Health/ServiceEntriesResponse.php @@ -34,7 +34,7 @@ class ServiceEntriesResponse extends AbstractValuedQueryResponse implements Unma /** * @return \DCarbone\PHPConsulAPI\Health\ServiceEntry[]|null */ - public function getValue() + public function getValue(): ?array { return $this->ServiceEntries; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ServiceEntries = []; foreach ($decodedData as $entry) { diff --git a/src/KV/KVClient.php b/src/KV/KVClient.php index ba2ea2a..b8c3ce1 100644 --- a/src/KV/KVClient.php +++ b/src/KV/KVClient.php @@ -277,12 +277,12 @@ public function Txn(KVTxnOps $txn, ?QueryOptions $opts = null): KVTxnAPIResponse } /** - * @param string|null $prefix + * @param string $prefix * @param \DCarbone\PHPConsulAPI\QueryOptions|null $opts * @throws \GuzzleHttp\Exception\GuzzleException * @return array( - * @var \DCarbone\PHPConsulAPI\KV\KVPair[]|\DCarbone\PHPConsulAPI\KV\KVTree[]|null array of trees, values, or null on error - * @var \DCarbone\PHPConsulAPI\Error|null error, if any + * @var \DCarbone\PHPConsulAPI\KV\KVPair[]|\DCarbone\PHPConsulAPI\KV\KVTree[]|null array of trees, values, or null on error + * @var \DCarbone\PHPConsulAPI\Error|null error, if any * ) */ public function Tree(string $prefix = '', ?QueryOptions $opts = null): array @@ -294,7 +294,7 @@ public function Tree(string $prefix = '', ?QueryOptions $opts = null): array } $treeHierarchy = []; - /** @var KVPair $kvp */ + /** @var KVPair $kvp */ foreach ($valueList as $kvp) { $path = $kvp->getKey(); $slashPos = strpos($path, '/'); @@ -309,7 +309,7 @@ public function Tree(string $prefix = '', ?QueryOptions $opts = null): array $treeHierarchy[$root] = new KVTree($root); } - if ('/' === substr($path, -1)) { + if (str_ends_with($path, '/')) { $_path = ''; foreach (explode('/', $prefix) as $part) { if ('' === $part) { diff --git a/src/KV/KVPairResponse.php b/src/KV/KVPairResponse.php index 8fe777b..d23e38b 100644 --- a/src/KV/KVPairResponse.php +++ b/src/KV/KVPairResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?KVPair /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->KVPair = new KVPair((array)$decodedData, true); } diff --git a/src/KV/KVPairsResponse.php b/src/KV/KVPairsResponse.php index 3e2ac6c..ea2325b 100644 --- a/src/KV/KVPairsResponse.php +++ b/src/KV/KVPairsResponse.php @@ -34,7 +34,7 @@ class KVPairsResponse extends AbstractValuedQueryResponse implements Unmarshalle /** * @return \DCarbone\PHPConsulAPI\KV\KVPairs|null */ - public function getValue() + public function getValue(): ?KVPairs { return $this->KVPairs; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->KVPairs = new KVPairs((array)$decodedData); } diff --git a/src/KV/KVTree.php b/src/KV/KVTree.php index a9b8d41..5394629 100644 --- a/src/KV/KVTree.php +++ b/src/KV/KVTree.php @@ -51,7 +51,7 @@ public function getPrefix(): string /** * @return \DCarbone\PHPConsulAPI\KV\KVPair|\DCarbone\PHPConsulAPI\KV\KVTree can return any type */ - public function current() + public function current(): KVTree|KVPair { return current($this->_children); } @@ -64,7 +64,7 @@ public function next(): void /** * @return string scalar on success, or null on failure */ - public function key() + public function key(): string { return key($this->_children); } @@ -73,7 +73,7 @@ public function key() * @return bool The return value will be casted to boolean and then evaluated. * Returns true on success or false on failure. */ - public function valid() + public function valid(): bool { return null !== key($this->_children); } @@ -86,15 +86,15 @@ public function rewind(): void /** * @return bool true if the current entry can be iterated over, otherwise returns false */ - public function hasChildren() + public function hasChildren(): bool { return $this->current() instanceof self; } /** - * @return \RecursiveIterator an iterator for the current entry + * @return \RecursiveIterator|\DCarbone\PHPConsulAPI\KV\KVTree|\DCarbone\PHPConsulAPI\KV\KVPair an iterator for the current entry */ - public function getChildren() + public function getChildren(): \RecursiveIterator|KVTree|KVPair { return $this->current(); } @@ -102,7 +102,7 @@ public function getChildren() /** * @return int the custom count as an integer */ - public function count() + public function count(): int { return \count($this->_children); } @@ -111,7 +111,7 @@ public function count() * @param mixed $offset an offset to check for * @return bool true on success or false on failure */ - public function offsetExists($offset) + public function offsetExists(mixed $offset): bool { if (\is_string($offset)) { $subPath = str_replace($this->_prefix, '', $offset); @@ -130,9 +130,9 @@ public function offsetExists($offset) /** * @param mixed $offset the offset to retrieve - * @return \DCarbone\PHPConsulAPI\KV\KVPair|\DCarbone\PHPConsulAPI\KV\KVTree + * @return \DCarbone\PHPConsulAPI\KV\KVTree|\DCarbone\PHPConsulAPI\KV\KVPair|null */ - public function offsetGet($offset) + public function offsetGet(mixed $offset): KVTree|KVPair|null { if (\is_string($offset)) { $subPath = str_replace($this->_prefix, '', $offset); @@ -165,7 +165,7 @@ public function offsetGet($offset) * @param mixed $offset the offset to assign the value to * @param mixed $value the value to set */ - public function offsetSet($offset, $value): void + public function offsetSet(mixed $offset, mixed $value): void { if ('string' === \gettype($offset)) { $subPath = str_replace($this->_prefix, '', $offset); @@ -187,7 +187,7 @@ public function offsetSet($offset, $value): void /** * @param mixed $offset the offset to unset */ - public function offsetUnset($offset): void + public function offsetUnset(mixed $offset): void { // do nothing, yo... } @@ -195,7 +195,7 @@ public function offsetUnset($offset): void /** * @return array */ - public function jsonSerialize() + public function jsonSerialize(): array { $json = [$this->_prefix => []]; foreach ($this->_children as $k => $child) { diff --git a/src/MapResponse.php b/src/MapResponse.php index 35d3743..b3e355c 100644 --- a/src/MapResponse.php +++ b/src/MapResponse.php @@ -31,7 +31,7 @@ class MapResponse extends AbstractValuedResponse implements UnmarshalledResponse /** * @return array|null */ - public function getValue() + public function getValue(): ?array { return $this->Map; } @@ -39,7 +39,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->Map = $decodedData; } diff --git a/src/Marshaller.php b/src/Marshaller.php index 484887b..9986807 100644 --- a/src/Marshaller.php +++ b/src/Marshaller.php @@ -36,7 +36,7 @@ trait Marshaller * @param string $field * @param mixed $value */ - protected function marshalField(array &$output, string $field, $value): void + protected function marshalField(array &$output, string $field, mixed $value): void { $def = static::FIELDS[$field] ?? null; @@ -53,25 +53,15 @@ protected function marshalField(array &$output, string $field, $value): void // if this field is marked as needing to be typecast to a specific type for output if (isset($def[Transcoding::FIELD_MARSHAL_AS])) { - switch ($def[Transcoding::FIELD_MARSHAL_AS]) { - case Transcoding::STRING: - $value = (string)$value; - break; - case Transcoding::INTEGER: - $value = (int)$value; - break; - case Transcoding::DOUBLE: - $value = (float)$value; - break; - case Transcoding::BOOLEAN: - $value = (bool)$value; - break; - - default: - throw new \InvalidArgumentException( - sprintf('Unable to handle serializing to %s', $def[Transcoding::FIELD_MARSHAL_AS]) - ); - } + $value = match ($def[Transcoding::FIELD_MARSHAL_AS]) { + Transcoding::STRING => (string)$value, + Transcoding::INTEGER => (int)$value, + Transcoding::DOUBLE => (float)$value, + Transcoding::BOOLEAN => (bool)$value, + default => throw new \InvalidArgumentException( + sprintf('Unable to handle serializing to %s', $def[Transcoding::FIELD_MARSHAL_AS]) + ), + }; } // if this field is NOT explicitly marked as "omitempty", set and move on. diff --git a/src/Operator/AutopilotServer.php b/src/Operator/AutopilotServer.php index ef1d8f7..dd056da 100644 --- a/src/Operator/AutopilotServer.php +++ b/src/Operator/AutopilotServer.php @@ -380,7 +380,7 @@ public function setNodeType(string $NodeType): self } /** - * @return array|mixed|void + * @return array */ public function jsonSerialize(): array { diff --git a/src/Operator/AutopilotStateResponse.php b/src/Operator/AutopilotStateResponse.php index f96d3a9..7273a47 100644 --- a/src/Operator/AutopilotStateResponse.php +++ b/src/Operator/AutopilotStateResponse.php @@ -34,7 +34,7 @@ class AutopilotStateResponse extends AbstractValuedResponse implements Unmarshal /** * @return \DCarbone\PHPConsulAPI\Operator\AutopilotState|null */ - public function getValue() + public function getValue(): ?AutopilotState { return $this->AutopilotState; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->AutopilotState = new AutopilotState($decodedData); } diff --git a/src/Operator/OperatorAreaJoinResponse.php b/src/Operator/OperatorAreaJoinResponse.php index b5ddb27..0cc06cf 100644 --- a/src/Operator/OperatorAreaJoinResponse.php +++ b/src/Operator/OperatorAreaJoinResponse.php @@ -34,7 +34,7 @@ class OperatorAreaJoinResponse extends AbstractValuedWriteResponse implements Un /** * @return \DCarbone\PHPConsulAPI\Operator\AreaJoinResponse[]|null */ - public function getValue() + public function getValue(): ?array { return $this->AreaJoinResponses; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->AreaJoinResponses = []; foreach ($decodedData as $area) { diff --git a/src/Operator/OperatorAreasResponse.php b/src/Operator/OperatorAreasResponse.php index db7a6ad..d4c8664 100644 --- a/src/Operator/OperatorAreasResponse.php +++ b/src/Operator/OperatorAreasResponse.php @@ -34,7 +34,7 @@ class OperatorAreasResponse extends AbstractValuedQueryResponse implements Unmar /** * @return \DCarbone\PHPConsulAPI\Operator\Area[]|null */ - public function getValue() + public function getValue(): ?array { return $this->Areas; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->Areas = []; foreach ($decodedData as $area) { diff --git a/src/Operator/OperatorAutopilotConfigurationResponse.php b/src/Operator/OperatorAutopilotConfigurationResponse.php index bd185b2..b828e86 100644 --- a/src/Operator/OperatorAutopilotConfigurationResponse.php +++ b/src/Operator/OperatorAutopilotConfigurationResponse.php @@ -34,7 +34,7 @@ class OperatorAutopilotConfigurationResponse extends AbstractValuedResponse impl /** * @return \DCarbone\PHPConsulAPI\Operator\AutopilotConfiguration|null */ - public function getValue() + public function getValue(): ?AutopilotConfiguration { return $this->AutopilotConfiguration; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->AutopilotConfiguration = new AutopilotConfiguration((array)$decodedData); } diff --git a/src/Operator/OperatorClient.php b/src/Operator/OperatorClient.php index 1eac531..abae318 100644 --- a/src/Operator/OperatorClient.php +++ b/src/Operator/OperatorClient.php @@ -149,8 +149,9 @@ public function AutopilotGetConfiguration(?QueryOptions $opts = null): OperatorA /** * @param \DCarbone\PHPConsulAPI\Operator\AutopilotConfiguration $conf * @param \DCarbone\PHPConsulAPI\WriteOptions|null $opts - * @throws \GuzzleHttp\Exception\GuzzleException * @return \DCarbone\PHPConsulAPI\Error|null + * @throws \Exception + * @throws \GuzzleHttp\Exception\GuzzleException */ public function AutopilotSetConfiguration(AutopilotConfiguration $conf, ?WriteOptions $opts = null): ?Error { @@ -227,7 +228,7 @@ public function RaftRemovePeerByAddress(string $address, ?WriteOptions $opts = n { $r = $this->_newDeleteRequest('v1/operator/raft/peer', $opts); $r->applyOptions($opts); - $r->params->set('address', (string)$address); + $r->params->set('address', $address); return $this->_requireOK($this->_do($r))->Err; } diff --git a/src/Operator/OperatorHealthReplyResponse.php b/src/Operator/OperatorHealthReplyResponse.php index 5494c48..36b3eca 100644 --- a/src/Operator/OperatorHealthReplyResponse.php +++ b/src/Operator/OperatorHealthReplyResponse.php @@ -34,7 +34,7 @@ class OperatorHealthReplyResponse extends AbstractValuedResponse implements Unma /** * @return \DCarbone\PHPConsulAPI\Operator\OperatorHealthReply|mixed|null */ - public function getValue() + public function getValue(): mixed { return $this->OperatorHealthReply; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->OperatorHealthReply = new OperatorHealthReply((array)$decodedData); } diff --git a/src/Operator/OperatorRaftConfigurationResponse.php b/src/Operator/OperatorRaftConfigurationResponse.php index bee06e3..33a27f1 100644 --- a/src/Operator/OperatorRaftConfigurationResponse.php +++ b/src/Operator/OperatorRaftConfigurationResponse.php @@ -34,7 +34,7 @@ class OperatorRaftConfigurationResponse extends AbstractValuedResponse implement /** * @return \DCarbone\PHPConsulAPI\Operator\RaftConfiguration|null */ - public function getValue() + public function getValue(): ?RaftConfiguration { return $this->RaftConfiguration; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->RaftConfiguration = new RaftConfiguration($decodedData); } diff --git a/src/Operator/OperatorSerfMembersResponse.php b/src/Operator/OperatorSerfMembersResponse.php index 53e4f87..2e44e82 100644 --- a/src/Operator/OperatorSerfMembersResponse.php +++ b/src/Operator/OperatorSerfMembersResponse.php @@ -34,7 +34,7 @@ class OperatorSerfMembersResponse extends AbstractValuedQueryResponse implements /** * @return \DCarbone\PHPConsulAPI\Operator\SerfMember[]|null */ - public function getValue() + public function getValue(): ?array { return $this->SerfMembers; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->SerfMembers = []; foreach ($decodedData as $datum) { diff --git a/src/Operator/OperatorServerHealthsResponse.php b/src/Operator/OperatorServerHealthsResponse.php index f65fb05..5aa6b64 100644 --- a/src/Operator/OperatorServerHealthsResponse.php +++ b/src/Operator/OperatorServerHealthsResponse.php @@ -34,7 +34,7 @@ class OperatorServerHealthsResponse extends AbstractValuedResponse implements Un /** * @return \DCarbone\PHPConsulAPI\Operator\ServerHealth[]|null */ - public function getValue() + public function getValue(): ?array { return $this->ServerHealths; } @@ -42,7 +42,7 @@ public function getValue() /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->ServerHealths = []; foreach ($decodedData as $datum) { diff --git a/src/Operator/ReadableDuration.php b/src/Operator/ReadableDuration.php index 4816ab8..f5c8372 100644 --- a/src/Operator/ReadableDuration.php +++ b/src/Operator/ReadableDuration.php @@ -33,7 +33,7 @@ class ReadableDuration extends Time\Duration implements \JsonSerializable, Scala * @param string $field * @param mixed $value */ - public static function unmarshalJSON(object $instance, string $field, $value): void + public static function unmarshalJSON(object $instance, string $field, mixed $value): void { $instance->{$field} = new self(\intval($value, 10)); } diff --git a/src/PreparedQuery/PreparedQueryDefinitionsResponse.php b/src/PreparedQuery/PreparedQueryDefinitionsResponse.php index 46180aa..16a6f4d 100644 --- a/src/PreparedQuery/PreparedQueryDefinitionsResponse.php +++ b/src/PreparedQuery/PreparedQueryDefinitionsResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?array /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->PreparedQueryDefinitions = []; foreach ($decodedData as $datum) { diff --git a/src/PreparedQuery/PreparedQueryExecuteResponseResponse.php b/src/PreparedQuery/PreparedQueryExecuteResponseResponse.php index 37540f5..aa095b5 100644 --- a/src/PreparedQuery/PreparedQueryExecuteResponseResponse.php +++ b/src/PreparedQuery/PreparedQueryExecuteResponseResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?PreparedQueryExecuteResponse /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->PreparedQueryExecuteResponse = new PreparedQueryExecuteResponse((array)$decodedData); } diff --git a/src/PreparedQuery/QueryDNSOptions.php b/src/PreparedQuery/QueryDNSOptions.php index e93d261..b34af75 100644 --- a/src/PreparedQuery/QueryDNSOptions.php +++ b/src/PreparedQuery/QueryDNSOptions.php @@ -53,6 +53,6 @@ public function setTTL(string $ttl): self */ public function __toString(): string { - return (string) $this->TTL; + return $this->TTL; } } diff --git a/src/QueryOptions.php b/src/QueryOptions.php index 8dc6fce..08b8b97 100644 --- a/src/QueryOptions.php +++ b/src/QueryOptions.php @@ -90,7 +90,7 @@ class QueryOptions extends AbstractModel implements RequestOptions /** * QueryOptions constructor. - * @param array $data + * @param array|null $data */ public function __construct(?array $data = null) { @@ -198,9 +198,9 @@ public function getMaxAge(): Time\Duration } /** - * @param \DCarbone\Go\Time\Duration|float|int|string|null $maxAge + * @param float|int|string|\DCarbone\Go\Time\Duration|null $maxAge */ - public function setMaxAge($maxAge): void + public function setMaxAge(float|int|string|Time\Duration|null $maxAge): void { $this->MaxAge = Time::Duration($maxAge); } @@ -214,9 +214,9 @@ public function getStaleIfError(): Time\Duration } /** - * @param \DCarbone\Go\Time\Duration|float|int|string|null $staleIfError + * @param float|int|string|\DCarbone\Go\Time\Duration|null $staleIfError */ - public function setStaleIfError($staleIfError): void + public function setStaleIfError(float|int|string|Time\Duration|null $staleIfError): void { $this->StaleIfError = Time::Duration($staleIfError); } @@ -248,7 +248,7 @@ public function getWaitTime(): Time\Duration /** * @param mixed $waitTime */ - public function setWaitTime($waitTime): void + public function setWaitTime(mixed $waitTime): void { $this->WaitTime = Time::Duration($waitTime); } @@ -390,9 +390,9 @@ public function getTimeout(): ?Time\Duration } /** - * @param \DCarbone\Go\Time\Duration|float|int|string|null $timeout + * @param float|int|string|\DCarbone\Go\Time\Duration|null $timeout */ - public function setTimeout($timeout): void + public function setTimeout(float|int|string|Time\Duration|null $timeout): void { $this->Timeout = Time::Duration($timeout); } diff --git a/src/Request.php b/src/Request.php index 8feab0d..112e93f 100644 --- a/src/Request.php +++ b/src/Request.php @@ -50,7 +50,7 @@ class Request private string $method; /** @var mixed */ - private $body; + private mixed $body; /** * Request constructor. @@ -59,7 +59,7 @@ class Request * @param \DCarbone\PHPConsulAPI\Config $config * @param mixed $body */ - public function __construct(string $method, string $path, Config $config, $body) + public function __construct(string $method, string $path, Config $config, mixed $body) { $this->scheme = $config->Scheme; $this->address = $config->Address; @@ -121,7 +121,7 @@ public function getMethod(): string /** * @return mixed */ - public function getBody() + public function getBody(): mixed { return $this->body; } diff --git a/src/ResponseValueBoolTrait.php b/src/ResponseValueBoolTrait.php index 329392a..9176958 100644 --- a/src/ResponseValueBoolTrait.php +++ b/src/ResponseValueBoolTrait.php @@ -39,7 +39,7 @@ public function getValue(): bool /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { if (\is_bool($decodedData)) { $this->Value = $decodedData; diff --git a/src/ResponseValueStringTrait.php b/src/ResponseValueStringTrait.php index b8d394c..73bb985 100644 --- a/src/ResponseValueStringTrait.php +++ b/src/ResponseValueStringTrait.php @@ -39,7 +39,7 @@ public function getValue(): string /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->Value = (string)$decodedData; } diff --git a/src/ResponseValueStringsTrait.php b/src/ResponseValueStringsTrait.php index dc23a1a..14ee9f6 100644 --- a/src/ResponseValueStringsTrait.php +++ b/src/ResponseValueStringsTrait.php @@ -39,7 +39,7 @@ public function getValue(): ?array /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->Value = (array)$decodedData; } diff --git a/src/Session/SessionClient.php b/src/Session/SessionClient.php index d437ab0..e8f8b9b 100644 --- a/src/Session/SessionClient.php +++ b/src/Session/SessionClient.php @@ -79,8 +79,9 @@ public function Destroy(string $id, ?WriteOptions $opts = null): WriteResponse /** * @param string $id * @param \DCarbone\PHPConsulAPI\WriteOptions|null $opts - * @throws \GuzzleHttp\Exception\GuzzleException * @return \DCarbone\PHPConsulAPI\Session\SessionEntriesWriteResponse + * @throws \Exception + * @throws \GuzzleHttp\Exception\GuzzleException */ public function Renew(string $id, ?WriteOptions $opts = null): SessionEntriesWriteResponse { diff --git a/src/Session/SessionEntriesQueryResponse.php b/src/Session/SessionEntriesQueryResponse.php index f3c2792..264cd84 100644 --- a/src/Session/SessionEntriesQueryResponse.php +++ b/src/Session/SessionEntriesQueryResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?array /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->SessionEntries = []; foreach ($decodedData as $datum) { diff --git a/src/Session/SessionEntriesWriteResponse.php b/src/Session/SessionEntriesWriteResponse.php index 648138b..4427123 100644 --- a/src/Session/SessionEntriesWriteResponse.php +++ b/src/Session/SessionEntriesWriteResponse.php @@ -42,7 +42,7 @@ public function getValue(): ?array /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void + public function unmarshalValue(mixed $decodedData): void { $this->SessionEntries = []; foreach ($decodedData as $datum) { diff --git a/src/Transcoding.php b/src/Transcoding.php index ad5292d..2e0db81 100644 --- a/src/Transcoding.php +++ b/src/Transcoding.php @@ -102,7 +102,7 @@ public static function isScalar(string $type): bool * @param \DCarbone\Go\Time\Time|string $value * @throws \Exception */ - public static function unmarshalTime(object $instance, string $field, $value): void + public static function unmarshalTime(object $instance, string $field, Time\Time|string $value): void { if ($value instanceof Time\Time) { $instance->{$field} = clone $value; @@ -117,7 +117,7 @@ public static function unmarshalTime(object $instance, string $field, $value): v * @param \DCarbone\Go\Time\Time|string|null $value * @throws \Exception */ - public static function unmarshalNullableTime(object $instance, string $field, $value): void + public static function unmarshalNullableTime(object $instance, string $field, Time\Time|string|null $value): void { if (null === $value) { $instance->{$field} = null; @@ -133,7 +133,7 @@ public static function unmarshalNullableTime(object $instance, string $field, $v * @param string $field * @param mixed $value */ - public static function unmarshalDuration(object $instance, string $field, $value): void + public static function unmarshalDuration(object $instance, string $field, mixed $value): void { $instance->{$field} = Time::Duration($value); } @@ -143,7 +143,7 @@ public static function unmarshalDuration(object $instance, string $field, $value * @param string $field * @param mixed $value */ - public static function unmarshalNullableDuration(object $instance, string $field, $value): void + public static function unmarshalNullableDuration(object $instance, string $field, mixed $value): void { if (null === $value) { $instance->{$field} = null; diff --git a/src/UnmarshalledResponseInterface.php b/src/UnmarshalledResponseInterface.php index 0808983..58db415 100644 --- a/src/UnmarshalledResponseInterface.php +++ b/src/UnmarshalledResponseInterface.php @@ -28,5 +28,5 @@ interface UnmarshalledResponseInterface /** * @param mixed $decodedData */ - public function unmarshalValue($decodedData): void; + public function unmarshalValue(mixed $decodedData): void; } diff --git a/src/Unmarshaller.php b/src/Unmarshaller.php index 76cd707..1724ca6 100644 --- a/src/Unmarshaller.php +++ b/src/Unmarshaller.php @@ -37,7 +37,7 @@ trait Unmarshaller * @param string $field * @param mixed $value */ - protected function unmarshalField(string $field, $value): void + protected function unmarshalField(string $field, mixed $value): void { if (isset(static::FIELDS[$field])) { // if the implementing class has some explicitly defined overrides @@ -78,7 +78,7 @@ protected function fieldIsNullable(array $fieldDef): bool * @param string $type * @return false|float|int|string|null */ - protected static function scalarZeroVal(string $type) + protected static function scalarZeroVal(string $type): float|bool|int|string|null { if (Transcoding::STRING === $type) { return ''; @@ -103,7 +103,7 @@ protected static function scalarZeroVal(string $type) * @param bool $nullable * @return bool|float|int|string */ - private function buildScalarValue(string $field, $value, string $type, bool $nullable) + private function buildScalarValue(string $field, mixed $value, string $type, bool $nullable): float|bool|int|string|null { // if the incoming value is null... if (null === $value) { @@ -134,12 +134,12 @@ private function buildScalarValue(string $field, $value, string $type, bool $nul /** * @param string $field - * @param array|object $value + * @param object|array $value * @param string $class * @param bool $nullable * @return object|null */ - private function buildObjectValue(string $field, $value, string $class, bool $nullable): ?object + private function buildObjectValue(string $field, object|array $value, string $class, bool $nullable): ?object { // if the incoming value is null... if (null === $value) { @@ -170,7 +170,7 @@ private function buildObjectValue(string $field, $value, string $class, bool $nu * @param mixed $value * @param bool $nullable */ - private function unmarshalScalar(string $field, $value, bool $nullable): void + private function unmarshalScalar(string $field, mixed $value, bool $nullable): void { $this->{$field} = $this->buildScalarValue( $field, @@ -187,7 +187,7 @@ private function unmarshalScalar(string $field, $value, bool $nullable): void * @param mixed $value * @param array $def */ - private function unmarshalComplex(string $field, $value, array $def): void + private function unmarshalComplex(string $field, mixed $value, array $def): void { // check if a callable has been defined if (isset($def[Transcoding::FIELD_UNMARSHAL_CALLBACK])) { @@ -255,7 +255,7 @@ private function unmarshalComplex(string $field, $value, array $def): void * @param mixed $value * @param array $def */ - private function unmarshalObject(string $field, $value, array $def): void + private function unmarshalObject(string $field, mixed $value, array $def): void { if (!isset($def[Transcoding::FIELD_CLASS])) { throw new \LogicException( @@ -281,7 +281,7 @@ private function unmarshalObject(string $field, $value, array $def): void * @param mixed $value * @param array $def */ - private function unmarshalArray(string $field, $value, array $def): void + private function unmarshalArray(string $field, mixed $value, array $def): void { // attempt to extract the two possible keys $type = $def[Transcoding::FIELD_ARRAY_TYPE] ?? null; diff --git a/src/ValuedResponseInterface.php b/src/ValuedResponseInterface.php index 6ecdc08..b1e1f29 100644 --- a/src/ValuedResponseInterface.php +++ b/src/ValuedResponseInterface.php @@ -28,5 +28,5 @@ interface ValuedResponseInterface /** * @return mixed */ - public function getValue(); + public function getValue(): mixed; } diff --git a/src/Values.php b/src/Values.php index 3ad59d9..559bc1c 100644 --- a/src/Values.php +++ b/src/Values.php @@ -138,7 +138,7 @@ public function rewind(): void * @param mixed $offset * @return bool */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return isset($this->values[$offset]); } diff --git a/src/WriteOptions.php b/src/WriteOptions.php index 63ee15c..541c8ae 100644 --- a/src/WriteOptions.php +++ b/src/WriteOptions.php @@ -41,7 +41,7 @@ class WriteOptions extends AbstractModel implements RequestOptions /** * WriteOptions constructor. - * @param array $data + * @param array|null $data */ public function __construct(?array $data = null) { @@ -124,9 +124,9 @@ public function getTimeout(): ?Time\Duration } /** - * @param \DCarbone\Go\Time\Duration|float|int|string|null $timeout + * @param float|int|string|\DCarbone\Go\Time\Duration|null $timeout */ - public function setTimeout($timeout): void + public function setTimeout(float|int|string|Time\Duration|null $timeout): void { $this->Timeout = Time::Duration($timeout); } diff --git a/src/WriteResponse.php b/src/WriteResponse.php index 0eae4e7..ec92cf2 100644 --- a/src/WriteResponse.php +++ b/src/WriteResponse.php @@ -32,17 +32,16 @@ class WriteResponse extends AbstractResponse * @param mixed $offset * @return bool */ - public function offsetExists($offset): bool + public function offsetExists(mixed $offset): bool { return \is_int($offset) && 0 <= $offset && $offset < 2; } /** * @param mixed $offset - * @return \DCarbone\PHPConsulAPI\Error|\DCarbone\PHPConsulAPI\WriteMeta|mixed|null + * @return Error|WriteMeta|null */ - #[\ReturnTypeWillChange] - public function offsetGet($offset) + public function offsetGet(mixed $offset): Error|null|WriteMeta { if (0 === $offset) { return $this->WriteMeta; diff --git a/src/funcs.php b/src/funcs.php index 453451f..b9b986b 100644 --- a/src/funcs.php +++ b/src/funcs.php @@ -21,7 +21,6 @@ */ use DCarbone\Go\Time; -use DCarbone\PHPConsulAPI\ConfigEntry\ConfigEntry; /** * @param \DCarbone\Go\Time\Duration $dur @@ -38,12 +37,3 @@ function dur_to_millisecond(Time\Duration $dur): string return sprintf('%dms', $ms); } - -/** - * @param string $kind - * @param string $Name - * @return \DCarbone\PHPConsulAPI\ConfigEntry\ConfigEntry - */ -function MakeConfigEntry(string $kind, string $Name): ConfigEntry -{ -} diff --git a/tests/Usage/Agent/AgentServiceConnectProxyConfigTest.php b/tests/Usage/Agent/AgentServiceConnectProxyConfigTest.php new file mode 100644 index 0000000..a2ca164 --- /dev/null +++ b/tests/Usage/Agent/AgentServiceConnectProxyConfigTest.php @@ -0,0 +1,47 @@ + [ + 'envoy_prometheus_bind_addr' => '0.0.0.0:12345', + 'handshake_timeout_ms' => 10000, + 'local_connect_timeout_ms' => 1000, + 'local_request_timeout_ms' => 0, + 'protocol' => 'http', + ], + ]); + + $this->assertEquals([ + 'envoy_prometheus_bind_addr' => '0.0.0.0:12345', + 'handshake_timeout_ms' => 10000, + 'local_connect_timeout_ms' => 1000, + 'local_request_timeout_ms' => 0, + 'protocol' => 'http', + ], $config->Config); + } +} \ No newline at end of file