From 3b9e2809ea97670c7fa65feef60acc202130c390 Mon Sep 17 00:00:00 2001 From: Colin Viebrock Date: Thu, 2 Oct 2025 16:57:58 -0400 Subject: [PATCH 1/4] All null values in SwatDataTreeNode constructor for value param --- Swat/SwatDataTreeNode.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Swat/SwatDataTreeNode.php b/Swat/SwatDataTreeNode.php index fdc6de13..fa35f774 100644 --- a/Swat/SwatDataTreeNode.php +++ b/Swat/SwatDataTreeNode.php @@ -13,7 +13,7 @@ class SwatDataTreeNode extends SwatTreeNode * * The value is used for processing. It is either a string or an integer. */ - public int|string $value; + public null|int|string $value; /** * The title of this node. @@ -39,14 +39,14 @@ class SwatDataTreeNode extends SwatTreeNode /** * Creates a new data node. * - * @param int|string $value the value of the node. It is either a string or an - * integer. - * @param string $title the title of the node - * @param string $content_type optional content-type - * @param mixed $sensitive + * @param int|string|null $value the value of the node. It is either a string or an + * integer. + * @param string $title the title of the node + * @param string $content_type optional content-type + * @param mixed $sensitive */ public function __construct( - int|string $value, + null|int|string $value, string $title, string $content_type = 'text/plain', bool $sensitive = true, From 4d079f9eecf24bc715cfcec3c4816495bc17bf5a Mon Sep 17 00:00:00 2001 From: Colin Viebrock Date: Thu, 2 Oct 2025 18:00:37 -0400 Subject: [PATCH 2/4] bump and pin php-cs-fixer version --- composer.json | 2 +- composer.lock | 208 ++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 151 insertions(+), 59 deletions(-) diff --git a/composer.json b/composer.json index 8590f1de..3441a818 100644 --- a/composer.json +++ b/composer.json @@ -61,7 +61,7 @@ "silverorange/yui": "^1.0.11" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.75", + "friendsofphp/php-cs-fixer": "3.88.2", "phpstan/phpstan": "^2.1" }, "autoload": { diff --git a/composer.lock b/composer.lock index 0ccebbeb..a80d08cc 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": "5564b1bb53919d76f07092ca03a12cf5", + "content-hash": "51e2a3810f6355a8bd17a0a471f5f321", "packages": [ { "name": "league/climate", @@ -1150,16 +1150,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "1.2.0", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "8520451a140d3f46ac33042715115e290cf5785f" + "reference": "db9508f7b1474469d9d3c53b86f817e344732678" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f", - "reference": "8520451a140d3f46ac33042715115e290cf5785f", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678", + "reference": "db9508f7b1474469d9d3c53b86f817e344732678", "shasum": "" }, "require": { @@ -1169,10 +1169,10 @@ "fidry/makefile": "^0.2.0", "fidry/php-cs-fixer-config": "^1.1.2", "phpstan/extension-installer": "^1.2.0", - "phpstan/phpstan": "^1.9.2", - "phpstan/phpstan-deprecation-rules": "^1.0.0", - "phpstan/phpstan-phpunit": "^1.2.2", - "phpstan/phpstan-strict-rules": "^1.4.4", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^8.5.31 || ^9.5.26", "webmozarts/strict-phpunit": "^7.5" }, @@ -1199,7 +1199,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.3.0" }, "funding": [ { @@ -1207,62 +1207,62 @@ "type": "github" } ], - "time": "2024-08-06T10:04:20+00:00" + "time": "2025-08-14T07:29:31+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.75.0", + "version": "v3.88.2", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c" + "reference": "a8d15584bafb0f0d9d938827840060fd4a3ebc99" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/399a128ff2fdaf4281e4e79b755693286cdf325c", - "reference": "399a128ff2fdaf4281e4e79b755693286cdf325c", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a8d15584bafb0f0d9d938827840060fd4a3ebc99", + "reference": "a8d15584bafb0f0d9d938827840060fd4a3ebc99", "shasum": "" }, "require": { - "clue/ndjson-react": "^1.0", + "clue/ndjson-react": "^1.3", "composer/semver": "^3.4", - "composer/xdebug-handler": "^3.0.3", + "composer/xdebug-handler": "^3.0.5", "ext-filter": "*", "ext-hash": "*", "ext-json": "*", "ext-tokenizer": "*", - "fidry/cpu-core-counter": "^1.2", + "fidry/cpu-core-counter": "^1.3", "php": "^7.4 || ^8.0", - "react/child-process": "^0.6.5", - "react/event-loop": "^1.0", - "react/promise": "^2.0 || ^3.0", - "react/socket": "^1.0", - "react/stream": "^1.0", - "sebastian/diff": "^4.0 || ^5.1 || ^6.0 || ^7.0", - "symfony/console": "^5.4 || ^6.4 || ^7.0", - "symfony/event-dispatcher": "^5.4 || ^6.4 || ^7.0", - "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", - "symfony/finder": "^5.4 || ^6.4 || ^7.0", - "symfony/options-resolver": "^5.4 || ^6.4 || ^7.0", - "symfony/polyfill-mbstring": "^1.31", - "symfony/polyfill-php80": "^1.31", - "symfony/polyfill-php81": "^1.31", - "symfony/process": "^5.4 || ^6.4 || ^7.2", - "symfony/stopwatch": "^5.4 || ^6.4 || ^7.0" + "react/child-process": "^0.6.6", + "react/event-loop": "^1.5", + "react/promise": "^3.3", + "react/socket": "^1.16", + "react/stream": "^1.4", + "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0", + "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0", + "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0", + "symfony/polyfill-mbstring": "^1.33", + "symfony/polyfill-php80": "^1.33", + "symfony/polyfill-php81": "^1.33", + "symfony/polyfill-php84": "^1.33", + "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2", + "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0" }, "require-dev": { - "facile-it/paraunit": "^1.3.1 || ^2.6", - "infection/infection": "^0.29.14", - "justinrainbow/json-schema": "^5.3 || ^6.2", - "keradus/cli-executor": "^2.1", + "facile-it/paraunit": "^1.3.1 || ^2.7", + "infection/infection": "^0.31.0", + "justinrainbow/json-schema": "^6.5", + "keradus/cli-executor": "^2.2", "mikey179/vfsstream": "^1.6.12", - "php-coveralls/php-coveralls": "^2.7", - "php-cs-fixer/accessible-object": "^1.1", + "php-coveralls/php-coveralls": "^2.8", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", - "phpunit/phpunit": "^9.6.22 || ^10.5.45 || ^11.5.12", - "symfony/var-dumper": "^5.4.48 || ^6.4.18 || ^7.2.3", - "symfony/yaml": "^5.4.45 || ^6.4.18 || ^7.2.3" + "phpunit/phpunit": "^9.6.25 || ^10.5.53 || ^11.5.34", + "symfony/var-dumper": "^5.4.48 || ^6.4.24 || ^7.3.2", + "symfony/yaml": "^5.4.45 || ^6.4.24 || ^7.3.2" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -1303,7 +1303,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.75.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.88.2" }, "funding": [ { @@ -1311,7 +1311,7 @@ "type": "github" } ], - "time": "2025-03-31T18:40:42+00:00" + "time": "2025-09-27T00:24:15+00:00" }, { "name": "phpstan/phpstan", @@ -1771,23 +1771,23 @@ }, { "name": "react/promise", - "version": "v3.2.0", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/reactphp/promise.git", - "reference": "8a164643313c71354582dc850b42b33fa12a4b63" + "reference": "23444f53a813a3296c1368bb104793ce8d88f04a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reactphp/promise/zipball/8a164643313c71354582dc850b42b33fa12a4b63", - "reference": "8a164643313c71354582dc850b42b33fa12a4b63", + "url": "https://api.github.com/repos/reactphp/promise/zipball/23444f53a813a3296c1368bb104793ce8d88f04a", + "reference": "23444f53a813a3296c1368bb104793ce8d88f04a", "shasum": "" }, "require": { "php": ">=7.1.0" }, "require-dev": { - "phpstan/phpstan": "1.10.39 || 1.4.10", + "phpstan/phpstan": "1.12.28 || 1.4.10", "phpunit/phpunit": "^9.6 || ^7.5" }, "type": "library", @@ -1832,7 +1832,7 @@ ], "support": { "issues": "https://github.com/reactphp/promise/issues", - "source": "https://github.com/reactphp/promise/tree/v3.2.0" + "source": "https://github.com/reactphp/promise/tree/v3.3.0" }, "funding": [ { @@ -1840,7 +1840,7 @@ "type": "open_collective" } ], - "time": "2024-05-24T10:39:05+00:00" + "time": "2025-08-19T18:57:03+00:00" }, { "name": "react/socket", @@ -2674,7 +2674,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -2735,7 +2735,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" }, "funding": [ { @@ -2746,6 +2746,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -2755,7 +2759,7 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", @@ -2815,7 +2819,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0" }, "funding": [ { @@ -2826,6 +2830,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -2835,7 +2843,7 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.32.0", + "version": "v1.33.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", @@ -2891,7 +2899,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.32.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.33.0" }, "funding": [ { @@ -2902,6 +2910,10 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" @@ -2909,6 +2921,86 @@ ], "time": "2024-09-09T11:45:10+00:00" }, + { + "name": "symfony/polyfill-php84", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php84.git", + "reference": "d8ced4d875142b6a7426000426b8abc631d6b191" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/d8ced4d875142b6a7426000426b8abc631d6b191", + "reference": "d8ced4d875142b6a7426000426b8abc631d6b191", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php84\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.4+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php84/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-06-24T13:30:11+00:00" + }, { "name": "symfony/process", "version": "v7.2.5", From af41eebfb85124389a1b66c5dc52ac2865499f11 Mon Sep 17 00:00:00 2001 From: Colin Viebrock Date: Thu, 2 Oct 2025 18:01:22 -0400 Subject: [PATCH 3/4] Fix deprecated ruleset name --- .php-cs-fixer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index cc3a4352..0bedc2cb 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -7,14 +7,14 @@ $finder = (new Finder()) ->in(__DIR__) ->exclude([ - 'node_modules' + 'node_modules', ]); return (new Config()) - ->setParallelConfig(ParallelConfigFactory::detect(null, null, 2**18-1)) + ->setParallelConfig(ParallelConfigFactory::detect(null, null, 2 ** 18 - 1)) ->setRules([ '@PhpCsFixer' => true, - '@PHP82Migration' => true, + '@PHP8x2Migration' => true, 'indentation_type' => true, // Overrides for (opinionated) @PhpCsFixer and @Symfony rules: From 628591b813094eb452b45f186f11d985ef444b71 Mon Sep 17 00:00:00 2001 From: Colin Viebrock Date: Thu, 2 Oct 2025 18:01:38 -0400 Subject: [PATCH 4/4] Run cs fixer against changed files --- Swat/SwatDataTreeNode.php | 4 ++-- SwatDB/SwatDB.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Swat/SwatDataTreeNode.php b/Swat/SwatDataTreeNode.php index fa35f774..d8249e9e 100644 --- a/Swat/SwatDataTreeNode.php +++ b/Swat/SwatDataTreeNode.php @@ -13,7 +13,7 @@ class SwatDataTreeNode extends SwatTreeNode * * The value is used for processing. It is either a string or an integer. */ - public null|int|string $value; + public int|string|null $value; /** * The title of this node. @@ -46,7 +46,7 @@ class SwatDataTreeNode extends SwatTreeNode * @param mixed $sensitive */ public function __construct( - null|int|string $value, + int|string|null $value, string $title, string $content_type = 'text/plain', bool $sensitive = true, diff --git a/SwatDB/SwatDB.php b/SwatDB/SwatDB.php index 5d1c774e..bf6df4b2 100644 --- a/SwatDB/SwatDB.php +++ b/SwatDB/SwatDB.php @@ -80,7 +80,7 @@ public static function connect($dsn) public static function query( MDB2_Driver_Common $db, string $sql, - null|string|SwatDBRecordsetWrapper $wrapper = SwatDBDefaultRecordsetWrapper::class, + string|SwatDBRecordsetWrapper|null $wrapper = SwatDBDefaultRecordsetWrapper::class, ?array $types = null, ): MDB2_Result_Common|SwatDBRecordsetWrapper { $mdb2_types = $types === null ? true : $types;