diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f0c9ceb..b97358b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] # windows-latest, macos-latest - php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] include: - php: 7.2 phpunit: 7 @@ -31,6 +31,10 @@ jobs: phpunit: 9 - php: 8.2 phpunit: 9 + - php: 8.3 + phpunit: 9 + - php: 8.4 + phpunit: 9 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/composer.json b/composer.json index 9e37ee8..96ec814 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ }, "require-dev": { "squizlabs/php_codesniffer": "^3.5", - "phan/phan": "5.4.2", + "phan/phan": "5.4.5", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5" }, "autoload": { diff --git a/composer.lock b/composer.lock index efb6251..ca0a4a1 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": "9fdb3ec1706ae57fb5bdfd790d73983f", + "content-hash": "d774ca521a28aa59304826a76f1a1b2e", "packages": [ { "name": "apimatic/core-interfaces", @@ -806,16 +806,16 @@ }, { "name": "phan/phan", - "version": "5.4.2", + "version": "5.4.5", "source": { "type": "git", "url": "https://github.com/phan/phan.git", - "reference": "4f2870ed6fea320f62f3c3c63f3274d357a7980e" + "reference": "2b15302175931a0629a85c57d0c1f91d68b26a4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phan/phan/zipball/4f2870ed6fea320f62f3c3c63f3274d357a7980e", - "reference": "4f2870ed6fea320f62f3c3c63f3274d357a7980e", + "url": "https://api.github.com/repos/phan/phan/zipball/2b15302175931a0629a85c57d0c1f91d68b26a4d", + "reference": "2b15302175931a0629a85c57d0c1f91d68b26a4d", "shasum": "" }, "require": { @@ -829,7 +829,7 @@ "netresearch/jsonmapper": "^1.6.0|^2.0|^3.0|^4.0", "php": "^7.2.0|^8.0.0", "sabre/event": "^5.1.3", - "symfony/console": "^3.2|^4.0|^5.0|^6.0", + "symfony/console": "^3.2|^4.0|^5.0|^6.0|^7.0", "symfony/polyfill-mbstring": "^1.11.0", "symfony/polyfill-php80": "^1.20.0", "tysonandre/var_representation_polyfill": "^0.0.2|^0.1.0" @@ -875,13 +875,14 @@ "keywords": [ "analyzer", "php", - "static" + "static", + "static analysis" ], "support": { "issues": "https://github.com/phan/phan/issues", - "source": "https://github.com/phan/phan/tree/5.4.2" + "source": "https://github.com/phan/phan/tree/5.4.5" }, - "time": "2023-03-03T17:20:24+00:00" + "time": "2024-08-13T21:41:35+00:00" }, { "name": "phar-io/manifest", @@ -3708,7 +3709,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -3718,6 +3719,6 @@ "ext-dom": "*", "ext-libxml": "*" }, - "platform-dev": [], - "plugin-api-version": "2.0.0" + "platform-dev": {}, + "plugin-api-version": "2.6.0" } diff --git a/src/Client.php b/src/Client.php index 77c8dfe..dfb18ba 100644 --- a/src/Client.php +++ b/src/Client.php @@ -22,14 +22,14 @@ class Client { private static $converter; private static $jsonHelper; - public static function getConverter(Client $client = null): ConverterInterface + public static function getConverter(?Client $client = null): ConverterInterface { if (isset($client)) { return $client->localConverter; } return self::$converter; } - public static function getJsonHelper(Client $client = null): JsonHelper + public static function getJsonHelper(?Client $client = null): JsonHelper { if (isset($client)) { return $client->localJsonHelper; diff --git a/src/Types/Sdk/CoreCallback.php b/src/Types/Sdk/CoreCallback.php index 7731e1a..166dbec 100644 --- a/src/Types/Sdk/CoreCallback.php +++ b/src/Types/Sdk/CoreCallback.php @@ -27,7 +27,7 @@ class CoreCallback * @param callable|null $onBeforeRequest Called before an API call * @param callable|null $onAfterRequest Called after an API call */ - public function __construct(callable $onBeforeRequest = null, callable $onAfterRequest = null) + public function __construct(?callable $onBeforeRequest = null, ?callable $onAfterRequest = null) { $this->onBeforeRequest = $onBeforeRequest; $this->onAfterRequest = $onAfterRequest; diff --git a/src/Utils/XmlDeserializer.php b/src/Utils/XmlDeserializer.php index 1e29f12..c67fc7a 100644 --- a/src/Utils/XmlDeserializer.php +++ b/src/Utils/XmlDeserializer.php @@ -22,7 +22,7 @@ class XmlDeserializer /** * @param int|null $loadOptions A bit field of LIBXML_* constants */ - public function __construct(int $loadOptions = null) + public function __construct(?int $loadOptions = null) { $this->dom = new DOMDocument(); $this->loadOptions = $loadOptions ?? (LIBXML_NONET | LIBXML_NOBLANKS); @@ -81,7 +81,7 @@ public function fromElementToArray( \DOMNode $parent, string $itemName, string $clazz, - string $wrappingElementName = null + ?string $wrappingElementName = null ) { if ($wrappingElementName === null) { $elements = static::getChildNodesByTagName($parent, $itemName); diff --git a/src/Utils/XmlSerializer.php b/src/Utils/XmlSerializer.php index 0162abe..170d936 100644 --- a/src/Utils/XmlSerializer.php +++ b/src/Utils/XmlSerializer.php @@ -67,7 +67,7 @@ public function addArrayAsSubelement( \DOMNode $root, string $itemName, $items, - string $wrappingElementName = null + ?string $wrappingElementName = null ): void { if ($items === null) { return; @@ -102,7 +102,7 @@ public function addAsSubelement(\DOMNode $root, string $name, $value): ?\DOMElem return $element; } - public function createElement(string $name, string $value = null): \DOMElement + public function createElement(string $name, ?string $value = null): \DOMElement { return $value === null ? $this->dom->createElement($name) : $this->dom->createElement($name, $value); } diff --git a/tests/LoggerTest.php b/tests/LoggerTest.php index 89beb5d..8943708 100644 --- a/tests/LoggerTest.php +++ b/tests/LoggerTest.php @@ -81,7 +81,7 @@ public function testConsoleLoggerFailure() private function logAndGetEntry( string $level, - LoggerInterface $logger = null, + ?LoggerInterface $logger = null, string $message = 'someMessage', array $context = [] ): LogEntry {