From: Tim Düsterhus Date: Thu, 12 Aug 2021 12:05:04 +0000 (+0200) Subject: Replace Zend/ProgressBar by laminas-progressbar X-Git-Tag: 5.5.0_Alpha_1~491^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ad1065a15177b7283a408878a31d55fd22ed4c7;p=GitHub%2FWoltLab%2FWCF.git Replace Zend/ProgressBar by laminas-progressbar This is a drop-in replacement for our use-case due to laminas-zendframework-bridge. --- diff --git a/com.woltlab.wcf/fileDelete.xml b/com.woltlab.wcf/fileDelete.xml index 11d8b3b924..b8b2d4ae43 100644 --- a/com.woltlab.wcf/fileDelete.xml +++ b/com.woltlab.wcf/fileDelete.xml @@ -1648,6 +1648,19 @@ lib/system/api/symfony/polyfill-php72/README.md lib/system/api/symfony/polyfill-php72/bootstrap.php lib/system/api/symfony/polyfill-php72/composer.json + lib/system/api/zend/ProgressBar/Adapter/AbstractAdapter.php + lib/system/api/zend/ProgressBar/Adapter/Console.php + lib/system/api/zend/ProgressBar/Adapter/Exception/ExceptionInterface.php + lib/system/api/zend/ProgressBar/Adapter/Exception/InvalidArgumentException.php + lib/system/api/zend/ProgressBar/Adapter/Exception/RuntimeException.php + lib/system/api/zend/ProgressBar/Adapter/JsPull.php + lib/system/api/zend/ProgressBar/Adapter/JsPush.php + lib/system/api/zend/ProgressBar/Exception/ExceptionInterface.php + lib/system/api/zend/ProgressBar/Exception/InvalidArgumentException.php + lib/system/api/zend/ProgressBar/Exception/OutOfRangeException.php + lib/system/api/zend/ProgressBar/Exception/RuntimeException.php + lib/system/api/zend/ProgressBar/ProgressBar.php + lib/system/api/zend/ProgressBar/composer.json lib/system/auth/UserAuth.class.php lib/system/auth/UserAuthEmail.class.php lib/system/background/job/DownloadRankImageJob.class.php diff --git a/wcfsetup/install/files/lib/system/api/composer.json b/wcfsetup/install/files/lib/system/api/composer.json index fc774967d0..83ce6ee51b 100644 --- a/wcfsetup/install/files/lib/system/api/composer.json +++ b/wcfsetup/install/files/lib/system/api/composer.json @@ -19,6 +19,7 @@ "guzzlehttp/guzzle": "^7.3.0", "paragonie/constant_time_encoding": "^2.3", "laminas/laminas-diactoros": "^2.4", - "laminas/laminas-httphandlerrunner": "^1.2" + "laminas/laminas-httphandlerrunner": "^1.2", + "laminas/laminas-progressbar": "^2.7" } } diff --git a/wcfsetup/install/files/lib/system/api/composer.lock b/wcfsetup/install/files/lib/system/api/composer.lock index d24293223c..39cb52b399 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": "b3aeea343e2f7ee79bb2d9a6b8a86799", + "content-hash": "f0cae9f94fb82f90b140ebbc23a4366d", "packages": [ { "name": "chrisjean/php-ico", @@ -567,6 +567,128 @@ ], "time": "2020-06-03T15:52:17+00:00" }, + { + "name": "laminas/laminas-progressbar", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-progressbar.git", + "reference": "15f9e983276462f30d7d38660dc7488c6e3df34b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-progressbar/zipball/15f9e983276462f30d7d38660dc7488c6e3df34b", + "reference": "15f9e983276462f30d7d38660dc7488c6e3df34b", + "shasum": "" + }, + "require": { + "laminas/laminas-stdlib": "^3.2.1", + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^5.6 || ^7.0" + }, + "replace": { + "zendframework/zend-progressbar": "self.version" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-json": "^2.6.1", + "laminas/laminas-session": "^2.8.5", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4" + }, + "suggest": { + "laminas/laminas-json": "Laminas\\Json component", + "laminas/laminas-session": "To support progressbar persistent" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7.x-dev", + "dev-develop": "2.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laminas\\ProgressBar\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Create and update progress bars in different environments", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "progressbar" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-progressbar/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-progressbar/issues", + "rss": "https://github.com/laminas/laminas-progressbar/releases.atom", + "source": "https://github.com/laminas/laminas-progressbar" + }, + "time": "2019-12-31T17:38:44+00:00" + }, + { + "name": "laminas/laminas-stdlib", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-stdlib.git", + "reference": "2b18347625a2f06a1a485acfbc870f699dbe51c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/2b18347625a2f06a1a485acfbc870f699dbe51c6", + "reference": "2b18347625a2f06a1a485acfbc870f699dbe51c6", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^5.6 || ^7.0" + }, + "replace": { + "zendframework/zend-stdlib": "self.version" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "phpbench/phpbench": "^0.13", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev", + "dev-develop": "3.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laminas\\Stdlib\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "SPL extensions, array utilities, error handlers, and more", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "stdlib" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-stdlib/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-stdlib/issues", + "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", + "source": "https://github.com/laminas/laminas-stdlib" + }, + "time": "2019-12-31T17:51:15+00:00" + }, { "name": "laminas/laminas-zendframework-bridge", "version": "1.1.1", diff --git a/wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php b/wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php index 78fba2bc61..f6c763f8df 100644 --- a/wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php +++ b/wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php @@ -376,6 +376,71 @@ return array( 'Laminas\\HttpHandlerRunner\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-httphandlerrunner/src/Exception/ExceptionInterface.php', 'Laminas\\HttpHandlerRunner\\Exception\\InvalidEmitterException' => $vendorDir . '/laminas/laminas-httphandlerrunner/src/Exception/InvalidEmitterException.php', 'Laminas\\HttpHandlerRunner\\RequestHandlerRunner' => $vendorDir . '/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php', + 'Laminas\\ProgressBar\\Adapter\\AbstractAdapter' => $vendorDir . '/laminas/laminas-progressbar/src/Adapter/AbstractAdapter.php', + 'Laminas\\ProgressBar\\Adapter\\Console' => $vendorDir . '/laminas/laminas-progressbar/src/Adapter/Console.php', + 'Laminas\\ProgressBar\\Adapter\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-progressbar/src/Adapter/Exception/ExceptionInterface.php', + 'Laminas\\ProgressBar\\Adapter\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-progressbar/src/Adapter/Exception/InvalidArgumentException.php', + 'Laminas\\ProgressBar\\Adapter\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-progressbar/src/Adapter/Exception/RuntimeException.php', + 'Laminas\\ProgressBar\\Adapter\\JsPull' => $vendorDir . '/laminas/laminas-progressbar/src/Adapter/JsPull.php', + 'Laminas\\ProgressBar\\Adapter\\JsPush' => $vendorDir . '/laminas/laminas-progressbar/src/Adapter/JsPush.php', + 'Laminas\\ProgressBar\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-progressbar/src/Exception/ExceptionInterface.php', + 'Laminas\\ProgressBar\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-progressbar/src/Exception/InvalidArgumentException.php', + 'Laminas\\ProgressBar\\Exception\\OutOfRangeException' => $vendorDir . '/laminas/laminas-progressbar/src/Exception/OutOfRangeException.php', + 'Laminas\\ProgressBar\\Exception\\PhpEnvironmentException' => $vendorDir . '/laminas/laminas-progressbar/src/Exception/PhpEnvironmentException.php', + 'Laminas\\ProgressBar\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-progressbar/src/Exception/RuntimeException.php', + 'Laminas\\ProgressBar\\ProgressBar' => $vendorDir . '/laminas/laminas-progressbar/src/ProgressBar.php', + 'Laminas\\ProgressBar\\Upload\\AbstractUploadHandler' => $vendorDir . '/laminas/laminas-progressbar/src/Upload/AbstractUploadHandler.php', + 'Laminas\\ProgressBar\\Upload\\ApcProgress' => $vendorDir . '/laminas/laminas-progressbar/src/Upload/ApcProgress.php', + 'Laminas\\ProgressBar\\Upload\\SessionProgress' => $vendorDir . '/laminas/laminas-progressbar/src/Upload/SessionProgress.php', + 'Laminas\\ProgressBar\\Upload\\UploadHandlerInterface' => $vendorDir . '/laminas/laminas-progressbar/src/Upload/UploadHandlerInterface.php', + 'Laminas\\ProgressBar\\Upload\\UploadProgress' => $vendorDir . '/laminas/laminas-progressbar/src/Upload/UploadProgress.php', + 'Laminas\\Stdlib\\AbstractOptions' => $vendorDir . '/laminas/laminas-stdlib/src/AbstractOptions.php', + 'Laminas\\Stdlib\\ArrayObject' => $vendorDir . '/laminas/laminas-stdlib/src/ArrayObject.php', + 'Laminas\\Stdlib\\ArraySerializableInterface' => $vendorDir . '/laminas/laminas-stdlib/src/ArraySerializableInterface.php', + 'Laminas\\Stdlib\\ArrayStack' => $vendorDir . '/laminas/laminas-stdlib/src/ArrayStack.php', + 'Laminas\\Stdlib\\ArrayUtils' => $vendorDir . '/laminas/laminas-stdlib/src/ArrayUtils.php', + 'Laminas\\Stdlib\\ArrayUtils\\MergeRemoveKey' => $vendorDir . '/laminas/laminas-stdlib/src/ArrayUtils/MergeRemoveKey.php', + 'Laminas\\Stdlib\\ArrayUtils\\MergeReplaceKey' => $vendorDir . '/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKey.php', + 'Laminas\\Stdlib\\ArrayUtils\\MergeReplaceKeyInterface' => $vendorDir . '/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKeyInterface.php', + 'Laminas\\Stdlib\\ConsoleHelper' => $vendorDir . '/laminas/laminas-stdlib/src/ConsoleHelper.php', + 'Laminas\\Stdlib\\DispatchableInterface' => $vendorDir . '/laminas/laminas-stdlib/src/DispatchableInterface.php', + 'Laminas\\Stdlib\\ErrorHandler' => $vendorDir . '/laminas/laminas-stdlib/src/ErrorHandler.php', + 'Laminas\\Stdlib\\Exception\\BadMethodCallException' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/BadMethodCallException.php', + 'Laminas\\Stdlib\\Exception\\DomainException' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/DomainException.php', + 'Laminas\\Stdlib\\Exception\\ExceptionInterface' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/ExceptionInterface.php', + 'Laminas\\Stdlib\\Exception\\ExtensionNotLoadedException' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/ExtensionNotLoadedException.php', + 'Laminas\\Stdlib\\Exception\\InvalidArgumentException' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/InvalidArgumentException.php', + 'Laminas\\Stdlib\\Exception\\LogicException' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/LogicException.php', + 'Laminas\\Stdlib\\Exception\\RuntimeException' => $vendorDir . '/laminas/laminas-stdlib/src/Exception/RuntimeException.php', + 'Laminas\\Stdlib\\FastPriorityQueue' => $vendorDir . '/laminas/laminas-stdlib/src/FastPriorityQueue.php', + 'Laminas\\Stdlib\\Glob' => $vendorDir . '/laminas/laminas-stdlib/src/Glob.php', + 'Laminas\\Stdlib\\Guard\\AllGuardsTrait' => $vendorDir . '/laminas/laminas-stdlib/src/Guard/AllGuardsTrait.php', + 'Laminas\\Stdlib\\Guard\\ArrayOrTraversableGuardTrait' => $vendorDir . '/laminas/laminas-stdlib/src/Guard/ArrayOrTraversableGuardTrait.php', + 'Laminas\\Stdlib\\Guard\\EmptyGuardTrait' => $vendorDir . '/laminas/laminas-stdlib/src/Guard/EmptyGuardTrait.php', + 'Laminas\\Stdlib\\Guard\\NullGuardTrait' => $vendorDir . '/laminas/laminas-stdlib/src/Guard/NullGuardTrait.php', + 'Laminas\\Stdlib\\InitializableInterface' => $vendorDir . '/laminas/laminas-stdlib/src/InitializableInterface.php', + 'Laminas\\Stdlib\\JsonSerializable' => $vendorDir . '/laminas/laminas-stdlib/src/JsonSerializable.php', + 'Laminas\\Stdlib\\Message' => $vendorDir . '/laminas/laminas-stdlib/src/Message.php', + 'Laminas\\Stdlib\\MessageInterface' => $vendorDir . '/laminas/laminas-stdlib/src/MessageInterface.php', + 'Laminas\\Stdlib\\ParameterObjectInterface' => $vendorDir . '/laminas/laminas-stdlib/src/ParameterObjectInterface.php', + 'Laminas\\Stdlib\\Parameters' => $vendorDir . '/laminas/laminas-stdlib/src/Parameters.php', + 'Laminas\\Stdlib\\ParametersInterface' => $vendorDir . '/laminas/laminas-stdlib/src/ParametersInterface.php', + 'Laminas\\Stdlib\\PriorityList' => $vendorDir . '/laminas/laminas-stdlib/src/PriorityList.php', + 'Laminas\\Stdlib\\PriorityQueue' => $vendorDir . '/laminas/laminas-stdlib/src/PriorityQueue.php', + 'Laminas\\Stdlib\\Request' => $vendorDir . '/laminas/laminas-stdlib/src/Request.php', + 'Laminas\\Stdlib\\RequestInterface' => $vendorDir . '/laminas/laminas-stdlib/src/RequestInterface.php', + 'Laminas\\Stdlib\\Response' => $vendorDir . '/laminas/laminas-stdlib/src/Response.php', + 'Laminas\\Stdlib\\ResponseInterface' => $vendorDir . '/laminas/laminas-stdlib/src/ResponseInterface.php', + 'Laminas\\Stdlib\\SplPriorityQueue' => $vendorDir . '/laminas/laminas-stdlib/src/SplPriorityQueue.php', + 'Laminas\\Stdlib\\SplQueue' => $vendorDir . '/laminas/laminas-stdlib/src/SplQueue.php', + 'Laminas\\Stdlib\\SplStack' => $vendorDir . '/laminas/laminas-stdlib/src/SplStack.php', + 'Laminas\\Stdlib\\StringUtils' => $vendorDir . '/laminas/laminas-stdlib/src/StringUtils.php', + 'Laminas\\Stdlib\\StringWrapper\\AbstractStringWrapper' => $vendorDir . '/laminas/laminas-stdlib/src/StringWrapper/AbstractStringWrapper.php', + 'Laminas\\Stdlib\\StringWrapper\\Iconv' => $vendorDir . '/laminas/laminas-stdlib/src/StringWrapper/Iconv.php', + 'Laminas\\Stdlib\\StringWrapper\\Intl' => $vendorDir . '/laminas/laminas-stdlib/src/StringWrapper/Intl.php', + 'Laminas\\Stdlib\\StringWrapper\\MbString' => $vendorDir . '/laminas/laminas-stdlib/src/StringWrapper/MbString.php', + 'Laminas\\Stdlib\\StringWrapper\\Native' => $vendorDir . '/laminas/laminas-stdlib/src/StringWrapper/Native.php', + 'Laminas\\Stdlib\\StringWrapper\\StringWrapperInterface' => $vendorDir . '/laminas/laminas-stdlib/src/StringWrapper/StringWrapperInterface.php', 'Laminas\\ZendFrameworkBridge\\Autoloader' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/Autoloader.php', 'Laminas\\ZendFrameworkBridge\\ConfigPostProcessor' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/ConfigPostProcessor.php', 'Laminas\\ZendFrameworkBridge\\Module' => $vendorDir . '/laminas/laminas-zendframework-bridge/src/Module.php', diff --git a/wcfsetup/install/files/lib/system/api/composer/autoload_psr4.php b/wcfsetup/install/files/lib/system/api/composer/autoload_psr4.php index 6af3227e6d..870c07a863 100644 --- a/wcfsetup/install/files/lib/system/api/composer/autoload_psr4.php +++ b/wcfsetup/install/files/lib/system/api/composer/autoload_psr4.php @@ -16,6 +16,8 @@ return array( 'Pelago\\Emogrifier\\' => array($vendorDir . '/pelago/emogrifier/src'), 'ParagonIE\\ConstantTime\\' => array($vendorDir . '/paragonie/constant_time_encoding/src'), 'Laminas\\ZendFrameworkBridge\\' => array($vendorDir . '/laminas/laminas-zendframework-bridge/src'), + 'Laminas\\Stdlib\\' => array($vendorDir . '/laminas/laminas-stdlib/src'), + 'Laminas\\ProgressBar\\' => array($vendorDir . '/laminas/laminas-progressbar/src'), 'Laminas\\HttpHandlerRunner\\' => array($vendorDir . '/laminas/laminas-httphandlerrunner/src'), 'Laminas\\Diactoros\\' => array($vendorDir . '/laminas/laminas-diactoros/src'), 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), diff --git a/wcfsetup/install/files/lib/system/api/composer/autoload_static.php b/wcfsetup/install/files/lib/system/api/composer/autoload_static.php index 021008b4de..9b0223e419 100644 --- a/wcfsetup/install/files/lib/system/api/composer/autoload_static.php +++ b/wcfsetup/install/files/lib/system/api/composer/autoload_static.php @@ -53,6 +53,8 @@ class ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d 'L' => array ( 'Laminas\\ZendFrameworkBridge\\' => 28, + 'Laminas\\Stdlib\\' => 15, + 'Laminas\\ProgressBar\\' => 20, 'Laminas\\HttpHandlerRunner\\' => 26, 'Laminas\\Diactoros\\' => 18, ), @@ -106,6 +108,14 @@ class ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d array ( 0 => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src', ), + 'Laminas\\Stdlib\\' => + array ( + 0 => __DIR__ . '/..' . '/laminas/laminas-stdlib/src', + ), + 'Laminas\\ProgressBar\\' => + array ( + 0 => __DIR__ . '/..' . '/laminas/laminas-progressbar/src', + ), 'Laminas\\HttpHandlerRunner\\' => array ( 0 => __DIR__ . '/..' . '/laminas/laminas-httphandlerrunner/src', @@ -523,6 +533,71 @@ class ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d 'Laminas\\HttpHandlerRunner\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-httphandlerrunner/src/Exception/ExceptionInterface.php', 'Laminas\\HttpHandlerRunner\\Exception\\InvalidEmitterException' => __DIR__ . '/..' . '/laminas/laminas-httphandlerrunner/src/Exception/InvalidEmitterException.php', 'Laminas\\HttpHandlerRunner\\RequestHandlerRunner' => __DIR__ . '/..' . '/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php', + 'Laminas\\ProgressBar\\Adapter\\AbstractAdapter' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Adapter/AbstractAdapter.php', + 'Laminas\\ProgressBar\\Adapter\\Console' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Adapter/Console.php', + 'Laminas\\ProgressBar\\Adapter\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Adapter/Exception/ExceptionInterface.php', + 'Laminas\\ProgressBar\\Adapter\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Adapter/Exception/InvalidArgumentException.php', + 'Laminas\\ProgressBar\\Adapter\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Adapter/Exception/RuntimeException.php', + 'Laminas\\ProgressBar\\Adapter\\JsPull' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Adapter/JsPull.php', + 'Laminas\\ProgressBar\\Adapter\\JsPush' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Adapter/JsPush.php', + 'Laminas\\ProgressBar\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Exception/ExceptionInterface.php', + 'Laminas\\ProgressBar\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Exception/InvalidArgumentException.php', + 'Laminas\\ProgressBar\\Exception\\OutOfRangeException' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Exception/OutOfRangeException.php', + 'Laminas\\ProgressBar\\Exception\\PhpEnvironmentException' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Exception/PhpEnvironmentException.php', + 'Laminas\\ProgressBar\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Exception/RuntimeException.php', + 'Laminas\\ProgressBar\\ProgressBar' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/ProgressBar.php', + 'Laminas\\ProgressBar\\Upload\\AbstractUploadHandler' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Upload/AbstractUploadHandler.php', + 'Laminas\\ProgressBar\\Upload\\ApcProgress' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Upload/ApcProgress.php', + 'Laminas\\ProgressBar\\Upload\\SessionProgress' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Upload/SessionProgress.php', + 'Laminas\\ProgressBar\\Upload\\UploadHandlerInterface' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Upload/UploadHandlerInterface.php', + 'Laminas\\ProgressBar\\Upload\\UploadProgress' => __DIR__ . '/..' . '/laminas/laminas-progressbar/src/Upload/UploadProgress.php', + 'Laminas\\Stdlib\\AbstractOptions' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/AbstractOptions.php', + 'Laminas\\Stdlib\\ArrayObject' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArrayObject.php', + 'Laminas\\Stdlib\\ArraySerializableInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArraySerializableInterface.php', + 'Laminas\\Stdlib\\ArrayStack' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArrayStack.php', + 'Laminas\\Stdlib\\ArrayUtils' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArrayUtils.php', + 'Laminas\\Stdlib\\ArrayUtils\\MergeRemoveKey' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArrayUtils/MergeRemoveKey.php', + 'Laminas\\Stdlib\\ArrayUtils\\MergeReplaceKey' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKey.php', + 'Laminas\\Stdlib\\ArrayUtils\\MergeReplaceKeyInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ArrayUtils/MergeReplaceKeyInterface.php', + 'Laminas\\Stdlib\\ConsoleHelper' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ConsoleHelper.php', + 'Laminas\\Stdlib\\DispatchableInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/DispatchableInterface.php', + 'Laminas\\Stdlib\\ErrorHandler' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ErrorHandler.php', + 'Laminas\\Stdlib\\Exception\\BadMethodCallException' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/BadMethodCallException.php', + 'Laminas\\Stdlib\\Exception\\DomainException' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/DomainException.php', + 'Laminas\\Stdlib\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/ExceptionInterface.php', + 'Laminas\\Stdlib\\Exception\\ExtensionNotLoadedException' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/ExtensionNotLoadedException.php', + 'Laminas\\Stdlib\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/InvalidArgumentException.php', + 'Laminas\\Stdlib\\Exception\\LogicException' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/LogicException.php', + 'Laminas\\Stdlib\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Exception/RuntimeException.php', + 'Laminas\\Stdlib\\FastPriorityQueue' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/FastPriorityQueue.php', + 'Laminas\\Stdlib\\Glob' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Glob.php', + 'Laminas\\Stdlib\\Guard\\AllGuardsTrait' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Guard/AllGuardsTrait.php', + 'Laminas\\Stdlib\\Guard\\ArrayOrTraversableGuardTrait' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Guard/ArrayOrTraversableGuardTrait.php', + 'Laminas\\Stdlib\\Guard\\EmptyGuardTrait' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Guard/EmptyGuardTrait.php', + 'Laminas\\Stdlib\\Guard\\NullGuardTrait' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Guard/NullGuardTrait.php', + 'Laminas\\Stdlib\\InitializableInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/InitializableInterface.php', + 'Laminas\\Stdlib\\JsonSerializable' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/JsonSerializable.php', + 'Laminas\\Stdlib\\Message' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Message.php', + 'Laminas\\Stdlib\\MessageInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/MessageInterface.php', + 'Laminas\\Stdlib\\ParameterObjectInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ParameterObjectInterface.php', + 'Laminas\\Stdlib\\Parameters' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Parameters.php', + 'Laminas\\Stdlib\\ParametersInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ParametersInterface.php', + 'Laminas\\Stdlib\\PriorityList' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/PriorityList.php', + 'Laminas\\Stdlib\\PriorityQueue' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/PriorityQueue.php', + 'Laminas\\Stdlib\\Request' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Request.php', + 'Laminas\\Stdlib\\RequestInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/RequestInterface.php', + 'Laminas\\Stdlib\\Response' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/Response.php', + 'Laminas\\Stdlib\\ResponseInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/ResponseInterface.php', + 'Laminas\\Stdlib\\SplPriorityQueue' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/SplPriorityQueue.php', + 'Laminas\\Stdlib\\SplQueue' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/SplQueue.php', + 'Laminas\\Stdlib\\SplStack' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/SplStack.php', + 'Laminas\\Stdlib\\StringUtils' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringUtils.php', + 'Laminas\\Stdlib\\StringWrapper\\AbstractStringWrapper' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringWrapper/AbstractStringWrapper.php', + 'Laminas\\Stdlib\\StringWrapper\\Iconv' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringWrapper/Iconv.php', + 'Laminas\\Stdlib\\StringWrapper\\Intl' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringWrapper/Intl.php', + 'Laminas\\Stdlib\\StringWrapper\\MbString' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringWrapper/MbString.php', + 'Laminas\\Stdlib\\StringWrapper\\Native' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringWrapper/Native.php', + 'Laminas\\Stdlib\\StringWrapper\\StringWrapperInterface' => __DIR__ . '/..' . '/laminas/laminas-stdlib/src/StringWrapper/StringWrapperInterface.php', 'Laminas\\ZendFrameworkBridge\\Autoloader' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/Autoloader.php', 'Laminas\\ZendFrameworkBridge\\ConfigPostProcessor' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/ConfigPostProcessor.php', 'Laminas\\ZendFrameworkBridge\\Module' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/Module.php', diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.json b/wcfsetup/install/files/lib/system/api/composer/installed.json index c57a665e41..cd82eb334b 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.json +++ b/wcfsetup/install/files/lib/system/api/composer/installed.json @@ -573,6 +573,134 @@ ], "install-path": "../laminas/laminas-httphandlerrunner" }, + { + "name": "laminas/laminas-progressbar", + "version": "2.7.0", + "version_normalized": "2.7.0.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-progressbar.git", + "reference": "15f9e983276462f30d7d38660dc7488c6e3df34b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-progressbar/zipball/15f9e983276462f30d7d38660dc7488c6e3df34b", + "reference": "15f9e983276462f30d7d38660dc7488c6e3df34b", + "shasum": "" + }, + "require": { + "laminas/laminas-stdlib": "^3.2.1", + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^5.6 || ^7.0" + }, + "replace": { + "zendframework/zend-progressbar": "self.version" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-json": "^2.6.1", + "laminas/laminas-session": "^2.8.5", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4" + }, + "suggest": { + "laminas/laminas-json": "Laminas\\Json component", + "laminas/laminas-session": "To support progressbar persistent" + }, + "time": "2019-12-31T17:38:44+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7.x-dev", + "dev-develop": "2.8.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Laminas\\ProgressBar\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Create and update progress bars in different environments", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "progressbar" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-progressbar/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-progressbar/issues", + "rss": "https://github.com/laminas/laminas-progressbar/releases.atom", + "source": "https://github.com/laminas/laminas-progressbar" + }, + "install-path": "../laminas/laminas-progressbar" + }, + { + "name": "laminas/laminas-stdlib", + "version": "3.2.1", + "version_normalized": "3.2.1.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-stdlib.git", + "reference": "2b18347625a2f06a1a485acfbc870f699dbe51c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/2b18347625a2f06a1a485acfbc870f699dbe51c6", + "reference": "2b18347625a2f06a1a485acfbc870f699dbe51c6", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^5.6 || ^7.0" + }, + "replace": { + "zendframework/zend-stdlib": "self.version" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "phpbench/phpbench": "^0.13", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2" + }, + "time": "2019-12-31T17:51:15+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev", + "dev-develop": "3.3.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Laminas\\Stdlib\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "SPL extensions, array utilities, error handlers, and more", + "homepage": "https://laminas.dev", + "keywords": [ + "laminas", + "stdlib" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-stdlib/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-stdlib/issues", + "rss": "https://github.com/laminas/laminas-stdlib/releases.atom", + "source": "https://github.com/laminas/laminas-stdlib" + }, + "install-path": "../laminas/laminas-stdlib" + }, { "name": "laminas/laminas-zendframework-bridge", "version": "1.1.1", diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.php b/wcfsetup/install/files/lib/system/api/composer/installed.php index dd62df17d9..5ef8dfbe90 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.php +++ b/wcfsetup/install/files/lib/system/api/composer/installed.php @@ -91,6 +91,24 @@ 'reference' => 'e1a5dad040e0043135e8095ee27d1fbf6fb640e1', 'dev_requirement' => false, ), + 'laminas/laminas-progressbar' => array( + 'pretty_version' => '2.7.0', + 'version' => '2.7.0.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../laminas/laminas-progressbar', + 'aliases' => array(), + 'reference' => '15f9e983276462f30d7d38660dc7488c6e3df34b', + 'dev_requirement' => false, + ), + 'laminas/laminas-stdlib' => array( + 'pretty_version' => '3.2.1', + 'version' => '3.2.1.0', + 'type' => 'library', + 'install_path' => __DIR__ . '/../laminas/laminas-stdlib', + 'aliases' => array(), + 'reference' => '2b18347625a2f06a1a485acfbc870f699dbe51c6', + 'dev_requirement' => false, + ), 'laminas/laminas-zendframework-bridge' => array( 'pretty_version' => '1.1.1', 'version' => '1.1.1.0', @@ -247,5 +265,17 @@ 0 => '^1.1.0', ), ), + 'zendframework/zend-progressbar' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => '2.7.0', + ), + ), + 'zendframework/zend-stdlib' => array( + 'dev_requirement' => false, + 'replaced' => array( + 0 => '3.2.1', + ), + ), ), ); diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/CHANGELOG.md b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/CHANGELOG.md new file mode 100644 index 0000000000..1ceedab840 --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/CHANGELOG.md @@ -0,0 +1,71 @@ +# Changelog + +All notable changes to this project will be documented in this file, in reverse chronological order by release. + +## 2.7.0 - 2019-10-17 + +### Added + +- [zendframework/zend-progressbar#27](https://github.com/zendframework/zend-progressbar/pull/27) adds support for PHP 7.3. + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- [zendframework/zend-progressbar#27](https://github.com/zendframework/zend-progressbar/pull/27) removes support for laminas-stdlib v2 releases. + +### Fixed + +- Nothing. + +## 2.6.0 - 2018-04-30 + +### Added + +- [zendframework/zend-progressbar#25](https://github.com/zendframework/zend-progressbar/pull/25) adds support for PHP 7.1 and 7.2. + +- [zendframework/zend-progressbar#17](https://github.com/zendframework/zend-progressbar/pull/17) adds and + publishes the documentation to https://docs.laminas.dev/laminas-progressbar/ + +### Changed + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- [zendframework/zend-progressbar#25](https://github.com/zendframework/zend-progressbar/pull/25) removes support for PHP 5.5. + +- [zendframework/zend-progressbar#25](https://github.com/zendframework/zend-progressbar/pull/25) removes support for HHVM. + +### Fixed + +- Nothing. + +## 2.5.2 - 2016-03-01 + +### Added + +- Nothing. + +### Deprecated + +- Nothing. + +### Removed + +- Nothing. + +### Fixed + +- [zendframework/zend-progressbar#10](https://github.com/zendframework/zend-progressbar/pull/10) updates + dependencies to allow forward-compatibility with laminas-stdlib 3. diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/COPYRIGHT.md b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/COPYRIGHT.md new file mode 100644 index 0000000000..c4fc4fee19 --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/COPYRIGHT.md @@ -0,0 +1,2 @@ +Copyright (c) 2019, Laminas Foundation. +All rights reserved. (https://getlaminas.org/) diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/LICENSE.md b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/LICENSE.md new file mode 100644 index 0000000000..09f53edc11 --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/LICENSE.md @@ -0,0 +1,27 @@ +Copyright (c) 2019, Laminas Foundation +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +- Neither the name of Laminas Foundation nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 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 new file mode 100644 index 0000000000..0c738cd964 --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/README.md @@ -0,0 +1,28 @@ +# laminas-progressbar + +[![Build Status](https://travis-ci.org/laminas/laminas-progressbar.svg?branch=master)](https://travis-ci.org/laminas/laminas-progressbar) +[![Coverage Status](https://coveralls.io/repos/github/laminas/laminas-progressbar/badge.svg?branch=master)](https://coveralls.io/github/laminas/laminas-progressbar?branch=master) + +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 +optionally a status message, and then calls the adapter with some precalculated +values like percentage and estimated time left. + +## Installation + +Run the following to install this library: + +```bash +$ 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 new file mode 100644 index 0000000000..af2cd2930f --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/composer.json @@ -0,0 +1,65 @@ +{ + "name": "laminas/laminas-progressbar", + "description": "Create and update progress bars in different environments", + "license": "BSD-3-Clause", + "keywords": [ + "laminas", + "progressbar" + ], + "homepage": "https://laminas.dev", + "support": { + "docs": "https://docs.laminas.dev/laminas-progressbar/", + "issues": "https://github.com/laminas/laminas-progressbar/issues", + "source": "https://github.com/laminas/laminas-progressbar", + "rss": "https://github.com/laminas/laminas-progressbar/releases.atom", + "chat": "https://laminas.dev/chat", + "forum": "https://discourse.laminas.dev" + }, + "config": { + "sort-packages": true + }, + "extra": { + "branch-alias": { + "dev-master": "2.7.x-dev", + "dev-develop": "2.8.x-dev" + } + }, + "require": { + "php": "^5.6 || ^7.0", + "laminas/laminas-stdlib": "^3.2.1", + "laminas/laminas-zendframework-bridge": "^1.0" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-json": "^2.6.1", + "laminas/laminas-session": "^2.8.5", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4" + }, + "suggest": { + "laminas/laminas-json": "Laminas\\Json component", + "laminas/laminas-session": "To support progressbar persistent" + }, + "autoload": { + "psr-4": { + "Laminas\\ProgressBar\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "LaminasTest\\ProgressBar\\": "test/" + } + }, + "scripts": { + "check": [ + "@cs-check", + "@test" + ], + "cs-check": "phpcs", + "cs-fix": "phpcbf", + "test": "phpunit --colors=always", + "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" + }, + "replace": { + "zendframework/zend-progressbar": "self.version" + } +} diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/src/Adapter/AbstractAdapter.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/src/Adapter/AbstractAdapter.php new file mode 100644 index 0000000000..e9acd4d43c --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/src/Adapter/AbstractAdapter.php @@ -0,0 +1,88 @@ +setOptions($options); + } + } + + /** + * Set options via an array + * + * @param array $options + * @return AbstractAdapter + */ + public function setOptions(array $options) + { + foreach ($options as $key => $value) { + if (in_array(strtolower($key), $this->skipOptions)) { + continue; + } + + $method = 'set' . ucfirst($key); + if (method_exists($this, $method)) { + $this->$method($value); + } + } + + return $this; + } + + /** + * Notify the adapter about an update + * + * @param float $current Current progress value + * @param float $max Max progress value + * @param float $percent Current percent value + * @param int $timeTaken Taken time in seconds + * @param int $timeRemaining Remaining time in seconds + * @param string $text Status text + * @return void + */ + abstract public function notify($current, $max, $percent, $timeTaken, $timeRemaining, $text); + + /** + * Called when the progress is explicitly finished + * + * @return void + */ + abstract public function finish(); +} diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/src/Adapter/Console.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/src/Adapter/Console.php new file mode 100644 index 0000000000..c8ccb32e0e --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/src/Adapter/Console.php @@ -0,0 +1,533 @@ +width === null) { + $this->setWidth(); + } + } + + /** + * Close local stdout, when open + */ + public function __destruct() + { + if ($this->outputStream !== null) { + fclose($this->outputStream); + } + } + + /** + * Set a different output-stream + * + * @param string $resource + * @throws Exception\RuntimeException + * @return \Laminas\ProgressBar\Adapter\Console + */ + public function setOutputStream($resource) + { + ErrorHandler::start(); + $stream = fopen($resource, 'w'); + $error = ErrorHandler::stop(); + + if ($stream === false) { + throw new Exception\RuntimeException('Unable to open stream', 0, $error); + } + + if ($this->outputStream !== null) { + fclose($this->outputStream); + } + + $this->outputStream = $stream; + } + + /** + * Get the current output stream + * + * @return resource + */ + public function getOutputStream() + { + if ($this->outputStream === null) { + if (! defined('STDOUT')) { + $this->outputStream = fopen('php://stdout', 'w'); + } else { + return STDOUT; + } + } + + return $this->outputStream; + } + + /** + * Set the width of the progressbar + * + * @param int $width + * @return \Laminas\ProgressBar\Adapter\Console + */ + public function setWidth($width = null) + { + if ($width === null || ! is_int($width)) { + if (substr(PHP_OS, 0, 3) === 'WIN') { + // We have to default to 79 on windows, because the windows + // terminal always has a fixed width of 80 characters and the + // cursor is counted to the line, else windows would line break + // after every update. + $this->width = 79; + } else { + // Set the default width of 80 + $this->width = 80; + + // Try to determine the width through stty + ErrorHandler::start(); + if (preg_match('#\d+ (\d+)#', shell_exec('stty size'), $match) === 1) { + $this->width = (int) $match[1]; + } elseif (preg_match('#columns = (\d+);#', shell_exec('stty'), $match) === 1) { + $this->width = (int) $match[1]; + } + ErrorHandler::stop(); + } + } else { + $this->width = (int) $width; + } + + $this->_calculateBarWidth(); + + return $this; + } + + /** + * Set the elements to display with the progressbar + * + * @param array $elements + * @throws \Laminas\ProgressBar\Adapter\Exception\InvalidArgumentException When an invalid element is found + * in the array + * @return \Laminas\ProgressBar\Adapter\Console + */ + public function setElements(array $elements) + { + $allowedElements = [self::ELEMENT_PERCENT, + self::ELEMENT_BAR, + self::ELEMENT_ETA, + self::ELEMENT_TEXT]; + + if (count(array_diff($elements, $allowedElements)) > 0) { + throw new Exception\InvalidArgumentException('Invalid element found in $elements array'); + } + + $this->elements = $elements; + + $this->_calculateBarWidth(); + + return $this; + } + + /** + * Set the left-hand character for the bar + * + * @param string $char + * @throws \Laminas\ProgressBar\Adapter\Exception\InvalidArgumentException When character is empty + * @return \Laminas\ProgressBar\Adapter\Console + */ + public function setBarLeftChar($char) + { + if (empty($char)) { + throw new Exception\InvalidArgumentException('Character may not be empty'); + } + + $this->barLeftChar = (string) $char; + + return $this; + } + + /** + * Set the right-hand character for the bar + * + * @param string $char + * @throws \Laminas\ProgressBar\Adapter\Exception\InvalidArgumentException When character is empty + * @return \Laminas\ProgressBar\Adapter\Console + */ + public function setBarRightChar($char) + { + if (empty($char)) { + throw new Exception\InvalidArgumentException('Character may not be empty'); + } + + $this->barRightChar = (string) $char; + + return $this; + } + + /** + * Set the indicator character for the bar + * + * @param string $char + * @return \Laminas\ProgressBar\Adapter\Console + */ + public function setBarIndicatorChar($char) + { + $this->barIndicatorChar = (string) $char; + + return $this; + } + + /** + * Set the width of the text element + * + * @param int $width + * @return \Laminas\ProgressBar\Adapter\Console + */ + public function setTextWidth($width) + { + $this->textWidth = (int) $width; + + $this->_calculateBarWidth(); + + return $this; + } + + /** + * Set the charset of the text element + * + * @param string $charset + */ + public function setCharset($charset) + { + $this->charset = $charset; + } + + /** + * Set the finish action + * + * @param string $action + * @throws \Laminas\ProgressBar\Adapter\Exception\InvalidArgumentException When an invalid action is specified + * @return \Laminas\ProgressBar\Adapter\Console + */ + public function setFinishAction($action) + { + $allowedActions = [self::FINISH_ACTION_CLEAR_LINE, + self::FINISH_ACTION_EOL, + self::FINISH_ACTION_NONE]; + + if (! in_array($action, $allowedActions)) { + throw new Exception\InvalidArgumentException('Invalid finish action specified'); + } + + $this->finishAction = $action; + + return $this; + } + + /** + * Defined by Laminas\ProgressBar\Adapter\AbstractAdapter + * + * @param float $current Current progress value + * @param float $max Max progress value + * @param float $percent Current percent value + * @param int $timeTaken Taken time in seconds + * @param int $timeRemaining Remaining time in seconds + * @param string $text Status text + * @return void + */ + public function notify($current, $max, $percent, $timeTaken, $timeRemaining, $text) + { + // See if we must clear the line + if ($this->outputStarted) { + $data = str_repeat("\x08", $this->width); + } else { + $data = ''; + $this->outputStarted = true; + } + + // Build all elements + $renderedElements = []; + + foreach ($this->elements as $element) { + switch ($element) { + case self::ELEMENT_BAR: + $visualWidth = $this->barWidth - 2; + $bar = '['; + + $indicatorWidth = strlen($this->barIndicatorChar); + + $doneWidth = min($visualWidth - $indicatorWidth, round($visualWidth * $percent)); + if ($doneWidth > 0) { + $bar .= substr( + str_repeat($this->barLeftChar, ceil($doneWidth / strlen($this->barLeftChar))), + 0, + $doneWidth + ); + } + + $bar .= $this->barIndicatorChar; + + $leftWidth = $visualWidth - $doneWidth - $indicatorWidth; + if ($leftWidth > 0) { + $bar .= substr( + str_repeat($this->barRightChar, ceil($leftWidth / strlen($this->barRightChar))), + 0, + $leftWidth + ); + } + + $bar .= ']'; + + $renderedElements[] = $bar; + break; + + case self::ELEMENT_PERCENT: + $renderedElements[] = str_pad(round($percent * 100), 3, ' ', STR_PAD_LEFT) . '%'; + break; + + case self::ELEMENT_ETA: + // In the first 5 seconds we don't get accurate results, + // this skipping technique is found in many progressbar + // implementations. + if ($timeTaken < 5) { + $renderedElements[] = str_repeat(' ', 12); + break; + } + + if ($timeRemaining === null || $timeRemaining > 86400) { + $etaFormatted = '??:??:??'; + } else { + $hours = floor($timeRemaining / 3600); + $minutes = floor(($timeRemaining % 3600) / 60); + $seconds = ($timeRemaining % 3600 % 60); + + $etaFormatted = sprintf('%02d:%02d:%02d', $hours, $minutes, $seconds); + } + + $renderedElements[] = 'ETA ' . $etaFormatted; + break; + + case self::ELEMENT_TEXT: + $wrapper = StringUtils::getWrapper($this->charset); + $renderedElements[] = $wrapper->strPad( + $wrapper->substr($text, 0, $this->textWidth), + $this->textWidth, + ' ', + STR_PAD_RIGHT + ); + break; + } + } + + $data .= implode(' ', $renderedElements); + + // Output line data + $this->_outputData($data); + } + + /** + * Defined by Laminas\ProgressBar\Adapter\AbstractAdapter + * + * @return void + */ + public function finish() + { + switch ($this->finishAction) { + case self::FINISH_ACTION_EOL: + $this->_outputData(PHP_EOL); + break; + + case self::FINISH_ACTION_CLEAR_LINE: + if ($this->outputStarted) { + $data = str_repeat("\x08", $this->width) + . str_repeat(' ', $this->width) + . str_repeat("\x08", $this->width); + + $this->_outputData($data); + } + break; + + case self::FINISH_ACTION_NONE: + break; + } + } + + /** + * Calculate the bar width when other elements changed + * + * @return void + */ + // @codingStandardsIgnoreStart + protected function _calculateBarWidth() + { + // @codingStandardsIgnoreEnd + if (in_array(self::ELEMENT_BAR, $this->elements)) { + $barWidth = $this->width; + + if (in_array(self::ELEMENT_PERCENT, $this->elements)) { + $barWidth -= 4; + } + + if (in_array(self::ELEMENT_ETA, $this->elements)) { + $barWidth -= 12; + } + + if (in_array(self::ELEMENT_TEXT, $this->elements)) { + $barWidth -= $this->textWidth; + } + + $this->barWidth = $barWidth - (count($this->elements) - 1); + } + } + + /** + * Outputs given data to STDOUT. + * + * This split-off is required for unit-testing. + * + * @param string $data + * @return void + */ + // @codingStandardsIgnoreStart + protected function _outputData($data) + { + // @codingStandardsIgnoreEnd + fwrite($this->getOutputStream(), $data); + } +} diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/src/Adapter/Exception/ExceptionInterface.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/src/Adapter/Exception/ExceptionInterface.php new file mode 100644 index 0000000000..2cf99f6474 --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/src/Adapter/Exception/ExceptionInterface.php @@ -0,0 +1,18 @@ +exitAfterSend = $exitAfterSend; + } + + /** + * Defined by Laminas\ProgressBar\Adapter\AbstractAdapter + * + * @param float $current Current progress value + * @param float $max Max progress value + * @param float $percent Current percent value + * @param int $timeTaken Taken time in seconds + * @param int $timeRemaining Remaining time in seconds + * @param string $text Status text + * @return void + */ + public function notify($current, $max, $percent, $timeTaken, $timeRemaining, $text) + { + $arguments = [ + 'current' => $current, + 'max' => $max, + 'percent' => ($percent * 100), + 'timeTaken' => $timeTaken, + 'timeRemaining' => $timeRemaining, + 'text' => $text, + 'finished' => false + ]; + + $data = Json::encode($arguments); + + // Output the data + $this->_outputData($data); + } + + /** + * Defined by Laminas\ProgressBar\Adapter\AbstractAdapter + * + * @return void + */ + public function finish() + { + $data = Json::encode(['finished' => true]); + + $this->_outputData($data); + } + + /** + * Outputs given data the user agent. + * + * This split-off is required for unit-testing. + * + * @param string $data + * @return void + */ + // @codingStandardsIgnoreStart + protected function _outputData($data) + { + // @codingStandardsIgnoreEnd + echo $data; + + if ($this->exitAfterSend) { + exit; + } + } +} diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/src/Adapter/JsPush.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/src/Adapter/JsPush.php new file mode 100644 index 0000000000..ae7675ead4 --- /dev/null +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-progressbar/src/Adapter/JsPush.php @@ -0,0 +1,127 @@ +updateMethodName = $methodName; + + return $this; + } + + /** + * Set the finish method name + * + * @param string $methodName + * @return \Laminas\ProgressBar\Adapter\JsPush + */ + public function setFinishMethodName($methodName) + { + $this->finishMethodName = $methodName; + + return $this; + } + + /** + * Defined by Laminas\ProgressBar\Adapter\AbstractAdapter + * + * @param float $current Current progress value + * @param float $max Max progress value + * @param float $percent Current percent value + * @param int $timeTaken Taken time in seconds + * @param int $timeRemaining Remaining time in seconds + * @param string $text Status text + * @return void + */ + public function notify($current, $max, $percent, $timeTaken, $timeRemaining, $text) + { + $arguments = [ + 'current' => $current, + 'max' => $max, + 'percent' => ($percent * 100), + 'timeTaken' => $timeTaken, + 'timeRemaining' => $timeRemaining, + 'text' => $text + ]; + + $data = ''; + + // Output the data + $this->_outputData($data); + } + + /** + * Defined by Laminas\ProgressBar\Adapter\AbstractAdapter + * + * @return void + */ + public function finish() + { + if ($this->finishMethodName === null) { + return; + } + + $data = ''; + + $this->_outputData($data); + } + + /** + * Outputs given data the user agent. + * + * This split-off is required for unit-testing. + * + * @param string $data + * @return void + */ + // @codingStandardsIgnoreStart + protected function _outputData($data) + { + // @codingStandardsIgnoreEnd + // 1024 padding is required for Safari, while 256 padding is required + // for Internet Explorer. The
is required so Safari actually + // executes the '; - - // Output the data - $this->_outputData($data); - } - - /** - * Defined by Zend\ProgressBar\Adapter\AbstractAdapter - * - * @return void - */ - public function finish() - { - if ($this->finishMethodName === null) { - return; - } - - $data = ''; - - $this->_outputData($data); - } - - /** - * Outputs given data the user agent. - * - * This split-off is required for unit-testing. - * - * @param string $data - * @return void - */ - protected function _outputData($data) - { - // 1024 padding is required for Safari, while 256 padding is required - // for Internet Explorer. The
is required so Safari actually - // executes the