Upgrade phpstan to v2

This commit is contained in:
crazywhalecc 2026-02-03 11:22:32 +08:00
parent c536fedff7
commit 103b5b3585
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
9 changed files with 162 additions and 159 deletions

View File

@ -25,7 +25,7 @@
"captainhook/hook-installer": "^1.0", "captainhook/hook-installer": "^1.0",
"friendsofphp/php-cs-fixer": "^3.60", "friendsofphp/php-cs-fixer": "^3.60",
"humbug/box": "^4.5.0 || ^4.6.0", "humbug/box": "^4.5.0 || ^4.6.0",
"phpstan/phpstan": "^1.10", "phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^10.3 || ^9.5" "phpunit/phpunit": "^10.3 || ^9.5"
}, },
"autoload": { "autoload": {

299
composer.lock generated
View File

@ -4,20 +4,20 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "edb3243ddaa8b05d8f6545266a146e93", "content-hash": "f30595c9c60e55083112410cd1ffb203",
"packages": [ "packages": [
{ {
"name": "laravel/prompts", "name": "laravel/prompts",
"version": "v0.3.8", "version": "v0.3.11",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/prompts.git", "url": "https://github.com/laravel/prompts.git",
"reference": "096748cdfb81988f60090bbb839ce3205ace0d35" "reference": "dd2a2ed95acacbcccd32fd98dee4c946ae7a7217"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/prompts/zipball/096748cdfb81988f60090bbb839ce3205ace0d35", "url": "https://api.github.com/repos/laravel/prompts/zipball/dd2a2ed95acacbcccd32fd98dee4c946ae7a7217",
"reference": "096748cdfb81988f60090bbb839ce3205ace0d35", "reference": "dd2a2ed95acacbcccd32fd98dee4c946ae7a7217",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -61,22 +61,22 @@
"description": "Add beautiful and user-friendly forms to your command-line applications.", "description": "Add beautiful and user-friendly forms to your command-line applications.",
"support": { "support": {
"issues": "https://github.com/laravel/prompts/issues", "issues": "https://github.com/laravel/prompts/issues",
"source": "https://github.com/laravel/prompts/tree/v0.3.8" "source": "https://github.com/laravel/prompts/tree/v0.3.11"
}, },
"time": "2025-11-21T20:52:52+00:00" "time": "2026-01-27T02:55:06+00:00"
}, },
{ {
"name": "laravel/serializable-closure", "name": "laravel/serializable-closure",
"version": "v2.0.7", "version": "v2.0.8",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/serializable-closure.git", "url": "https://github.com/laravel/serializable-closure.git",
"reference": "cb291e4c998ac50637c7eeb58189c14f5de5b9dd" "reference": "7581a4407012f5f53365e11bafc520fd7f36bc9b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/cb291e4c998ac50637c7eeb58189c14f5de5b9dd", "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/7581a4407012f5f53365e11bafc520fd7f36bc9b",
"reference": "cb291e4c998ac50637c7eeb58189c14f5de5b9dd", "reference": "7581a4407012f5f53365e11bafc520fd7f36bc9b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -124,7 +124,7 @@
"issues": "https://github.com/laravel/serializable-closure/issues", "issues": "https://github.com/laravel/serializable-closure/issues",
"source": "https://github.com/laravel/serializable-closure" "source": "https://github.com/laravel/serializable-closure"
}, },
"time": "2025-11-21T20:52:36+00:00" "time": "2026-01-08T16:22:46+00:00"
}, },
{ {
"name": "nette/php-generator", "name": "nette/php-generator",
@ -200,16 +200,16 @@
}, },
{ {
"name": "nette/utils", "name": "nette/utils",
"version": "v4.1.0", "version": "v4.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nette/utils.git", "url": "https://github.com/nette/utils.git",
"reference": "fa1f0b8261ed150447979eb22e373b7b7ad5a8e0" "reference": "c99059c0315591f1a0db7ad6002000288ab8dc72"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nette/utils/zipball/fa1f0b8261ed150447979eb22e373b7b7ad5a8e0", "url": "https://api.github.com/repos/nette/utils/zipball/c99059c0315591f1a0db7ad6002000288ab8dc72",
"reference": "fa1f0b8261ed150447979eb22e373b7b7ad5a8e0", "reference": "c99059c0315591f1a0db7ad6002000288ab8dc72",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -283,9 +283,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/nette/utils/issues", "issues": "https://github.com/nette/utils/issues",
"source": "https://github.com/nette/utils/tree/v4.1.0" "source": "https://github.com/nette/utils/tree/v4.1.1"
}, },
"time": "2025-12-01T17:49:23+00:00" "time": "2025-12-22T12:14:32+00:00"
}, },
{ {
"name": "php-di/invoker", "name": "php-di/invoker",
@ -520,16 +520,16 @@
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v7.4.0", "version": "v7.4.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "0bc0f45254b99c58d45a8fbf9fb955d46cbd1bb8" "reference": "41e38717ac1dd7a46b6bda7d6a82af2d98a78894"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/0bc0f45254b99c58d45a8fbf9fb955d46cbd1bb8", "url": "https://api.github.com/repos/symfony/console/zipball/41e38717ac1dd7a46b6bda7d6a82af2d98a78894",
"reference": "0bc0f45254b99c58d45a8fbf9fb955d46cbd1bb8", "reference": "41e38717ac1dd7a46b6bda7d6a82af2d98a78894",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -594,7 +594,7 @@
"terminal" "terminal"
], ],
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v7.4.0" "source": "https://github.com/symfony/console/tree/v7.4.4"
}, },
"funding": [ "funding": [
{ {
@ -614,7 +614,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-11-27T13:27:24+00:00" "time": "2026-01-13T11:36:38+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
@ -1020,16 +1020,16 @@
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v7.4.0", "version": "v7.4.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "7ca8dc2d0dcf4882658313aba8be5d9fd01026c8" "reference": "608476f4604102976d687c483ac63a79ba18cc97"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/7ca8dc2d0dcf4882658313aba8be5d9fd01026c8", "url": "https://api.github.com/repos/symfony/process/zipball/608476f4604102976d687c483ac63a79ba18cc97",
"reference": "7ca8dc2d0dcf4882658313aba8be5d9fd01026c8", "reference": "608476f4604102976d687c483ac63a79ba18cc97",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1061,7 +1061,7 @@
"description": "Executes commands in sub-processes", "description": "Executes commands in sub-processes",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/process/tree/v7.4.0" "source": "https://github.com/symfony/process/tree/v7.4.5"
}, },
"funding": [ "funding": [
{ {
@ -1081,7 +1081,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-10-16T11:21:06+00:00" "time": "2026-01-26T15:07:59+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
@ -1172,16 +1172,16 @@
}, },
{ {
"name": "symfony/string", "name": "symfony/string",
"version": "v8.0.0", "version": "v8.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/string.git", "url": "https://github.com/symfony/string.git",
"reference": "f929eccf09531078c243df72398560e32fa4cf4f" "reference": "758b372d6882506821ed666032e43020c4f57194"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/f929eccf09531078c243df72398560e32fa4cf4f", "url": "https://api.github.com/repos/symfony/string/zipball/758b372d6882506821ed666032e43020c4f57194",
"reference": "f929eccf09531078c243df72398560e32fa4cf4f", "reference": "758b372d6882506821ed666032e43020c4f57194",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1238,7 +1238,7 @@
"utf8" "utf8"
], ],
"support": { "support": {
"source": "https://github.com/symfony/string/tree/v8.0.0" "source": "https://github.com/symfony/string/tree/v8.0.4"
}, },
"funding": [ "funding": [
{ {
@ -1258,20 +1258,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-09-11T14:37:55+00:00" "time": "2026-01-12T12:37:40+00:00"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v7.4.0", "version": "v7.4.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/yaml.git", "url": "https://github.com/symfony/yaml.git",
"reference": "6c84a4b55aee4cd02034d1c528e83f69ddf63810" "reference": "24dd4de28d2e3988b311751ac49e684d783e2345"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/6c84a4b55aee4cd02034d1c528e83f69ddf63810", "url": "https://api.github.com/repos/symfony/yaml/zipball/24dd4de28d2e3988b311751ac49e684d783e2345",
"reference": "6c84a4b55aee4cd02034d1c528e83f69ddf63810", "reference": "24dd4de28d2e3988b311751ac49e684d783e2345",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1314,7 +1314,7 @@
"description": "Loads and dumps YAML files", "description": "Loads and dumps YAML files",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/yaml/tree/v7.4.0" "source": "https://github.com/symfony/yaml/tree/v7.4.1"
}, },
"funding": [ "funding": [
{ {
@ -1334,7 +1334,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-11-16T10:14:42+00:00" "time": "2025-12-04T18:11:45+00:00"
}, },
{ {
"name": "zhamao/logger", "name": "zhamao/logger",
@ -1719,16 +1719,16 @@
}, },
{ {
"name": "amphp/parallel", "name": "amphp/parallel",
"version": "v2.3.2", "version": "v2.3.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/amphp/parallel.git", "url": "https://github.com/amphp/parallel.git",
"reference": "321b45ae771d9c33a068186b24117e3cd1c48dce" "reference": "296b521137a54d3a02425b464e5aee4c93db2c60"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/amphp/parallel/zipball/321b45ae771d9c33a068186b24117e3cd1c48dce", "url": "https://api.github.com/repos/amphp/parallel/zipball/296b521137a54d3a02425b464e5aee4c93db2c60",
"reference": "321b45ae771d9c33a068186b24117e3cd1c48dce", "reference": "296b521137a54d3a02425b464e5aee4c93db2c60",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1791,7 +1791,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/amphp/parallel/issues", "issues": "https://github.com/amphp/parallel/issues",
"source": "https://github.com/amphp/parallel/tree/v2.3.2" "source": "https://github.com/amphp/parallel/tree/v2.3.3"
}, },
"funding": [ "funding": [
{ {
@ -1799,7 +1799,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-08-27T21:55:40+00:00" "time": "2025-11-15T06:23:42+00:00"
}, },
{ {
"name": "amphp/parser", "name": "amphp/parser",
@ -2217,7 +2217,7 @@
}, },
{ {
"name": "captainhook/captainhook-phar", "name": "captainhook/captainhook-phar",
"version": "5.27.3", "version": "5.27.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/captainhook-git/captainhook-phar.git", "url": "https://github.com/captainhook-git/captainhook-phar.git",
@ -2271,7 +2271,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/captainhook-git/captainhook/issues", "issues": "https://github.com/captainhook-git/captainhook/issues",
"source": "https://github.com/captainhook-git/captainhook-phar/tree/5.27.3" "source": "https://github.com/captainhook-git/captainhook-phar/tree/5.27.5"
}, },
"funding": [ "funding": [
{ {
@ -2968,16 +2968,16 @@
}, },
{ {
"name": "friendsofphp/php-cs-fixer", "name": "friendsofphp/php-cs-fixer",
"version": "v3.91.0", "version": "v3.93.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "c4a25f20390337789c26b693ae46faa125040352" "reference": "b3546ab487c0762c39f308dc1ec0ea2c461fc21a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/c4a25f20390337789c26b693ae46faa125040352", "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/b3546ab487c0762c39f308dc1ec0ea2c461fc21a",
"reference": "c4a25f20390337789c26b693ae46faa125040352", "reference": "b3546ab487c0762c39f308dc1ec0ea2c461fc21a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3009,16 +3009,17 @@
}, },
"require-dev": { "require-dev": {
"facile-it/paraunit": "^1.3.1 || ^2.7", "facile-it/paraunit": "^1.3.1 || ^2.7",
"infection/infection": "^0.31.0", "infection/infection": "^0.32",
"justinrainbow/json-schema": "^6.5", "justinrainbow/json-schema": "^6.6",
"keradus/cli-executor": "^2.2", "keradus/cli-executor": "^2.3",
"mikey179/vfsstream": "^1.6.12", "mikey179/vfsstream": "^1.6.12",
"php-coveralls/php-coveralls": "^2.9", "php-coveralls/php-coveralls": "^2.9",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.6",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.6",
"phpunit/phpunit": "^9.6.25 || ^10.5.53 || ^11.5.34", "phpunit/phpunit": "^9.6.31 || ^10.5.60 || ^11.5.48",
"symfony/var-dumper": "^5.4.48 || ^6.4.24 || ^7.3.2 || ^8.0", "symfony/polyfill-php85": "^1.33",
"symfony/yaml": "^5.4.45 || ^6.4.24 || ^7.3.2 || ^8.0" "symfony/var-dumper": "^5.4.48 || ^6.4.26 || ^7.4.0 || ^8.0",
"symfony/yaml": "^5.4.45 || ^6.4.30 || ^7.4.1 || ^8.0"
}, },
"suggest": { "suggest": {
"ext-dom": "For handling output formats in XML", "ext-dom": "For handling output formats in XML",
@ -3033,7 +3034,7 @@
"PhpCsFixer\\": "src/" "PhpCsFixer\\": "src/"
}, },
"exclude-from-classmap": [ "exclude-from-classmap": [
"src/Fixer/Internal/*" "src/**/Internal/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
@ -3059,7 +3060,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.91.0" "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.93.1"
}, },
"funding": [ "funding": [
{ {
@ -3067,7 +3068,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-11-28T22:07:42+00:00" "time": "2026-01-28T23:50:50+00:00"
}, },
{ {
"name": "humbug/box", "name": "humbug/box",
@ -3316,21 +3317,21 @@
}, },
{ {
"name": "justinrainbow/json-schema", "name": "justinrainbow/json-schema",
"version": "6.6.2", "version": "6.6.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/jsonrainbow/json-schema.git", "url": "https://github.com/jsonrainbow/json-schema.git",
"reference": "3c25fe750c1599716ef26aa997f7c026cee8c4b7" "reference": "2eeb75d21cf73211335888e7f5e6fd7440723ec7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/3c25fe750c1599716ef26aa997f7c026cee8c4b7", "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/2eeb75d21cf73211335888e7f5e6fd7440723ec7",
"reference": "3c25fe750c1599716ef26aa997f7c026cee8c4b7", "reference": "2eeb75d21cf73211335888e7f5e6fd7440723ec7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"marc-mabe/php-enum": "^4.0", "marc-mabe/php-enum": "^4.4",
"php": "^7.2 || ^8.0" "php": "^7.2 || ^8.0"
}, },
"require-dev": { "require-dev": {
@ -3385,9 +3386,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/jsonrainbow/json-schema/issues", "issues": "https://github.com/jsonrainbow/json-schema/issues",
"source": "https://github.com/jsonrainbow/json-schema/tree/6.6.2" "source": "https://github.com/jsonrainbow/json-schema/tree/6.6.4"
}, },
"time": "2025-11-28T15:24:03+00:00" "time": "2025-12-19T15:01:32+00:00"
}, },
{ {
"name": "kelunik/certificate", "name": "kelunik/certificate",
@ -3449,20 +3450,20 @@
}, },
{ {
"name": "league/uri", "name": "league/uri",
"version": "7.6.0", "version": "7.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/uri.git", "url": "https://github.com/thephpleague/uri.git",
"reference": "f625804987a0a9112d954f9209d91fec52182344" "reference": "4436c6ec8d458e4244448b069cc572d088230b76"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/uri/zipball/f625804987a0a9112d954f9209d91fec52182344", "url": "https://api.github.com/repos/thephpleague/uri/zipball/4436c6ec8d458e4244448b069cc572d088230b76",
"reference": "f625804987a0a9112d954f9209d91fec52182344", "reference": "4436c6ec8d458e4244448b069cc572d088230b76",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"league/uri-interfaces": "^7.6", "league/uri-interfaces": "^7.8",
"php": "^8.1", "php": "^8.1",
"psr/http-factory": "^1" "psr/http-factory": "^1"
}, },
@ -3476,11 +3477,11 @@
"ext-gmp": "to improve IPV4 host parsing", "ext-gmp": "to improve IPV4 host parsing",
"ext-intl": "to handle IDN host with the best performance", "ext-intl": "to handle IDN host with the best performance",
"ext-uri": "to use the PHP native URI class", "ext-uri": "to use the PHP native URI class",
"jeremykendall/php-domain-parser": "to resolve Public Suffix and Top Level Domain", "jeremykendall/php-domain-parser": "to further parse the URI host and resolve its Public Suffix and Top Level Domain",
"league/uri-components": "Needed to easily manipulate URI objects components", "league/uri-components": "to provide additional tools to manipulate URI objects components",
"league/uri-polyfill": "Needed to backport the PHP URI extension for older versions of PHP", "league/uri-polyfill": "to backport the PHP URI extension for older versions of PHP",
"php-64bit": "to improve IPV4 host parsing", "php-64bit": "to improve IPV4 host parsing",
"rowbot/url": "to handle WHATWG URL", "rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification",
"symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present"
}, },
"type": "library", "type": "library",
@ -3535,7 +3536,7 @@
"docs": "https://uri.thephpleague.com", "docs": "https://uri.thephpleague.com",
"forum": "https://thephpleague.slack.com", "forum": "https://thephpleague.slack.com",
"issues": "https://github.com/thephpleague/uri-src/issues", "issues": "https://github.com/thephpleague/uri-src/issues",
"source": "https://github.com/thephpleague/uri/tree/7.6.0" "source": "https://github.com/thephpleague/uri/tree/7.8.0"
}, },
"funding": [ "funding": [
{ {
@ -3543,20 +3544,20 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-11-18T12:17:23+00:00" "time": "2026-01-14T17:24:56+00:00"
}, },
{ {
"name": "league/uri-interfaces", "name": "league/uri-interfaces",
"version": "7.6.0", "version": "7.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/thephpleague/uri-interfaces.git", "url": "https://github.com/thephpleague/uri-interfaces.git",
"reference": "ccbfb51c0445298e7e0b7f4481b942f589665368" "reference": "c5c5cd056110fc8afaba29fa6b72a43ced42acd4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/ccbfb51c0445298e7e0b7f4481b942f589665368", "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/c5c5cd056110fc8afaba29fa6b72a43ced42acd4",
"reference": "ccbfb51c0445298e7e0b7f4481b942f589665368", "reference": "c5c5cd056110fc8afaba29fa6b72a43ced42acd4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3569,7 +3570,7 @@
"ext-gmp": "to improve IPV4 host parsing", "ext-gmp": "to improve IPV4 host parsing",
"ext-intl": "to handle IDN host with the best performance", "ext-intl": "to handle IDN host with the best performance",
"php-64bit": "to improve IPV4 host parsing", "php-64bit": "to improve IPV4 host parsing",
"rowbot/url": "to handle WHATWG URL", "rowbot/url": "to handle URLs using the WHATWG URL Living Standard specification",
"symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present" "symfony/polyfill-intl-idn": "to handle IDN host via the Symfony polyfill if ext-intl is not present"
}, },
"type": "library", "type": "library",
@ -3619,7 +3620,7 @@
"docs": "https://uri.thephpleague.com", "docs": "https://uri.thephpleague.com",
"forum": "https://thephpleague.slack.com", "forum": "https://thephpleague.slack.com",
"issues": "https://github.com/thephpleague/uri-src/issues", "issues": "https://github.com/thephpleague/uri-src/issues",
"source": "https://github.com/thephpleague/uri-interfaces/tree/7.6.0" "source": "https://github.com/thephpleague/uri-interfaces/tree/7.8.0"
}, },
"funding": [ "funding": [
{ {
@ -3627,7 +3628,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-11-18T12:17:23+00:00" "time": "2026-01-15T06:54:53+00:00"
}, },
{ {
"name": "marc-mabe/php-enum", "name": "marc-mabe/php-enum",
@ -3816,16 +3817,16 @@
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
"version": "v5.6.2", "version": "v5.7.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nikic/PHP-Parser.git", "url": "https://github.com/nikic/PHP-Parser.git",
"reference": "3a454ca033b9e06b63282ce19562e892747449bb" "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/3a454ca033b9e06b63282ce19562e892747449bb", "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82",
"reference": "3a454ca033b9e06b63282ce19562e892747449bb", "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -3868,9 +3869,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/nikic/PHP-Parser/issues", "issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v5.6.2" "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0"
}, },
"time": "2025-10-21T19:32:17+00:00" "time": "2025-12-06T11:56:16+00:00"
}, },
{ {
"name": "phar-io/composer-distributor", "name": "phar-io/composer-distributor",
@ -4259,16 +4260,16 @@
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
"version": "5.6.5", "version": "5.6.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
"reference": "90614c73d3800e187615e2dd236ad0e2a01bf761" "reference": "5cee1d3dfc2d2aa6599834520911d246f656bcb8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/90614c73d3800e187615e2dd236ad0e2a01bf761", "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/5cee1d3dfc2d2aa6599834520911d246f656bcb8",
"reference": "90614c73d3800e187615e2dd236ad0e2a01bf761", "reference": "5cee1d3dfc2d2aa6599834520911d246f656bcb8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4278,7 +4279,7 @@
"phpdocumentor/reflection-common": "^2.2", "phpdocumentor/reflection-common": "^2.2",
"phpdocumentor/type-resolver": "^1.7", "phpdocumentor/type-resolver": "^1.7",
"phpstan/phpdoc-parser": "^1.7|^2.0", "phpstan/phpdoc-parser": "^1.7|^2.0",
"webmozart/assert": "^1.9.1" "webmozart/assert": "^1.9.1 || ^2"
}, },
"require-dev": { "require-dev": {
"mockery/mockery": "~1.3.5 || ~1.6.0", "mockery/mockery": "~1.3.5 || ~1.6.0",
@ -4317,9 +4318,9 @@
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"support": { "support": {
"issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues",
"source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.5" "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.6"
}, },
"time": "2025-11-27T19:50:05+00:00" "time": "2025-12-22T21:13:58+00:00"
}, },
{ {
"name": "phpdocumentor/type-resolver", "name": "phpdocumentor/type-resolver",
@ -4381,16 +4382,16 @@
}, },
{ {
"name": "phpstan/phpdoc-parser", "name": "phpstan/phpdoc-parser",
"version": "2.3.0", "version": "2.3.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git", "url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "1e0cd5370df5dd2e556a36b9c62f62e555870495" "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/1e0cd5370df5dd2e556a36b9c62f62e555870495", "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a004701b11273a26cd7955a61d67a7f1e525a45a",
"reference": "1e0cd5370df5dd2e556a36b9c62f62e555870495", "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4422,21 +4423,21 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types", "description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": { "support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues", "issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.0" "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.2"
}, },
"time": "2025-08-30T15:50:23+00:00" "time": "2026-01-25T14:56:51+00:00"
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "1.12.32", "version": "2.1.38",
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/2770dcdf5078d0b0d53f94317e06affe88419aa8", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dfaf1f530e1663aa167bc3e52197adb221582629",
"reference": "2770dcdf5078d0b0d53f94317e06affe88419aa8", "reference": "dfaf1f530e1663aa167bc3e52197adb221582629",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.2|^8.0" "php": "^7.4|^8.0"
}, },
"conflict": { "conflict": {
"phpstan/phpstan-shim": "*" "phpstan/phpstan-shim": "*"
@ -4477,7 +4478,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-09-30T10:16:31+00:00" "time": "2026-01-30T17:12:46+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
@ -4802,16 +4803,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "10.5.58", "version": "10.5.63",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "e24fb46da450d8e6a5788670513c1af1424f16ca" "reference": "33198268dad71e926626b618f3ec3966661e4d90"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e24fb46da450d8e6a5788670513c1af1424f16ca", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/33198268dad71e926626b618f3ec3966661e4d90",
"reference": "e24fb46da450d8e6a5788670513c1af1424f16ca", "reference": "33198268dad71e926626b618f3ec3966661e4d90",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -4832,7 +4833,7 @@
"phpunit/php-timer": "^6.0.0", "phpunit/php-timer": "^6.0.0",
"sebastian/cli-parser": "^2.0.1", "sebastian/cli-parser": "^2.0.1",
"sebastian/code-unit": "^2.0.0", "sebastian/code-unit": "^2.0.0",
"sebastian/comparator": "^5.0.4", "sebastian/comparator": "^5.0.5",
"sebastian/diff": "^5.1.1", "sebastian/diff": "^5.1.1",
"sebastian/environment": "^6.1.0", "sebastian/environment": "^6.1.0",
"sebastian/exporter": "^5.1.4", "sebastian/exporter": "^5.1.4",
@ -4883,7 +4884,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy", "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
"source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.58" "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.63"
}, },
"funding": [ "funding": [
{ {
@ -4907,7 +4908,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-09-28T12:04:46+00:00" "time": "2026-01-27T05:48:37+00:00"
}, },
{ {
"name": "psr/event-dispatcher", "name": "psr/event-dispatcher",
@ -5141,16 +5142,16 @@
}, },
{ {
"name": "react/child-process", "name": "react/child-process",
"version": "v0.6.6", "version": "v0.6.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/reactphp/child-process.git", "url": "https://github.com/reactphp/child-process.git",
"reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159" "reference": "970f0e71945556422ee4570ccbabaedc3cf04ad3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/reactphp/child-process/zipball/1721e2b93d89b745664353b9cfc8f155ba8a6159", "url": "https://api.github.com/repos/reactphp/child-process/zipball/970f0e71945556422ee4570ccbabaedc3cf04ad3",
"reference": "1721e2b93d89b745664353b9cfc8f155ba8a6159", "reference": "970f0e71945556422ee4570ccbabaedc3cf04ad3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5204,7 +5205,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/reactphp/child-process/issues", "issues": "https://github.com/reactphp/child-process/issues",
"source": "https://github.com/reactphp/child-process/tree/v0.6.6" "source": "https://github.com/reactphp/child-process/tree/v0.6.7"
}, },
"funding": [ "funding": [
{ {
@ -5212,7 +5213,7 @@
"type": "open_collective" "type": "open_collective"
} }
], ],
"time": "2025-01-01T16:37:48+00:00" "time": "2025-12-23T15:25:20+00:00"
}, },
{ {
"name": "react/dns", "name": "react/dns",
@ -5835,16 +5836,16 @@
}, },
{ {
"name": "sebastian/comparator", "name": "sebastian/comparator",
"version": "5.0.4", "version": "5.0.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git", "url": "https://github.com/sebastianbergmann/comparator.git",
"reference": "e8e53097718d2b53cfb2aa859b06a41abf58c62e" "reference": "55dfef806eb7dfeb6e7a6935601fef866f8ca48d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e8e53097718d2b53cfb2aa859b06a41abf58c62e", "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55dfef806eb7dfeb6e7a6935601fef866f8ca48d",
"reference": "e8e53097718d2b53cfb2aa859b06a41abf58c62e", "reference": "55dfef806eb7dfeb6e7a6935601fef866f8ca48d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5900,7 +5901,7 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues", "issues": "https://github.com/sebastianbergmann/comparator/issues",
"security": "https://github.com/sebastianbergmann/comparator/security/policy", "security": "https://github.com/sebastianbergmann/comparator/security/policy",
"source": "https://github.com/sebastianbergmann/comparator/tree/5.0.4" "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.5"
}, },
"funding": [ "funding": [
{ {
@ -5920,7 +5921,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-09-07T05:25:07+00:00" "time": "2026-01-24T09:25:16+00:00"
}, },
{ {
"name": "sebastian/complexity", "name": "sebastian/complexity",
@ -6732,16 +6733,16 @@
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v8.0.0", "version": "v8.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "573f95783a2ec6e38752979db139f09fec033f03" "reference": "99301401da182b6cfaa4700dbe9987bb75474b47"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/573f95783a2ec6e38752979db139f09fec033f03", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/99301401da182b6cfaa4700dbe9987bb75474b47",
"reference": "573f95783a2ec6e38752979db139f09fec033f03", "reference": "99301401da182b6cfaa4700dbe9987bb75474b47",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -6793,7 +6794,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v8.0.0" "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.4"
}, },
"funding": [ "funding": [
{ {
@ -6813,7 +6814,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-10-30T14:17:19+00:00" "time": "2026-01-05T11:45:55+00:00"
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
@ -6963,16 +6964,16 @@
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v7.4.0", "version": "v7.4.5",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "340b9ed7320570f319028a2cbec46d40535e94bd" "reference": "ad4daa7c38668dcb031e63bc99ea9bd42196a2cb"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/340b9ed7320570f319028a2cbec46d40535e94bd", "url": "https://api.github.com/repos/symfony/finder/zipball/ad4daa7c38668dcb031e63bc99ea9bd42196a2cb",
"reference": "340b9ed7320570f319028a2cbec46d40535e94bd", "reference": "ad4daa7c38668dcb031e63bc99ea9bd42196a2cb",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7007,7 +7008,7 @@
"description": "Finds files and directories via an intuitive fluent interface", "description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/finder/tree/v7.4.0" "source": "https://github.com/symfony/finder/tree/v7.4.5"
}, },
"funding": [ "funding": [
{ {
@ -7027,7 +7028,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-11-05T05:42:40+00:00" "time": "2026-01-26T15:07:59+00:00"
}, },
{ {
"name": "symfony/options-resolver", "name": "symfony/options-resolver",
@ -7332,16 +7333,16 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v7.4.0", "version": "v7.4.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "41fd6c4ae28c38b294b42af6db61446594a0dece" "reference": "0e4769b46a0c3c62390d124635ce59f66874b282"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/41fd6c4ae28c38b294b42af6db61446594a0dece", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0e4769b46a0c3c62390d124635ce59f66874b282",
"reference": "41fd6c4ae28c38b294b42af6db61446594a0dece", "reference": "0e4769b46a0c3c62390d124635ce59f66874b282",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7395,7 +7396,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v7.4.0" "source": "https://github.com/symfony/var-dumper/tree/v7.4.4"
}, },
"funding": [ "funding": [
{ {
@ -7415,7 +7416,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2025-10-27T20:36:44+00:00" "time": "2026-01-01T22:13:48+00:00"
}, },
{ {
"name": "thecodingmachine/safe", "name": "thecodingmachine/safe",

View File

@ -11,11 +11,13 @@ parameters:
- '#Function Swoole\\Coroutine\\run not found.#' - '#Function Swoole\\Coroutine\\run not found.#'
- '#Static call to instance method ZM\\Logger\\ConsoleColor#' - '#Static call to instance method ZM\\Logger\\ConsoleColor#'
- '#Constant GNU_ARCH not found#' - '#Constant GNU_ARCH not found#'
-
identifiers:
- 'if.alwaysFalse'
dynamicConstantNames: dynamicConstantNames:
- PHP_OS_FAMILY - PHP_OS_FAMILY
excludePaths: excludePaths:
analyseAndScan: analyseAndScan:
- ./src/globals/ext-tests/swoole.php - ./src/globals/ext-tests/
- ./src/globals/ext-tests/swoole.phpt
- ./src/globals/test-extensions.php - ./src/globals/test-extensions.php
- ./src/SPC/ - ./src/SPC/

View File

@ -241,7 +241,6 @@ class php extends TargetPackage
{ {
$arg = []; $arg = [];
foreach ($installer->getResolvedPackages() as $package) { foreach ($installer->getResolvedPackages() as $package) {
/** @var PhpExtensionPackage $package */
if ($package->getType() !== 'php-extension' || !$package instanceof PhpExtensionPackage) { if ($package->getType() !== 'php-extension' || !$package instanceof PhpExtensionPackage) {
continue; continue;
} }

View File

@ -312,7 +312,7 @@ class ArtifactDownloader
FileSystem::createDir(DOWNLOAD_PATH); FileSystem::createDir(DOWNLOAD_PATH);
} }
logger()->info('Downloading' . implode(', ', array_map(fn ($x) => " '{$x->getName()}'", $this->artifacts)) . " with concurrency {$this->parallel} ..."); logger()->info('Downloading' . implode(', ', array_map(fn ($x) => " '{$x->getName()}'", $this->artifacts)) . " with concurrency {$this->parallel} ...");
// Download artifacts parallely // Download artifacts parallelly
if ($this->parallel > 1) { if ($this->parallel > 1) {
$this->downloadWithConcurrency(); $this->downloadWithConcurrency();
} else { } else {

View File

@ -247,6 +247,7 @@ class ArtifactExtractor
$artifact->emitAfterBinaryExtract($target_path, $platform); $artifact->emitAfterBinaryExtract($target_path, $platform);
logger()->debug("Emitted after-binary-extract hooks for [{$name}]"); logger()->debug("Emitted after-binary-extract hooks for [{$name}]");
/* @phpstan-ignore-next-line */
if ($hash !== null && $cache_info['cache_type'] !== 'file') { if ($hash !== null && $cache_info['cache_type'] !== 'file') {
FileSystem::writeFile("{$target_path}/.spc-hash", $hash); FileSystem::writeFile("{$target_path}/.spc-hash", $hash);
} }

View File

@ -169,7 +169,7 @@ class PackageLoader
} }
} }
$pkg = self::$packages[$attribute_instance->name]; $pkg = self::$packages[$attribute_instance->name] ?? null;
// Use the package instance if it's a Package subclass, otherwise create a new instance // Use the package instance if it's a Package subclass, otherwise create a new instance
$instance_class = is_a($class_name, Package::class, true) ? $pkg : $refClass->newInstance(); $instance_class = is_a($class_name, Package::class, true) ? $pkg : $refClass->newInstance();
@ -184,7 +184,7 @@ class PackageLoader
if (!in_array($package_type, $pkg_type_attr, true)) { if (!in_array($package_type, $pkg_type_attr, true)) {
throw new RegistryException("Package [{$attribute_instance->name}] type mismatch: config type is [{$package_type}], but attribute type is [" . implode('|', $pkg_type_attr) . '].'); throw new RegistryException("Package [{$attribute_instance->name}] type mismatch: config type is [{$package_type}], but attribute type is [" . implode('|', $pkg_type_attr) . '].');
} }
if ($pkg !== null && !PackageConfig::isPackageExists($pkg->getName())) { if ($pkg instanceof Package && !PackageConfig::isPackageExists($pkg->getName())) {
throw new RegistryException("Package [{$pkg->getName()}] config not found for class {$class}"); throw new RegistryException("Package [{$pkg->getName()}] config not found for class {$class}");
} }
@ -355,7 +355,7 @@ class PackageLoader
$stage = $method_instance->stage; $stage = $method_instance->stage;
$stage = match (true) { $stage = match (true) {
is_string($stage) => $stage, is_string($stage) => $stage,
is_array($stage) && count($stage) === 2 => $stage[1], count($stage) === 2 => $stage[1],
default => throw new RegistryException('Invalid stage definition in BeforeStage attribute.'), default => throw new RegistryException('Invalid stage definition in BeforeStage attribute.'),
}; };
if ($method_instance->package_name === '' && $pkg === null) { if ($method_instance->package_name === '' && $pkg === null) {

View File

@ -75,7 +75,7 @@ class LicenseDumper
* *
* @param Artifact $artifact Artifact instance * @param Artifact $artifact Artifact instance
* @param string $target_dir Target directory * @param string $target_dir Target directory
* @param array<string, array> &$license_summary Summary data to populate * @param array &$license_summary Summary data to populate
* @return bool True if dumped * @return bool True if dumped
* @throws SPCInternalException * @throws SPCInternalException
*/ */

View File

@ -44,7 +44,7 @@ abstract class UnixUtil
continue; continue;
} }
$name = preg_replace('/@.*$/', '', $name); $name = preg_replace('/@.*$/', '', $name);
if ($name !== '' && $name !== false) { if (!empty($name)) {
$defined[] = $name; $defined[] = $name;
} }
} }