From f6d552ab096fab333bc496eab61b60fbf1adb6f5 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 9 Jan 2025 13:37:01 +0100 Subject: [PATCH] Update the composer dependencies --- .../files/lib/system/api/composer.json | 4 +- .../files/lib/system/api/composer.lock | 33 +++++++++-------- .../system/api/composer/InstalledVersions.php | 11 ++++-- .../lib/system/api/composer/installed.json | 37 ++++++++++--------- .../lib/system/api/composer/installed.php | 18 ++++----- .../lib/system/api/cuyz/valinor/composer.json | 8 ++-- .../ApiAndInternalAnnotationCheck.php | 2 +- .../ArgumentsMapperPHPStanExtension.php | 18 ++++----- .../Extension/TreeMapperPHPStanExtension.php | 18 ++++----- .../valinor/qa/Psalm/ValinorPsalmPlugin.php | 2 +- .../Cache/Compiler/AttributesCompiler.php | 36 ++++++++++-------- .../ReflectionAttributesRepository.php | 2 +- .../ReflectionMethodDefinitionBuilder.php | 1 - .../ClassImportedTypeAliasResolver.php | 2 +- .../ClassLocalTypeAliasResolver.php | 2 +- .../api/cuyz/valinor/src/Library/Settings.php | 2 +- .../valinor/src/Mapper/ArgumentsMapper.php | 2 - .../Object/DateTimeFormatConstructor.php | 3 +- .../Factory/DateTimeObjectBuilderFactory.php | 2 +- .../Mapper/Object/FunctionObjectBuilder.php | 1 + .../Mapper/Source/Modifier/PathMapping.php | 2 +- .../Message/Formatter/MessageMapFormatter.php | 4 +- .../Formatter/TranslationMessageFormatter.php | 1 + .../Mapper/Tree/Message/MessageBuilder.php | 9 ++--- .../src/Mapper/Tree/Message/Messages.php | 5 ++- .../api/cuyz/valinor/src/Mapper/Tree/Node.php | 4 +- .../cuyz/valinor/src/Mapper/TreeMapper.php | 2 - .../src/Mapper/TypeArgumentsMapper.php | 1 - .../valinor/src/Mapper/TypeTreeMapper.php | 1 - .../api/cuyz/valinor/src/MapperBuilder.php | 17 +-------- .../Normalizer/Formatter/JsonFormatter.php | 3 ++ .../valinor/src/Normalizer/JsonNormalizer.php | 27 +++++++------- .../Transformer/KeyTransformersHandler.php | 1 + .../Transformer/ValueTransformersHandler.php | 1 + .../src/Type/Parser/Lexer/Annotations.php | 4 +- .../src/Type/Parser/Lexer/TokenStream.php | 1 - .../api/laminas/laminas-progressbar/README.md | 17 +++------ .../laminas/laminas-progressbar/composer.json | 1 + 38 files changed, 143 insertions(+), 162 deletions(-) diff --git a/wcfsetup/install/files/lib/system/api/composer.json b/wcfsetup/install/files/lib/system/api/composer.json index 09716bc72f..6ddedcf74f 100644 --- a/wcfsetup/install/files/lib/system/api/composer.json +++ b/wcfsetup/install/files/lib/system/api/composer.json @@ -10,7 +10,7 @@ } }, "require": { - "cuyz/valinor": "^1.14.1", + "cuyz/valinor": "^1.14.2", "dragonmantank/cron-expression": "^3.4.0", "erusev/parsedown": "^1.7.4", "ezyang/htmlpurifier": "^4.18", @@ -18,7 +18,7 @@ "guzzlehttp/psr7": "^2.7.0", "laminas/laminas-diactoros": "^3.5.0", "laminas/laminas-httphandlerrunner": "^2.11.0", - "laminas/laminas-progressbar": "^2.14", + "laminas/laminas-progressbar": "^2.14.1", "minishlink/web-push": "^v9.0.1", "nikic/fast-route": "2.0.0-beta1", "paragonie/constant_time_encoding": "^3.0", diff --git a/wcfsetup/install/files/lib/system/api/composer.lock b/wcfsetup/install/files/lib/system/api/composer.lock index d4febfe5a4..d283196873 100644 --- a/wcfsetup/install/files/lib/system/api/composer.lock +++ b/wcfsetup/install/files/lib/system/api/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": "c6d3e68e563d4b2ddb31505fc2d3b478", + "content-hash": "e28f08e0dd80e8d2c529f7e098d220ba", "packages": [ { "name": "brick/math", @@ -68,16 +68,16 @@ }, { "name": "cuyz/valinor", - "version": "1.14.1", + "version": "1.14.2", "source": { "type": "git", "url": "https://github.com/CuyZ/Valinor.git", - "reference": "12033fccdcc6afa7e73b3e234e4d6656530f2bcb" + "reference": "1881c77d555b00c2f969dfbbc2c7dbd939ae97ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CuyZ/Valinor/zipball/12033fccdcc6afa7e73b3e234e4d6656530f2bcb", - "reference": "12033fccdcc6afa7e73b3e234e4d6656530f2bcb", + "url": "https://api.github.com/repos/CuyZ/Valinor/zipball/1881c77d555b00c2f969dfbbc2c7dbd939ae97ea", + "reference": "1881c77d555b00c2f969dfbbc2c7dbd939ae97ea", "shasum": "" }, "require": { @@ -90,11 +90,11 @@ "infection/infection": "^0.27", "marcocesarato/php-conventional-changelog": "^1.12", "mikey179/vfsstream": "^1.6.10", - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^10.5", - "rector/rector": "^1.0", + "rector/rector": "^2.0", "vimeo/psalm": "^5.0" }, "type": "library", @@ -129,7 +129,7 @@ ], "support": { "issues": "https://github.com/CuyZ/Valinor/issues", - "source": "https://github.com/CuyZ/Valinor/tree/1.14.1" + "source": "https://github.com/CuyZ/Valinor/tree/1.14.2" }, "funding": [ { @@ -137,7 +137,7 @@ "type": "github" } ], - "time": "2024-11-06T07:46:46+00:00" + "time": "2025-01-09T09:48:05+00:00" }, { "name": "dragonmantank/cron-expression", @@ -797,16 +797,16 @@ }, { "name": "laminas/laminas-progressbar", - "version": "2.14.0", + "version": "2.14.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-progressbar.git", - "reference": "cb87f8d9a252e9944a4a924b3a7ce1c6687c7007" + "reference": "f5180549455495dc10f4a5f34bfeef2013b141a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-progressbar/zipball/cb87f8d9a252e9944a4a924b3a7ce1c6687c7007", - "reference": "cb87f8d9a252e9944a4a924b3a7ce1c6687c7007", + "url": "https://api.github.com/repos/laminas/laminas-progressbar/zipball/f5180549455495dc10f4a5f34bfeef2013b141a4", + "reference": "f5180549455495dc10f4a5f34bfeef2013b141a4", "shasum": "" }, "require": { @@ -854,7 +854,8 @@ "type": "community_bridge" } ], - "time": "2024-10-11T10:58:38+00:00" + "abandoned": true, + "time": "2024-12-05T16:32:56+00:00" }, { "name": "laminas/laminas-stdlib", diff --git a/wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php b/wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php index 51e734a774..07b32ed6ef 100644 --- a/wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php +++ b/wcfsetup/install/files/lib/system/api/composer/InstalledVersions.php @@ -322,6 +322,7 @@ class InstalledVersions } $installed = array(); + $copiedLocalDir = false; if (self::$canGetVendors) { foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { @@ -330,9 +331,11 @@ class InstalledVersions } elseif (is_file($vendorDir.'/composer/installed.php')) { /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ $required = require $vendorDir.'/composer/installed.php'; - $installed[] = self::$installedByVendor[$vendorDir] = $required; - if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { - self::$installed = $installed[count($installed) - 1]; + self::$installedByVendor[$vendorDir] = $required; + $installed[] = $required; + if (strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { + self::$installed = $required; + $copiedLocalDir = true; } } } @@ -350,7 +353,7 @@ class InstalledVersions } } - if (self::$installed !== array()) { + if (self::$installed !== array() && !$copiedLocalDir) { $installed[] = self::$installed; } diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.json b/wcfsetup/install/files/lib/system/api/composer/installed.json index 3e00c77fa1..0ab45fc931 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.json +++ b/wcfsetup/install/files/lib/system/api/composer/installed.json @@ -65,17 +65,17 @@ }, { "name": "cuyz/valinor", - "version": "1.14.1", - "version_normalized": "1.14.1.0", + "version": "1.14.2", + "version_normalized": "1.14.2.0", "source": { "type": "git", "url": "https://github.com/CuyZ/Valinor.git", - "reference": "12033fccdcc6afa7e73b3e234e4d6656530f2bcb" + "reference": "1881c77d555b00c2f969dfbbc2c7dbd939ae97ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CuyZ/Valinor/zipball/12033fccdcc6afa7e73b3e234e4d6656530f2bcb", - "reference": "12033fccdcc6afa7e73b3e234e4d6656530f2bcb", + "url": "https://api.github.com/repos/CuyZ/Valinor/zipball/1881c77d555b00c2f969dfbbc2c7dbd939ae97ea", + "reference": "1881c77d555b00c2f969dfbbc2c7dbd939ae97ea", "shasum": "" }, "require": { @@ -88,14 +88,14 @@ "infection/infection": "^0.27", "marcocesarato/php-conventional-changelog": "^1.12", "mikey179/vfsstream": "^1.6.10", - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-phpunit": "^1.0", - "phpstan/phpstan-strict-rules": "^1.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^10.5", - "rector/rector": "^1.0", + "rector/rector": "^2.0", "vimeo/psalm": "^5.0" }, - "time": "2024-11-06T07:46:46+00:00", + "time": "2025-01-09T09:48:05+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -129,7 +129,7 @@ ], "support": { "issues": "https://github.com/CuyZ/Valinor/issues", - "source": "https://github.com/CuyZ/Valinor/tree/1.14.1" + "source": "https://github.com/CuyZ/Valinor/tree/1.14.2" }, "funding": [ { @@ -821,17 +821,17 @@ }, { "name": "laminas/laminas-progressbar", - "version": "2.14.0", - "version_normalized": "2.14.0.0", + "version": "2.14.1", + "version_normalized": "2.14.1.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-progressbar.git", - "reference": "cb87f8d9a252e9944a4a924b3a7ce1c6687c7007" + "reference": "f5180549455495dc10f4a5f34bfeef2013b141a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-progressbar/zipball/cb87f8d9a252e9944a4a924b3a7ce1c6687c7007", - "reference": "cb87f8d9a252e9944a4a924b3a7ce1c6687c7007", + "url": "https://api.github.com/repos/laminas/laminas-progressbar/zipball/f5180549455495dc10f4a5f34bfeef2013b141a4", + "reference": "f5180549455495dc10f4a5f34bfeef2013b141a4", "shasum": "" }, "require": { @@ -849,7 +849,7 @@ "suggest": { "laminas/laminas-session": "To support progressbar persistent" }, - "time": "2024-10-11T10:58:38+00:00", + "time": "2024-12-05T16:32:56+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -881,6 +881,7 @@ "type": "community_bridge" } ], + "abandoned": true, "install-path": "../laminas/laminas-progressbar" }, { @@ -2847,6 +2848,6 @@ "install-path": "../willdurand/negotiation" } ], - "dev": false, + "dev": true, "dev-package-names": [] } diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.php b/wcfsetup/install/files/lib/system/api/composer/installed.php index 9be4a87826..8985adda91 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.php +++ b/wcfsetup/install/files/lib/system/api/composer/installed.php @@ -3,17 +3,17 @@ 'name' => '__root__', 'pretty_version' => '6.1.x-dev', 'version' => '6.1.9999999.9999999-dev', - 'reference' => 'd0f21942f2a92fa397acea1b42b2e552338c4f9a', + 'reference' => '7e305277c70cb69c4d566d99c44eef497f6614a1', 'type' => 'project', 'install_path' => __DIR__ . '/../', 'aliases' => array(), - 'dev' => false, + 'dev' => true, ), 'versions' => array( '__root__' => array( 'pretty_version' => '6.1.x-dev', 'version' => '6.1.9999999.9999999-dev', - 'reference' => 'd0f21942f2a92fa397acea1b42b2e552338c4f9a', + 'reference' => '7e305277c70cb69c4d566d99c44eef497f6614a1', 'type' => 'project', 'install_path' => __DIR__ . '/../', 'aliases' => array(), @@ -29,9 +29,9 @@ 'dev_requirement' => false, ), 'cuyz/valinor' => array( - 'pretty_version' => '1.14.1', - 'version' => '1.14.1.0', - 'reference' => '12033fccdcc6afa7e73b3e234e4d6656530f2bcb', + 'pretty_version' => '1.14.2', + 'version' => '1.14.2.0', + 'reference' => '1881c77d555b00c2f969dfbbc2c7dbd939ae97ea', 'type' => 'library', 'install_path' => __DIR__ . '/../cuyz/valinor', 'aliases' => array(), @@ -110,9 +110,9 @@ 'dev_requirement' => false, ), 'laminas/laminas-progressbar' => array( - 'pretty_version' => '2.14.0', - 'version' => '2.14.0.0', - 'reference' => 'cb87f8d9a252e9944a4a924b3a7ce1c6687c7007', + 'pretty_version' => '2.14.1', + 'version' => '2.14.1.0', + 'reference' => 'f5180549455495dc10f4a5f34bfeef2013b141a4', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-progressbar', 'aliases' => array(), diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/composer.json b/wcfsetup/install/files/lib/system/api/cuyz/valinor/composer.json index 3113cb2f61..f4181fe501 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/composer.json +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/composer.json @@ -22,14 +22,14 @@ "require-dev": { "phpunit/phpunit": "^10.5", "infection/infection": "^0.27", - "phpstan/phpstan": "^1.3", - "phpstan/phpstan-strict-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpstan/phpstan-phpunit": "^2.0", "friendsofphp/php-cs-fixer": "^3.4", "marcocesarato/php-conventional-changelog": "^1.12", "vimeo/psalm": "^5.0", "mikey179/vfsstream": "^1.6.10", - "rector/rector": "^1.0" + "rector/rector": "^2.0" }, "autoload": { "psr-4": { diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/PHPStan/Extension/ApiAndInternalAnnotationCheck.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/PHPStan/Extension/ApiAndInternalAnnotationCheck.php index 632cb4bc63..07d783a2c3 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/PHPStan/Extension/ApiAndInternalAnnotationCheck.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/PHPStan/Extension/ApiAndInternalAnnotationCheck.php @@ -47,7 +47,7 @@ final class ApiAndInternalAnnotationCheck implements Rule return [ RuleErrorBuilder::message( 'Missing annotation `@api` or `@internal`.' - )->build(), + )->identifier('valinor.api_or_internal_annotation')->build(), ]; } diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/PHPStan/Extension/ArgumentsMapperPHPStanExtension.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/PHPStan/Extension/ArgumentsMapperPHPStanExtension.php index bfb6db151d..1c028fb568 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/PHPStan/Extension/ArgumentsMapperPHPStanExtension.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/PHPStan/Extension/ArgumentsMapperPHPStanExtension.php @@ -8,8 +8,6 @@ use CuyZ\Valinor\Mapper\ArgumentsMapper; use PhpParser\Node\Expr\MethodCall; use PHPStan\Analyser\Scope; use PHPStan\Reflection\MethodReflection; -use PHPStan\Type\ClosureType; -use PHPStan\Type\Constant\ConstantArrayType; use PHPStan\Type\Constant\ConstantArrayTypeBuilder; use PHPStan\Type\Constant\ConstantStringType; use PHPStan\Type\DynamicMethodReturnTypeExtension; @@ -40,20 +38,18 @@ final class ArgumentsMapperPHPStanExtension implements DynamicMethodReturnTypeEx $type = $scope->getType($arguments[0]->value); - if ($type instanceof ClosureType) { - $parameters = $type->getParameters(); - } elseif ($type instanceof ConstantArrayType) { - $acceptors = $type->getCallableParametersAcceptors($scope); + if (! $type->isCallable()->yes()) { + return new MixedType(); + } - if (count($acceptors) !== 1) { - return new MixedType(); - } + $acceptors = $type->getCallableParametersAcceptors($scope); - $parameters = $acceptors[0]->getParameters(); - } else { + if (count($acceptors) !== 1) { return new MixedType(); } + $parameters = $acceptors[0]->getParameters(); + $builder = ConstantArrayTypeBuilder::createEmpty(); foreach ($parameters as $parameter) { diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/PHPStan/Extension/TreeMapperPHPStanExtension.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/PHPStan/Extension/TreeMapperPHPStanExtension.php index 2b2f73431b..2059a95145 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/PHPStan/Extension/TreeMapperPHPStanExtension.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/PHPStan/Extension/TreeMapperPHPStanExtension.php @@ -10,15 +10,13 @@ use PHPStan\Analyser\Scope; use PHPStan\PhpDoc\TypeStringResolver; use PHPStan\PhpDocParser\Parser\ParserException; use PHPStan\Reflection\MethodReflection; -use PHPStan\Type\ClassStringType; -use PHPStan\Type\Constant\ConstantStringType; use PHPStan\Type\DynamicMethodReturnTypeExtension; -use PHPStan\Type\Generic\GenericClassStringType; use PHPStan\Type\MixedType; -use PHPStan\Type\ObjectWithoutClassType; use PHPStan\Type\Type; use PHPStan\Type\UnionType; +use function implode; + final class TreeMapperPHPStanExtension implements DynamicMethodReturnTypeExtension { public function __construct(private TypeStringResolver $resolver) {} @@ -60,16 +58,14 @@ final class TreeMapperPHPStanExtension implements DynamicMethodReturnTypeExtensi private function type(Type $type): Type { - if ($type instanceof GenericClassStringType) { - return $type->getGenericType(); + if ($type->isClassString()->yes()) { + return $type->getClassStringObjectType(); } - if ($type instanceof ConstantStringType) { - return $this->resolver->resolve($type->getValue()); - } + if ($type->isConstantValue()->yes()) { + $value = implode('', $type->getConstantScalarValues()); - if ($type instanceof ClassStringType) { - return new ObjectWithoutClassType(); + return $this->resolver->resolve($value); } return new MixedType(); diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/Psalm/ValinorPsalmPlugin.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/Psalm/ValinorPsalmPlugin.php index 3eb2b1ceed..48cf225c59 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/Psalm/ValinorPsalmPlugin.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/qa/Psalm/ValinorPsalmPlugin.php @@ -10,7 +10,7 @@ use SimpleXMLElement; class ValinorPsalmPlugin implements PluginEntryPointInterface { - public function __invoke(RegistrationInterface $api, SimpleXMLElement $config = null): void + public function __invoke(RegistrationInterface $api, ?SimpleXMLElement $config = null): void { require_once __DIR__ . '/Plugin/TreeMapperPsalmPlugin.php'; require_once __DIR__ . '/Plugin/ArgumentsMapperPsalmPlugin.php'; diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Cache/Compiler/AttributesCompiler.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Cache/Compiler/AttributesCompiler.php index 990c262036..9a7b44988c 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Cache/Compiler/AttributesCompiler.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Cache/Compiler/AttributesCompiler.php @@ -6,6 +6,7 @@ namespace CuyZ\Valinor\Definition\Repository\Cache\Compiler; use CuyZ\Valinor\Definition\Attributes; +use function array_map; use function count; use function implode; use function is_array; @@ -36,7 +37,15 @@ final class AttributesCompiler foreach ($attributes as $attribute) { $class = $this->classDefinitionCompiler->compile($attribute->class); - $arguments = $this->compileAttributeArguments($attribute->arguments); + + if ($attribute->arguments === []) { + $arguments = ''; + } else { + $arguments = implode(', ', array_map( + fn (mixed $argument) => $this->compileAttributeArguments($argument), + $attribute->arguments, + )); + } $attributesListCode[] = << $arguments - */ - private function compileAttributeArguments(array $arguments): string + private function compileAttributeArguments(mixed $value): string { - if (count($arguments) === 0) { - return ''; + if (is_object($value)) { + return 'unserialize(' . var_export(serialize($value), true) . ')'; } - $argumentsCode = []; + if (is_array($value)) { + $parts = []; - foreach ($arguments as $argument) { - if (is_object($argument)) { - $argumentsCode[] = 'unserialize(' . var_export(serialize($argument), true) . ')'; - } elseif (is_array($argument)) { - $argumentsCode[] = '[' . $this->compileAttributeArguments($argument) . ']'; - } else { - $argumentsCode[] = var_export($argument, true); + foreach ($value as $key => $subValue) { + $parts[] = var_export($key, true) . ' => ' . $this->compileAttributeArguments($subValue); } + + return '[' . implode(', ', $parts) . ']'; } - return implode(', ', $argumentsCode); + return var_export($value, true); } } diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/ReflectionAttributesRepository.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/ReflectionAttributesRepository.php index 883d68f1f8..a56d6d59ef 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/ReflectionAttributesRepository.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/ReflectionAttributesRepository.php @@ -46,7 +46,7 @@ final class ReflectionAttributesRepository implements AttributesRepository return array_values(array_map( fn (ReflectionAttribute $attribute) => new AttributeDefinition( $this->classDefinitionRepository->for(new NativeClassType($attribute->getName())), - $attribute->getArguments(), + array_values($attribute->getArguments()), ), $attributes, )); diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/ReflectionMethodDefinitionBuilder.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/ReflectionMethodDefinitionBuilder.php index 4749c708cb..ea4b5664e2 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/ReflectionMethodDefinitionBuilder.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/ReflectionMethodDefinitionBuilder.php @@ -31,7 +31,6 @@ final class ReflectionMethodDefinitionBuilder public function for(ReflectionMethod $reflection, ReflectionTypeResolver $typeResolver): MethodDefinition { - /** @var non-empty-string $name */ $name = $reflection->name; $signature = $reflection->getDeclaringClass()->name . '::' . $reflection->name . '()'; diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/TypeResolver/ClassImportedTypeAliasResolver.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/TypeResolver/ClassImportedTypeAliasResolver.php index 84ae421204..91de88c340 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/TypeResolver/ClassImportedTypeAliasResolver.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/TypeResolver/ClassImportedTypeAliasResolver.php @@ -94,9 +94,9 @@ final class ClassImportedTypeAliasResolver next($tokens); - /** @var int|null $key / Somehow PHPStan does not properly infer the key */ $key = key($tokens); + // @phpstan-ignore identical.alwaysFalse (Somehow PHPStan does not properly infer the key) if ($key === null) { continue; } diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/TypeResolver/ClassLocalTypeAliasResolver.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/TypeResolver/ClassLocalTypeAliasResolver.php index dd57537f73..973d0ef437 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/TypeResolver/ClassLocalTypeAliasResolver.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Definition/Repository/Reflection/TypeResolver/ClassLocalTypeAliasResolver.php @@ -76,9 +76,9 @@ final class ClassLocalTypeAliasResolver next($tokens); } - /** @var int|null $key / Somehow PHPStan does not properly infer the key */ $key = key($tokens); + // @phpstan-ignore notIdentical.alwaysTrue (Somehow PHPStan does not properly infer the key) if ($key !== null) { $aliases[$name] = $annotation->allAfter($key); } diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Library/Settings.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Library/Settings.php index 028556c26a..3196ff8d71 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Library/Settings.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Library/Settings.php @@ -41,7 +41,7 @@ final class Settings /** @var CacheInterface */ public CacheInterface $cache; - /** @var non-empty-array */ + /** @var non-empty-list */ public array $supportedDateFormats = self::DEFAULT_SUPPORTED_DATETIME_FORMATS; public bool $enableFlexibleCasting = false; diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/ArgumentsMapper.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/ArgumentsMapper.php index e12011bb38..8e1bde6f7d 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/ArgumentsMapper.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/ArgumentsMapper.php @@ -8,8 +8,6 @@ namespace CuyZ\Valinor\Mapper; interface ArgumentsMapper { /** - * @pure - * * @return array * * @throws MappingError diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Object/DateTimeFormatConstructor.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Object/DateTimeFormatConstructor.php index a9df7758ac..d0026792af 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Object/DateTimeFormatConstructor.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Object/DateTimeFormatConstructor.php @@ -30,10 +30,11 @@ use DateTimeInterface; */ final class DateTimeFormatConstructor { - /** @var non-empty-array */ + /** @var non-empty-list */ private array $formats; /** + * @no-named-arguments * @param non-empty-string $format * @param non-empty-string ...$formats */ diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Object/Factory/DateTimeObjectBuilderFactory.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Object/Factory/DateTimeObjectBuilderFactory.php index 8626928689..7ab26dcae1 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Object/Factory/DateTimeObjectBuilderFactory.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Object/Factory/DateTimeObjectBuilderFactory.php @@ -24,7 +24,7 @@ final class DateTimeObjectBuilderFactory implements ObjectBuilderFactory { public function __construct( private ObjectBuilderFactory $delegate, - /** @var non-empty-array */ + /** @var non-empty-list */ private array $supportedDateFormats, private FunctionDefinitionRepository $functionDefinitionRepository ) {} diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Object/FunctionObjectBuilder.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Object/FunctionObjectBuilder.php index db1cc19dae..1d36058e48 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Object/FunctionObjectBuilder.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Object/FunctionObjectBuilder.php @@ -60,6 +60,7 @@ final class FunctionObjectBuilder implements ObjectBuilder $arguments = new MethodArguments($parameters, $arguments); try { + /** @var object */ return ($this->function->callback)(...$arguments); } catch (Exception $exception) { throw UserlandError::from($exception); diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Source/Modifier/PathMapping.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Source/Modifier/PathMapping.php index 71eb36d962..7a694ae7d0 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Source/Modifier/PathMapping.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Source/Modifier/PathMapping.php @@ -17,7 +17,7 @@ use function is_array; */ final class PathMapping implements IteratorAggregate { - /** @var array */ + /** @var array */ private array $source; /** diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/Formatter/MessageMapFormatter.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/Formatter/MessageMapFormatter.php index 9ca30d56dd..4495a10c6b 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/Formatter/MessageMapFormatter.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/Formatter/MessageMapFormatter.php @@ -6,7 +6,7 @@ namespace CuyZ\Valinor\Mapper\Tree\Message\Formatter; use CuyZ\Valinor\Mapper\Tree\Message\NodeMessage; -use function is_callable; +use function is_string; /** * Can be used to customize the content of messages added during a mapping. @@ -74,7 +74,7 @@ final class MessageMapFormatter implements MessageFormatter $target = $this->target($message); if ($target) { - return $message->withBody(is_callable($target) ? $target($message) : $target); + return $message->withBody(is_string($target) ? $target : $target($message)); } return $message; diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/Formatter/TranslationMessageFormatter.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/Formatter/TranslationMessageFormatter.php index 2ad3ca934f..060ff641aa 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/Formatter/TranslationMessageFormatter.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/Formatter/TranslationMessageFormatter.php @@ -69,6 +69,7 @@ final class TranslationMessageFormatter implements MessageFormatter public function withTranslations(array $translations): self { $clone = clone $this; + // @phpstan-ignore assign.propertyType (PHPStan does not properly infer the return type of the function) $clone->translations = array_replace_recursive($this->translations, $translations); return $clone; diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/MessageBuilder.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/MessageBuilder.php index 943e1ed26d..e668aede69 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/MessageBuilder.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/MessageBuilder.php @@ -46,16 +46,13 @@ final class MessageBuilder */ public static function newError(string $body): self { + /** @var self $instance */ $instance = new self($body); $instance->isError = true; - /** @var self */ return $instance; } - /** - * @psalm-pure - */ public static function from(Throwable $error): ErrorMessage { if ($error instanceof ErrorMessage) { @@ -119,8 +116,6 @@ final class MessageBuilder } /** - * @psalm-pure - * * @return MessageType&HasCode&HasParameters */ public function build(): Message&HasCode&HasParameters @@ -175,11 +170,13 @@ final class MessageBuilder public function body(): string { + /** @var string */ return $this->message; } public function code(): string { + /** @var string */ return $this->code; } diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/Messages.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/Messages.php index 05766eee7a..33fa2addff 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/Messages.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Message/Messages.php @@ -12,6 +12,7 @@ use Iterator; use IteratorAggregate; use function array_filter; +use function array_values; use function count; /** @@ -89,7 +90,9 @@ final class Messages implements IteratorAggregate, Countable public function errors(): self { $clone = clone $this; - $clone->messages = array_filter($clone->messages, fn (NodeMessage $message) => $message->isError()); + $clone->messages = array_values( + array_filter($clone->messages, fn (NodeMessage $message) => $message->isError()) + ); return $clone; } diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Node.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Node.php index fc76666cba..d66c081866 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Node.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/Tree/Node.php @@ -28,7 +28,7 @@ final class Node private bool $isValid = true; - /** @var array */ + /** @var list */ private array $messages = []; /** @var array */ @@ -119,7 +119,7 @@ final class Node } /** - * @return array + * @return list */ public function messages(): array { diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/TreeMapper.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/TreeMapper.php index 8da4425484..503de2d4dd 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/TreeMapper.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/TreeMapper.php @@ -8,8 +8,6 @@ namespace CuyZ\Valinor\Mapper; interface TreeMapper { /** - * @pure - * * @template T of object * * @param string|class-string $signature diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/TypeArgumentsMapper.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/TypeArgumentsMapper.php index 465ec6249b..d5b476467f 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/TypeArgumentsMapper.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/TypeArgumentsMapper.php @@ -24,7 +24,6 @@ final class TypeArgumentsMapper implements ArgumentsMapper private Settings $settings, ) {} - /** @pure */ public function mapArguments(callable $callable, mixed $source): array { $function = $this->functionDefinitionRepository->for($callable); diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/TypeTreeMapper.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/TypeTreeMapper.php index 6c0734ca90..eb997694f4 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/TypeTreeMapper.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Mapper/TypeTreeMapper.php @@ -23,7 +23,6 @@ final class TypeTreeMapper implements TreeMapper private Settings $settings, ) {} - /** @pure */ public function map(string $signature, mixed $source): mixed { $node = $this->node($signature, $source); diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/MapperBuilder.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/MapperBuilder.php index 48ffecc21a..9cc47e2ef4 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/MapperBuilder.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/MapperBuilder.php @@ -15,6 +15,7 @@ use Psr\SimpleCache\CacheInterface; use Throwable; use function array_unique; +use function array_values; use function is_callable; /** @api */ @@ -36,9 +37,6 @@ final class MapperBuilder * using the given source. These arguments can then be used to decide which * implementation should be used. * - * The callback *must* be pure, its output must be deterministic. - * @see https://en.wikipedia.org/wiki/Pure_function - * * Example: * * ```php @@ -57,7 +55,6 @@ final class MapperBuilder * ``` * * @param interface-string|class-string $name - * @psalm-param pure-callable $callback */ public function infer(string $name, callable $callback): self { @@ -86,9 +83,6 @@ final class MapperBuilder * needs to be handled as well, the name of the class must be given to this * method. * - * A constructor *must* be pure, its output must be deterministic. - * @see https://en.wikipedia.org/wiki/Pure_function - * * ```php * final class SomeClass * { @@ -200,7 +194,6 @@ final class MapperBuilder * ]); * ``` * - * @psalm-param pure-callable|class-string ...$constructors * @param callable|class-string ...$constructors */ public function registerConstructor(callable|string ...$constructors): self @@ -238,7 +231,7 @@ final class MapperBuilder public function supportDateFormats(string $format, string ...$formats): self { $clone = clone $this; - $clone->settings->supportedDateFormats = array_unique([$format, ...$formats]); + $clone->settings->supportedDateFormats = array_values(array_unique([$format, ...$formats])); return $clone; } @@ -298,7 +291,6 @@ final class MapperBuilder /** * @template T - * @psalm-param pure-callable(T): T $callback * @param callable(T): T $callback */ public function alter(callable $callback): self @@ -418,9 +410,6 @@ final class MapperBuilder * part of a query should never be allowed. Therefore, only an exhaustive * list of carefully chosen exceptions should be filtered. * - * The filter callback *must* be pure, its output must be deterministic. - * @see https://en.wikipedia.org/wiki/Pure_function - * * ```php * final class SomeClass * { @@ -446,7 +435,6 @@ final class MapperBuilder * ]); * ``` * - * @psalm-param pure-callable(Throwable): ErrorMessage $filter * @param callable(Throwable): ErrorMessage $filter */ public function filterExceptions(callable $filter): self @@ -514,7 +502,6 @@ final class MapperBuilder * ->normalize('Hello world'); // HELLO WORLD?! * ``` * - * @psalm-param pure-callable|class-string $transformer * @param callable|class-string $transformer */ public function registerTransformer(callable|string $transformer, int $priority = 0): self diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/Formatter/JsonFormatter.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/Formatter/JsonFormatter.php index 33c591b1cf..6a543f141c 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/Formatter/JsonFormatter.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/Formatter/JsonFormatter.php @@ -9,6 +9,7 @@ use CuyZ\Valinor\Normalizer\Transformer\EmptyObject; use Generator; use function array_is_list; +use function assert; use function fwrite; use function is_array; use function is_bool; @@ -83,6 +84,8 @@ final class JsonFormatter implements StreamFormatter $isFirst = false; if (! $isList) { + assert(is_scalar($key)); + $key = json_encode((string)$key, $this->jsonEncodingOptions); $chunk .= $key . ':'; diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/JsonNormalizer.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/JsonNormalizer.php index 2525bd240e..a7280242a8 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/JsonNormalizer.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/JsonNormalizer.php @@ -36,19 +36,19 @@ use const JSON_UNESCAPED_UNICODE; final class JsonNormalizer implements Normalizer { private const ACCEPTABLE_JSON_OPTIONS = JSON_FORCE_OBJECT - | JSON_HEX_QUOT - | JSON_HEX_TAG - | JSON_HEX_AMP - | JSON_HEX_APOS - | JSON_INVALID_UTF8_IGNORE - | JSON_INVALID_UTF8_SUBSTITUTE - | JSON_NUMERIC_CHECK - | JSON_PRETTY_PRINT - | JSON_PRESERVE_ZERO_FRACTION - | JSON_UNESCAPED_LINE_TERMINATORS - | JSON_UNESCAPED_SLASHES - | JSON_UNESCAPED_UNICODE - | JSON_THROW_ON_ERROR; + | JSON_HEX_QUOT + | JSON_HEX_TAG + | JSON_HEX_AMP + | JSON_HEX_APOS + | JSON_INVALID_UTF8_IGNORE + | JSON_INVALID_UTF8_SUBSTITUTE + | JSON_NUMERIC_CHECK + | JSON_PRETTY_PRINT + | JSON_PRESERVE_ZERO_FRACTION + | JSON_UNESCAPED_LINE_TERMINATORS + | JSON_UNESCAPED_SLASHES + | JSON_UNESCAPED_UNICODE + | JSON_THROW_ON_ERROR; private RecursiveTransformer $transformer; @@ -152,7 +152,6 @@ final class JsonNormalizer implements Normalizer public function streamTo(mixed $resource): StreamNormalizer { // This check is there to help people that do not use static analyzers. - // @phpstan-ignore-next-line if (! is_resource($resource)) { throw new RuntimeException('Expected a valid resource, got ' . get_debug_type($resource)); } diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/Transformer/KeyTransformersHandler.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/Transformer/KeyTransformersHandler.php index 8f86c89f03..9fcd87adac 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/Transformer/KeyTransformersHandler.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/Transformer/KeyTransformersHandler.php @@ -35,6 +35,7 @@ final class KeyTransformersHandler } } + /** @var array-key */ return $key; } diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/Transformer/ValueTransformersHandler.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/Transformer/ValueTransformersHandler.php index ef42b56c38..2b218271e0 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/Transformer/ValueTransformersHandler.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Normalizer/Transformer/ValueTransformersHandler.php @@ -33,6 +33,7 @@ final class ValueTransformersHandler */ public function transform(mixed $value, array $attributes, array $transformers, callable $defaultTransformer): mixed { + /** @var array|scalar|null */ return call_user_func( $this->next($transformers, $value, $attributes, $defaultTransformer), ); diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Type/Parser/Lexer/Annotations.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Type/Parser/Lexer/Annotations.php index 8cc7fa659c..ca1b1d700c 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Type/Parser/Lexer/Annotations.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Type/Parser/Lexer/Annotations.php @@ -90,8 +90,8 @@ final class Annotations } /** - * @param array $array - * @return array + * @param list $array + * @return list */ private function trimArrayTips(array $array): array { diff --git a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Type/Parser/Lexer/TokenStream.php b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Type/Parser/Lexer/TokenStream.php index 1199b3ef04..eb53a734e0 100644 --- a/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Type/Parser/Lexer/TokenStream.php +++ b/wcfsetup/install/files/lib/system/api/cuyz/valinor/src/Type/Parser/Lexer/TokenStream.php @@ -50,7 +50,6 @@ final class TokenStream return $type; } - /** @phpstan-impure */ public function next(): Token { return $this->tokens[$this->peek + 1]; diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/README.md b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/README.md index a6971ae371..d164ec8fde 100644 --- a/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/README.md +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/README.md @@ -1,5 +1,10 @@ # laminas-progressbar +> [!CAUTION] +> This package is **abandoned** and will receive no further development. +> +> See the Technical Steering Committee [meeting minutes](https://github.com/laminas/technical-steering-committee/blob/main/meetings/minutes/2024-11-04-TSC-Minutes.md#archive--abandon-various-legacy-libraries). + > ## 🇷🇺 Русским гражданам > > Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм. @@ -16,12 +21,6 @@ > > You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!" -> This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only). -> If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/). -> If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D) - -[![Build Status](https://github.com/laminas/laminas-progressbar/workflows/Continuous%20Integration/badge.svg)](https://github.com/laminas/laminas-progressbar/actions?query=workflow%3A"Continuous+Integration") - laminas-progressbar is a component to create and update progress bars in different environments. It consists of a single backend, which outputs the progress through one of the multiple adapters. On every update, it takes an absolute value and @@ -39,9 +38,3 @@ $ composer require laminas/laminas-progressbar ## Documentation Browse the documentation online at https://docs.laminas.dev/laminas-progressbar/ - -## Support - -- [Issues](https://github.com/laminas/laminas-progressbar/issues/) -- [Chat](https://laminas.dev/chat/) -- [Forum](https://discourse.laminas.dev/) diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/composer.json b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/composer.json index 35a00367d1..9bfa5fdd96 100644 --- a/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/composer.json +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/composer.json @@ -15,6 +15,7 @@ "chat": "https://laminas.dev/chat", "forum": "https://discourse.laminas.dev" }, + "abandoned": true, "config": { "sort-packages": true, "platform": { -- 2.20.1