From 2b7229069a4a988021a950bec621793f752b5332 Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Sat, 14 Oct 2023 17:54:24 +0800 Subject: [PATCH 1/5] fixed --- app/adminapi/controller/SuYuanController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/adminapi/controller/SuYuanController.php b/app/adminapi/controller/SuYuanController.php index bc4bc6dd..330db8ed 100644 --- a/app/adminapi/controller/SuYuanController.php +++ b/app/adminapi/controller/SuYuanController.php @@ -114,7 +114,7 @@ class SuYuanController extends BaseAdminController return $this->fail('参数错误'); } $data = Db::name('environmental_data')->where('id',$params['id'])->where('flag',$params['flag'])->order('id desc')->findOrEmpty(); - if($data->isEmpty()){ + if(empty($data)){ return $this->success('请求成功',[]); } $content = Db::name('production_base')->where('id',$data['production_base_id'])->field('content')->findOrEmpty(); -- 2.40.1 From 32fcb1700d10d5ecd72af94dacf35466839c8f0f Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Sat, 14 Oct 2023 17:59:44 +0800 Subject: [PATCH 2/5] fixed --- app/adminapi/controller/SuYuanController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/adminapi/controller/SuYuanController.php b/app/adminapi/controller/SuYuanController.php index 330db8ed..8cd747c7 100644 --- a/app/adminapi/controller/SuYuanController.php +++ b/app/adminapi/controller/SuYuanController.php @@ -113,7 +113,7 @@ class SuYuanController extends BaseAdminController if(empty($params['id']) || empty($params['flag'])){ return $this->fail('参数错误'); } - $data = Db::name('environmental_data')->where('id',$params['id'])->where('flag',$params['flag'])->order('id desc')->findOrEmpty(); + $data = Db::name('environmental_data')->where('production_base_id',$params['id'])->where('flag',$params['flag'])->order('id desc')->findOrEmpty(); if(empty($data)){ return $this->success('请求成功',[]); } -- 2.40.1 From 27fd8388612d24168ef430e3af44c33406ed3860 Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Sat, 14 Oct 2023 19:04:04 +0800 Subject: [PATCH 3/5] fixed --- app/adminapi/controller/SuYuanController.php | 21 ++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/app/adminapi/controller/SuYuanController.php b/app/adminapi/controller/SuYuanController.php index 8cd747c7..6e7f6009 100644 --- a/app/adminapi/controller/SuYuanController.php +++ b/app/adminapi/controller/SuYuanController.php @@ -8,7 +8,7 @@ use think\response\Json; class SuYuanController extends BaseAdminController { - public array $notNeedLogin = ['areaLists','areaDetail','monitorDetail','imageUpload']; + public array $notNeedLogin = ['areaLists','areaDetail','monitorDetail','imageUpload','monitorList']; //添加种植基地 public function addArea(): Json @@ -114,14 +114,23 @@ class SuYuanController extends BaseAdminController return $this->fail('参数错误'); } $data = Db::name('environmental_data')->where('production_base_id',$params['id'])->where('flag',$params['flag'])->order('id desc')->findOrEmpty(); - if(empty($data)){ - return $this->success('请求成功',[]); - } - $content = Db::name('production_base')->where('id',$data['production_base_id'])->field('content')->findOrEmpty(); - $data['content'] = $content['content']; return $this->success('请求成功',$data); } + public function monitorList() { + $params = $this->request->get(['id','flag']); + if(empty($params['id']) || empty($params['flag'])){ + return $this->fail('参数错误'); + } + $data = Db::name('environmental_data')->where('production_base_id',$params['id'])->where('flag',$params['flag'])->limit(6)->select(); + $content = Db::name('production_base')->where('id',$params['id'])->field('content')->findOrEmpty(); + $result = []; + foreach ($data as $v) { + + } + dump($data);die; + } + //上传图片 public function imageUpload(): Json { -- 2.40.1 From 0b6b29a77bea7bf509dd19e4bc1e20a33d3946d9 Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Sat, 14 Oct 2023 19:05:42 +0800 Subject: [PATCH 4/5] fixed --- app/adminapi/controller/SuYuanController.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/adminapi/controller/SuYuanController.php b/app/adminapi/controller/SuYuanController.php index 6e7f6009..b8445a44 100644 --- a/app/adminapi/controller/SuYuanController.php +++ b/app/adminapi/controller/SuYuanController.php @@ -124,11 +124,7 @@ class SuYuanController extends BaseAdminController } $data = Db::name('environmental_data')->where('production_base_id',$params['id'])->where('flag',$params['flag'])->limit(6)->select(); $content = Db::name('production_base')->where('id',$params['id'])->field('content')->findOrEmpty(); - $result = []; - foreach ($data as $v) { - - } - dump($data);die; + return $this->success('请求成功',['data'=>$data,'content'=>$content['content']]); } //上传图片 -- 2.40.1 From 581510f8eaa6b94698602e07a768924ad8edcb01 Mon Sep 17 00:00:00 2001 From: unknown <736250432@qq.com> Date: Mon, 16 Oct 2023 10:40:36 +0800 Subject: [PATCH 5/5] update --- app/adminapi/controller/SuYuanController.php | 3 +- composer.lock | 1082 +--- vendor/bin/jp.php | 119 + vendor/bin/jp.php.bat | 5 + vendor/composer/autoload_classmap.php | 3 +- vendor/composer/autoload_files.php | 1 - vendor/composer/autoload_psr4.php | 3 +- vendor/composer/autoload_static.php | 17 +- vendor/composer/installed.json | 859 +-- vendor/composer/installed.php | 193 +- .../cron-expression/CHANGELOG.md | 23 + .../dragonmantank/cron-expression/README.md | 2 +- .../cron-expression/composer.json | 6 + .../cron-expression/phpstan.neon | 15 - .../src/Cron/CronExpression.php | 14 +- .../src/Cron/DayOfMonthField.php | 6 +- .../src/Cron/DayOfWeekField.php | 4 +- .../cron-expression/src/Cron/HoursField.php | 4 +- .../cron-expression/src/Cron/MinutesField.php | 1 + .../guzzlehttp/command/.php-cs-fixer.dist.php | 26 + vendor/guzzlehttp/command/composer.json | 16 +- vendor/guzzlehttp/command/src/Command.php | 1 + .../command/src/CommandInterface.php | 1 + .../src/Exception/CommandClientException.php | 5 +- .../src/Exception/CommandException.php | 16 +- .../src/Exception/CommandServerException.php | 5 +- vendor/guzzlehttp/command/src/Result.php | 4 +- .../command/src/ResultInterface.php | 1 + .../guzzlehttp/command/src/ServiceClient.php | 45 +- .../command/src/ServiceClientInterface.php | 25 +- .../vendor-bin/php-cs-fixer/composer.json | 9 + .../guzzle-services/.php-cs-fixer.dist.php | 26 + .../guzzlehttp/guzzle-services/composer.json | 17 +- .../guzzle-services/src/Description.php | 7 +- .../src/DescriptionInterface.php | 5 +- .../guzzle-services/src/Deserializer.php | 49 +- .../guzzle-services/src/GuzzleClient.php | 28 +- .../Handler/ValidatedDescriptionHandler.php | 20 +- .../guzzle-services/src/Operation.php | 14 +- .../guzzle-services/src/Parameter.php | 61 +- .../QuerySerializerInterface.php | 4 +- .../src/RequestLocation/AbstractLocation.php | 12 +- .../src/RequestLocation/BodyLocation.php | 10 +- .../src/RequestLocation/FormParamLocation.php | 13 +- .../src/RequestLocation/HeaderLocation.php | 10 +- .../src/RequestLocation/JsonLocation.php | 11 +- .../src/RequestLocation/MultiPartLocation.php | 16 +- .../src/RequestLocation/QueryLocation.php | 12 +- .../src/RequestLocation/XmlLocation.php | 54 +- .../src/ResponseLocation/AbstractLocation.php | 16 +- .../src/ResponseLocation/BodyLocation.php | 5 +- .../src/ResponseLocation/HeaderLocation.php | 6 +- .../src/ResponseLocation/JsonLocation.php | 14 +- .../ResponseLocation/ReasonPhraseLocation.php | 5 +- .../ResponseLocationInterface.php | 1 + .../ResponseLocation/StatusCodeLocation.php | 5 +- .../src/ResponseLocation/XmlLocation.php | 23 +- .../guzzle-services/src/SchemaFormatter.php | 19 +- .../guzzle-services/src/SchemaValidator.php | 43 +- .../guzzle-services/src/Serializer.php | 21 +- .../vendor-bin/php-cs-fixer/composer.json | 9 + vendor/guzzlehttp/guzzle/CHANGELOG.md | 91 +- vendor/guzzlehttp/guzzle/README.md | 14 +- vendor/guzzlehttp/guzzle/UPGRADING.md | 2 +- vendor/guzzlehttp/guzzle/composer.json | 10 +- vendor/guzzlehttp/guzzle/src/Client.php | 40 +- .../guzzlehttp/guzzle/src/ClientInterface.php | 2 +- .../guzzle/src/Cookie/CookieJar.php | 56 +- .../guzzle/src/Cookie/CookieJarInterface.php | 5 +- .../guzzle/src/Cookie/SessionCookieJar.php | 2 +- .../guzzle/src/Cookie/SetCookie.php | 84 +- .../guzzle/src/Handler/CurlFactory.php | 93 +- .../guzzle/src/Handler/CurlMultiHandler.php | 13 +- .../guzzle/src/Handler/EasyHandle.php | 2 +- .../guzzle/src/Handler/HeaderProcessor.php | 4 +- .../guzzle/src/Handler/MockHandler.php | 3 +- .../guzzle/src/Handler/StreamHandler.php | 66 +- vendor/guzzlehttp/guzzle/src/HandlerStack.php | 16 +- .../guzzle/src/MessageFormatter.php | 17 +- .../guzzle/src/MessageFormatterInterface.php | 2 +- vendor/guzzlehttp/guzzle/src/Middleware.php | 20 +- .../guzzle/src/PrepareBodyMiddleware.php | 1 + .../guzzle/src/RedirectMiddleware.php | 12 +- .../guzzlehttp/guzzle/src/RequestOptions.php | 16 +- .../guzzlehttp/guzzle/src/RetryMiddleware.php | 7 +- .../guzzlehttp/guzzle/src/TransferStats.php | 4 +- vendor/guzzlehttp/guzzle/src/Utils.php | 22 +- vendor/guzzlehttp/guzzle/src/functions.php | 8 +- .../guzzle/src/functions_include.php | 2 +- vendor/guzzlehttp/promises/CHANGELOG.md | 35 + vendor/guzzlehttp/promises/README.md | 21 +- vendor/guzzlehttp/promises/composer.json | 20 +- .../promises/src/AggregateException.php | 4 +- .../promises/src/CancellationException.php | 2 + vendor/guzzlehttp/promises/src/Coroutine.php | 39 +- vendor/guzzlehttp/promises/src/Create.php | 21 +- vendor/guzzlehttp/promises/src/Each.php | 26 +- .../guzzlehttp/promises/src/EachPromise.php | 43 +- .../promises/src/FulfilledPromise.php | 29 +- vendor/guzzlehttp/promises/src/Is.php | 18 +- vendor/guzzlehttp/promises/src/Promise.php | 51 +- .../promises/src/PromiseInterface.php | 34 +- .../promises/src/PromisorInterface.php | 6 +- .../promises/src/RejectedPromise.php | 30 +- .../promises/src/RejectionException.php | 15 +- vendor/guzzlehttp/promises/src/TaskQueue.php | 16 +- .../promises/src/TaskQueueInterface.php | 10 +- vendor/guzzlehttp/promises/src/Utils.php | 69 +- vendor/guzzlehttp/promises/src/functions.php | 363 -- .../promises/src/functions_include.php | 6 - vendor/guzzlehttp/psr7/CHANGELOG.md | 23 +- vendor/guzzlehttp/psr7/README.md | 24 +- vendor/guzzlehttp/psr7/src/AppendStream.php | 14 +- vendor/guzzlehttp/psr7/src/BufferStream.php | 2 - vendor/guzzlehttp/psr7/src/FnStream.php | 9 +- vendor/guzzlehttp/psr7/src/Header.php | 2 +- vendor/guzzlehttp/psr7/src/HttpFactory.php | 8 +- vendor/guzzlehttp/psr7/src/InflateStream.php | 6 +- vendor/guzzlehttp/psr7/src/Message.php | 26 +- vendor/guzzlehttp/psr7/src/MessageTrait.php | 12 +- vendor/guzzlehttp/psr7/src/MimeType.php | 34 +- .../guzzlehttp/psr7/src/MultipartStream.php | 8 +- vendor/guzzlehttp/psr7/src/PumpStream.php | 6 +- vendor/guzzlehttp/psr7/src/Query.php | 4 +- vendor/guzzlehttp/psr7/src/Request.php | 6 +- vendor/guzzlehttp/psr7/src/Response.php | 1 + vendor/guzzlehttp/psr7/src/Rfc7230.php | 2 +- vendor/guzzlehttp/psr7/src/ServerRequest.php | 14 +- vendor/guzzlehttp/psr7/src/Stream.php | 11 +- .../psr7/src/StreamDecoratorTrait.php | 5 +- vendor/guzzlehttp/psr7/src/StreamWrapper.php | 60 +- vendor/guzzlehttp/psr7/src/Uri.php | 51 +- vendor/guzzlehttp/psr7/src/UriNormalizer.php | 10 +- vendor/guzzlehttp/psr7/src/UriResolver.php | 18 +- vendor/guzzlehttp/psr7/src/Utils.php | 10 +- vendor/guzzlehttp/uri-template/CHANGELOG.md | 8 + vendor/guzzlehttp/uri-template/composer.json | 9 +- .../uri-template/src/UriTemplate.php | 5 +- vendor/monolog/monolog/CHANGELOG.md | 619 --- vendor/monolog/monolog/LICENSE | 19 - vendor/monolog/monolog/README.md | 112 - vendor/monolog/monolog/UPGRADE.md | 72 - vendor/monolog/monolog/composer.json | 81 - .../Monolog/Attribute/AsMonologProcessor.php | 46 - .../monolog/src/Monolog/DateTimeImmutable.php | 49 - .../monolog/src/Monolog/ErrorHandler.php | 307 - .../Monolog/Formatter/ChromePHPFormatter.php | 83 - .../Monolog/Formatter/ElasticaFormatter.php | 89 - .../Formatter/ElasticsearchFormatter.php | 89 - .../Monolog/Formatter/FlowdockFormatter.php | 112 - .../Monolog/Formatter/FluentdFormatter.php | 88 - .../Monolog/Formatter/FormatterInterface.php | 42 - .../Formatter/GelfMessageFormatter.php | 175 - .../Formatter/GoogleCloudLoggingFormatter.php | 40 - .../src/Monolog/Formatter/HtmlFormatter.php | 142 - .../src/Monolog/Formatter/JsonFormatter.php | 224 - .../src/Monolog/Formatter/LineFormatter.php | 246 - .../src/Monolog/Formatter/LogglyFormatter.php | 45 - .../Monolog/Formatter/LogmaticFormatter.php | 66 - .../Monolog/Formatter/LogstashFormatter.php | 101 - .../Monolog/Formatter/MongoDBFormatter.php | 162 - .../Monolog/Formatter/NormalizerFormatter.php | 287 - .../src/Monolog/Formatter/ScalarFormatter.php | 51 - .../Monolog/Formatter/WildfireFormatter.php | 139 - .../src/Monolog/Handler/AbstractHandler.php | 112 - .../Handler/AbstractProcessingHandler.php | 69 - .../Monolog/Handler/AbstractSyslogHandler.php | 106 - .../src/Monolog/Handler/AmqpHandler.php | 171 - .../Monolog/Handler/BrowserConsoleHandler.php | 308 - .../src/Monolog/Handler/BufferHandler.php | 167 - .../src/Monolog/Handler/ChromePHPHandler.php | 196 - .../src/Monolog/Handler/CouchDBHandler.php | 77 - .../src/Monolog/Handler/CubeHandler.php | 167 - .../monolog/src/Monolog/Handler/Curl/Util.php | 71 - .../Monolog/Handler/DeduplicationHandler.php | 186 - .../Handler/DoctrineCouchDBHandler.php | 47 - .../src/Monolog/Handler/DynamoDbHandler.php | 104 - .../src/Monolog/Handler/ElasticaHandler.php | 129 - .../Monolog/Handler/ElasticsearchHandler.php | 218 - .../src/Monolog/Handler/ErrorLogHandler.php | 91 - .../Monolog/Handler/FallbackGroupHandler.php | 71 - .../src/Monolog/Handler/FilterHandler.php | 212 - .../ActivationStrategyInterface.php | 29 - .../ChannelLevelActivationStrategy.php | 77 - .../ErrorLevelActivationStrategy.php | 46 - .../Monolog/Handler/FingersCrossedHandler.php | 252 - .../src/Monolog/Handler/FirePHPHandler.php | 180 - .../src/Monolog/Handler/FleepHookHandler.php | 135 - .../src/Monolog/Handler/FlowdockHandler.php | 133 - .../Handler/FormattableHandlerInterface.php | 37 - .../Handler/FormattableHandlerTrait.php | 60 - .../src/Monolog/Handler/GelfHandler.php | 57 - .../src/Monolog/Handler/GroupHandler.php | 132 - .../monolog/src/Monolog/Handler/Handler.php | 62 - .../src/Monolog/Handler/HandlerInterface.php | 85 - .../src/Monolog/Handler/HandlerWrapper.php | 136 - .../src/Monolog/Handler/IFTTTHandler.php | 74 - .../src/Monolog/Handler/InsightOpsHandler.php | 76 - .../src/Monolog/Handler/LogEntriesHandler.php | 70 - .../src/Monolog/Handler/LogglyHandler.php | 160 - .../src/Monolog/Handler/LogmaticHandler.php | 106 - .../src/Monolog/Handler/MailHandler.php | 95 - .../src/Monolog/Handler/MandrillHandler.php | 83 - .../Handler/MissingExtensionException.php | 21 - .../src/Monolog/Handler/MongoDBHandler.php | 86 - .../Monolog/Handler/NativeMailerHandler.php | 174 - .../src/Monolog/Handler/NewRelicHandler.php | 199 - .../src/Monolog/Handler/NoopHandler.php | 40 - .../src/Monolog/Handler/NullHandler.php | 60 - .../src/Monolog/Handler/OverflowHandler.php | 149 - .../src/Monolog/Handler/PHPConsoleHandler.php | 263 - .../src/Monolog/Handler/ProcessHandler.php | 191 - .../Handler/ProcessableHandlerInterface.php | 44 - .../Handler/ProcessableHandlerTrait.php | 77 - .../src/Monolog/Handler/PsrHandler.php | 95 - .../src/Monolog/Handler/PushoverHandler.php | 246 - .../src/Monolog/Handler/RedisHandler.php | 101 - .../Monolog/Handler/RedisPubSubHandler.php | 67 - .../src/Monolog/Handler/RollbarHandler.php | 131 - .../Monolog/Handler/RotatingFileHandler.php | 207 - .../src/Monolog/Handler/SamplingHandler.php | 132 - .../src/Monolog/Handler/SendGridHandler.php | 102 - .../src/Monolog/Handler/Slack/SlackRecord.php | 387 -- .../src/Monolog/Handler/SlackHandler.php | 256 - .../Monolog/Handler/SlackWebhookHandler.php | 130 - .../src/Monolog/Handler/SocketHandler.php | 448 -- .../src/Monolog/Handler/SqsHandler.php | 62 - .../src/Monolog/Handler/StreamHandler.php | 221 - .../Monolog/Handler/SwiftMailerHandler.php | 115 - .../Monolog/Handler/SymfonyMailerHandler.php | 111 - .../src/Monolog/Handler/SyslogHandler.php | 68 - .../Monolog/Handler/SyslogUdp/UdpSocket.php | 88 - .../src/Monolog/Handler/SyslogUdpHandler.php | 150 - .../Monolog/Handler/TelegramBotHandler.php | 274 - .../src/Monolog/Handler/TestHandler.php | 231 - .../Handler/WebRequestRecognizerTrait.php | 24 - .../Handler/WhatFailureGroupHandler.php | 81 - .../Monolog/Handler/ZendMonitorHandler.php | 101 - .../monolog/monolog/src/Monolog/LogRecord.php | 34 - vendor/monolog/monolog/src/Monolog/Logger.php | 725 --- .../src/Monolog/Processor/GitProcessor.php | 77 - .../Monolog/Processor/HostnameProcessor.php | 36 - .../Processor/IntrospectionProcessor.php | 123 - .../Processor/MemoryPeakUsageProcessor.php | 37 - .../src/Monolog/Processor/MemoryProcessor.php | 61 - .../Processor/MemoryUsageProcessor.php | 37 - .../Monolog/Processor/MercurialProcessor.php | 77 - .../Monolog/Processor/ProcessIdProcessor.php | 30 - .../Monolog/Processor/ProcessorInterface.php | 30 - .../Processor/PsrLogMessageProcessor.php | 88 - .../src/Monolog/Processor/TagProcessor.php | 61 - .../src/Monolog/Processor/UidProcessor.php | 59 - .../src/Monolog/Processor/WebProcessor.php | 111 - .../monolog/monolog/src/Monolog/Registry.php | 134 - .../src/Monolog/ResettableInterface.php | 34 - .../monolog/src/Monolog/SignalHandler.php | 120 - .../monolog/src/Monolog/Test/TestCase.php | 85 - vendor/monolog/monolog/src/Monolog/Utils.php | 284 - vendor/mtdowling/jmespath.php/CHANGELOG.md | 6 + vendor/mtdowling/jmespath.php/README.rst | 2 +- vendor/mtdowling/jmespath.php/bin/jp.php | 74 + vendor/mtdowling/jmespath.php/bin/perf.php | 68 + vendor/mtdowling/jmespath.php/composer.json | 69 +- .../jmespath.php/src/SyntaxErrorException.php | 2 +- .../jmespath.php/src/TreeCompiler.php | 2 +- .../jmespath.php/src/TreeInterpreter.php | 2 +- vendor/myclabs/php-enum/README.md | 62 +- vendor/myclabs/php-enum/composer.json | 5 +- vendor/myclabs/php-enum/psalm.xml | 35 - vendor/myclabs/php-enum/src/Enum.php | 2 +- vendor/myclabs/php-enum/stubs/Stringable.php | 11 + .../socialite/src/Providers/Facebook.php | 4 +- .../socialite/src/Providers/Linkedin.php | 21 +- .../phpspreadsheet/.php-cs-fixer.dist.php | 1 + vendor/phpoffice/phpspreadsheet/CHANGELOG.md | 61 + .../phpoffice/phpspreadsheet/CONTRIBUTING.md | 39 +- vendor/phpoffice/phpspreadsheet/README.md | 24 +- vendor/phpoffice/phpspreadsheet/composer.json | 18 +- .../phpspreadsheet/phpstan.neon.dist | 4 + .../phpspreadsheet/phpunit10.xml.dist | 15 + .../Calculation/Calculation.php | 50 +- .../Calculation/DateTimeExcel/DateValue.php | 5 + .../Calculation/DateTimeExcel/Month.php | 2 + .../Calculation/DateTimeExcel/TimeValue.php | 5 + .../Calculation/Engine/FormattedNumber.php | 23 +- .../Engine/Operands/StructuredReference.php | 6 +- .../Calculation/Engineering.php | 22 - .../Calculation/Engineering/Complex.php | 2 +- .../Calculation/Engineering/ConvertBinary.php | 6 +- .../Calculation/LookupRef/HLookup.php | 2 +- .../Calculation/LookupRef/VLookup.php | 2 +- .../Calculation/MathTrig/Sum.php | 2 +- .../Calculation/TextData/Extract.php | 4 +- .../Calculation/TextData/Format.php | 21 +- .../Calculation/TextData/Text.php | 4 +- .../Cell/AdvancedValueBinder.php | 7 +- .../src/PhpSpreadsheet/Cell/Cell.php | 13 +- .../src/PhpSpreadsheet/Cell/DataValidator.php | 54 +- .../src/PhpSpreadsheet/Cell/IgnoredErrors.php | 66 + .../PhpSpreadsheet/CellReferenceHelper.php | 4 +- .../src/PhpSpreadsheet/Chart/Axis.php | 38 + .../src/PhpSpreadsheet/Chart/AxisText.php | 56 + .../src/PhpSpreadsheet/Chart/Chart.php | 25 + .../src/PhpSpreadsheet/Chart/Layout.php | 44 +- .../src/PhpSpreadsheet/Chart/Legend.php | 40 + .../src/PhpSpreadsheet/Chart/PlotArea.php | 45 + .../Chart/Renderer/JpGraphRendererBase.php | 29 +- .../Chart/Renderer/MtJpGraphRenderer.php | 6 +- .../PhpSpreadsheet/Document/Properties.php | 16 +- .../src/PhpSpreadsheet/Helper/Downloader.php | 89 + .../src/PhpSpreadsheet/Helper/Handler.php | 46 + .../src/PhpSpreadsheet/Helper/Html.php | 35 +- .../src/PhpSpreadsheet/Helper/Sample.php | 47 +- .../src/PhpSpreadsheet/Helper/TextGrid.php | 16 +- .../src/PhpSpreadsheet/Reader/Gnumeric.php | 51 +- .../src/PhpSpreadsheet/Reader/Html.php | 162 +- .../src/PhpSpreadsheet/Reader/Ods.php | 40 + .../Reader/Security/XmlScanner.php | 2 +- .../src/PhpSpreadsheet/Reader/Xls.php | 9 +- .../src/PhpSpreadsheet/Reader/Xlsx.php | 192 +- .../src/PhpSpreadsheet/Reader/Xlsx/Chart.php | 159 +- .../Reader/Xlsx/DataValidations.php | 12 + .../PhpSpreadsheet/Reader/Xlsx/Properties.php | 3 + .../Reader/Xlsx/SharedFormula.php | 26 + .../src/PhpSpreadsheet/Reader/Xlsx/Styles.php | 16 +- .../src/PhpSpreadsheet/Reader/Xml.php | 162 +- .../Reader/Xml/DataValidations.php | 177 + .../Reader/Xml/PageSettings.php | 9 +- .../PhpSpreadsheet/Reader/Xml/Properties.php | 19 +- .../src/PhpSpreadsheet/Reader/Xml/Style.php | 25 +- .../PhpSpreadsheet/Reader/Xml/Style/Font.php | 4 +- .../src/PhpSpreadsheet/ReferenceHelper.php | 81 +- .../PhpSpreadsheet/RichText/TextElement.php | 2 +- .../src/PhpSpreadsheet/Settings.php | 2 +- .../src/PhpSpreadsheet/Shared/Date.php | 2 +- .../src/PhpSpreadsheet/Shared/File.php | 16 +- .../src/PhpSpreadsheet/Shared/Font.php | 40 +- .../Shared/OLE/ChainedBlockStream.php | 5 +- .../src/PhpSpreadsheet/Shared/OLERead.php | 2 +- .../PhpSpreadsheet/Shared/StringHelper.php | 12 + .../src/PhpSpreadsheet/Shared/Trend/Trend.php | 1 - .../src/PhpSpreadsheet/Spreadsheet.php | 31 + .../src/PhpSpreadsheet/Style/Color.php | 17 +- .../src/PhpSpreadsheet/Style/Conditional.php | 2 +- .../src/PhpSpreadsheet/Style/Font.php | 49 +- .../Style/NumberFormat/Formatter.php | 21 +- .../Style/NumberFormat/Wizard/Accounting.php | 4 +- .../Style/NumberFormat/Wizard/Date.php | 125 + .../Style/NumberFormat/Wizard/DateTime.php | 50 + .../NumberFormat/Wizard/DateTimeWizard.php | 44 + .../Style/NumberFormat/Wizard/Duration.php | 153 + .../Style/NumberFormat/Wizard/Time.php | 105 + .../src/PhpSpreadsheet/Style/RgbTint.php | 175 + .../src/PhpSpreadsheet/Style/Style.php | 14 +- .../src/PhpSpreadsheet/Theme.php | 269 + .../PhpSpreadsheet/Worksheet/AutoFilter.php | 8 +- .../PhpSpreadsheet/Worksheet/PageMargins.php | 15 - .../PhpSpreadsheet/Worksheet/PageSetup.php | 15 - .../PhpSpreadsheet/Worksheet/SheetView.php | 15 - .../src/PhpSpreadsheet/Worksheet/Table.php | 4 +- .../PhpSpreadsheet/Worksheet/Table/Column.php | 4 +- .../PhpSpreadsheet/Worksheet/Validations.php | 5 +- .../PhpSpreadsheet/Worksheet/Worksheet.php | 200 +- .../src/PhpSpreadsheet/Writer/Html.php | 45 +- .../src/PhpSpreadsheet/Writer/Ods.php | 7 +- .../src/PhpSpreadsheet/Writer/Ods/Content.php | 9 + .../src/PhpSpreadsheet/Writer/Xls.php | 9 +- .../src/PhpSpreadsheet/Writer/Xls/Parser.php | 12 +- .../PhpSpreadsheet/Writer/Xls/Workbook.php | 8 +- .../PhpSpreadsheet/Writer/Xls/Worksheet.php | 7 + .../src/PhpSpreadsheet/Writer/Xlsx.php | 9 +- .../src/PhpSpreadsheet/Writer/Xlsx/Chart.php | 185 +- .../PhpSpreadsheet/Writer/Xlsx/DocProps.php | 3 + .../Writer/Xlsx/FunctionPrefix.php | 2 +- .../Writer/Xlsx/StringTable.php | 9 +- .../src/PhpSpreadsheet/Writer/Xlsx/Style.php | 22 +- .../src/PhpSpreadsheet/Writer/Xlsx/Theme.php | 187 +- .../PhpSpreadsheet/Writer/Xlsx/Worksheet.php | 60 +- .../src/PhpSpreadsheet/Writer/ZipStream0.php | 17 + .../src/PhpSpreadsheet/Writer/ZipStream2.php | 21 + .../src/PhpSpreadsheet/Writer/ZipStream3.php | 22 + vendor/psr/http-client/CHANGELOG.md | 8 + vendor/psr/http-client/README.md | 2 +- vendor/psr/http-client/composer.json | 7 +- vendor/qcloud/cos-sdk-v5/CHANGELOG.md | 42 + .../qcloud/cos-sdk-v5/sample/ImageSearch.php | 2 +- .../cos-sdk-v5/sample/ImageSearchAdd.php | 2 +- .../cos-sdk-v5/sample/ImageSearchDelete.php | 2 +- .../cos-sdk-v5/sample/ImageSearchOpen.php | 2 +- .../sample/abortMultipartUpload.php | 2 +- .../cos-sdk-v5/sample/blindWatermark.php | 2 +- .../sample/cancelInventoryTriggerJob.php | 2 +- .../sample/cancelLiveVideoAuditing.php | 2 +- .../cos-sdk-v5/sample/catchException.php | 2 +- .../cos-sdk-v5/sample/ciTransformation.php | 2 +- .../cos-sdk-v5/sample/closeImageSlim.php | 23 + .../sample/completeMultipartUpload.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/copy.php | 2 +- .../qcloud/cos-sdk-v5/sample/copyObject.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/cosClient.php | 6 +- .../sample/createAiTranslationJobs.php | 54 + .../sample/createAiWordsGeneralizeJobs.php | 45 + .../qcloud/cos-sdk-v5/sample/createBucket.php | 2 +- .../sample/createDocProcessJobs.php | 3 +- .../sample/createFileCompressJobs.php | 3 +- .../sample/createFileHashCodeJobs.php | 3 +- .../sample/createFileUncompressJobs.php | 3 +- .../qcloud/cos-sdk-v5/sample/createFolder.php | 2 +- .../sample/createInventoryTriggerJob.php | 76 +- .../sample/createM3U8PlayListJobs.php | 45 + .../sample/createMediaAnimationJobs.php | 4 +- .../sample/createMediaAnimationTemplate.php | 2 +- .../sample/createMediaConcatJobs.php | 32 +- .../sample/createMediaConcatTemplate.php | 30 +- .../createMediaDigitalWatermarkJobs.php | 3 +- ...createMediaExtractDigitalWatermarkJobs.php | 3 +- .../sample/createMediaHighSpeedHdTemplate.php | 2 +- .../cos-sdk-v5/sample/createMediaJobs.php | 3 +- .../sample/createMediaNoiseReductionJobs.php | 18 +- .../sample/createMediaPicProcessJobs.php | 4 +- .../sample/createMediaPicProcessTemplate.php | 2 +- .../sample/createMediaQualityEstimateJobs.php | 2 +- .../sample/createMediaSDRtoHDRJobs.php | 3 +- .../sample/createMediaSegmentJobs.php | 3 +- .../sample/createMediaSmartCoverJobs.php | 3 +- .../sample/createMediaSmartCoverTemplate.php | 34 + .../sample/createMediaSnapshotJobs.php | 4 +- .../sample/createMediaSnapshotTemplate.php | 2 +- .../sample/createMediaStreamExtractJobs.php | 5 +- .../sample/createMediaSuperResolutionJobs.php | 4 +- .../createMediaSuperResolutionTemplate.php | 2 +- .../sample/createMediaTranscodeJobs.php | 34 +- .../createMediaTranscodeProTemplate.php | 61 + .../sample/createMediaTranscodeTemplate.php | 30 +- .../sample/createMediaVideoEnhanceJobs.php | 201 + .../createMediaVideoEnhanceTemplate.php | 65 + .../sample/createMediaVideoMontageJobs.php | 20 +- .../createMediaVideoMontageTemplate.php | 21 +- .../sample/createMediaVideoProcessJobs.php | 4 +- .../createMediaVideoProcessTemplate.php | 2 +- .../sample/createMediaVideoTagJobs.php | 3 +- .../sample/createMediaVoiceSeparateJobs.php | 4 +- .../createMediaVoiceSeparateTemplate.php | 2 +- .../sample/createMediaWatermarkTemplate.php | 2 +- .../sample/createMultipartUpload.php | 2 +- .../createVoiceSpeechRecognitionJobs.php | 95 + .../createVoiceSpeechRecognitionTemplate.php | 44 + .../cos-sdk-v5/sample/createVoiceTtsJobs.php | 86 + .../sample/createVoiceTtsTemplate.php | 33 + .../qcloud/cos-sdk-v5/sample/deleteBucket.php | 2 +- .../cos-sdk-v5/sample/deleteBucketCors.php | 2 +- .../cos-sdk-v5/sample/deleteBucketDomain.php | 2 +- .../cos-sdk-v5/sample/deleteBucketGuetzli.php | 2 +- .../sample/deleteBucketImageStyle.php | 2 +- .../sample/deleteBucketLifecycle.php | 2 +- .../cos-sdk-v5/sample/deleteBucketTagging.php | 2 +- .../cos-sdk-v5/sample/deleteBucketWebsite.php | 2 +- .../cos-sdk-v5/sample/deleteBuckets.php | 2 +- .../qcloud/cos-sdk-v5/sample/deleteFolder.php | 2 +- .../qcloud/cos-sdk-v5/sample/deleteObject.php | 2 +- .../cos-sdk-v5/sample/deleteObjectTagging.php | 2 +- .../cos-sdk-v5/sample/deleteWorkflow.php | 2 +- .../sample/describeInventoryTriggerJob.php | 2 +- .../sample/describeInventoryTriggerJobs.php | 2 +- .../cos-sdk-v5/sample/describeMediaJob.php | 2 +- .../cos-sdk-v5/sample/describeMediaJobs.php | 2 +- .../sample/describeMediaTemplates.php | 2 +- .../cos-sdk-v5/sample/describeWorkflow.php | 2 +- .../qcloud/cos-sdk-v5/sample/detectAudio.php | 8 +- .../cos-sdk-v5/sample/detectDocument.php | 10 +- .../qcloud/cos-sdk-v5/sample/detectImage.php | 2 - .../qcloud/cos-sdk-v5/sample/detectImages.php | 55 +- .../qcloud/cos-sdk-v5/sample/detectLable.php | 2 +- .../cos-sdk-v5/sample/detectLiveVideo.php | 5 +- .../qcloud/cos-sdk-v5/sample/detectText.php | 10 +- .../qcloud/cos-sdk-v5/sample/detectVideo.php | 18 +- .../qcloud/cos-sdk-v5/sample/detectVirus.php | 2 +- .../cos-sdk-v5/sample/detectWebpage.php | 25 +- .../cos-sdk-v5/sample/document2dstType.php | 2 +- .../cos-sdk-v5/sample/doesBucketExist.php | 2 +- .../cos-sdk-v5/sample/doesObjectExist.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/download.php | 2 +- .../cos-sdk-v5/sample/downloadFolder.php | 2 +- .../cos-sdk-v5/sample/fileJobs4Hash.php | 2 +- .../cos-sdk-v5/sample/getAiBucketList.php | 30 + .../cos-sdk-v5/sample/getAiQueueList.php | 28 + .../cos-sdk-v5/sample/getBlindWatermark.php | 2 +- .../cos-sdk-v5/sample/getBucketAccelerate.php | 2 +- .../qcloud/cos-sdk-v5/sample/getBucketAcl.php | 2 +- .../cos-sdk-v5/sample/getBucketCors.php | 2 +- .../cos-sdk-v5/sample/getBucketDomain.php | 2 +- .../cos-sdk-v5/sample/getBucketGuetzli.php | 2 +- .../cos-sdk-v5/sample/getBucketImageStyle.php | 2 +- .../cos-sdk-v5/sample/getBucketInventory.php | 2 +- .../cos-sdk-v5/sample/getBucketLifecycle.php | 2 +- .../cos-sdk-v5/sample/getBucketLogging.php | 2 +- .../cos-sdk-v5/sample/getBucketTagging.php | 2 +- .../cos-sdk-v5/sample/getBucketWebsite.php | 2 +- .../sample/getDescribeDocProcessBuckets.php | 2 +- .../sample/getDescribeDocProcessJob.php | 2 +- .../sample/getDescribeDocProcessJobs.php | 2 +- .../sample/getDescribeDocProcessQueues.php | 2 +- .../sample/getDescribeMediaBuckets.php | 2 +- .../sample/getDescribeMediaQueues.php | 2 +- .../getDescribeMediaVoiceSeparateJob.php | 2 +- .../sample/getDetectAudioResult.php | 2 +- .../sample/getDetectDocumentResult.php | 2 +- .../sample/getDetectImageResult.php | 2 +- .../cos-sdk-v5/sample/getDetectTextResult.php | 2 +- .../sample/getDetectVideoResult.php | 2 +- .../sample/getDetectVirusResult.php | 2 +- .../sample/getDetectWebpageResult.php | 2 +- .../sample/getFileCompressResult.php | 2 +- .../sample/getFileHashCodeResult.php | 2 +- .../sample/getFileProcessQueueList.php | 2 +- .../sample/getFileUncompressResult.php | 2 +- .../qcloud/cos-sdk-v5/sample/getImageSlim.php | 23 + .../qcloud/cos-sdk-v5/sample/getMediaInfo.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/getObject.php | 2 +- .../cos-sdk-v5/sample/getPicBucketList.php | 30 + .../cos-sdk-v5/sample/getPicQueueList.php | 28 + .../cos-sdk-v5/sample/getPresignedUrl.php | 2 +- .../cos-sdk-v5/sample/getPrivateM3U8.php | 2 +- .../qcloud/cos-sdk-v5/sample/getSnapshot.php | 2 +- .../qcloud/cos-sdk-v5/sample/headBucket.php | 2 +- .../qcloud/cos-sdk-v5/sample/headObject.php | 2 +- .../sample/imageAssessQualityProcess.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/imageAve.php | 2 +- .../sample/imageDetectCarProcess.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/imageExif.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/imageInfo.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/imageMogr.php | 2 +- .../qcloud/cos-sdk-v5/sample/imageProcess.php | 2 +- .../cos-sdk-v5/sample/imageProcessCrop.php | 2 +- .../cos-sdk-v5/sample/imageProcessFormat.php | 2 +- .../sample/imageProcessFormatAvif.php | 2 +- .../sample/imageProcessFormatHeif.php | 2 +- .../sample/imageProcessFormatSvgc.php | 2 +- .../sample/imageProcessFormatTpg.php | 2 +- .../sample/imageProcessFormatWebp.php | 2 +- .../sample/imageProcessGaussianBlur.php | 2 +- .../cos-sdk-v5/sample/imageProcessQuality.php | 2 +- .../cos-sdk-v5/sample/imageProcessRotate.php | 2 +- .../sample/imageProcessThumbnail.php | 2 +- .../sample/imageProcessWatermarkText.php | 2 + .../cos-sdk-v5/sample/imageRepairProcess.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/imageView.php | 2 +- .../cos-sdk-v5/sample/imageWatermark.php | 2 +- .../qcloud/cos-sdk-v5/sample/listBuckets.php | 2 +- .../sample/listMultipartUploads.php | 2 +- .../qcloud/cos-sdk-v5/sample/listObjects.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/listParts.php | 2 +- .../cos-sdk-v5/sample/openAiService.php | 24 + .../sample/openFileProcessService.php | 2 +- .../cos-sdk-v5/sample/openImageSlim.php | 30 + .../sample/opticalOcrRecognition.php | 2 +- .../cos-sdk-v5/sample/picOperations.php | 2 +- .../cos-sdk-v5/sample/putBlindWatermark.php | 2 +- .../cos-sdk-v5/sample/putBucketAccelerate.php | 2 +- .../qcloud/cos-sdk-v5/sample/putBucketAcl.php | 2 +- .../cos-sdk-v5/sample/putBucketCors.php | 2 +- .../cos-sdk-v5/sample/putBucketDomain.php | 2 +- .../cos-sdk-v5/sample/putBucketGuetzli.php | 2 +- .../cos-sdk-v5/sample/putBucketImageStyle.php | 2 +- .../cos-sdk-v5/sample/putBucketInventory.php | 2 +- .../cos-sdk-v5/sample/putBucketLifecycle.php | 2 +- .../cos-sdk-v5/sample/putBucketLogging.php | 2 +- .../cos-sdk-v5/sample/putBucketTagging.php | 2 +- .../cos-sdk-v5/sample/putBucketWebsite.php | 2 +- .../cos-sdk-v5/sample/putImageStyle.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/putObject.php | 2 +- .../cos-sdk-v5/sample/putObjectTagging.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/putQrcode.php | 2 +- vendor/qcloud/cos-sdk-v5/sample/qrcode.php | 2 +- .../cos-sdk-v5/sample/qrcodeGenerate.php | 2 +- .../cos-sdk-v5/sample/restoreObject.php | 2 +- .../cos-sdk-v5/sample/selectObjectContent.php | 2 +- .../cos-sdk-v5/sample/textWatermark.php | 2 +- .../qcloud/cos-sdk-v5/sample/trafficLimit.php | 2 +- .../cos-sdk-v5/sample/updateAiQueue.php | 38 + .../sample/updateDocProcessQueue.php | 2 +- .../sample/updateFileProcessQueue.php | 2 +- .../sample/updateMediaAnimationTemplate.php | 2 +- .../sample/updateMediaConcatTemplate.php | 30 +- .../sample/updateMediaHighSpeedHdTemplate.php | 2 +- .../sample/updateMediaPicProcessTemplate.php | 2 +- .../cos-sdk-v5/sample/updateMediaQueue.php | 2 +- .../sample/updateMediaSmartCoverTemplate.php | 35 + .../sample/updateMediaSnapshotTemplate.php | 2 +- .../updateMediaSuperResolutionTemplate.php | 2 +- .../updateMediaTranscodeProTemplate.php | 62 + .../sample/updateMediaTranscodeTemplate.php | 30 +- .../updateMediaVideoEnhanceTemplate.php | 66 + .../updateMediaVideoMontageTemplate.php | 21 +- .../updateMediaVideoProcessTemplate.php | 2 +- .../updateMediaVoiceSeparateTemplate.php | 2 +- .../sample/updateMediaWatermarkTemplate.php | 2 +- .../cos-sdk-v5/sample/updatePicQueue.php | 38 + .../updateVoiceSpeechRecognitionTemplate.php | 45 + .../sample/updateVoiceTtsTemplate.php | 34 + vendor/qcloud/cos-sdk-v5/sample/upload.php | 2 +- .../qcloud/cos-sdk-v5/sample/uploadFolder.php | 2 +- .../qcloud/cos-sdk-v5/sample/uploadPart.php | 2 +- vendor/qcloud/cos-sdk-v5/src/Client.php | 53 +- .../src/CommandToRequestTransformer.php | 49 +- vendor/qcloud/cos-sdk-v5/src/Descriptions.php | 4945 ++++++++++++++++- .../TextWatermarkTemplate.php | 28 + .../cos-sdk-v5/src/ResultTransformer.php | 13 +- vendor/qcloud/cos-sdk-v5/src/Service.php | 72 + vendor/rmccue/requests/CHANGELOG.md | 39 + vendor/rmccue/requests/README.md | 18 + .../rmccue/requests/certificates/cacert.pem | 423 +- .../requests/certificates/cacert.pem.sha256 | 2 +- vendor/rmccue/requests/composer.json | 6 + vendor/rmccue/requests/library/Requests.php | 2 +- vendor/rmccue/requests/src/Autoload.php | 2 +- vendor/rmccue/requests/src/Capability.php | 2 +- vendor/rmccue/requests/src/Cookie.php | 25 +- vendor/rmccue/requests/src/Cookie/Jar.php | 7 +- vendor/rmccue/requests/src/IdnaEncoder.php | 12 +- vendor/rmccue/requests/src/Iri.php | 7 +- vendor/rmccue/requests/src/Requests.php | 10 +- vendor/rmccue/requests/src/Response.php | 20 +- .../rmccue/requests/src/Response/Headers.php | 9 +- vendor/rmccue/requests/src/Transport/Curl.php | 7 +- .../requests/src/Transport/Fsockopen.php | 7 +- .../src/Utility/CaseInsensitiveDictionary.php | 2 +- .../requests/src/Utility/FilteredIterator.php | 21 +- vendor/services.php | 2 +- .../cache/Adapter/DoctrineDbalAdapter.php | 62 +- vendor/symfony/cache/Traits/RedisTrait.php | 39 +- vendor/symfony/polyfill-ctype/LICENSE | 2 +- vendor/symfony/polyfill-ctype/composer.json | 2 +- vendor/symfony/polyfill-intl-idn/Idn.php | 28 +- vendor/symfony/polyfill-intl-idn/LICENSE | 2 +- .../Resources/unidata/DisallowedRanges.php | 9 + .../Resources/unidata/Regex.php | 9 + .../symfony/polyfill-intl-idn/composer.json | 2 +- .../symfony/polyfill-intl-normalizer/LICENSE | 2 +- .../polyfill-intl-normalizer/composer.json | 2 +- vendor/symfony/polyfill-mbstring/LICENSE | 2 +- vendor/symfony/polyfill-mbstring/Mbstring.php | 87 +- .../Resources/unidata/caseFolding.php | 119 + .../symfony/polyfill-mbstring/bootstrap.php | 4 + .../symfony/polyfill-mbstring/bootstrap80.php | 4 + .../symfony/polyfill-mbstring/composer.json | 2 +- vendor/symfony/polyfill-php72/LICENSE | 2 +- vendor/symfony/polyfill-php72/composer.json | 2 +- vendor/symfony/polyfill-php73/LICENSE | 2 +- vendor/symfony/polyfill-php73/composer.json | 2 +- vendor/symfony/polyfill-php80/LICENSE | 2 +- vendor/symfony/polyfill-php80/composer.json | 2 +- vendor/symfony/polyfill-php81/LICENSE | 2 +- vendor/symfony/polyfill-php81/README.md | 1 + .../Resources/stubs/CURLStringFile.php | 51 + vendor/symfony/polyfill-php81/composer.json | 2 +- .../PsrServerRequestResolver.php | 11 +- .../ValueResolverInterface.php | 26 + .../psr-http-message-bridge/CHANGELOG.md | 9 + .../Factory/HttpFoundationFactory.php | 12 +- .../Factory/PsrHttpFactory.php | 33 +- .../Factory/UploadedFile.php | 2 +- .../psr-http-message-bridge/composer.json | 3 +- .../TencentCloud/Common/AbstractClient.php | 2 +- vendor/tencentcloud/sms/composer.json | 2 +- .../Sms/V20190711/Models/DeleteSignStatus.php | 8 + .../TencentCloud/Sms/V20190711/SmsClient.php | 8 - vendor/topthink/framework/README.md | 2 +- vendor/topthink/framework/src/think/App.php | 2 +- vendor/topthink/framework/src/think/Route.php | 32 +- .../framework/src/think/cache/driver/File.php | 3 +- .../framework/src/think/console/bin/README.md | 1 + .../src/think/console/bin/hiddeninput.exe | Bin 0 -> 9216 bytes .../src/think/console/command/RouteList.php | 2 +- .../think/console/command/optimize/Schema.php | 5 + .../framework/src/think/facade/Route.php | 6 +- .../framework/src/think/initializer/Error.php | 4 +- .../src/think/middleware/SessionInit.php | 2 +- .../framework/src/think/response/Redirect.php | 14 +- .../framework/src/think/route/Dispatch.php | 10 - .../framework/src/think/route/Domain.php | 7 +- .../framework/src/think/route/Resource.php | 37 +- .../src/think/route/ResourceRegister.php | 72 + .../framework/src/think/route/Rule.php | 11 +- .../framework/src/think/route/RuleGroup.php | 95 +- .../framework/src/think/route/RuleItem.php | 23 +- .../framework/src/think/route/RuleName.php | 5 +- .../framework/src/think/route/Url.php | 2 +- vendor/topthink/think-multi-app/composer.json | 2 +- .../topthink/think-multi-app/src/MultiApp.php | 33 +- vendor/topthink/think-multi-app/src/Url.php | 2 +- vendor/w7corp/easywechat/README.md | 4 +- vendor/w7corp/easywechat/composer.json | 3 +- vendor/w7corp/easywechat/docs/.npmrc | 1 + vendor/w7corp/easywechat/docs/package.json | 17 +- vendor/w7corp/easywechat/docs/pnpm-lock.yaml | 1252 +++-- .../w7corp/easywechat/docs/src/3.x/notice.md | 76 +- .../w7corp/easywechat/docs/src/3.x/oauth.md | 25 +- .../w7corp/easywechat/docs/src/3.x/payment.md | 116 +- vendor/w7corp/easywechat/docs/src/3.x/poi.md | 18 +- .../w7corp/easywechat/docs/src/3.x/roadmap.md | 5 +- .../easywechat/docs/src/3.x/tutorial.md | 63 +- .../w7corp/easywechat/docs/src/4.x/client.md | 44 + .../docs/src/4.x/official-account/accounts.md | 2 +- .../docs/src/4.x/official-account/card.md | 4 +- .../docs/src/4.x/official-account/material.md | 4 +- .../docs/src/4.x/official-account/oauth.md | 4 +- .../docs/src/4.x/official-account/poi.md | 4 +- .../4.x/official-account/template_message.md | 5 +- .../easywechat/docs/src/4.x/overview.md | 6 +- .../easywechat/docs/src/4.x/payment/order.md | 2 +- .../docs/src/4.x/payment/scan-pay.md | 18 +- .../w7corp/easywechat/docs/src/4.x/sidebar.js | 16 +- .../docs/src/4.x/wework/external-contact.md | 51 + .../docs/src/4.x/wework/group-robot.md | 7 +- .../easywechat/docs/src/4.x/wework/media.md | 14 + .../docs/src/5.x/official-account/accounts.md | 2 +- .../docs/src/5.x/official-account/card.md | 4 +- .../docs/src/5.x/official-account/material.md | 4 +- .../docs/src/5.x/official-account/oauth.md | 4 +- .../docs/src/5.x/official-account/poi.md | 4 +- .../5.x/official-account/template_message.md | 5 +- .../5.x/open-platform/authorizer-delegate.md | 8 +- .../easywechat/docs/src/5.x/overview.md | 6 +- .../easywechat/docs/src/5.x/payment/order.md | 2 +- .../docs/src/5.x/payment/scan-pay.md | 18 +- .../docs/src/5.x/wework/group-robot.md | 7 +- .../w7corp/easywechat/docs/src/6.x/client.md | 2 +- .../w7corp/easywechat/docs/src/6.x/index.md | 6 + .../docs/src/6.x/mini-app/config.md | 8 + .../easywechat/docs/src/6.x/mini-app/index.md | 2 +- .../w7corp/easywechat/docs/src/6.x/oauth.md | 12 +- .../docs/src/6.x/official-account/config.md | 8 + .../docs/src/6.x/official-account/examples.md | 33 + .../docs/src/6.x/open-platform/examples.md | 11 +- .../docs/src/6.x/open-platform/index.md | 4 +- .../docs/src/6.x/open-work/server.md | 20 +- .../easywechat/docs/src/6.x/pay/index.md | 57 + .../easywechat/docs/src/6.x/pay/media.md | 32 + .../easywechat/docs/src/6.x/pay/server.md | 27 +- .../w7corp/easywechat/docs/src/6.x/sidebar.js | 1 + .../docs/src/6.x/troubleshooting.md | 2 +- .../easywechat/docs/src/6.x/work/utils.md | 4 +- vendor/w7corp/easywechat/docs/src/index.md | 22 +- .../w7corp/easywechat/src/Kernel/Config.php | 5 +- .../src/Kernel/Contracts/JsApiTicket.php | 15 + .../Contracts/RefreshableJsApiTicket.php | 8 + .../easywechat/src/Kernel/Encryptor.php | 16 +- .../src/Kernel/Exceptions/HttpException.php | 4 - .../easywechat/src/Kernel/Form/File.php | 48 +- .../HttpClient/AccessTokenAwareClient.php | 6 +- .../Kernel/HttpClient/HttpClientMethods.php | 14 +- .../src/Kernel/HttpClient/RequestUtil.php | 35 +- .../Kernel/HttpClient/RequestWithPresets.php | 3 +- .../src/Kernel/HttpClient/Response.php | 36 +- .../w7corp/easywechat/src/Kernel/Message.php | 7 +- .../easywechat/src/Kernel/ServerResponse.php | 33 +- .../easywechat/src/Kernel/Support/AesCbc.php | 6 +- .../easywechat/src/Kernel/Support/AesEcb.php | 6 +- .../easywechat/src/Kernel/Support/AesGcm.php | 8 +- .../easywechat/src/Kernel/Support/Arr.php | 22 +- .../src/Kernel/Support/PrivateKey.php | 3 +- .../src/Kernel/Support/PublicKey.php | 1 + .../easywechat/src/Kernel/Support/Str.php | 3 +- .../src/Kernel/Support/UserAgent.php | 4 +- .../easywechat/src/Kernel/Support/Xml.php | 2 +- .../src/Kernel/Traits/InteractWithConfig.php | 1 + .../Kernel/Traits/InteractWithHandlers.php | 10 +- .../Kernel/Traits/InteractWithHttpClient.php | 3 +- .../src/Kernel/Traits/RespondXmlMessage.php | 14 +- .../easywechat/src/MiniApp/AccessToken.php | 2 +- .../easywechat/src/MiniApp/Application.php | 8 +- .../easywechat/src/MiniApp/Decryptor.php | 5 +- .../src/OfficialAccount/AccessToken.php | 79 +- .../src/OfficialAccount/Application.php | 19 +- .../src/OfficialAccount/JsApiTicket.php | 11 +- .../easywechat/src/OfficialAccount/Server.php | 7 +- .../easywechat/src/OfficialAccount/Utils.php | 3 +- .../src/OpenPlatform/Application.php | 11 +- .../src/OpenPlatform/ComponentAccessToken.php | 11 +- .../easywechat/src/OpenPlatform/Server.php | 9 +- .../src/OpenPlatform/VerifyTicket.php | 7 +- .../easywechat/src/OpenWork/Application.php | 84 +- .../src/OpenWork/AuthorizerAccessToken.php | 127 +- .../easywechat/src/OpenWork/JsApiTicket.php | 165 + .../easywechat/src/OpenWork/Message.php | 2 + .../src/OpenWork/ProviderAccessToken.php | 10 +- .../w7corp/easywechat/src/OpenWork/Server.php | 32 +- .../src/OpenWork/SuiteAccessToken.php | 14 +- .../easywechat/src/OpenWork/SuiteTicket.php | 7 +- .../w7corp/easywechat/src/Pay/Application.php | 23 + vendor/w7corp/easywechat/src/Pay/Client.php | 62 +- .../src/Pay/Contracts/ResponseValidator.php | 7 +- .../src/Pay/Contracts/Validator.php | 15 + .../Exceptions/InvalidSignatureException.php | 9 + .../easywechat/src/Pay/LegacySignature.php | 5 +- vendor/w7corp/easywechat/src/Pay/Merchant.php | 3 +- vendor/w7corp/easywechat/src/Pay/Message.php | 3 +- .../easywechat/src/Pay/ResponseValidator.php | 62 +- vendor/w7corp/easywechat/src/Pay/Server.php | 63 +- .../w7corp/easywechat/src/Pay/Signature.php | 7 +- .../easywechat/src/Pay/URLSchemeBuilder.php | 1 + vendor/w7corp/easywechat/src/Pay/Utils.php | 7 +- .../w7corp/easywechat/src/Pay/Validator.php | 71 + .../easywechat/src/Work/AccessToken.php | 18 +- .../easywechat/src/Work/Application.php | 17 +- .../easywechat/src/Work/JsApiTicket.php | 11 +- vendor/w7corp/easywechat/src/Work/Server.php | 6 +- vendor/w7corp/easywechat/src/Work/Utils.php | 1 + 809 files changed, 15885 insertions(+), 21338 deletions(-) create mode 100644 vendor/bin/jp.php create mode 100644 vendor/bin/jp.php.bat delete mode 100644 vendor/dragonmantank/cron-expression/phpstan.neon create mode 100644 vendor/guzzlehttp/command/.php-cs-fixer.dist.php create mode 100644 vendor/guzzlehttp/command/vendor-bin/php-cs-fixer/composer.json create mode 100644 vendor/guzzlehttp/guzzle-services/.php-cs-fixer.dist.php create mode 100644 vendor/guzzlehttp/guzzle-services/vendor-bin/php-cs-fixer/composer.json delete mode 100644 vendor/guzzlehttp/promises/src/functions.php delete mode 100644 vendor/guzzlehttp/promises/src/functions_include.php delete mode 100644 vendor/monolog/monolog/CHANGELOG.md delete mode 100644 vendor/monolog/monolog/LICENSE delete mode 100644 vendor/monolog/monolog/README.md delete mode 100644 vendor/monolog/monolog/UPGRADE.md delete mode 100644 vendor/monolog/monolog/composer.json delete mode 100644 vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php delete mode 100644 vendor/monolog/monolog/src/Monolog/ErrorHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/Handler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/LogRecord.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Logger.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Registry.php delete mode 100644 vendor/monolog/monolog/src/Monolog/ResettableInterface.php delete mode 100644 vendor/monolog/monolog/src/Monolog/SignalHandler.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Test/TestCase.php delete mode 100644 vendor/monolog/monolog/src/Monolog/Utils.php create mode 100644 vendor/mtdowling/jmespath.php/bin/jp.php create mode 100644 vendor/mtdowling/jmespath.php/bin/perf.php delete mode 100644 vendor/myclabs/php-enum/psalm.xml create mode 100644 vendor/myclabs/php-enum/stubs/Stringable.php create mode 100644 vendor/phpoffice/phpspreadsheet/phpunit10.xml.dist create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/IgnoredErrors.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/AxisText.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Downloader.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Handler.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SharedFormula.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/DataValidations.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Date.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/DateTime.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/DateTimeWizard.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Duration.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Time.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/RgbTint.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Theme.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/ZipStream0.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/ZipStream2.php create mode 100644 vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/ZipStream3.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/closeImageSlim.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/createAiTranslationJobs.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/createAiWordsGeneralizeJobs.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/createM3U8PlayListJobs.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/createMediaSmartCoverTemplate.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/createMediaTranscodeProTemplate.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/createMediaVideoEnhanceJobs.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/createMediaVideoEnhanceTemplate.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/createVoiceSpeechRecognitionJobs.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/createVoiceSpeechRecognitionTemplate.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/createVoiceTtsJobs.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/createVoiceTtsTemplate.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/getAiBucketList.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/getAiQueueList.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/getImageSlim.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/getPicBucketList.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/getPicQueueList.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/openAiService.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/openImageSlim.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/updateAiQueue.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/updateMediaSmartCoverTemplate.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/updateMediaTranscodeProTemplate.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/updateMediaVideoEnhanceTemplate.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/updatePicQueue.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/updateVoiceSpeechRecognitionTemplate.php create mode 100644 vendor/qcloud/cos-sdk-v5/sample/updateVoiceTtsTemplate.php create mode 100644 vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php create mode 100644 vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php create mode 100644 vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/ValueResolverInterface.php create mode 100644 vendor/topthink/framework/src/think/console/bin/README.md create mode 100644 vendor/topthink/framework/src/think/console/bin/hiddeninput.exe create mode 100644 vendor/topthink/framework/src/think/route/ResourceRegister.php create mode 100644 vendor/w7corp/easywechat/docs/.npmrc create mode 100644 vendor/w7corp/easywechat/docs/src/4.x/client.md create mode 100644 vendor/w7corp/easywechat/docs/src/6.x/pay/media.md create mode 100644 vendor/w7corp/easywechat/src/Kernel/Contracts/JsApiTicket.php create mode 100644 vendor/w7corp/easywechat/src/Kernel/Contracts/RefreshableJsApiTicket.php create mode 100644 vendor/w7corp/easywechat/src/OpenWork/JsApiTicket.php create mode 100644 vendor/w7corp/easywechat/src/Pay/Contracts/Validator.php create mode 100644 vendor/w7corp/easywechat/src/Pay/Exceptions/InvalidSignatureException.php create mode 100644 vendor/w7corp/easywechat/src/Pay/Validator.php diff --git a/app/adminapi/controller/SuYuanController.php b/app/adminapi/controller/SuYuanController.php index b8445a44..cce2aa9c 100644 --- a/app/adminapi/controller/SuYuanController.php +++ b/app/adminapi/controller/SuYuanController.php @@ -117,7 +117,8 @@ class SuYuanController extends BaseAdminController return $this->success('请求成功',$data); } - public function monitorList() { + public function monitorList(): Json + { $params = $this->request->get(['id','flag']); if(empty($params['id']) || empty($params['flag'])){ return $this->fail('参数错误'); diff --git a/composer.lock b/composer.lock index 90260152..0470a267 100644 --- a/composer.lock +++ b/composer.lock @@ -18,13 +18,7 @@ "type": "zip", "url": "https://api.github.com/repos/adbario/php-dot-notation/zipball/081e2cca50c84bfeeea2e3ef9b2c8d206d80ccae", "reference": "081e2cca50c84bfeeea2e3ef9b2c8d206d80ccae", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-json": "*", @@ -77,13 +71,7 @@ "type": "zip", "url": "https://api.github.com/repos/aliyun/openapi-sdk-php-client/zipball/5bc6f6d660797dcee2c3aef29700ab41ee764f4d", "reference": "5bc6f6d660797dcee2c3aef29700ab41ee764f4d", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "adbario/php-dot-notation": "^2.4.1", @@ -167,13 +155,7 @@ "type": "zip", "url": "https://api.github.com/repos/aliyun/aliyun-oss-php-sdk/zipball/572d0f8e099e8630ae7139ed3fdedb926c7a760f", "reference": "572d0f8e099e8630ae7139ed3fdedb926c7a760f", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.3" @@ -218,13 +200,7 @@ "type": "zip", "url": "https://api.github.com/repos/clagiordano/weblibs-configmanager/zipball/8802c7396d61a923c9a73e37ead062b24bb1b273", "reference": "8802c7396d61a923c9a73e37ead062b24bb1b273", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-json": "*", @@ -269,23 +245,17 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v3.3.1", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", + "shasum": "" }, "require": { "php": "^7.2|^8.0", @@ -324,7 +294,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3" }, "funding": [ { @@ -332,7 +302,7 @@ "type": "github" } ], - "time": "2022-01-18T15:43:28+00:00" + "time": "2023-08-10T19:36:49+00:00" }, { "name": "ezyang/htmlpurifier", @@ -346,13 +316,7 @@ "type": "zip", "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/523407fb06eb9e5f3d59889b3978d5bfe94299c8", "reference": "523407fb06eb9e5f3d59889b3978d5bfe94299c8", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0" @@ -403,34 +367,35 @@ }, { "name": "guzzlehttp/command", - "version": "1.2.3", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/command.git", - "reference": "3c9383aaf2e39fa8d39375ae37b95b55964aaef4" + "reference": "3372bcfd79d4b357b6871665bf06155515e8d844" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/command/zipball/3c9383aaf2e39fa8d39375ae37b95b55964aaef4", - "reference": "3c9383aaf2e39fa8d39375ae37b95b55964aaef4", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/guzzle/command/zipball/3372bcfd79d4b357b6871665bf06155515e8d844", + "reference": "3372bcfd79d4b357b6871665bf06155515e8d844", + "shasum": "" }, "require": { "guzzlehttp/guzzle": "^7.5.1", - "guzzlehttp/promises": "^1.5.2", + "guzzlehttp/promises": "^1.5.3 || ^2.0", "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", "php": "^7.2.5 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5.19" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.19 || ^9.5.8" }, "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, "autoload": { "psr-4": { "GuzzleHttp\\Command\\": "src/" @@ -465,7 +430,7 @@ "description": "Provides the foundation for building command-based web service clients", "support": { "issues": "https://github.com/guzzle/command/issues", - "source": "https://github.com/guzzle/command/tree/1.2.3" + "source": "https://github.com/guzzle/command/tree/1.3.0" }, "funding": [ { @@ -481,32 +446,26 @@ "type": "tidelift" } ], - "time": "2023-04-18T08:30:31+00:00" + "time": "2023-05-21T14:15:09+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.5.1", + "version": "7.8.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9" + "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b964ca597e86b752cd994f27293e9fa6b6a95ed9", - "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -517,7 +476,8 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, @@ -531,9 +491,6 @@ "bamarni-bin": { "bin-links": true, "forward-command": false - }, - "branch-alias": { - "dev-master": "7.5-dev" } }, "autoload": { @@ -599,7 +556,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.5.1" + "source": "https://github.com/guzzle/guzzle/tree/7.8.0" }, "funding": [ { @@ -615,36 +572,31 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:30:08+00:00" + "time": "2023-08-27T10:20:53+00:00" }, { "name": "guzzlehttp/guzzle-services", - "version": "1.3.2", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle-services.git", - "reference": "4989d902dd4e0411b320e851c46f3c94d652d891" + "reference": "f4bb1c205152a56741624b88753732e01a60565c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle-services/zipball/4989d902dd4e0411b320e851c46f3c94d652d891", - "reference": "4989d902dd4e0411b320e851c46f3c94d652d891", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/guzzle/guzzle-services/zipball/f4bb1c205152a56741624b88753732e01a60565c", + "reference": "f4bb1c205152a56741624b88753732e01a60565c", + "shasum": "" }, "require": { - "guzzlehttp/command": "^1.2.2", - "guzzlehttp/guzzle": "^7.4.1", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/command": "^1.3", + "guzzlehttp/guzzle": "^7.7", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", "guzzlehttp/uri-template": "^1.0.1", "php": "^7.2.5 || ^8.0" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", "phpunit/phpunit": "^8.5.19 || ^9.5.8" }, "suggest": { @@ -652,8 +604,9 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.3-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { @@ -690,7 +643,7 @@ "description": "Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.", "support": { "issues": "https://github.com/guzzle/guzzle-services/issues", - "source": "https://github.com/guzzle/guzzle-services/tree/1.3.2" + "source": "https://github.com/guzzle/guzzle-services/tree/1.4.0" }, "funding": [ { @@ -706,44 +659,37 @@ "type": "tidelift" } ], - "time": "2022-03-03T11:21:34+00:00" + "time": "2023-05-21T14:21:30+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.2", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "b94b2807d85443f9719887892882d0329d1e2598" + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", - "reference": "b94b2807d85443f9719887892882d0329d1e2598", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", + "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -780,7 +726,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.2" + "source": "https://github.com/guzzle/promises/tree/2.0.1" }, "funding": [ { @@ -796,27 +742,21 @@ "type": "tidelift" } ], - "time": "2022-08-28T14:55:35+00:00" + "time": "2023-08-03T15:11:55+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.5.0", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", @@ -902,7 +842,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" + "source": "https://github.com/guzzle/psr7/tree/2.6.1" }, "funding": [ { @@ -918,42 +858,32 @@ "type": "tidelift" } ], - "time": "2023-04-17T16:11:26+00:00" + "time": "2023-08-27T10:13:57+00:00" }, { "name": "guzzlehttp/uri-template", - "version": "v1.0.1", + "version": "v1.0.2", "source": { "type": "git", "url": "https://github.com/guzzle/uri-template.git", - "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2" + "reference": "61bf437fc2197f587f6857d3ff903a24f1731b5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/uri-template/zipball/b945d74a55a25a949158444f09ec0d3c120d69e2", - "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/61bf437fc2197f587f6857d3ff903a24f1731b5d", + "reference": "61bf437fc2197f587f6857d3ff903a24f1731b5d", + "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", "symfony/polyfill-php80": "^1.17" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", "phpunit/phpunit": "^8.5.19 || ^9.5.8", "uri-template/tests": "1.0.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "autoload": { "psr-4": { "GuzzleHttp\\UriTemplate\\": "src" @@ -992,7 +922,7 @@ ], "support": { "issues": "https://github.com/guzzle/uri-template/issues", - "source": "https://github.com/guzzle/uri-template/tree/v1.0.1" + "source": "https://github.com/guzzle/uri-template/tree/v1.0.2" }, "funding": [ { @@ -1008,7 +938,7 @@ "type": "tidelift" } ], - "time": "2021-10-07T12:57:01+00:00" + "time": "2023-08-27T10:19:19+00:00" }, { "name": "league/flysystem", @@ -1154,7 +1084,7 @@ }, { "name": "maennchen/zipstream-php", - "version": "v2.4.0", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/maennchen/ZipStream-PHP.git", @@ -1164,13 +1094,7 @@ "type": "zip", "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3", "reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-mbstring": "*", @@ -1222,7 +1146,7 @@ ], "support": { "issues": "https://github.com/maennchen/ZipStream-PHP/issues", - "source": "https://github.com/maennchen/ZipStream-PHP/tree/v2.4.0" + "source": "https://github.com/maennchen/ZipStream-PHP/tree/2.4.0" }, "funding": [ { @@ -1248,13 +1172,7 @@ "type": "zip", "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9", "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^7.2 || ^8.0" @@ -1305,13 +1223,7 @@ "type": "zip", "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c", "reference": "728434227fe21be27ff6d86621a1b13107a2562c", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^7.1 || ^8.0" @@ -1355,141 +1267,27 @@ }, "time": "2022-12-02T22:17:43+00:00" }, - { - "name": "monolog/monolog", - "version": "2.9.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "e1c0ae1528ce313a450e5e1ad782765c4a8dd3cb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e1c0ae1528ce313a450e5e1ad782765c4a8dd3cb", - "reference": "e1c0ae1528ce313a450e5e1ad782765c4a8dd3cb", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=7.2", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", - "guzzlehttp/guzzle": "^7.4", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5.14", - "predis/predis": "^1.1 || ^2.0", - "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": "^7", - "swiftmailer/swiftmailer": "^5.3|^6.0", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.9.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2023-02-05T13:07:32+00:00" - }, { "name": "mtdowling/jmespath.php", - "version": "2.6.1", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb" + "reference": "bbb69a935c2cbb0c03d7f481a238027430f6440b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/9b87907a81b87bc76d19a7fb2d61e61486ee9edb", - "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/bbb69a935c2cbb0c03d7f481a238027430f6440b", + "reference": "bbb69a935c2cbb0c03d7f481a238027430f6440b", + "shasum": "" }, "require": { - "php": "^5.4 || ^7.0 || ^8.0", + "php": "^7.2.5 || ^8.0", "symfony/polyfill-mbstring": "^1.17" }, "require-dev": { - "composer/xdebug-handler": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^7.5.15" + "composer/xdebug-handler": "^3.0.3", + "phpunit/phpunit": "^8.5.33" }, "bin": [ "bin/jp.php" @@ -1497,7 +1295,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "autoload": { @@ -1513,6 +1311,11 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", @@ -1526,29 +1329,23 @@ ], "support": { "issues": "https://github.com/jmespath/jmespath.php/issues", - "source": "https://github.com/jmespath/jmespath.php/tree/2.6.1" + "source": "https://github.com/jmespath/jmespath.php/tree/2.7.0" }, - "time": "2021-06-14T00:11:39+00:00" + "time": "2023-08-25T10:54:48+00:00" }, { "name": "myclabs/php-enum", - "version": "1.8.3", + "version": "1.8.4", "source": { "type": "git", "url": "https://github.com/myclabs/php-enum.git", - "reference": "b942d263c641ddb5190929ff840c68f78713e937" + "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/php-enum/zipball/b942d263c641ddb5190929ff840c68f78713e937", - "reference": "b942d263c641ddb5190929ff840c68f78713e937", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483", + "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483", + "shasum": "" }, "require": { "ext-json": "*", @@ -1563,7 +1360,10 @@ "autoload": { "psr-4": { "MyCLabs\\Enum\\": "src/" - } + }, + "classmap": [ + "stubs/Stringable.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1582,7 +1382,7 @@ ], "support": { "issues": "https://github.com/myclabs/php-enum/issues", - "source": "https://github.com/myclabs/php-enum/tree/1.8.3" + "source": "https://github.com/myclabs/php-enum/tree/1.8.4" }, "funding": [ { @@ -1594,7 +1394,7 @@ "type": "tidelift" } ], - "time": "2021-07-05T08:18:36+00:00" + "time": "2022-08-04T09:53:51+00:00" }, { "name": "nyholm/psr7", @@ -1608,13 +1408,7 @@ "type": "zip", "url": "https://api.github.com/repos/Nyholm/psr7/zipball/3cb4d163b58589e47b35103e8e5e6a6a475b47be", "reference": "3cb4d163b58589e47b35103e8e5e6a6a475b47be", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=7.2", @@ -1692,13 +1486,7 @@ "type": "zip", "url": "https://api.github.com/repos/Nyholm/psr7-server/zipball/b846a689844cef114e8079d8c80f0afd96745ae3", "reference": "b846a689844cef114e8079d8c80f0afd96745ae3", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^7.1 || ^8.0", @@ -1754,23 +1542,17 @@ }, { "name": "overtrue/socialite", - "version": "4.8.0", + "version": "4.9.0", "source": { "type": "git", "url": "https://github.com/overtrue/socialite.git", - "reference": "e55fdf50f8003be8f03a85a7e5a5b7c5716f4c9a" + "reference": "dcbb1eed948fe036e6de8cdf0b125f5af1bc73fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/overtrue/socialite/zipball/e55fdf50f8003be8f03a85a7e5a5b7c5716f4c9a", - "reference": "e55fdf50f8003be8f03a85a7e5a5b7c5716f4c9a", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/overtrue/socialite/zipball/dcbb1eed948fe036e6de8cdf0b125f5af1bc73fb", + "reference": "dcbb1eed948fe036e6de8cdf0b125f5af1bc73fb", + "shasum": "" }, "require": { "ext-json": "*", @@ -1821,7 +1603,7 @@ ], "support": { "issues": "https://github.com/overtrue/socialite/issues", - "source": "https://github.com/overtrue/socialite/tree/4.8.0" + "source": "https://github.com/overtrue/socialite/tree/4.9.0" }, "funding": [ { @@ -1829,27 +1611,21 @@ "type": "github" } ], - "time": "2023-01-10T14:29:55+00:00" + "time": "2023-09-01T11:01:34+00:00" }, { "name": "phpoffice/phpspreadsheet", - "version": "1.28.0", + "version": "1.29.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a" + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a", - "reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "shasum": "" }, "require": { "ext-ctype": "*", @@ -1866,7 +1642,7 @@ "ext-zip": "*", "ext-zlib": "*", "ezyang/htmlpurifier": "^4.15", - "maennchen/zipstream-php": "^2.1", + "maennchen/zipstream-php": "^2.1 || ^3.0", "markbaker/complex": "^3.0", "markbaker/matrix": "^3.0", "php": "^7.4 || ^8.0", @@ -1878,12 +1654,12 @@ "dealerdirect/phpcodesniffer-composer-installer": "dev-main", "dompdf/dompdf": "^1.0 || ^2.0", "friendsofphp/php-cs-fixer": "^3.2", - "mitoteam/jpgraph": "^10.2.4", + "mitoteam/jpgraph": "^10.3", "mpdf/mpdf": "^8.1.1", "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.1", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5 || ^9.0", + "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0", "squizlabs/php_codesniffer": "^3.7", "tecnickcom/tcpdf": "^6.5" }, @@ -1938,9 +1714,9 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.28.0" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0" }, - "time": "2023-02-25T12:24:49+00:00" + "time": "2023-06-14T22:48:31+00:00" }, { "name": "psr/cache", @@ -1954,13 +1730,7 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/cache/zipball/213f9dbc5b9bfbc4f8db86d2838dc968752ce13b", "reference": "213f9dbc5b9bfbc4f8db86d2838dc968752ce13b", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=8.0.0" @@ -2009,13 +1779,7 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=7.4.0" @@ -2053,27 +1817,21 @@ }, { "name": "psr/http-client", - "version": "1.0.1", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -2093,7 +1851,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -2105,9 +1863,9 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/master" + "source": "https://github.com/php-fig/http-client" }, - "time": "2020-06-29T06:28:15+00:00" + "time": "2023-09-23T14:17:50+00:00" }, { "name": "psr/http-factory", @@ -2121,13 +1879,7 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", "reference": "e616d01114759c4c489f93b099585439f795fe35", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=7.0.0", @@ -2182,13 +1934,7 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba", "reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": "^7.2 || ^8.0" @@ -2241,13 +1987,7 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.3.0" @@ -2297,13 +2037,7 @@ "type": "zip", "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.3.0" @@ -2344,23 +2078,17 @@ }, { "name": "qcloud/cos-sdk-v5", - "version": "v2.6.2", + "version": "v2.6.6", "source": { "type": "git", "url": "https://github.com/tencentyun/cos-php-sdk-v5.git", - "reference": "92a1ee62b85ed4e7bf6836a684df5d7e3158d0ed" + "reference": "9d82ccb550fe2dca1adfb53835791d314023a9a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tencentyun/cos-php-sdk-v5/zipball/92a1ee62b85ed4e7bf6836a684df5d7e3158d0ed", - "reference": "92a1ee62b85ed4e7bf6836a684df5d7e3158d0ed", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/tencentyun/cos-php-sdk-v5/zipball/9d82ccb550fe2dca1adfb53835791d314023a9a8", + "reference": "9d82ccb550fe2dca1adfb53835791d314023a9a8", + "shasum": "" }, "require": { "ext-curl": "*", @@ -2412,9 +2140,9 @@ ], "support": { "issues": "https://github.com/tencentyun/cos-php-sdk-v5/issues", - "source": "https://github.com/tencentyun/cos-php-sdk-v5/tree/v2.6.2" + "source": "https://github.com/tencentyun/cos-php-sdk-v5/tree/v2.6.6" }, - "time": "2023-04-07T07:38:24+00:00" + "time": "2023-08-23T08:14:27+00:00" }, { "name": "qiniu/php-sdk", @@ -2428,13 +2156,7 @@ "type": "zip", "url": "https://api.github.com/repos/qiniu/php-sdk/zipball/1c6bc89166e524a40ee42bf516fb99ffc6401c82", "reference": "1c6bc89166e524a40ee42bf516fb99ffc6401c82", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.3.3" @@ -2489,13 +2211,7 @@ "type": "zip", "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.6" @@ -2529,23 +2245,17 @@ }, { "name": "rmccue/requests", - "version": "v2.0.5", + "version": "v2.0.8", "source": { "type": "git", "url": "https://github.com/WordPress/Requests.git", - "reference": "b717f1d2f4ef7992ec0c127747ed8b7e170c2f49" + "reference": "fae75bcb83d9d00d0e31ee86a472a036f9f91519" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/Requests/zipball/b717f1d2f4ef7992ec0c127747ed8b7e170c2f49", - "reference": "b717f1d2f4ef7992ec0c127747ed8b7e170c2f49", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/WordPress/Requests/zipball/fae75bcb83d9d00d0e31ee86a472a036f9f91519", + "reference": "fae75bcb83d9d00d0e31ee86a472a036f9f91519", + "shasum": "" }, "require": { "ext-json": "*", @@ -2562,6 +2272,12 @@ "wp-coding-standards/wpcs": "^2.0", "yoast/phpunit-polyfills": "^1.0.0" }, + "suggest": { + "art4/requests-psr18-adapter": "For using Requests as a PSR-18 HTTP Client", + "ext-curl": "For improved performance", + "ext-openssl": "For secure transport support", + "ext-zlib": "For improved performance when decompressing encoded streams" + }, "type": "library", "autoload": { "files": [ @@ -2612,27 +2328,21 @@ "issues": "https://github.com/WordPress/Requests/issues", "source": "https://github.com/WordPress/Requests" }, - "time": "2022-10-11T08:15:28+00:00" + "time": "2023-09-11T08:27:57+00:00" }, { "name": "symfony/cache", - "version": "v5.4.23", + "version": "v5.4.29", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107" + "reference": "e29c5a97bc2d81269973c3e1d7ceb9d48b4d5151" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/983c79ff28612cdfd66d8e44e1a06e5afc87e107", - "reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/cache/zipball/e29c5a97bc2d81269973c3e1d7ceb9d48b4d5151", + "reference": "e29c5a97bc2d81269973c3e1d7ceb9d48b4d5151", + "shasum": "" }, "require": { "php": ">=7.2.5", @@ -2699,7 +2409,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v5.4.23" + "source": "https://github.com/symfony/cache/tree/v5.4.29" }, "funding": [ { @@ -2715,7 +2425,7 @@ "type": "tidelift" } ], - "time": "2023-04-21T15:38:51+00:00" + "time": "2023-09-19T13:25:51+00:00" }, { "name": "symfony/cache-contracts", @@ -2729,13 +2439,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", "reference": "64be4a7acb83b6f2bf6de9a02cee6dad41277ebc", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=7.2.5", @@ -2814,13 +2518,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=8.0.2" @@ -2887,13 +2585,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/http-client/zipball/541c04560da1875f62c963c3aab6ea12a7314e11", "reference": "541c04560da1875f62c963c3aab6ea12a7314e11", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=8.0.2", @@ -2977,13 +2669,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/4184b9b63af1edaf35b6a7974c6f1f9f33294129", "reference": "4184b9b63af1edaf35b6a7974c6f1f9f33294129", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=8.0.2" @@ -3061,13 +2747,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e16b2676a4b3b1fa12378a20b29c364feda2a8d6", "reference": "e16b2676a4b3b1fa12378a20b29c364feda2a8d6", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=8.0.2", @@ -3142,13 +2822,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/mime/zipball/d7052547a0070cbeadd474e172b527a00d657301", "reference": "d7052547a0070cbeadd474e172b527a00d657301", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=8.0.2", @@ -3220,23 +2894,17 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "shasum": "" }, "require": { "php": ">=7.1" @@ -3250,7 +2918,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3288,7 +2956,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -3304,27 +2972,21 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da" + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", + "shasum": "" }, "require": { "php": ">=7.1", @@ -3337,7 +2999,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3381,7 +3043,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" }, "funding": [ { @@ -3397,27 +3059,21 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:30:37+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "shasum": "" }, "require": { "php": ">=7.1" @@ -3428,7 +3084,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3471,7 +3127,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -3487,27 +3143,21 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", + "shasum": "" }, "require": { "php": ">=7.1" @@ -3521,7 +3171,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3560,7 +3210,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -3576,27 +3226,21 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", + "shasum": "" }, "require": { "php": ">=7.1" @@ -3604,7 +3248,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3642,7 +3286,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" }, "funding": [ { @@ -3658,27 +3302,21 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "shasum": "" }, "require": { "php": ">=7.1" @@ -3686,7 +3324,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3727,7 +3365,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" }, "funding": [ { @@ -3743,27 +3381,21 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "shasum": "" }, "require": { "php": ">=7.1" @@ -3771,7 +3403,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3816,7 +3448,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -3832,27 +3464,21 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "shasum": "" }, "require": { "php": ">=7.1" @@ -3860,7 +3486,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3901,7 +3527,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -3917,31 +3543,26 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/psr-http-message-bridge", - "version": "v2.2.0", + "version": "v2.3.1", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "28a732c05bbad801304ad5a5c674cf2970508993" + "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/28a732c05bbad801304ad5a5c674cf2970508993", - "reference": "28a732c05bbad801304ad5a5c674cf2970508993", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/581ca6067eb62640de5ff08ee1ba6850a0ee472e", + "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e", + "shasum": "" }, "require": { "php": ">=7.2.5", "psr/http-message": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0", "symfony/http-foundation": "^5.4 || ^6.0" }, "require-dev": { @@ -3960,7 +3581,7 @@ "type": "symfony-bridge", "extra": { "branch-alias": { - "dev-main": "2.2-dev" + "dev-main": "2.3-dev" } }, "autoload": { @@ -3995,7 +3616,7 @@ ], "support": { "issues": "https://github.com/symfony/psr-http-message-bridge/issues", - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.2.0" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.3.1" }, "funding": [ { @@ -4011,7 +3632,7 @@ "type": "tidelift" } ], - "time": "2023-04-21T08:40:19+00:00" + "time": "2023-07-26T11:53:26+00:00" }, { "name": "symfony/service-contracts", @@ -4025,13 +3646,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=7.2.5", @@ -4114,13 +3729,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/var-exporter/zipball/df56f53818c2d5d9f683f4ad2e365ba73a3b69d2", "reference": "df56f53818c2d5d9f683f4ad2e365ba73a3b69d2", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=8.0.2" @@ -4192,13 +3801,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/yaml/zipball/02c1859112aa779d9ab394ae4f3381911d84052b", "reference": "02c1859112aa779d9ab394ae4f3381911d84052b", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=5.3.9", @@ -4241,23 +3844,17 @@ }, { "name": "tencentcloud/common", - "version": "3.0.990", + "version": "3.0.995", "source": { "type": "git", "url": "https://github.com/tencentcloud-sdk-php/common.git", - "reference": "0c2705d31c42443ab54422aec7965561141e99ca" + "reference": "60cb44ef1c52d26964ca1f8974c33b04a20bf36c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tencentcloud-sdk-php/common/zipball/0c2705d31c42443ab54422aec7965561141e99ca", - "reference": "0c2705d31c42443ab54422aec7965561141e99ca", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/tencentcloud-sdk-php/common/zipball/60cb44ef1c52d26964ca1f8974c33b04a20bf36c", + "reference": "60cb44ef1c52d26964ca1f8974c33b04a20bf36c", + "shasum": "" }, "require": { "guzzlehttp/guzzle": "^6.3||^7.0", @@ -4285,32 +3882,26 @@ "homepage": "https://github.com/tencentcloud-sdk-php/common", "support": { "issues": "https://github.com/tencentcloud-sdk-php/common/issues", - "source": "https://github.com/tencentcloud-sdk-php/common/tree/3.0.990" + "source": "https://github.com/tencentcloud-sdk-php/common/tree/3.0.995" }, - "time": "2023-10-09T00:19:14+00:00" + "time": "2023-10-16T00:20:26+00:00" }, { "name": "tencentcloud/sms", - "version": "3.0.990", + "version": "3.0.995", "source": { "type": "git", "url": "https://github.com/tencentcloud-sdk-php/sms.git", - "reference": "2dc4e09ae59950778370f6f438643046deee9882" + "reference": "d0de23eea0cd54bf84a2fccab0990deae0d06d48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tencentcloud-sdk-php/sms/zipball/2dc4e09ae59950778370f6f438643046deee9882", - "reference": "2dc4e09ae59950778370f6f438643046deee9882", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/tencentcloud-sdk-php/sms/zipball/d0de23eea0cd54bf84a2fccab0990deae0d06d48", + "reference": "d0de23eea0cd54bf84a2fccab0990deae0d06d48", + "shasum": "" }, "require": { - "tencentcloud/common": "3.0.990" + "tencentcloud/common": "3.0.995" }, "type": "library", "autoload": { @@ -4334,9 +3925,9 @@ "homepage": "https://github.com/tencentcloud-sdk-php/sms", "support": { "issues": "https://github.com/tencentcloud-sdk-php/sms/issues", - "source": "https://github.com/tencentcloud-sdk-php/sms/tree/3.0.990" + "source": "https://github.com/tencentcloud-sdk-php/sms/tree/3.0.995" }, - "time": "2023-10-09T00:41:03+00:00" + "time": "2023-10-16T00:42:05+00:00" }, { "name": "thenorthmemory/xml", @@ -4350,13 +3941,7 @@ "type": "zip", "url": "https://api.github.com/repos/TheNorthMemory/xml/zipball/6f50c63450a0b098772423f8bdc3c4ad2c4c30bb", "reference": "6f50c63450a0b098772423f8bdc3c4ad2c4c30bb", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-libxml": "*", @@ -4397,23 +3982,17 @@ }, { "name": "topthink/framework", - "version": "v6.1.2", + "version": "v6.1.4", "source": { "type": "git", "url": "https://github.com/top-think/framework.git", - "reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3" + "reference": "66eb9cf4d627df12911344cd328faf9bb596bf2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/67235be5b919aaaf1de5aed9839f65d8e766aca3", - "reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/top-think/framework/zipball/66eb9cf4d627df12911344cd328faf9bb596bf2c", + "reference": "66eb9cf4d627df12911344cd328faf9bb596bf2c", + "shasum": "" }, "require": { "ext-json": "*", @@ -4462,9 +4041,9 @@ ], "support": { "issues": "https://github.com/top-think/framework/issues", - "source": "https://github.com/top-think/framework/tree/v6.1.2" + "source": "https://github.com/top-think/framework/tree/v6.1.4" }, - "time": "2023-02-08T02:24:01+00:00" + "time": "2023-07-11T15:16:03+00:00" }, { "name": "topthink/think-filesystem", @@ -4524,13 +4103,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-helper/zipball/769acbe50a4274327162f9c68ec2e89a38eb2aff", "reference": "769acbe50a4274327162f9c68ec2e89a38eb2aff", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=7.1.0" @@ -4566,23 +4139,17 @@ }, { "name": "topthink/think-multi-app", - "version": "v1.0.16", + "version": "v1.0.17", "source": { "type": "git", "url": "https://github.com/top-think/think-multi-app.git", - "reference": "07b9183855150455e1f76f8cbe9d77d6d1bc399f" + "reference": "4055a6187296ac16c0bc7bbab4ed5d92f82f791c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-multi-app/zipball/07b9183855150455e1f76f8cbe9d77d6d1bc399f", - "reference": "07b9183855150455e1f76f8cbe9d77d6d1bc399f", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/top-think/think-multi-app/zipball/4055a6187296ac16c0bc7bbab4ed5d92f82f791c", + "reference": "4055a6187296ac16c0bc7bbab4ed5d92f82f791c", + "shasum": "" }, "require": { "php": ">=7.1.0", @@ -4611,12 +4178,12 @@ "email": "liu21st@gmail.com" } ], - "description": "thinkphp6 multi app support", + "description": "thinkphp multi app support", "support": { "issues": "https://github.com/top-think/think-multi-app/issues", - "source": "https://github.com/top-think/think-multi-app/tree/v1.0.16" + "source": "https://github.com/top-think/think-multi-app/tree/v1.0.17" }, - "time": "2023-02-07T08:40:09+00:00" + "time": "2023-03-29T02:04:29+00:00" }, { "name": "topthink/think-orm", @@ -4630,13 +4197,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-orm/zipball/10528ebf4a5106b19c3bac9c6deae7a67ff49de6", "reference": "10528ebf4a5106b19c3bac9c6deae7a67ff49de6", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-json": "*", @@ -4691,13 +4252,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-template/zipball/6d25642ae0e306166742fd7073dc7a159e18073c", "reference": "6d25642ae0e306166742fd7073dc7a159e18073c", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=7.1.0", @@ -4738,13 +4293,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-view/zipball/edce0ae2c9551ab65f9e94a222604b0dead3576d", "reference": "edce0ae2c9551ab65f9e94a222604b0dead3576d", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=7.1.0", @@ -4775,23 +4324,17 @@ }, { "name": "w7corp/easywechat", - "version": "6.8.0", + "version": "6.12.11", "source": { "type": "git", "url": "https://github.com/w7corp/easywechat.git", - "reference": "60f0b4ba2ac3144df1a2291193daa34beb949d26" + "reference": "81594e1068dadfb6caf354052689cedb2b6394f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/w7corp/easywechat/zipball/60f0b4ba2ac3144df1a2291193daa34beb949d26", - "reference": "60f0b4ba2ac3144df1a2291193daa34beb949d26", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/w7corp/easywechat/zipball/81594e1068dadfb6caf354052689cedb2b6394f8", + "reference": "81594e1068dadfb6caf354052689cedb2b6394f8", + "shasum": "" }, "require": { "ext-curl": "*", @@ -4800,10 +4343,9 @@ "ext-openssl": "*", "ext-simplexml": "*", "ext-sodium": "*", - "monolog/monolog": "^2.2", "nyholm/psr7": "^1.5", "nyholm/psr7-server": "^1.0", - "overtrue/socialite": "^3.5|^4.0.1", + "overtrue/socialite": "^3.5.4|^4.0.1", "php": ">=8.0.2", "psr/http-client": "^1.0", "psr/simple-cache": "^1.0|^2.0|^3.0", @@ -4869,7 +4411,7 @@ ], "support": { "issues": "https://github.com/w7corp/easywechat/issues", - "source": "https://github.com/w7corp/easywechat/tree/6.8.0" + "source": "https://github.com/w7corp/easywechat/tree/6.12.11" }, "funding": [ { @@ -4877,7 +4419,7 @@ "type": "github" } ], - "time": "2022-09-25T13:05:18+00:00" + "time": "2023-09-19T14:05:21+00:00" }, { "name": "webmozart/assert", @@ -4891,13 +4433,7 @@ "type": "zip", "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "ext-ctype": "*", @@ -4957,13 +4493,7 @@ "type": "zip", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1069c7a3fca74578022fab6f81643248d02f8e63", "reference": "1069c7a3fca74578022fab6f81643248d02f8e63", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=7.1.3", @@ -5052,13 +4582,7 @@ "type": "zip", "url": "https://api.github.com/repos/top-think/think-trace/zipball/136cd5d97e8bdb780e4b5c1637c588ed7ca3e142", "reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "shasum": "" }, "require": { "php": ">=7.1.0", diff --git a/vendor/bin/jp.php b/vendor/bin/jp.php new file mode 100644 index 00000000..fc4e0a76 --- /dev/null +++ b/vendor/bin/jp.php @@ -0,0 +1,119 @@ +#!/usr/bin/env php +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/mtdowling/jmespath.php/bin/jp.php'); + } +} + +return include __DIR__ . '/..'.'/mtdowling/jmespath.php/bin/jp.php'; diff --git a/vendor/bin/jp.php.bat b/vendor/bin/jp.php.bat new file mode 100644 index 00000000..9af045e2 --- /dev/null +++ b/vendor/bin/jp.php.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/jp.php +SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 +php "%BIN_TARGET%" %* diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 4b76a845..a5142dc3 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -7,13 +7,14 @@ $baseDir = dirname($vendorDir); return array( 'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', + 'CURLStringFile' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php', 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 'JsonException' => $vendorDir . '/symfony/polyfill-php73/Resources/stubs/JsonException.php', 'Normalizer' => $vendorDir . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', 'PhpToken' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', 'Requests' => $vendorDir . '/rmccue/requests/library/Requests.php', 'ReturnTypeWillChange' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php', - 'Stringable' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', + 'Stringable' => $vendorDir . '/myclabs/php-enum/stubs/Stringable.php', 'UnhandledMatchError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', 'ValueError' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', ); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 2ca5883c..436acf40 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -8,7 +8,6 @@ $baseDir = dirname($vendorDir); return array( '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', - 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php', diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 96a1604f..2ed23d89 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -9,7 +9,7 @@ return array( 'think\\view\\driver\\' => array($vendorDir . '/topthink/think-view/src'), 'think\\trace\\' => array($vendorDir . '/topthink/think-trace/src'), 'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/src'), - 'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src', $vendorDir . '/topthink/think-filesystem/src'), + 'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-filesystem/src', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src'), 'clagiordano\\weblibs\\configmanager\\' => array($vendorDir . '/clagiordano/weblibs-configmanager/src'), 'app\\' => array($baseDir . '/app'), 'ZipStream\\' => array($vendorDir . '/maennchen/zipstream-php/src'), @@ -50,7 +50,6 @@ return array( 'Nyholm\\Psr7\\' => array($vendorDir . '/nyholm/psr7/src'), 'Nyholm\\Psr7Server\\' => array($vendorDir . '/nyholm/psr7-server/src'), 'MyCLabs\\Enum\\' => array($vendorDir . '/myclabs/php-enum/src'), - 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), 'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'), 'League\\MimeTypeDetection\\' => array($vendorDir . '/league/mime-type-detection/src'), 'League\\Flysystem\\' => array($vendorDir . '/league/flysystem/src'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 7bbc8ef6..56de6a98 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -9,7 +9,6 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e public static $files = array ( '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', - 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', @@ -114,7 +113,6 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e 'M' => array ( 'MyCLabs\\Enum\\' => 13, - 'Monolog\\' => 8, 'Matrix\\' => 7, ), 'L' => @@ -167,10 +165,10 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e 'think\\' => array ( 0 => __DIR__ . '/..' . '/topthink/framework/src/think', - 1 => __DIR__ . '/..' . '/topthink/think-helper/src', - 2 => __DIR__ . '/..' . '/topthink/think-orm/src', - 3 => __DIR__ . '/..' . '/topthink/think-template/src', - 4 => __DIR__ . '/..' . '/topthink/think-filesystem/src', + 1 => __DIR__ . '/..' . '/topthink/think-filesystem/src', + 2 => __DIR__ . '/..' . '/topthink/think-helper/src', + 3 => __DIR__ . '/..' . '/topthink/think-orm/src', + 4 => __DIR__ . '/..' . '/topthink/think-template/src', ), 'clagiordano\\weblibs\\configmanager\\' => array ( @@ -334,10 +332,6 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e array ( 0 => __DIR__ . '/..' . '/myclabs/php-enum/src', ), - 'Monolog\\' => - array ( - 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', - ), 'Matrix\\' => array ( 0 => __DIR__ . '/..' . '/markbaker/matrix/classes/src', @@ -416,13 +410,14 @@ class ComposerStaticInitd2a74ba94e266cc4f45a64c54a292d7e public static $classMap = array ( 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', + 'CURLStringFile' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php', 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php', 'Normalizer' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/Resources/stubs/Normalizer.php', 'PhpToken' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/PhpToken.php', 'Requests' => __DIR__ . '/..' . '/rmccue/requests/library/Requests.php', 'ReturnTypeWillChange' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php', - 'Stringable' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Stringable.php', + 'Stringable' => __DIR__ . '/..' . '/myclabs/php-enum/stubs/Stringable.php', 'UnhandledMatchError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php', 'ValueError' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/ValueError.php', ); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 61c5f59f..2f6a40f5 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -275,24 +275,18 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v3.3.1", - "version_normalized": "3.3.1.0", + "version": "v3.3.3", + "version_normalized": "3.3.3.0", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", + "reference": "adfb1f505deb6384dc8b39804c5065dd3c8c8c0a", + "shasum": "" }, "require": { "php": "^7.2|^8.0", @@ -307,7 +301,7 @@ "phpstan/phpstan-webmozart-assert": "^1.0", "phpunit/phpunit": "^7.0|^8.0|^9.0" }, - "time": "2022-01-18T15:43:28+00:00", + "time": "2023-08-10T19:36:49+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -333,7 +327,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.3" }, "funding": [ { @@ -415,36 +409,37 @@ }, { "name": "guzzlehttp/command", - "version": "1.2.3", - "version_normalized": "1.2.3.0", + "version": "1.3.0", + "version_normalized": "1.3.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/command.git", - "reference": "3c9383aaf2e39fa8d39375ae37b95b55964aaef4" + "reference": "3372bcfd79d4b357b6871665bf06155515e8d844" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/command/zipball/3c9383aaf2e39fa8d39375ae37b95b55964aaef4", - "reference": "3c9383aaf2e39fa8d39375ae37b95b55964aaef4", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/guzzle/command/zipball/3372bcfd79d4b357b6871665bf06155515e8d844", + "reference": "3372bcfd79d4b357b6871665bf06155515e8d844", + "shasum": "" }, "require": { "guzzlehttp/guzzle": "^7.5.1", - "guzzlehttp/promises": "^1.5.2", + "guzzlehttp/promises": "^1.5.3 || ^2.0", "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", "php": "^7.2.5 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5.19" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.19 || ^9.5.8" }, - "time": "2023-04-18T08:30:31+00:00", + "time": "2023-05-21T14:15:09+00:00", "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, "installation-source": "dist", "autoload": { "psr-4": { @@ -480,7 +475,7 @@ "description": "Provides the foundation for building command-based web service clients", "support": { "issues": "https://github.com/guzzle/command/issues", - "source": "https://github.com/guzzle/command/tree/1.2.3" + "source": "https://github.com/guzzle/command/tree/1.3.0" }, "funding": [ { @@ -500,29 +495,23 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.5.1", - "version_normalized": "7.5.1.0", + "version": "7.8.0", + "version_normalized": "7.8.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9" + "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b964ca597e86b752cd994f27293e9fa6b6a95ed9", - "reference": "b964ca597e86b752cd994f27293e9fa6b6a95ed9", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "reference": "1110f66a6530a40fe7aea0378fe608ee2b2248f9", + "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", "php": "^7.2.5 || ^8.0", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" @@ -533,7 +522,8 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, @@ -542,15 +532,12 @@ "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, - "time": "2023-04-17T16:30:08+00:00", + "time": "2023-08-27T10:20:53+00:00", "type": "library", "extra": { "bamarni-bin": { "bin-links": true, "forward-command": false - }, - "branch-alias": { - "dev-master": "7.5-dev" } }, "installation-source": "dist", @@ -617,7 +604,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.5.1" + "source": "https://github.com/guzzle/guzzle/tree/7.8.0" }, "funding": [ { @@ -637,43 +624,39 @@ }, { "name": "guzzlehttp/guzzle-services", - "version": "1.3.2", - "version_normalized": "1.3.2.0", + "version": "1.4.0", + "version_normalized": "1.4.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle-services.git", - "reference": "4989d902dd4e0411b320e851c46f3c94d652d891" + "reference": "f4bb1c205152a56741624b88753732e01a60565c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle-services/zipball/4989d902dd4e0411b320e851c46f3c94d652d891", - "reference": "4989d902dd4e0411b320e851c46f3c94d652d891", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/guzzle/guzzle-services/zipball/f4bb1c205152a56741624b88753732e01a60565c", + "reference": "f4bb1c205152a56741624b88753732e01a60565c", + "shasum": "" }, "require": { - "guzzlehttp/command": "^1.2.2", - "guzzlehttp/guzzle": "^7.4.1", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/command": "^1.3", + "guzzlehttp/guzzle": "^7.7", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", "guzzlehttp/uri-template": "^1.0.1", "php": "^7.2.5 || ^8.0" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", "phpunit/phpunit": "^8.5.19 || ^9.5.8" }, "suggest": { "gimler/guzzle-description-loader": "^0.0.4" }, - "time": "2022-03-03T11:21:34+00:00", + "time": "2023-05-21T14:21:30+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.3-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "installation-source": "dist", @@ -711,7 +694,7 @@ "description": "Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.", "support": { "issues": "https://github.com/guzzle/guzzle-services/issues", - "source": "https://github.com/guzzle/guzzle-services/tree/1.3.2" + "source": "https://github.com/guzzle/guzzle-services/tree/1.4.0" }, "funding": [ { @@ -731,43 +714,36 @@ }, { "name": "guzzlehttp/promises", - "version": "1.5.2", - "version_normalized": "1.5.2.0", + "version": "2.0.1", + "version_normalized": "2.0.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "b94b2807d85443f9719887892882d0329d1e2598" + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", - "reference": "b94b2807d85443f9719887892882d0329d1e2598", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/guzzle/promises/zipball/111166291a0f8130081195ac4556a5587d7f1b5d", + "reference": "111166291a0f8130081195ac4556a5587d7f1b5d", + "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, - "time": "2022-08-28T14:55:35+00:00", + "time": "2023-08-03T15:11:55+00:00", "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "installation-source": "dist", "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\Promise\\": "src/" } @@ -804,7 +780,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.2" + "source": "https://github.com/guzzle/promises/tree/2.0.1" }, "funding": [ { @@ -824,24 +800,18 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.5.0", - "version_normalized": "2.5.0.0", + "version": "2.6.1", + "version_normalized": "2.6.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6" + "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", - "reference": "b635f279edd83fc275f822a1188157ffea568ff6", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/guzzle/psr7/zipball/be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "reference": "be45764272e8873c72dbe3d2edcfdfcc3bc9f727", + "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", @@ -861,7 +831,7 @@ "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, - "time": "2023-04-17T16:11:26+00:00", + "time": "2023-08-27T10:13:57+00:00", "type": "library", "extra": { "bamarni-bin": { @@ -929,7 +899,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.5.0" + "source": "https://github.com/guzzle/psr7/tree/2.6.1" }, "funding": [ { @@ -949,40 +919,30 @@ }, { "name": "guzzlehttp/uri-template", - "version": "v1.0.1", - "version_normalized": "1.0.1.0", + "version": "v1.0.2", + "version_normalized": "1.0.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/uri-template.git", - "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2" + "reference": "61bf437fc2197f587f6857d3ff903a24f1731b5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/uri-template/zipball/b945d74a55a25a949158444f09ec0d3c120d69e2", - "reference": "b945d74a55a25a949158444f09ec0d3c120d69e2", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/61bf437fc2197f587f6857d3ff903a24f1731b5d", + "reference": "61bf437fc2197f587f6857d3ff903a24f1731b5d", + "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", "symfony/polyfill-php80": "^1.17" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", "phpunit/phpunit": "^8.5.19 || ^9.5.8", "uri-template/tests": "1.0.0" }, - "time": "2021-10-07T12:57:01+00:00", + "time": "2023-08-27T10:19:19+00:00", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "installation-source": "dist", "autoload": { "psr-4": { @@ -1022,7 +982,7 @@ ], "support": { "issues": "https://github.com/guzzle/uri-template/issues", - "source": "https://github.com/guzzle/uri-template/tree/v1.0.1" + "source": "https://github.com/guzzle/uri-template/tree/v1.0.2" }, "funding": [ { @@ -1400,154 +1360,37 @@ }, "install-path": "../markbaker/matrix" }, - { - "name": "monolog/monolog", - "version": "2.9.0", - "version_normalized": "2.9.0.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "e1c0ae1528ce313a450e5e1ad782765c4a8dd3cb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e1c0ae1528ce313a450e5e1ad782765c4a8dd3cb", - "reference": "e1c0ae1528ce313a450e5e1ad782765c4a8dd3cb", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] - }, - "require": { - "php": ">=7.2", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", - "guzzlehttp/guzzle": "^7.4", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5.14", - "predis/predis": "^1.1 || ^2.0", - "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": "^7", - "swiftmailer/swiftmailer": "^5.3|^6.0", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "ext-openssl": "Required to send log messages using SSL", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" - }, - "time": "2023-02-05T13:07:32+00:00", - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "https://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.9.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "install-path": "../monolog/monolog" - }, { "name": "mtdowling/jmespath.php", - "version": "2.6.1", - "version_normalized": "2.6.1.0", + "version": "2.7.0", + "version_normalized": "2.7.0.0", "source": { "type": "git", "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb" + "reference": "bbb69a935c2cbb0c03d7f481a238027430f6440b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/9b87907a81b87bc76d19a7fb2d61e61486ee9edb", - "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/bbb69a935c2cbb0c03d7f481a238027430f6440b", + "reference": "bbb69a935c2cbb0c03d7f481a238027430f6440b", + "shasum": "" }, "require": { - "php": "^5.4 || ^7.0 || ^8.0", + "php": "^7.2.5 || ^8.0", "symfony/polyfill-mbstring": "^1.17" }, "require-dev": { - "composer/xdebug-handler": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^7.5.15" + "composer/xdebug-handler": "^3.0.3", + "phpunit/phpunit": "^8.5.33" }, - "time": "2021-06-14T00:11:39+00:00", + "time": "2023-08-25T10:54:48+00:00", "bin": [ "bin/jp.php" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.7-dev" } }, "installation-source": "dist", @@ -1564,6 +1407,11 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", @@ -1577,30 +1425,24 @@ ], "support": { "issues": "https://github.com/jmespath/jmespath.php/issues", - "source": "https://github.com/jmespath/jmespath.php/tree/2.6.1" + "source": "https://github.com/jmespath/jmespath.php/tree/2.7.0" }, "install-path": "../mtdowling/jmespath.php" }, { "name": "myclabs/php-enum", - "version": "1.8.3", - "version_normalized": "1.8.3.0", + "version": "1.8.4", + "version_normalized": "1.8.4.0", "source": { "type": "git", "url": "https://github.com/myclabs/php-enum.git", - "reference": "b942d263c641ddb5190929ff840c68f78713e937" + "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/php-enum/zipball/b942d263c641ddb5190929ff840c68f78713e937", - "reference": "b942d263c641ddb5190929ff840c68f78713e937", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483", + "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483", + "shasum": "" }, "require": { "ext-json": "*", @@ -1611,13 +1453,16 @@ "squizlabs/php_codesniffer": "1.*", "vimeo/psalm": "^4.6.2" }, - "time": "2021-07-05T08:18:36+00:00", + "time": "2022-08-04T09:53:51+00:00", "type": "library", "installation-source": "dist", "autoload": { "psr-4": { "MyCLabs\\Enum\\": "src/" - } + }, + "classmap": [ + "stubs/Stringable.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1636,7 +1481,7 @@ ], "support": { "issues": "https://github.com/myclabs/php-enum/issues", - "source": "https://github.com/myclabs/php-enum/tree/1.8.3" + "source": "https://github.com/myclabs/php-enum/tree/1.8.4" }, "funding": [ { @@ -1814,24 +1659,18 @@ }, { "name": "overtrue/socialite", - "version": "4.8.0", - "version_normalized": "4.8.0.0", + "version": "4.9.0", + "version_normalized": "4.9.0.0", "source": { "type": "git", "url": "https://github.com/overtrue/socialite.git", - "reference": "e55fdf50f8003be8f03a85a7e5a5b7c5716f4c9a" + "reference": "dcbb1eed948fe036e6de8cdf0b125f5af1bc73fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/overtrue/socialite/zipball/e55fdf50f8003be8f03a85a7e5a5b7c5716f4c9a", - "reference": "e55fdf50f8003be8f03a85a7e5a5b7c5716f4c9a", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/overtrue/socialite/zipball/dcbb1eed948fe036e6de8cdf0b125f5af1bc73fb", + "reference": "dcbb1eed948fe036e6de8cdf0b125f5af1bc73fb", + "shasum": "" }, "require": { "ext-json": "*", @@ -1848,7 +1687,7 @@ "phpstan/phpstan": "^1.7", "phpunit/phpunit": "^9.0" }, - "time": "2023-01-10T14:29:55+00:00", + "time": "2023-09-01T11:01:34+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1884,7 +1723,7 @@ ], "support": { "issues": "https://github.com/overtrue/socialite/issues", - "source": "https://github.com/overtrue/socialite/tree/4.8.0" + "source": "https://github.com/overtrue/socialite/tree/4.9.0" }, "funding": [ { @@ -1896,24 +1735,18 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.28.0", - "version_normalized": "1.28.0.0", + "version": "1.29.0", + "version_normalized": "1.29.0.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a" + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a", - "reference": "6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "shasum": "" }, "require": { "ext-ctype": "*", @@ -1930,7 +1763,7 @@ "ext-zip": "*", "ext-zlib": "*", "ezyang/htmlpurifier": "^4.15", - "maennchen/zipstream-php": "^2.1", + "maennchen/zipstream-php": "^2.1 || ^3.0", "markbaker/complex": "^3.0", "markbaker/matrix": "^3.0", "php": "^7.4 || ^8.0", @@ -1942,12 +1775,12 @@ "dealerdirect/phpcodesniffer-composer-installer": "dev-main", "dompdf/dompdf": "^1.0 || ^2.0", "friendsofphp/php-cs-fixer": "^3.2", - "mitoteam/jpgraph": "^10.2.4", + "mitoteam/jpgraph": "^10.3", "mpdf/mpdf": "^8.1.1", "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.1", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5 || ^9.0", + "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0", "squizlabs/php_codesniffer": "^3.7", "tecnickcom/tcpdf": "^6.5" }, @@ -1958,7 +1791,7 @@ "mpdf/mpdf": "Option for rendering PDF with PDF Writer", "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" }, - "time": "2023-02-25T12:24:49+00:00", + "time": "2023-06-14T22:48:31+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2004,7 +1837,7 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.28.0" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0" }, "install-path": "../phpoffice/phpspreadsheet" }, @@ -2125,30 +1958,24 @@ }, { "name": "psr/http-client", - "version": "1.0.1", - "version_normalized": "1.0.1.0", + "version": "1.0.3", + "version_normalized": "1.0.3.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, - "time": "2020-06-29T06:28:15+00:00", + "time": "2023-09-23T14:17:50+00:00", "type": "library", "extra": { "branch-alias": { @@ -2168,7 +1995,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -2180,7 +2007,7 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/master" + "source": "https://github.com/php-fig/http-client" }, "install-path": "../psr/http-client" }, @@ -2431,24 +2258,18 @@ }, { "name": "qcloud/cos-sdk-v5", - "version": "v2.6.2", - "version_normalized": "2.6.2.0", + "version": "v2.6.6", + "version_normalized": "2.6.6.0", "source": { "type": "git", "url": "https://github.com/tencentyun/cos-php-sdk-v5.git", - "reference": "92a1ee62b85ed4e7bf6836a684df5d7e3158d0ed" + "reference": "9d82ccb550fe2dca1adfb53835791d314023a9a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tencentyun/cos-php-sdk-v5/zipball/92a1ee62b85ed4e7bf6836a684df5d7e3158d0ed", - "reference": "92a1ee62b85ed4e7bf6836a684df5d7e3158d0ed", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/tencentyun/cos-php-sdk-v5/zipball/9d82ccb550fe2dca1adfb53835791d314023a9a8", + "reference": "9d82ccb550fe2dca1adfb53835791d314023a9a8", + "shasum": "" }, "require": { "ext-curl": "*", @@ -2460,7 +2281,7 @@ "guzzlehttp/psr7": "^1.3.1 || ^2.0", "php": ">=5.6" }, - "time": "2023-04-07T07:38:24+00:00", + "time": "2023-08-23T08:14:27+00:00", "type": "library", "extra": { "branch-alias": { @@ -2502,7 +2323,7 @@ ], "support": { "issues": "https://github.com/tencentyun/cos-php-sdk-v5/issues", - "source": "https://github.com/tencentyun/cos-php-sdk-v5/tree/v2.6.2" + "source": "https://github.com/tencentyun/cos-php-sdk-v5/tree/v2.6.6" }, "install-path": "../qcloud/cos-sdk-v5" }, @@ -2625,24 +2446,18 @@ }, { "name": "rmccue/requests", - "version": "v2.0.5", - "version_normalized": "2.0.5.0", + "version": "v2.0.8", + "version_normalized": "2.0.8.0", "source": { "type": "git", "url": "https://github.com/WordPress/Requests.git", - "reference": "b717f1d2f4ef7992ec0c127747ed8b7e170c2f49" + "reference": "fae75bcb83d9d00d0e31ee86a472a036f9f91519" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WordPress/Requests/zipball/b717f1d2f4ef7992ec0c127747ed8b7e170c2f49", - "reference": "b717f1d2f4ef7992ec0c127747ed8b7e170c2f49", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/WordPress/Requests/zipball/fae75bcb83d9d00d0e31ee86a472a036f9f91519", + "reference": "fae75bcb83d9d00d0e31ee86a472a036f9f91519", + "shasum": "" }, "require": { "ext-json": "*", @@ -2659,7 +2474,13 @@ "wp-coding-standards/wpcs": "^2.0", "yoast/phpunit-polyfills": "^1.0.0" }, - "time": "2022-10-11T08:15:28+00:00", + "suggest": { + "art4/requests-psr18-adapter": "For using Requests as a PSR-18 HTTP Client", + "ext-curl": "For improved performance", + "ext-openssl": "For secure transport support", + "ext-zlib": "For improved performance when decompressing encoded streams" + }, + "time": "2023-09-11T08:27:57+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2715,24 +2536,18 @@ }, { "name": "symfony/cache", - "version": "v5.4.23", - "version_normalized": "5.4.23.0", + "version": "v5.4.29", + "version_normalized": "5.4.29.0", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107" + "reference": "e29c5a97bc2d81269973c3e1d7ceb9d48b4d5151" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/983c79ff28612cdfd66d8e44e1a06e5afc87e107", - "reference": "983c79ff28612cdfd66d8e44e1a06e5afc87e107", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/cache/zipball/e29c5a97bc2d81269973c3e1d7ceb9d48b4d5151", + "reference": "e29c5a97bc2d81269973c3e1d7ceb9d48b4d5151", + "shasum": "" }, "require": { "php": ">=7.2.5", @@ -2769,7 +2584,7 @@ "symfony/messenger": "^4.4|^5.0|^6.0", "symfony/var-dumper": "^4.4|^5.0|^6.0" }, - "time": "2023-04-21T15:38:51+00:00", + "time": "2023-09-19T13:25:51+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -2801,7 +2616,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v5.4.23" + "source": "https://github.com/symfony/cache/tree/v5.4.29" }, "funding": [ { @@ -3340,24 +3155,18 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", - "version_normalized": "1.27.0.0", + "version": "v1.28.0", + "version_normalized": "1.28.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "shasum": "" }, "require": { "php": ">=7.1" @@ -3368,11 +3177,11 @@ "suggest": { "ext-ctype": "For best performance" }, - "time": "2022-11-03T14:55:06+00:00", + "time": "2023-01-26T09:26:14+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3411,7 +3220,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -3431,24 +3240,18 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.27.0", - "version_normalized": "1.27.0.0", + "version": "v1.28.0", + "version_normalized": "1.28.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da" + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", - "reference": "639084e360537a19f9ee352433b84ce831f3d2da", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d", + "reference": "ecaafce9f77234a6a449d29e49267ba10499116d", + "shasum": "" }, "require": { "php": ">=7.1", @@ -3458,11 +3261,11 @@ "suggest": { "ext-intl": "For best performance" }, - "time": "2022-11-03T14:55:06+00:00", + "time": "2023-01-26T09:30:37+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3507,7 +3310,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0" }, "funding": [ { @@ -3527,24 +3330,18 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", - "version_normalized": "1.27.0.0", + "version": "v1.28.0", + "version_normalized": "1.28.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "shasum": "" }, "require": { "php": ">=7.1" @@ -3552,11 +3349,11 @@ "suggest": { "ext-intl": "For best performance" }, - "time": "2022-11-03T14:55:06+00:00", + "time": "2023-01-26T09:26:14+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3600,7 +3397,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -3620,24 +3417,18 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", - "version_normalized": "1.27.0.0", + "version": "v1.28.0", + "version_normalized": "1.28.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", + "shasum": "" }, "require": { "php": ">=7.1" @@ -3648,11 +3439,11 @@ "suggest": { "ext-mbstring": "For best performance" }, - "time": "2022-11-03T14:55:06+00:00", + "time": "2023-07-28T09:04:16+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3692,7 +3483,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -3712,33 +3503,27 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.27.0", - "version_normalized": "1.27.0.0", + "version": "v1.28.0", + "version_normalized": "1.28.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179", + "reference": "70f4aebd92afca2f865444d30a4d2151c13c3179", + "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2022-11-03T14:55:06+00:00", + "time": "2023-01-26T09:26:14+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3777,7 +3562,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0" }, "funding": [ { @@ -3797,33 +3582,27 @@ }, { "name": "symfony/polyfill-php73", - "version": "v1.27.0", - "version_normalized": "1.27.0.0", + "version": "v1.28.0", + "version_normalized": "1.28.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2022-11-03T14:55:06+00:00", + "time": "2023-01-26T09:26:14+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3865,7 +3644,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" }, "funding": [ { @@ -3885,33 +3664,27 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", - "version_normalized": "1.27.0.0", + "version": "v1.28.0", + "version_normalized": "1.28.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2022-11-03T14:55:06+00:00", + "time": "2023-01-26T09:26:14+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -3957,7 +3730,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -3977,33 +3750,27 @@ }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", - "version_normalized": "1.27.0.0", + "version": "v1.28.0", + "version_normalized": "1.28.0.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "shasum": "" }, "require": { "php": ">=7.1" }, - "time": "2022-11-03T14:55:06+00:00", + "time": "2023-01-26T09:26:14+00:00", "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4045,7 +3812,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -4065,28 +3832,23 @@ }, { "name": "symfony/psr-http-message-bridge", - "version": "v2.2.0", - "version_normalized": "2.2.0.0", + "version": "v2.3.1", + "version_normalized": "2.3.1.0", "source": { "type": "git", "url": "https://github.com/symfony/psr-http-message-bridge.git", - "reference": "28a732c05bbad801304ad5a5c674cf2970508993" + "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/28a732c05bbad801304ad5a5c674cf2970508993", - "reference": "28a732c05bbad801304ad5a5c674cf2970508993", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/581ca6067eb62640de5ff08ee1ba6850a0ee472e", + "reference": "581ca6067eb62640de5ff08ee1ba6850a0ee472e", + "shasum": "" }, "require": { "php": ">=7.2.5", "psr/http-message": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0", "symfony/http-foundation": "^5.4 || ^6.0" }, "require-dev": { @@ -4102,11 +3864,11 @@ "suggest": { "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" }, - "time": "2023-04-21T08:40:19+00:00", + "time": "2023-07-26T11:53:26+00:00", "type": "symfony-bridge", "extra": { "branch-alias": { - "dev-main": "2.2-dev" + "dev-main": "2.3-dev" } }, "installation-source": "dist", @@ -4142,7 +3904,7 @@ ], "support": { "issues": "https://github.com/symfony/psr-http-message-bridge/issues", - "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.2.0" + "source": "https://github.com/symfony/psr-http-message-bridge/tree/v2.3.1" }, "funding": [ { @@ -4495,30 +4257,24 @@ }, { "name": "tencentcloud/common", - "version": "3.0.990", - "version_normalized": "3.0.990.0", + "version": "3.0.995", + "version_normalized": "3.0.995.0", "source": { "type": "git", "url": "https://github.com/tencentcloud-sdk-php/common.git", - "reference": "0c2705d31c42443ab54422aec7965561141e99ca" + "reference": "60cb44ef1c52d26964ca1f8974c33b04a20bf36c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tencentcloud-sdk-php/common/zipball/0c2705d31c42443ab54422aec7965561141e99ca", - "reference": "0c2705d31c42443ab54422aec7965561141e99ca", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/tencentcloud-sdk-php/common/zipball/60cb44ef1c52d26964ca1f8974c33b04a20bf36c", + "reference": "60cb44ef1c52d26964ca1f8974c33b04a20bf36c", + "shasum": "" }, "require": { "guzzlehttp/guzzle": "^6.3||^7.0", "php": ">=5.6.0" }, - "time": "2023-10-09T00:19:14+00:00", + "time": "2023-10-16T00:20:26+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4542,35 +4298,29 @@ "homepage": "https://github.com/tencentcloud-sdk-php/common", "support": { "issues": "https://github.com/tencentcloud-sdk-php/common/issues", - "source": "https://github.com/tencentcloud-sdk-php/common/tree/3.0.990" + "source": "https://github.com/tencentcloud-sdk-php/common/tree/3.0.995" }, "install-path": "../tencentcloud/common" }, { "name": "tencentcloud/sms", - "version": "3.0.990", - "version_normalized": "3.0.990.0", + "version": "3.0.995", + "version_normalized": "3.0.995.0", "source": { "type": "git", "url": "https://github.com/tencentcloud-sdk-php/sms.git", - "reference": "2dc4e09ae59950778370f6f438643046deee9882" + "reference": "d0de23eea0cd54bf84a2fccab0990deae0d06d48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tencentcloud-sdk-php/sms/zipball/2dc4e09ae59950778370f6f438643046deee9882", - "reference": "2dc4e09ae59950778370f6f438643046deee9882", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/tencentcloud-sdk-php/sms/zipball/d0de23eea0cd54bf84a2fccab0990deae0d06d48", + "reference": "d0de23eea0cd54bf84a2fccab0990deae0d06d48", + "shasum": "" }, "require": { - "tencentcloud/common": "3.0.990" + "tencentcloud/common": "3.0.995" }, - "time": "2023-10-09T00:41:03+00:00", + "time": "2023-10-16T00:42:05+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4594,7 +4344,7 @@ "homepage": "https://github.com/tencentcloud-sdk-php/sms", "support": { "issues": "https://github.com/tencentcloud-sdk-php/sms/issues", - "source": "https://github.com/tencentcloud-sdk-php/sms/tree/3.0.990" + "source": "https://github.com/tencentcloud-sdk-php/sms/tree/3.0.995" }, "install-path": "../tencentcloud/sms" }, @@ -4660,24 +4410,18 @@ }, { "name": "topthink/framework", - "version": "v6.1.2", - "version_normalized": "6.1.2.0", + "version": "v6.1.4", + "version_normalized": "6.1.4.0", "source": { "type": "git", "url": "https://github.com/top-think/framework.git", - "reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3" + "reference": "66eb9cf4d627df12911344cd328faf9bb596bf2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/framework/zipball/67235be5b919aaaf1de5aed9839f65d8e766aca3", - "reference": "67235be5b919aaaf1de5aed9839f65d8e766aca3", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/top-think/framework/zipball/66eb9cf4d627df12911344cd328faf9bb596bf2c", + "reference": "66eb9cf4d627df12911344cd328faf9bb596bf2c", + "shasum": "" }, "require": { "ext-json": "*", @@ -4696,7 +4440,7 @@ "mockery/mockery": "^1.2", "phpunit/phpunit": "^7.0" }, - "time": "2023-02-08T02:24:01+00:00", + "time": "2023-07-11T15:16:03+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -4728,7 +4472,7 @@ ], "support": { "issues": "https://github.com/top-think/framework/issues", - "source": "https://github.com/top-think/framework/tree/v6.1.2" + "source": "https://github.com/top-think/framework/tree/v6.1.4" }, "install-path": "../topthink/framework" }, @@ -4838,30 +4582,24 @@ }, { "name": "topthink/think-multi-app", - "version": "v1.0.16", - "version_normalized": "1.0.16.0", + "version": "v1.0.17", + "version_normalized": "1.0.17.0", "source": { "type": "git", "url": "https://github.com/top-think/think-multi-app.git", - "reference": "07b9183855150455e1f76f8cbe9d77d6d1bc399f" + "reference": "4055a6187296ac16c0bc7bbab4ed5d92f82f791c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/top-think/think-multi-app/zipball/07b9183855150455e1f76f8cbe9d77d6d1bc399f", - "reference": "07b9183855150455e1f76f8cbe9d77d6d1bc399f", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/top-think/think-multi-app/zipball/4055a6187296ac16c0bc7bbab4ed5d92f82f791c", + "reference": "4055a6187296ac16c0bc7bbab4ed5d92f82f791c", + "shasum": "" }, "require": { "php": ">=7.1.0", "topthink/framework": "^6.0|^8.0" }, - "time": "2023-02-07T08:40:09+00:00", + "time": "2023-03-29T02:04:29+00:00", "type": "library", "extra": { "think": { @@ -4886,10 +4624,10 @@ "email": "liu21st@gmail.com" } ], - "description": "thinkphp6 multi app support", + "description": "thinkphp multi app support", "support": { "issues": "https://github.com/top-think/think-multi-app/issues", - "source": "https://github.com/top-think/think-multi-app/tree/v1.0.16" + "source": "https://github.com/top-think/think-multi-app/tree/v1.0.17" }, "install-path": "../topthink/think-multi-app" }, @@ -5119,24 +4857,18 @@ }, { "name": "w7corp/easywechat", - "version": "6.8.0", - "version_normalized": "6.8.0.0", + "version": "6.12.11", + "version_normalized": "6.12.11.0", "source": { "type": "git", "url": "https://github.com/w7corp/easywechat.git", - "reference": "60f0b4ba2ac3144df1a2291193daa34beb949d26" + "reference": "81594e1068dadfb6caf354052689cedb2b6394f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/w7corp/easywechat/zipball/60f0b4ba2ac3144df1a2291193daa34beb949d26", - "reference": "60f0b4ba2ac3144df1a2291193daa34beb949d26", - "shasum": "", - "mirrors": [ - { - "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", - "preferred": true - } - ] + "url": "https://api.github.com/repos/w7corp/easywechat/zipball/81594e1068dadfb6caf354052689cedb2b6394f8", + "reference": "81594e1068dadfb6caf354052689cedb2b6394f8", + "shasum": "" }, "require": { "ext-curl": "*", @@ -5145,10 +4877,9 @@ "ext-openssl": "*", "ext-simplexml": "*", "ext-sodium": "*", - "monolog/monolog": "^2.2", "nyholm/psr7": "^1.5", "nyholm/psr7-server": "^1.0", - "overtrue/socialite": "^3.5|^4.0.1", + "overtrue/socialite": "^3.5.4|^4.0.1", "php": ">=8.0.2", "psr/http-client": "^1.0", "psr/simple-cache": "^1.0|^2.0|^3.0", @@ -5170,7 +4901,7 @@ "phpunit/phpunit": "^9.5", "symfony/var-dumper": "^5.2" }, - "time": "2022-09-25T13:05:18+00:00", + "time": "2023-09-19T14:05:21+00:00", "type": "library", "extra": { "hooks": { @@ -5216,7 +4947,7 @@ ], "support": { "issues": "https://github.com/w7corp/easywechat/issues", - "source": "https://github.com/w7corp/easywechat/tree/6.8.0" + "source": "https://github.com/w7corp/easywechat/tree/6.12.11" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index c4364d36..4e54f31f 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'topthink/think', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '8c9212052304a213c45338424760aea2d904f258', + 'reference' => '0b6b29a77bea7bf509dd19e4bc1e20a33d3946d9', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -47,9 +47,9 @@ 'dev_requirement' => false, ), 'dragonmantank/cron-expression' => array( - 'pretty_version' => 'v3.3.1', - 'version' => '3.3.1.0', - 'reference' => 'be85b3f05b46c39bbc0d95f6c071ddff669510fa', + 'pretty_version' => 'v3.3.3', + 'version' => '3.3.3.0', + 'reference' => 'adfb1f505deb6384dc8b39804c5065dd3c8c8c0a', 'type' => 'library', 'install_path' => __DIR__ . '/../dragonmantank/cron-expression', 'aliases' => array(), @@ -65,54 +65,54 @@ 'dev_requirement' => false, ), 'guzzlehttp/command' => array( - 'pretty_version' => '1.2.3', - 'version' => '1.2.3.0', - 'reference' => '3c9383aaf2e39fa8d39375ae37b95b55964aaef4', + 'pretty_version' => '1.3.0', + 'version' => '1.3.0.0', + 'reference' => '3372bcfd79d4b357b6871665bf06155515e8d844', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/command', 'aliases' => array(), 'dev_requirement' => false, ), 'guzzlehttp/guzzle' => array( - 'pretty_version' => '7.5.1', - 'version' => '7.5.1.0', - 'reference' => 'b964ca597e86b752cd994f27293e9fa6b6a95ed9', + 'pretty_version' => '7.8.0', + 'version' => '7.8.0.0', + 'reference' => '1110f66a6530a40fe7aea0378fe608ee2b2248f9', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'aliases' => array(), 'dev_requirement' => false, ), 'guzzlehttp/guzzle-services' => array( - 'pretty_version' => '1.3.2', - 'version' => '1.3.2.0', - 'reference' => '4989d902dd4e0411b320e851c46f3c94d652d891', + 'pretty_version' => '1.4.0', + 'version' => '1.4.0.0', + 'reference' => 'f4bb1c205152a56741624b88753732e01a60565c', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle-services', 'aliases' => array(), 'dev_requirement' => false, ), 'guzzlehttp/promises' => array( - 'pretty_version' => '1.5.2', - 'version' => '1.5.2.0', - 'reference' => 'b94b2807d85443f9719887892882d0329d1e2598', + 'pretty_version' => '2.0.1', + 'version' => '2.0.1.0', + 'reference' => '111166291a0f8130081195ac4556a5587d7f1b5d', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/promises', 'aliases' => array(), 'dev_requirement' => false, ), 'guzzlehttp/psr7' => array( - 'pretty_version' => '2.5.0', - 'version' => '2.5.0.0', - 'reference' => 'b635f279edd83fc275f822a1188157ffea568ff6', + 'pretty_version' => '2.6.1', + 'version' => '2.6.1.0', + 'reference' => 'be45764272e8873c72dbe3d2edcfdfcc3bc9f727', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), 'dev_requirement' => false, ), 'guzzlehttp/uri-template' => array( - 'pretty_version' => 'v1.0.1', - 'version' => '1.0.1.0', - 'reference' => 'b945d74a55a25a949158444f09ec0d3c120d69e2', + 'pretty_version' => 'v1.0.2', + 'version' => '1.0.2.0', + 'reference' => '61bf437fc2197f587f6857d3ff903a24f1731b5d', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/uri-template', 'aliases' => array(), @@ -163,15 +163,6 @@ 'aliases' => array(), 'dev_requirement' => false, ), - 'monolog/monolog' => array( - 'pretty_version' => '2.9.0', - 'version' => '2.9.0.0', - 'reference' => 'e1c0ae1528ce313a450e5e1ad782765c4a8dd3cb', - 'type' => 'library', - 'install_path' => __DIR__ . '/../monolog/monolog', - 'aliases' => array(), - 'dev_requirement' => false, - ), 'mtdowling/cron-expression' => array( 'dev_requirement' => false, 'replaced' => array( @@ -179,18 +170,18 @@ ), ), 'mtdowling/jmespath.php' => array( - 'pretty_version' => '2.6.1', - 'version' => '2.6.1.0', - 'reference' => '9b87907a81b87bc76d19a7fb2d61e61486ee9edb', + 'pretty_version' => '2.7.0', + 'version' => '2.7.0.0', + 'reference' => 'bbb69a935c2cbb0c03d7f481a238027430f6440b', 'type' => 'library', 'install_path' => __DIR__ . '/../mtdowling/jmespath.php', 'aliases' => array(), 'dev_requirement' => false, ), 'myclabs/php-enum' => array( - 'pretty_version' => '1.8.3', - 'version' => '1.8.3.0', - 'reference' => 'b942d263c641ddb5190929ff840c68f78713e937', + 'pretty_version' => '1.8.4', + 'version' => '1.8.4.0', + 'reference' => 'a867478eae49c9f59ece437ae7f9506bfaa27483', 'type' => 'library', 'install_path' => __DIR__ . '/../myclabs/php-enum', 'aliases' => array(), @@ -215,9 +206,9 @@ 'dev_requirement' => false, ), 'overtrue/socialite' => array( - 'pretty_version' => '4.8.0', - 'version' => '4.8.0.0', - 'reference' => 'e55fdf50f8003be8f03a85a7e5a5b7c5716f4c9a', + 'pretty_version' => '4.9.0', + 'version' => '4.9.0.0', + 'reference' => 'dcbb1eed948fe036e6de8cdf0b125f5af1bc73fb', 'type' => 'library', 'install_path' => __DIR__ . '/../overtrue/socialite', 'aliases' => array(), @@ -242,9 +233,9 @@ ), ), 'phpoffice/phpspreadsheet' => array( - 'pretty_version' => '1.28.0', - 'version' => '1.28.0.0', - 'reference' => '6e81cf39bbd93ebc3a4e8150444c41e8aa9b769a', + 'pretty_version' => '1.29.0', + 'version' => '1.29.0.0', + 'reference' => 'fde2ccf55eaef7e86021ff1acce26479160a0fa0', 'type' => 'library', 'install_path' => __DIR__ . '/../phpoffice/phpspreadsheet', 'aliases' => array(), @@ -275,9 +266,9 @@ 'dev_requirement' => false, ), 'psr/http-client' => array( - 'pretty_version' => '1.0.1', - 'version' => '1.0.1.0', - 'reference' => '2dfb5f6c5eff0e91e20e913f8c5452ed95b86621', + 'pretty_version' => '1.0.3', + 'version' => '1.0.3.0', + 'reference' => 'bb5906edc1c324c9a05aa0873d40117941e5fa90', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/http-client', 'aliases' => array(), @@ -328,12 +319,6 @@ 'aliases' => array(), 'dev_requirement' => false, ), - 'psr/log-implementation' => array( - 'dev_requirement' => false, - 'provided' => array( - 0 => '1.0.0 || 2.0.0 || 3.0.0', - ), - ), 'psr/simple-cache' => array( 'pretty_version' => '1.0.1', 'version' => '1.0.1.0', @@ -350,9 +335,9 @@ ), ), 'qcloud/cos-sdk-v5' => array( - 'pretty_version' => 'v2.6.2', - 'version' => '2.6.2.0', - 'reference' => '92a1ee62b85ed4e7bf6836a684df5d7e3158d0ed', + 'pretty_version' => 'v2.6.6', + 'version' => '2.6.6.0', + 'reference' => '9d82ccb550fe2dca1adfb53835791d314023a9a8', 'type' => 'library', 'install_path' => __DIR__ . '/../qcloud/cos-sdk-v5', 'aliases' => array(), @@ -377,18 +362,18 @@ 'dev_requirement' => false, ), 'rmccue/requests' => array( - 'pretty_version' => 'v2.0.5', - 'version' => '2.0.5.0', - 'reference' => 'b717f1d2f4ef7992ec0c127747ed8b7e170c2f49', + 'pretty_version' => 'v2.0.8', + 'version' => '2.0.8.0', + 'reference' => 'fae75bcb83d9d00d0e31ee86a472a036f9f91519', 'type' => 'library', 'install_path' => __DIR__ . '/../rmccue/requests', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/cache' => array( - 'pretty_version' => 'v5.4.23', - 'version' => '5.4.23.0', - 'reference' => '983c79ff28612cdfd66d8e44e1a06e5afc87e107', + 'pretty_version' => 'v5.4.29', + 'version' => '5.4.29.0', + 'reference' => 'e29c5a97bc2d81269973c3e1d7ceb9d48b4d5151', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/cache', 'aliases' => array(), @@ -461,81 +446,81 @@ 'dev_requirement' => false, ), 'symfony/polyfill-ctype' => array( - 'pretty_version' => 'v1.27.0', - 'version' => '1.27.0.0', - 'reference' => '5bbc823adecdae860bb64756d639ecfec17b050a', + 'pretty_version' => 'v1.28.0', + 'version' => '1.28.0.0', + 'reference' => 'ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-ctype', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-intl-idn' => array( - 'pretty_version' => 'v1.27.0', - 'version' => '1.27.0.0', - 'reference' => '639084e360537a19f9ee352433b84ce831f3d2da', + 'pretty_version' => 'v1.28.0', + 'version' => '1.28.0.0', + 'reference' => 'ecaafce9f77234a6a449d29e49267ba10499116d', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-intl-normalizer' => array( - 'pretty_version' => 'v1.27.0', - 'version' => '1.27.0.0', - 'reference' => '19bd1e4fcd5b91116f14d8533c57831ed00571b6', + 'pretty_version' => 'v1.28.0', + 'version' => '1.28.0.0', + 'reference' => '8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-mbstring' => array( - 'pretty_version' => 'v1.27.0', - 'version' => '1.27.0.0', - 'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534', + 'pretty_version' => 'v1.28.0', + 'version' => '1.28.0.0', + 'reference' => '42292d99c55abe617799667f454222c54c60e229', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-php72' => array( - 'pretty_version' => 'v1.27.0', - 'version' => '1.27.0.0', - 'reference' => '869329b1e9894268a8a61dabb69153029b7a8c97', + 'pretty_version' => 'v1.28.0', + 'version' => '1.28.0.0', + 'reference' => '70f4aebd92afca2f865444d30a4d2151c13c3179', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php72', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-php73' => array( - 'pretty_version' => 'v1.27.0', - 'version' => '1.27.0.0', - 'reference' => '9e8ecb5f92152187c4799efd3c96b78ccab18ff9', + 'pretty_version' => 'v1.28.0', + 'version' => '1.28.0.0', + 'reference' => 'fe2f306d1d9d346a7fee353d0d5012e401e984b5', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php73', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-php80' => array( - 'pretty_version' => 'v1.27.0', - 'version' => '1.27.0.0', - 'reference' => '7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936', + 'pretty_version' => 'v1.28.0', + 'version' => '1.28.0.0', + 'reference' => '6caa57379c4aec19c0a12a38b59b26487dcfe4b5', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php80', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/polyfill-php81' => array( - 'pretty_version' => 'v1.27.0', - 'version' => '1.27.0.0', - 'reference' => '707403074c8ea6e2edaf8794b0157a0bfa52157a', + 'pretty_version' => 'v1.28.0', + 'version' => '1.28.0.0', + 'reference' => '7581cd600fa9fd681b797d00b02f068e2f13263b', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-php81', 'aliases' => array(), 'dev_requirement' => false, ), 'symfony/psr-http-message-bridge' => array( - 'pretty_version' => 'v2.2.0', - 'version' => '2.2.0.0', - 'reference' => '28a732c05bbad801304ad5a5c674cf2970508993', + 'pretty_version' => 'v2.3.1', + 'version' => '2.3.1.0', + 'reference' => '581ca6067eb62640de5ff08ee1ba6850a0ee472e', 'type' => 'symfony-bridge', 'install_path' => __DIR__ . '/../symfony/psr-http-message-bridge', 'aliases' => array(), @@ -578,18 +563,18 @@ 'dev_requirement' => false, ), 'tencentcloud/common' => array( - 'pretty_version' => '3.0.990', - 'version' => '3.0.990.0', - 'reference' => '0c2705d31c42443ab54422aec7965561141e99ca', + 'pretty_version' => '3.0.995', + 'version' => '3.0.995.0', + 'reference' => '60cb44ef1c52d26964ca1f8974c33b04a20bf36c', 'type' => 'library', 'install_path' => __DIR__ . '/../tencentcloud/common', 'aliases' => array(), 'dev_requirement' => false, ), 'tencentcloud/sms' => array( - 'pretty_version' => '3.0.990', - 'version' => '3.0.990.0', - 'reference' => '2dc4e09ae59950778370f6f438643046deee9882', + 'pretty_version' => '3.0.995', + 'version' => '3.0.995.0', + 'reference' => 'd0de23eea0cd54bf84a2fccab0990deae0d06d48', 'type' => 'library', 'install_path' => __DIR__ . '/../tencentcloud/sms', 'aliases' => array(), @@ -605,9 +590,9 @@ 'dev_requirement' => false, ), 'topthink/framework' => array( - 'pretty_version' => 'v6.1.2', - 'version' => '6.1.2.0', - 'reference' => '67235be5b919aaaf1de5aed9839f65d8e766aca3', + 'pretty_version' => 'v6.1.4', + 'version' => '6.1.4.0', + 'reference' => '66eb9cf4d627df12911344cd328faf9bb596bf2c', 'type' => 'library', 'install_path' => __DIR__ . '/../topthink/framework', 'aliases' => array(), @@ -616,7 +601,7 @@ 'topthink/think' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '8c9212052304a213c45338424760aea2d904f258', + 'reference' => '0b6b29a77bea7bf509dd19e4bc1e20a33d3946d9', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -641,9 +626,9 @@ 'dev_requirement' => false, ), 'topthink/think-multi-app' => array( - 'pretty_version' => 'v1.0.16', - 'version' => '1.0.16.0', - 'reference' => '07b9183855150455e1f76f8cbe9d77d6d1bc399f', + 'pretty_version' => 'v1.0.17', + 'version' => '1.0.17.0', + 'reference' => '4055a6187296ac16c0bc7bbab4ed5d92f82f791c', 'type' => 'library', 'install_path' => __DIR__ . '/../topthink/think-multi-app', 'aliases' => array(), @@ -686,9 +671,9 @@ 'dev_requirement' => false, ), 'w7corp/easywechat' => array( - 'pretty_version' => '6.8.0', - 'version' => '6.8.0.0', - 'reference' => '60f0b4ba2ac3144df1a2291193daa34beb949d26', + 'pretty_version' => '6.12.11', + 'version' => '6.12.11.0', + 'reference' => '81594e1068dadfb6caf354052689cedb2b6394f8', 'type' => 'library', 'install_path' => __DIR__ . '/../w7corp/easywechat', 'aliases' => array(), diff --git a/vendor/dragonmantank/cron-expression/CHANGELOG.md b/vendor/dragonmantank/cron-expression/CHANGELOG.md index 99b587be..17ab2ce4 100644 --- a/vendor/dragonmantank/cron-expression/CHANGELOG.md +++ b/vendor/dragonmantank/cron-expression/CHANGELOG.md @@ -1,5 +1,28 @@ # Change Log +## [3.3.3] - 2024-08-10 + +### Added +- N/A + +### Changed +- N/A + +### Fixed +- Added fixes for making sure `?` is not passed for both DOM and DOW (#148, thank you https://github.com/LeoVie) +- Fixed bug in Next Execution Time by sorting minutes properly (#160, thank you https://github.com/imyip) + +## [3.3.2] - 2022-09-19 + +### Added +- N/A + +### Changed +- Skip some daylight savings time tests for PHP 8.1 daylight savings time weirdness (#146) + +### Fixed +- Changed string interpolations to work better with PHP 8.2 (#142) + ## [3.3.1] - 2022-01-18 ### Added diff --git a/vendor/dragonmantank/cron-expression/README.md b/vendor/dragonmantank/cron-expression/README.md index e853ad45..494652c8 100644 --- a/vendor/dragonmantank/cron-expression/README.md +++ b/vendor/dragonmantank/cron-expression/README.md @@ -84,4 +84,4 @@ Projects that Use cron-expression ================================= * Part of the [Laravel Framework](https://github.com/laravel/framework/) * Available as a [Symfony Bundle - setono/cron-expression-bundle](https://github.com/Setono/CronExpressionBundle) -* Framework agnostic, PHP-based job scheduler - [Crunz](https://github.com/lavary/crunz) +* Framework agnostic, PHP-based job scheduler - [Crunz](https://github.com/crunzphp/crunz) diff --git a/vendor/dragonmantank/cron-expression/composer.json b/vendor/dragonmantank/cron-expression/composer.json index e512446d..657a5b47 100644 --- a/vendor/dragonmantank/cron-expression/composer.json +++ b/vendor/dragonmantank/cron-expression/composer.json @@ -37,5 +37,11 @@ "scripts": { "phpstan": "./vendor/bin/phpstan analyze", "test": "phpunit" + }, + "config": { + "allow-plugins": { + "ocramius/package-versions": true, + "phpstan/extension-installer": true + } } } diff --git a/vendor/dragonmantank/cron-expression/phpstan.neon b/vendor/dragonmantank/cron-expression/phpstan.neon deleted file mode 100644 index bea9cb0d..00000000 --- a/vendor/dragonmantank/cron-expression/phpstan.neon +++ /dev/null @@ -1,15 +0,0 @@ -parameters: - checkMissingIterableValueType: false - - ignoreErrors: - - '#Call to an undefined method DateTimeInterface::add\(\)#' - - '#Call to an undefined method DateTimeInterface::modify\(\)#' - - '#Call to an undefined method DateTimeInterface::setDate\(\)#' - - '#Call to an undefined method DateTimeInterface::setTime\(\)#' - - '#Call to an undefined method DateTimeInterface::setTimezone\(\)#' - - '#Call to an undefined method DateTimeInterface::sub\(\)#' - - level: max - - paths: - - src/ diff --git a/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php b/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php index d5337cc5..216ce432 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php @@ -177,6 +177,7 @@ class CronExpression * * @param string $expression CRON expression (e.g. '8 * * * *') * @param null|FieldFactoryInterface $fieldFactory Factory to create cron fields + * @throws InvalidArgumentException */ public function __construct(string $expression, FieldFactoryInterface $fieldFactory = null) { @@ -201,13 +202,22 @@ class CronExpression $split = preg_split('/\s/', $value, -1, PREG_SPLIT_NO_EMPTY); Assert::isArray($split); - $this->cronParts = $split; - if (\count($this->cronParts) < 5) { + $notEnoughParts = \count($split) < 5; + + $questionMarkInInvalidPart = array_key_exists(0, $split) && $split[0] === '?' + || array_key_exists(1, $split) && $split[1] === '?' + || array_key_exists(3, $split) && $split[3] === '?'; + + $tooManyQuestionMarks = array_key_exists(2, $split) && $split[2] === '?' + && array_key_exists(4, $split) && $split[4] === '?'; + + if ($notEnoughParts || $questionMarkInInvalidPart || $tooManyQuestionMarks) { throw new InvalidArgumentException( $value . ' is not a valid CRON expression' ); } + $this->cronParts = $split; foreach ($this->cronParts as $position => $part) { $this->setPart($position, $part); } diff --git a/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php b/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php index e08f62ea..39ff5978 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php @@ -49,7 +49,7 @@ class DayOfMonthField extends AbstractField private static function getNearestWeekday(int $currentYear, int $currentMonth, int $targetDay): ?DateTime { $tday = str_pad((string) $targetDay, 2, '0', STR_PAD_LEFT); - $target = DateTime::createFromFormat('Y-m-d', "${currentYear}-${currentMonth}-${tday}"); + $target = DateTime::createFromFormat('Y-m-d', "{$currentYear}-{$currentMonth}-{$tday}"); if ($target === false) { return null; @@ -94,9 +94,9 @@ class DayOfMonthField extends AbstractField } // Check to see if this is the nearest weekday to a particular value - if (strpos($value, 'W')) { + if ($wPosition = strpos($value, 'W')) { // Parse the target day - $targetDay = (int) substr($value, 0, strpos($value, 'W')); + $targetDay = (int) substr($value, 0, $wPosition); // Find out if the current day is the nearest day of the week $nearest = self::getNearestWeekday( (int) $date->format('Y'), diff --git a/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php b/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php index 5ac003da..b9bbf48b 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php @@ -68,8 +68,8 @@ class DayOfWeekField extends AbstractField $lastDayOfMonth = (int) $date->format('t'); // Find out if this is the last specific weekday of the month - if (strpos($value, 'L')) { - $weekday = $this->convertLiterals(substr($value, 0, strpos($value, 'L'))); + if ($lPosition = strpos($value, 'L')) { + $weekday = $this->convertLiterals(substr($value, 0, $lPosition)); $weekday %= 7; $daysInMonth = (int) $date->format('t'); diff --git a/vendor/dragonmantank/cron-expression/src/Cron/HoursField.php b/vendor/dragonmantank/cron-expression/src/Cron/HoursField.php index a7f8f33c..413d138b 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/HoursField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/HoursField.php @@ -25,7 +25,7 @@ class HoursField extends AbstractField /** * @var array|null Transitions returned by DateTimeZone::getTransitions() */ - protected $transitions = null; + protected $transitions = []; /** * @var int|null Timestamp of the start of the transitions range @@ -92,7 +92,7 @@ class HoursField extends AbstractField $dtLimitStart->getTimestamp(), $dtLimitEnd->getTimestamp() ); - if ($this->transitions === false) { + if (empty($this->transitions)) { return null; } $this->transitionsStart = $dtLimitStart->getTimestamp(); diff --git a/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php b/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php index eda91098..f077e6ec 100644 --- a/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php +++ b/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php @@ -49,6 +49,7 @@ class MinutesField extends AbstractField $current_minute = (int) $date->format('i'); $parts = false !== strpos($parts, ',') ? explode(',', $parts) : [$parts]; + sort($parts); $minutes = []; foreach ($parts as $part) { $minutes = array_merge($minutes, $this->getRangeForExpression($part, 59)); diff --git a/vendor/guzzlehttp/command/.php-cs-fixer.dist.php b/vendor/guzzlehttp/command/.php-cs-fixer.dist.php new file mode 100644 index 00000000..7acf9b59 --- /dev/null +++ b/vendor/guzzlehttp/command/.php-cs-fixer.dist.php @@ -0,0 +1,26 @@ +setRiskyAllowed(true) + ->setRules([ + '@PHP71Migration:risky' => true, + '@PHPUnit75Migration:risky' => true, + '@Symfony' => true, + 'declare_strict_types' => false, + 'global_namespace_import' => false, + 'phpdoc_annotation_without_dot' => false, + 'phpdoc_summary' => false, + 'phpdoc_to_comment' => false, + 'single_line_throw' => false, + 'void_return' => false, + 'yoda_style' => false, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__.'/src') + ->in(__DIR__.'/tests') + ->name('*.php') + ) +; + +return $config; diff --git a/vendor/guzzlehttp/command/composer.json b/vendor/guzzlehttp/command/composer.json index f15cfe5f..379e59e5 100644 --- a/vendor/guzzlehttp/command/composer.json +++ b/vendor/guzzlehttp/command/composer.json @@ -27,19 +27,29 @@ "require": { "php": "^7.2.5 || ^8.0", "guzzlehttp/guzzle": "^7.5.1", - "guzzlehttp/promises": "^1.5.2", + "guzzlehttp/promises": "^1.5.3 || ^2.0", "guzzlehttp/psr7": "^1.9.1 || ^2.4.5" }, "require-dev": { - "phpunit/phpunit": "^8.5.19" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.19 || ^9.5.8" }, "autoload": { "psr-4": { "GuzzleHttp\\Command\\": "src/" } }, + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, "config": { "preferred-install": "dist", - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } } } diff --git a/vendor/guzzlehttp/command/src/Command.php b/vendor/guzzlehttp/command/src/Command.php index cff70a2b..ded93b5e 100644 --- a/vendor/guzzlehttp/command/src/Command.php +++ b/vendor/guzzlehttp/command/src/Command.php @@ -1,4 +1,5 @@ getName() - . ' command: ' . $prev->getMessage(); + $message = 'There was an error executing the '.$command->getName() + .' command: '.$prev->getMessage(); // Create the exception. return new $class($message, $command, $prev, $request, $response); } /** - * @param string $message Exception message - * @param CommandInterface $command - * @param \Exception $previous Previous exception (if any) - * @param RequestInterface $request + * @param string $message Exception message + * @param \Exception $previous Previous exception (if any) + * @param RequestInterface $request * @param ResponseInterface $response */ public function __construct( diff --git a/vendor/guzzlehttp/command/src/Exception/CommandServerException.php b/vendor/guzzlehttp/command/src/Exception/CommandServerException.php index 22356b52..c0383e47 100644 --- a/vendor/guzzlehttp/command/src/Exception/CommandServerException.php +++ b/vendor/guzzlehttp/command/src/Exception/CommandServerException.php @@ -1,7 +1,10 @@ data = $data; diff --git a/vendor/guzzlehttp/command/src/ResultInterface.php b/vendor/guzzlehttp/command/src/ResultInterface.php index 4ae49a8d..fb06a232 100644 --- a/vendor/guzzlehttp/command/src/ResultInterface.php +++ b/vendor/guzzlehttp/command/src/ResultInterface.php @@ -1,4 +1,5 @@ executeAllAsync($commands, $options) ->then(function () use (&$results) { ksort($results); + return $results; }) ->wait(); @@ -119,12 +121,12 @@ class ServiceClient implements ServiceClientInterface } // Convert the iterator of commands to a generator of promises. - $commands = Promise\iter_for($commands); + $commands = Promise\Create::iterFor($commands); $promises = function () use ($commands) { foreach ($commands as $key => $command) { if (!$command instanceof CommandInterface) { throw new \InvalidArgumentException('The iterator must ' - . 'yield instances of ' . CommandInterface::class); + .'yield instances of '.CommandInterface::class); } yield $key => $this->executeAsync($command); } @@ -138,9 +140,10 @@ class ServiceClient implements ServiceClientInterface * Creates and executes a command for an operation by name. * * @param string $name Name of the command to execute. - * @param array $args Arguments to pass to the getCommand method. + * @param array $args Arguments to pass to the getCommand method. * * @return ResultInterface|PromiseInterface + * * @see \GuzzleHttp\Command\ServiceClientInterface::getCommand */ public function __call($name, array $args) @@ -148,6 +151,7 @@ class ServiceClient implements ServiceClientInterface $args = isset($args[0]) ? $args[0] : []; if (substr($name, -5) === 'Async') { $command = $this->getCommand(substr($name, 0, -5), $args); + return $this->executeAsync($command); } else { return $this->execute($this->getCommand($name, $args)); @@ -162,7 +166,7 @@ class ServiceClient implements ServiceClientInterface private function createCommandHandler() { return function (CommandInterface $command) { - return Promise\coroutine(function () use ($command) { + return Promise\Coroutine::of(function () use ($command) { // Prepare the HTTP options. $opts = $command['@http'] ?: []; unset($command['@http']); @@ -185,7 +189,6 @@ class ServiceClient implements ServiceClientInterface /** * Transforms a Command object into a Request object. * - * @param CommandInterface $command * @return RequestInterface */ private function transformCommandToRequest(CommandInterface $command) @@ -195,14 +198,10 @@ class ServiceClient implements ServiceClientInterface return $transform($command); } - /** * Transforms a Response object, also using data from the Request object, * into a Result object. * - * @param ResponseInterface $response - * @param RequestInterface $request - * @param CommandInterface $command * @return ResultInterface */ private function transformResponseToResult( diff --git a/vendor/guzzlehttp/command/src/ServiceClientInterface.php b/vendor/guzzlehttp/command/src/ServiceClientInterface.php index 1f418377..205e92ea 100644 --- a/vendor/guzzlehttp/command/src/ServiceClientInterface.php +++ b/vendor/guzzlehttp/command/src/ServiceClientInterface.php @@ -1,4 +1,5 @@ setRiskyAllowed(true) + ->setRules([ + '@PHP71Migration:risky' => true, + '@PHPUnit75Migration:risky' => true, + '@Symfony' => true, + 'declare_strict_types' => false, + 'global_namespace_import' => false, + 'phpdoc_annotation_without_dot' => false, + 'phpdoc_summary' => false, + 'phpdoc_to_comment' => false, + 'single_line_throw' => false, + 'void_return' => false, + 'yoda_style' => false, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->in(__DIR__.'/src') + ->in(__DIR__.'/tests') + ->name('*.php') + ) +; + +return $config; diff --git a/vendor/guzzlehttp/guzzle-services/composer.json b/vendor/guzzlehttp/guzzle-services/composer.json index 9fa76ccf..999e6bc6 100644 --- a/vendor/guzzlehttp/guzzle-services/composer.json +++ b/vendor/guzzlehttp/guzzle-services/composer.json @@ -26,12 +26,13 @@ ], "require": { "php": "^7.2.5 || ^8.0", - "guzzlehttp/guzzle": "^7.4.1", - "guzzlehttp/command": "^1.2.2", - "guzzlehttp/psr7": "^1.8.3 || ^2.1", + "guzzlehttp/guzzle": "^7.7", + "guzzlehttp/command": "^1.3", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", "guzzlehttp/uri-template": "^1.0.1" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", "phpunit/phpunit": "^8.5.19 || ^9.5.8" }, "autoload": { @@ -48,12 +49,16 @@ "gimler/guzzle-description-loader": "^0.0.4" }, "extra": { - "branch-alias": { - "dev-master": "1.3-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "config": { "preferred-install": "dist", - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "bamarni/composer-bin-plugin": true + } } } diff --git a/vendor/guzzlehttp/guzzle-services/src/Description.php b/vendor/guzzlehttp/guzzle-services/src/Description.php index b8d060ea..88d195c3 100644 --- a/vendor/guzzlehttp/guzzle-services/src/Description.php +++ b/vendor/guzzlehttp/guzzle-services/src/Description.php @@ -1,4 +1,5 @@ new BodyLocation(), - 'header' => new HeaderLocation(), + 'body' => new BodyLocation(), + 'header' => new HeaderLocation(), 'reasonPhrase' => new ReasonPhraseLocation(), - 'statusCode' => new StatusCodeLocation(), - 'xml' => new XmlLocation(), - 'json' => new JsonLocation(), + 'statusCode' => new StatusCodeLocation(), + 'xml' => new XmlLocation(), + 'json' => new JsonLocation(), ]; } @@ -68,9 +68,8 @@ class Deserializer /** * Deserialize the response into the specified result representation * - * @param ResponseInterface $response * @param RequestInterface|null $request - * @param CommandInterface $command + * * @return Result|ResultInterface|void|ResponseInterface */ public function __invoke(ResponseInterface $response, RequestInterface $request, CommandInterface $command) @@ -103,8 +102,6 @@ class Deserializer /** * Handles visit() and after() methods of the Response locations * - * @param Parameter $model - * @param ResponseInterface $response * @return Result|ResultInterface|void */ protected function visit(Parameter $model, ResponseInterface $response) @@ -117,7 +114,7 @@ class Deserializer } elseif ($model->getType() === 'array') { $result = $this->visitOuterArray($model, $result, $response, $context); } else { - throw new \InvalidArgumentException('Invalid response model: ' . $model->getType()); + throw new \InvalidArgumentException('Invalid response model: '.$model->getType()); } // Call the after() method of each found visitor @@ -132,11 +129,8 @@ class Deserializer /** * Handles the before() method of Response locations * - * @param string $location - * @param Parameter $model - * @param ResultInterface $result - * @param ResponseInterface $response - * @param array $context + * @param string $location + * * @return ResultInterface */ private function triggerBeforeVisitor( @@ -164,10 +158,6 @@ class Deserializer /** * Visits the outer object * - * @param Parameter $model - * @param ResultInterface $result - * @param ResponseInterface $response - * @param array $context * @return ResultInterface */ private function visitOuterObject( @@ -212,10 +202,6 @@ class Deserializer /** * Visits the outer array * - * @param Parameter $model - * @param ResultInterface $result - * @param ResponseInterface $response - * @param array $context * @return ResultInterface|void */ private function visitOuterArray( @@ -246,11 +232,6 @@ class Deserializer * In order for the exception to be properly triggered, all your exceptions must be instance * of "GuzzleHttp\Command\Exception\CommandException". If that's not the case, your exceptions will be wrapped * around a CommandException - * - * @param ResponseInterface $response - * @param RequestInterface $request - * @param CommandInterface $command - * @param Operation $operation */ protected function handleErrorResponses( ResponseInterface $response, @@ -271,7 +252,7 @@ class Deserializer continue; } - if (isset($error['phrase']) && ! ($error['phrase'] === $response->getReasonPhrase())) { + if (isset($error['phrase']) && !($error['phrase'] === $response->getReasonPhrase())) { continue; } diff --git a/vendor/guzzlehttp/guzzle-services/src/GuzzleClient.php b/vendor/guzzlehttp/guzzle-services/src/GuzzleClient.php index fa656a3c..22d9b5ae 100644 --- a/vendor/guzzlehttp/guzzle-services/src/GuzzleClient.php +++ b/vendor/guzzlehttp/guzzle-services/src/GuzzleClient.php @@ -1,4 +1,5 @@ config['process']) || $this->config['process'] === true); + $process = (!isset($this->config['process']) || $this->config['process'] === true); return $responseToResultTransformer !== null ? $responseToResultTransformer @@ -123,6 +128,7 @@ class GuzzleClient extends ServiceClient * Get the config of the client * * @param array|string $option + * * @return mixed */ public function getConfig($option = null) @@ -132,10 +138,6 @@ class GuzzleClient extends ServiceClient : (isset($this->config[$option]) ? $this->config[$option] : []); } - /** - * @param $option - * @param $value - */ public function setConfig($option, $value) { $this->config[$option] = $value; diff --git a/vendor/guzzlehttp/guzzle-services/src/Handler/ValidatedDescriptionHandler.php b/vendor/guzzlehttp/guzzle-services/src/Handler/ValidatedDescriptionHandler.php index c5ec2d6e..49b4dc95 100644 --- a/vendor/guzzlehttp/guzzle-services/src/Handler/ValidatedDescriptionHandler.php +++ b/vendor/guzzlehttp/guzzle-services/src/Handler/ValidatedDescriptionHandler.php @@ -1,4 +1,6 @@ -filter($value); } - if (! $this->validator->validate($schema, $value)) { + if (!$this->validator->validate($schema, $value)) { $errors = array_merge($errors, $this->validator->getErrors()); } elseif ($value !== $command[$name]) { // Update the config value if it changed and no validation errors were encountered. @@ -60,10 +58,10 @@ class ValidatedDescriptionHandler if ($params = $operation->getAdditionalParameters()) { foreach ($command->toArray() as $name => $value) { // It's only additional if it isn't defined in the schema - if (! $operation->hasParam($name)) { + if (!$operation->hasParam($name)) { // Always set the name so that error messages are useful $params->setName($name); - if (! $this->validator->validate($params, $value)) { + if (!$this->validator->validate($params, $value)) { $errors = array_merge($errors, $this->validator->getErrors()); } elseif ($value !== $command[$name]) { $command[$name] = $value; @@ -73,7 +71,7 @@ class ValidatedDescriptionHandler } if ($errors) { - throw new CommandException('Validation errors: ' . implode("\n", $errors), $command); + throw new CommandException('Validation errors: '.implode("\n", $errors), $command); } return $handler($command); diff --git a/vendor/guzzlehttp/guzzle-services/src/Operation.php b/vendor/guzzlehttp/guzzle-services/src/Operation.php index 57b75ca2..0fbaa217 100644 --- a/vendor/guzzlehttp/guzzle-services/src/Operation.php +++ b/vendor/guzzlehttp/guzzle-services/src/Operation.php @@ -1,4 +1,5 @@ [], 'parameters' => [], 'additionalParameters' => null, - 'errorResponses' => [] + 'errorResponses' => [], ]; $this->description = $description === null ? new Description([]) : $description; @@ -240,7 +242,7 @@ class Operation implements ToArrayInterface * Get extra data from the operation * * @param string $name Name of the data point to retrieve or null to - * retrieve all of the extra data. + * retrieve all of the extra data. * * @return mixed|null */ @@ -256,14 +258,12 @@ class Operation implements ToArrayInterface } /** - * @param $name - * @param array $config * @return array */ private function resolveExtends($name, array $config) { if (!$this->description->hasOperation($name)) { - throw new \InvalidArgumentException('No operation named ' . $name); + throw new \InvalidArgumentException('No operation named '.$name); } // Merge parameters together one level deep diff --git a/vendor/guzzlehttp/guzzle-services/src/Parameter.php b/vendor/guzzlehttp/guzzle-services/src/Parameter.php index 8b3c39f2..29bab183 100644 --- a/vendor/guzzlehttp/guzzle-services/src/Parameter.php +++ b/vendor/guzzlehttp/guzzle-services/src/Parameter.php @@ -1,4 +1,5 @@ format) { if (!$this->serviceDescription) { throw new \RuntimeException('No service description was set so ' - . 'the value cannot be formatted.'); + .'the value cannot be formatted.'); } + return $this->serviceDescription->format($this->format, $value); } @@ -512,7 +516,7 @@ class Parameter implements ToArrayInterface * * @param string $name Name of the property to retrieve * - * @return null|Parameter + * @return Parameter|null */ public function getProperty($name) { @@ -618,6 +622,7 @@ class Parameter implements ToArrayInterface * @param string|array $filter Method to filter the value through * * @return self + * * @throws \InvalidArgumentException */ private function addFilter($filter) @@ -643,13 +648,15 @@ class Parameter implements ToArrayInterface * Check if a parameter has a specific variable and if it set. * * @param string $var + * * @return bool */ public function has($var) { if (!is_string($var)) { - throw new \InvalidArgumentException('Expected a string. Got: ' . (is_object($var) ? get_class($var) : gettype($var))); + throw new \InvalidArgumentException('Expected a string. Got: '.(is_object($var) ? get_class($var) : gettype($var))); } + return isset($this->{$var}) && !empty($this->{$var}); } } diff --git a/vendor/guzzlehttp/guzzle-services/src/QuerySerializer/QuerySerializerInterface.php b/vendor/guzzlehttp/guzzle-services/src/QuerySerializer/QuerySerializerInterface.php index ad7fb113..60f79571 100644 --- a/vendor/guzzlehttp/guzzle-services/src/QuerySerializer/QuerySerializerInterface.php +++ b/vendor/guzzlehttp/guzzle-services/src/QuerySerializer/QuerySerializerInterface.php @@ -1,4 +1,5 @@ getBody()->getContents(); $value = $command[$param->getName()]; - $value = $param->getName() . '=' . $param->filter($value); + $value = $param->getName().'='.$param->filter($value); if ($oldValue !== '') { - $value = $oldValue . '&' . $value; + $value = $oldValue.'&'.$value; } return $request->withBody(Psr7\Utils::streamFor($value)); diff --git a/vendor/guzzlehttp/guzzle-services/src/RequestLocation/FormParamLocation.php b/vendor/guzzlehttp/guzzle-services/src/RequestLocation/FormParamLocation.php index 1a52df81..df92c975 100644 --- a/vendor/guzzlehttp/guzzle-services/src/RequestLocation/FormParamLocation.php +++ b/vendor/guzzlehttp/guzzle-services/src/RequestLocation/FormParamLocation.php @@ -1,4 +1,5 @@ multipartData[] = [ 'name' => $param->getWireName(), - 'contents' => $this->prepareValue($command[$param->getName()], $param) + 'contents' => $this->prepareValue($command[$param->getName()], $param), ]; return $request; } - /** - * @param CommandInterface $command - * @param RequestInterface $request - * @param Operation $operation * @return RequestInterface */ public function after( @@ -68,7 +62,7 @@ class MultiPartLocation extends AbstractLocation $request = Psr7\Utils::modifyRequest($request, $modify); if ($request->getBody() instanceof Psr7\MultipartStream) { // Use a multipart/form-data POST if a Content-Type is not set. - $request->withHeader('Content-Type', $this->contentType . $request->getBody()->getBoundary()); + $request->withHeader('Content-Type', $this->contentType.$request->getBody()->getBoundary()); } return $request; diff --git a/vendor/guzzlehttp/guzzle-services/src/RequestLocation/QueryLocation.php b/vendor/guzzlehttp/guzzle-services/src/RequestLocation/QueryLocation.php index c55643c9..9e9e090b 100644 --- a/vendor/guzzlehttp/guzzle-services/src/RequestLocation/QueryLocation.php +++ b/vendor/guzzlehttp/guzzle-services/src/RequestLocation/QueryLocation.php @@ -1,4 +1,5 @@ getData('xmlFlattened')) { $writer->endElement(); } + return; } if ($param->getData('xmlAttribute')) { @@ -191,11 +185,11 @@ class XmlLocation extends AbstractLocation /** * Write an attribute with namespace if used * - * @param \XMLWriter $writer XMLWriter instance - * @param string $prefix Namespace prefix if any - * @param string $name Attribute name - * @param string $namespace The uri of the namespace - * @param string $value The attribute content + * @param \XMLWriter $writer XMLWriter instance + * @param string $prefix Namespace prefix if any + * @param string $name Attribute name + * @param string $namespace The uri of the namespace + * @param string $value The attribute content */ protected function writeAttribute($writer, $prefix, $name, $namespace, $value) { @@ -209,11 +203,11 @@ class XmlLocation extends AbstractLocation /** * Write an element with namespace if used * - * @param \XMLWriter $writer XML writer resource - * @param string $prefix Namespace prefix if any - * @param string $name Element name - * @param string $namespace The uri of the namespace - * @param string $value The element content + * @param \XMLWriter $writer XML writer resource + * @param string $prefix Namespace prefix if any + * @param string $name Element name + * @param string $namespace The uri of the namespace + * @param string $value The element content */ protected function writeElement(\XMLWriter $writer, $prefix, $name, $namespace, $value) { @@ -233,9 +227,10 @@ class XmlLocation extends AbstractLocation /** * Create a new xml writer and start a document * - * @param string $encoding document encoding + * @param string $encoding document encoding * * @return \XMLWriter the writer resource + * * @throws \RuntimeException if the document cannot be started */ protected function startDocument($encoding) @@ -267,10 +262,6 @@ class XmlLocation extends AbstractLocation /** * Add an array to the XML - * - * @param \XMLWriter $writer - * @param Parameter $param - * @param $value */ protected function addXmlArray(\XMLWriter $writer, Parameter $param, &$value) { @@ -283,10 +274,6 @@ class XmlLocation extends AbstractLocation /** * Add an object to the XML - * - * @param \XMLWriter $writer - * @param Parameter $param - * @param $value */ protected function addXmlObject(\XMLWriter $writer, Parameter $param, &$value) { @@ -309,11 +296,6 @@ class XmlLocation extends AbstractLocation } } - /** - * @param $value - * @param Parameter $param - * @param Operation $operation - */ private function visitWithValue( $value, Parameter $param, diff --git a/vendor/guzzlehttp/guzzle-services/src/ResponseLocation/AbstractLocation.php b/vendor/guzzlehttp/guzzle-services/src/ResponseLocation/AbstractLocation.php index 97adc72f..bcc84fdf 100644 --- a/vendor/guzzlehttp/guzzle-services/src/ResponseLocation/AbstractLocation.php +++ b/vendor/guzzlehttp/guzzle-services/src/ResponseLocation/AbstractLocation.php @@ -1,4 +1,5 @@ getBody(); - $body = $body ?: "{}"; + $body = $body ?: '{}'; $this->json = \GuzzleHttp\json_decode($body, true); // relocate named arrays, so that they have the same structure as // arrays nested in objects and visit can work on them in the same way @@ -49,9 +46,6 @@ class JsonLocation extends AbstractLocation } /** - * @param ResultInterface $result - * @param ResponseInterface $response - * @param Parameter $model * @return ResultInterface */ public function after( @@ -84,9 +78,6 @@ class JsonLocation extends AbstractLocation } /** - * @param ResultInterface $result - * @param ResponseInterface $response - * @param Parameter $param * @return Result|ResultInterface */ public function visit( @@ -123,6 +114,7 @@ class JsonLocation extends AbstractLocation * * @param Parameter $param API parameter being validated * @param mixed $value Value to process. + * * @return mixed|null */ private function recurse(Parameter $param, $value) diff --git a/vendor/guzzlehttp/guzzle-services/src/ResponseLocation/ReasonPhraseLocation.php b/vendor/guzzlehttp/guzzle-services/src/ResponseLocation/ReasonPhraseLocation.php index 1cb590ff..893f2b0e 100644 --- a/vendor/guzzlehttp/guzzle-services/src/ResponseLocation/ReasonPhraseLocation.php +++ b/vendor/guzzlehttp/guzzle-services/src/ResponseLocation/ReasonPhraseLocation.php @@ -1,4 +1,5 @@ getWireName(); $ns = null; - if (strstr($sentAs, ':')) { + if (null !== $sentAs && strstr($sentAs, ':')) { list($ns, $sentAs) = explode(':', $sentAs); } @@ -100,6 +92,7 @@ class XmlLocation extends AbstractLocation * * @param Parameter $param API parameter being processed * @param \SimpleXMLElement $node Node being processed + * * @return array */ private function recursiveProcess( @@ -132,8 +125,6 @@ class XmlLocation extends AbstractLocation } /** - * @param Parameter $param - * @param \SimpleXMLElement $node * @return array */ private function processArray(Parameter $param, \SimpleXMLElement $node) @@ -144,7 +135,7 @@ class XmlLocation extends AbstractLocation $result = []; $ns = null; - if (strstr($sentAs, ':')) { + if (null !== $sentAs && strstr($sentAs, ':')) { // Get namespace from the wire name list($ns, $sentAs) = explode(':', $sentAs); } else { @@ -174,6 +165,7 @@ class XmlLocation extends AbstractLocation * * @param Parameter $param API parameter being parsed * @param \SimpleXMLElement $node Value to process + * * @return array */ private function processObject(Parameter $param, \SimpleXMLElement $node) @@ -243,9 +235,8 @@ class XmlLocation extends AbstractLocation /** * Convert an XML document to an array. * - * @param \SimpleXMLElement $xml - * @param int $nesting - * @param null $ns + * @param int $nesting + * @param null $ns * * @return array */ diff --git a/vendor/guzzlehttp/guzzle-services/src/SchemaFormatter.php b/vendor/guzzlehttp/guzzle-services/src/SchemaFormatter.php index 34f7a884..274d0213 100644 --- a/vendor/guzzlehttp/guzzle-services/src/SchemaFormatter.php +++ b/vendor/guzzlehttp/guzzle-services/src/SchemaFormatter.php @@ -1,4 +1,5 @@ setTimezone($utc)->format($format); } throw new \InvalidArgumentException('Date/Time values must be either ' - . 'be a string, integer, or DateTime object'); + .'be a string, integer, or DateTime object'); } /** * Create a ISO 8601 (YYYY-MM-DDThh:mm:ssZ) formatted date time value in * UTC time. * - * @param string|integer|\DateTime $value Date time value + * @param string|int|\DateTime $value Date time value * * @return string */ @@ -81,7 +84,7 @@ class SchemaFormatter /** * Create an HTTP date (RFC 1123 / RFC 822) formatted UTC date-time string * - * @param string|integer|\DateTime $value Date time value + * @param string|int|\DateTime $value Date time value * * @return string */ @@ -93,7 +96,7 @@ class SchemaFormatter /** * Create a YYYY-MM-DD formatted string * - * @param string|integer|\DateTime $value Date time value + * @param string|int|\DateTime $value Date time value * * @return string */ @@ -105,7 +108,7 @@ class SchemaFormatter /** * Create a hh:mm:ss formatted string * - * @param string|integer|\DateTime $value Date time value + * @param string|int|\DateTime $value Date time value * * @return string */ @@ -117,8 +120,8 @@ class SchemaFormatter /** * Formats a boolean value as a string * - * @param string|integer|bool $value Value to convert to a boolean - * 'true' / 'false' value + * @param string|int|bool $value Value to convert to a boolean + * 'true' / 'false' value * * @return string */ @@ -130,7 +133,7 @@ class SchemaFormatter /** * Return a UNIX timestamp in the UTC timezone * - * @param string|integer|\DateTime $value Time value + * @param string|int|\DateTime $value Time value * * @return int */ diff --git a/vendor/guzzlehttp/guzzle-services/src/SchemaValidator.php b/vendor/guzzlehttp/guzzle-services/src/SchemaValidator.php index 4a2833f3..e4de6206 100644 --- a/vendor/guzzlehttp/guzzle-services/src/SchemaValidator.php +++ b/vendor/guzzlehttp/guzzle-services/src/SchemaValidator.php @@ -1,4 +1,5 @@ errors); + return false; } } @@ -60,8 +60,8 @@ class SchemaValidator /** * From the allowable types, determine the type that the variable matches * - * @param string|array $type Parameter type - * @param mixed $value Value to determine the type + * @param string|array $type Parameter type + * @param mixed $value Value to determine the type * * @return string|false Returns the matching type on */ @@ -97,11 +97,11 @@ class SchemaValidator /** * Recursively validate a parameter * - * @param Parameter $param API parameter being validated - * @param mixed $value Value to validate and validate. The value may - * change during this validate. - * @param string $path Current validation path (used for error reporting) - * @param int $depth Current depth in the validation validate + * @param Parameter $param API parameter being validated + * @param mixed $value Value to validate and validate. The value may + * change during this validate. + * @param string $path Current validation path (used for error reporting) + * @param int $depth Current depth in the validation validate * * @return bool Returns true if valid, or false if invalid */ @@ -146,6 +146,7 @@ class SchemaValidator // indexed if (isset($value[0])) { $this->errors[] = "{$path} must be an array of properties. Got a numerically indexed array."; + return false; } $traverse = true; @@ -208,24 +209,24 @@ class SchemaValidator $valueIsArray = false; } } - } elseif ($type == 'array' && $valueIsArray && $param->getItems()) { foreach ($value as $i => &$item) { // Validate each item in an array against the items attribute of the schema - $this->recursiveProcess($param->getItems(), $item, $path . "[{$i}]", $depth + 1); + $this->recursiveProcess($param->getItems(), $item, $path."[{$i}]", $depth + 1); } } // If the value is required and the type is not null, then there is an // error if the value is not set if ($required && $value === null && $type != 'null') { - $message = "{$path} is " . ($param->getType() - ? ('a required ' . implode(' or ', (array) $param->getType())) + $message = "{$path} is ".($param->getType() + ? ('a required '.implode(' or ', (array) $param->getType())) : 'required'); if ($param->has('description')) { - $message .= ': ' . $param->getDescription(); + $message .= ': '.$param->getDescription(); } $this->errors[] = $message; + return false; } @@ -239,7 +240,7 @@ class SchemaValidator ) { $value = (string) $value; } else { - $this->errors[] = "{$path} must be of type " . implode(' or ', (array) $param->getType()); + $this->errors[] = "{$path} must be of type ".implode(' or ', (array) $param->getType()); } } @@ -247,12 +248,12 @@ class SchemaValidator if ($type == 'string') { // Strings can have enums which are a list of predefined values if (($enum = $param->getEnum()) && !in_array($value, $enum)) { - $this->errors[] = "{$path} must be one of " . implode(' or ', array_map(function ($s) { - return '"' . addslashes($s) . '"'; + $this->errors[] = "{$path} must be one of ".implode(' or ', array_map(function ($s) { + return '"'.addslashes($s).'"'; }, $enum)); } // Strings can have a regex pattern that the value must match - if (($pattern = $param->getPattern()) && !preg_match($pattern, $value)) { + if (($pattern = $param->getPattern()) && !preg_match($pattern, $value)) { $this->errors[] = "{$path} must match the following regular expression: {$pattern}"; } @@ -268,7 +269,6 @@ class SchemaValidator $this->errors[] = "{$path} length must be less than or equal to {$max}"; } } - } elseif ($type == 'array') { $size = null; if ($min = $param->getMinItems()) { @@ -282,7 +282,6 @@ class SchemaValidator $this->errors[] = "{$path} must contain {$max} or fewer elements"; } } - } elseif ($type == 'integer' || $type == 'number' || $type == 'numeric') { if (($min = $param->getMinimum()) && $value < $min) { $this->errors[] = "{$path} must be greater than or equal to {$min}"; diff --git a/vendor/guzzlehttp/guzzle-services/src/Serializer.php b/vendor/guzzlehttp/guzzle-services/src/Serializer.php index 87fbd5ba..145c48fb 100644 --- a/vendor/guzzlehttp/guzzle-services/src/Serializer.php +++ b/vendor/guzzlehttp/guzzle-services/src/Serializer.php @@ -1,4 +1,5 @@ new BodyLocation(), - 'query' => new QueryLocation(), - 'header' => new HeaderLocation(), - 'json' => new JsonLocation(), - 'xml' => new XmlLocation(), + 'body' => new BodyLocation(), + 'query' => new QueryLocation(), + 'header' => new HeaderLocation(), + 'json' => new JsonLocation(), + 'xml' => new XmlLocation(), 'formParam' => new FormParamLocation(), 'multipart' => new MultiPartLocation(), ]; @@ -53,21 +53,22 @@ class Serializer } /** - * @param CommandInterface $command * @return RequestInterface */ public function __invoke(CommandInterface $command) { $request = $this->createRequest($command); + return $this->prepareRequest($command, $request); } /** * Prepares a request for sending using location visitors * - * @param CommandInterface $command * @param RequestInterface $request Request being created + * * @return RequestInterface + * * @throws \RuntimeException If a location cannot be handled */ protected function prepareRequest( @@ -109,9 +110,8 @@ class Serializer /** * Create a request for the command and operation * - * @param CommandInterface $command - * * @return RequestInterface + * * @throws \RuntimeException */ protected function createRequest(CommandInterface $command) @@ -133,7 +133,6 @@ class Serializer * Create a request for an operation with a uri merged onto a base URI * * @param \GuzzleHttp\Command\Guzzle\Operation $operation - * @param \GuzzleHttp\Command\CommandInterface $command * * @return \GuzzleHttp\Psr7\Request */ diff --git a/vendor/guzzlehttp/guzzle-services/vendor-bin/php-cs-fixer/composer.json b/vendor/guzzlehttp/guzzle-services/vendor-bin/php-cs-fixer/composer.json new file mode 100644 index 00000000..c9dd5ee4 --- /dev/null +++ b/vendor/guzzlehttp/guzzle-services/vendor-bin/php-cs-fixer/composer.json @@ -0,0 +1,9 @@ +{ + "require": { + "php": "^7.4 || ^8.0", + "friendsofphp/php-cs-fixer": "3.16.0" + }, + "config": { + "preferred-install": "dist" + } +} diff --git a/vendor/guzzlehttp/guzzle/CHANGELOG.md b/vendor/guzzlehttp/guzzle/CHANGELOG.md index 1a968434..990b86c9 100644 --- a/vendor/guzzlehttp/guzzle/CHANGELOG.md +++ b/vendor/guzzlehttp/guzzle/CHANGELOG.md @@ -2,6 +2,56 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version. + +## 7.8.0 - 2023-08-27 + +### Added + +- Support for PHP 8.3 +- Added automatic closing of handles on `CurlFactory` object destruction + + +## 7.7.1 - 2023-08-27 + +### Changed + +- Remove the need for `AllowDynamicProperties` in `CurlMultiHandler` + + +## 7.7.0 - 2023-05-21 + +### Added + +- Support `guzzlehttp/promises` v2 + + +## 7.6.1 - 2023-05-15 + +### Fixed + +- Fix `SetCookie::fromString` MaxAge deprecation warning and skip invalid MaxAge values + + +## 7.6.0 - 2023-05-14 + +### Added + +- Support for setting the minimum TLS version in a unified way +- Apply on request the version set in options parameters + + +## 7.5.2 - 2023-05-14 + +### Fixed + +- Fixed set cookie constructor validation +- Fixed handling of files with `'0'` body + +### Changed + +- Corrected docs and default connect timeout value to 300 seconds + + ## 7.5.1 - 2023-04-17 ### Fixed @@ -12,6 +62,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Adjusted `guzzlehttp/psr7` version constraint to `^1.9.1 || ^2.4.5` + ## 7.5.0 - 2022-08-28 ### Added @@ -19,6 +70,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Support PHP 8.2 - Add request to delay closure params + ## 7.4.5 - 2022-06-20 ### Fixed @@ -26,6 +78,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version * Fix change in port should be considered a change in origin * Fix `CURLOPT_HTTPAUTH` option not cleared on change of origin + ## 7.4.4 - 2022-06-09 ### Fixed @@ -33,12 +86,14 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version * Fix failure to strip Authorization header on HTTP downgrade * Fix failure to strip the Cookie header on change in host or HTTP downgrade + ## 7.4.3 - 2022-05-25 ### Fixed * Fix cross-domain cookie leakage + ## 7.4.2 - 2022-03-20 ### Fixed @@ -47,6 +102,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Reject non-HTTP schemes in StreamHandler - Set a default ssl.peer_name context in StreamHandler to allow `force_ip_resolve` + ## 7.4.1 - 2021-12-06 ### Changed @@ -58,6 +114,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Only close curl handle if it's done [#2950](https://github.com/guzzle/guzzle/pull/2950) + ## 7.4.0 - 2021-10-18 ### Added @@ -75,6 +132,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Be more strict with types [#2914](https://github.com/guzzle/guzzle/pull/2914), [#2917](https://github.com/guzzle/guzzle/pull/2917), [#2919](https://github.com/guzzle/guzzle/pull/2919), [#2945](https://github.com/guzzle/guzzle/pull/2945) + ## 7.3.0 - 2021-03-23 ### Added @@ -87,6 +145,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Handle exceptions on invalid header consistently between PHP versions and handlers [#2872](https://github.com/guzzle/guzzle/pull/2872) + ## 7.2.0 - 2020-10-10 ### Added @@ -109,6 +168,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - Using environment variable GUZZLE_CURL_SELECT_TIMEOUT [#2786](https://github.com/guzzle/guzzle/pull/2786) + ## 7.1.1 - 2020-09-30 ### Fixed @@ -120,6 +180,7 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - We dont connect curl `sink` on HEAD requests. - Removed some PHP 5 workarounds + ## 7.1.0 - 2020-09-22 ### Added @@ -142,14 +203,17 @@ Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version - `Utils::defaultCaBundle()` - `CurlFactory::LOW_CURL_VERSION_NUMBER` + ## 7.0.1 - 2020-06-27 * Fix multiply defined functions fatal error [#2699](https://github.com/guzzle/guzzle/pull/2699) + ## 7.0.0 - 2020-06-27 No changes since 7.0.0-rc1. + ## 7.0.0-rc1 - 2020-06-15 ### Changed @@ -157,6 +221,7 @@ No changes since 7.0.0-rc1. * Use error level for logging errors in Middleware [#2629](https://github.com/guzzle/guzzle/pull/2629) * Disabled IDN support by default and require ext-intl to use it [#2675](https://github.com/guzzle/guzzle/pull/2675) + ## 7.0.0-beta2 - 2020-05-25 ### Added @@ -182,6 +247,7 @@ No changes since 7.0.0-rc1. * Pool option `pool_size` [#2528](https://github.com/guzzle/guzzle/pull/2528) + ## 7.0.0-beta1 - 2019-12-30 The diff might look very big but 95% of Guzzle users will be able to upgrade without modification. @@ -215,15 +281,18 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * `uri_template()` and `UriTemplate` [#2440](https://github.com/guzzle/guzzle/pull/2440) * Request options `save_to` and `exceptions` [#2464](https://github.com/guzzle/guzzle/pull/2464) + ## 6.5.2 - 2019-12-23 * idn_to_ascii() fix for old PHP versions [#2489](https://github.com/guzzle/guzzle/pull/2489) + ## 6.5.1 - 2019-12-21 * Better defaults for PHP installations with old ICU lib [#2454](https://github.com/guzzle/guzzle/pull/2454) * IDN support for redirects [#2424](https://github.com/guzzle/guzzle/pull/2424) + ## 6.5.0 - 2019-12-07 * Improvement: Added support for reset internal queue in MockHandler. [#2143](https://github.com/guzzle/guzzle/pull/2143) @@ -233,11 +302,13 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Fix: Prevent undefined offset when using array for ssl_key options. [#2348](https://github.com/guzzle/guzzle/pull/2348) * Deprecated `ClientInterface::VERSION` + ## 6.4.1 - 2019-10-23 * No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that * Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar` + ## 6.4.0 - 2019-10-23 * Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108) @@ -250,6 +321,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335) * Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362) + ## 6.3.3 - 2018-04-22 * Fix: Default headers when decode_content is specified @@ -291,13 +363,14 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684) * Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827) - + Minor code cleanups, documentation fixes and clarifications. + ## 6.2.3 - 2017-02-28 * Fix deprecations with guzzle/psr7 version 1.4 + ## 6.2.2 - 2016-10-08 * Allow to pass nullable Response to delay callable @@ -305,6 +378,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Fix drain case where content-length is the literal string zero * Obfuscate in-URL credentials in exceptions + ## 6.2.1 - 2016-07-18 * Address HTTP_PROXY security vulnerability, CVE-2016-5385: @@ -315,6 +389,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c a server does not honor `Connection: close`. * Ignore URI fragment when sending requests. + ## 6.2.0 - 2016-03-21 * Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`. @@ -334,6 +409,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Bug fix: provide an empty string to `http_build_query` for HHVM workaround. https://github.com/guzzle/guzzle/pull/1367 + ## 6.1.1 - 2015-11-22 * Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler @@ -349,6 +425,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Bug fix: fixed regression where MockHandler was not using `sink`. https://github.com/guzzle/guzzle/pull/1292 + ## 6.1.0 - 2015-09-08 * Feature: Added the `on_stats` request option to provide access to transfer @@ -383,6 +460,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set. https://github.com/guzzle/guzzle/pull/1189 + ## 6.0.2 - 2015-07-04 * Fixed a memory leak in the curl handlers in which references to callbacks @@ -400,6 +478,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Functions are now conditionally required using an additional level of indirection to help with global Composer installations. + ## 6.0.1 - 2015-05-27 * Fixed a bug with serializing the `query` request option where the `&` @@ -408,6 +487,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c use `form_params` or `multipart` instead. * Various doc fixes. + ## 6.0.0 - 2015-05-26 * See the UPGRADING.md document for more information. @@ -432,6 +512,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * `$maxHandles` has been removed from CurlMultiHandler. * `MultipartPostBody` is now part of the `guzzlehttp/psr7` package. + ## 5.3.0 - 2015-05-19 * Mock now supports `save_to` @@ -442,6 +523,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated. * URL scheme is now always lowercased. + ## 6.0.0-beta.1 * Requires PHP >= 5.5 @@ -494,6 +576,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * `GuzzleHttp\QueryParser` has been replaced with the `GuzzleHttp\Psr7\parse_query`. + ## 5.2.0 - 2015-01-27 * Added `AppliesHeadersInterface` to make applying headers to a request based @@ -504,6 +587,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c RingBridge. * Added a guard in the Pool class to not use recursion for request retries. + ## 5.1.0 - 2014-12-19 * Pool class no longer uses recursion when a request is intercepted. @@ -524,6 +608,7 @@ Please see [the upgrade document](UPGRADING.md) that describes all BC breaking c * Exceptions thrown in the `end` event are now correctly wrapped with Guzzle specific exceptions if necessary. + ## 5.0.3 - 2014-11-03 This change updates query strings so that they are treated as un-encoded values @@ -538,6 +623,7 @@ string that should not be parsed or encoded (unless a call to getQuery() is subsequently made, forcing the query-string to be converted into a Query object). + ## 5.0.2 - 2014-10-30 * Added a trailing `\r\n` to multipart/form-data payloads. See @@ -559,6 +645,7 @@ object). string on a URL: Now allowing many more characters to be present in the query string without being percent encoded. See https://tools.ietf.org/html/rfc3986#appendix-A + ## 5.0.1 - 2014-10-16 Bugfix release. @@ -570,6 +657,7 @@ Bugfix release. * Fixed an issue where transfer statistics were not being populated in the RingBridge. https://github.com/guzzle/guzzle/issues/866 + ## 5.0.0 - 2014-10-12 Adding support for non-blocking responses and some minor API cleanup. @@ -651,6 +739,7 @@ interfaces. argument. They now accept an associative array of options, including the "size" key and "metadata" key which can be used to provide custom metadata. + ## 4.2.2 - 2014-09-08 * Fixed a memory leak in the CurlAdapter when reusing cURL handles. diff --git a/vendor/guzzlehttp/guzzle/README.md b/vendor/guzzlehttp/guzzle/README.md index 428f346f..0786462b 100644 --- a/vendor/guzzlehttp/guzzle/README.md +++ b/vendor/guzzlehttp/guzzle/README.md @@ -60,13 +60,13 @@ composer require guzzlehttp/guzzle ## Version Guidance -| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | -|---------|----------------|---------------------|--------------|---------------------|---------------------|-------|--------------| -| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 | -| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 | -| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 | -| 6.x | Security fixes | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 | -| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8.3 | +| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | +|---------|---------------------|---------------------|--------------|---------------------|---------------------|-------|--------------| +| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >=5.3.3,<7.0 | +| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >=5.4,<7.0 | +| 5.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >=5.4,<7.4 | +| 6.x | Security fixes only | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >=5.5,<8.0 | +| 7.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v7][guzzle-7-repo] | [v7][guzzle-7-docs] | Yes | >=7.2.5,<8.3 | [guzzle-3-repo]: https://github.com/guzzle/guzzle3 [guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x diff --git a/vendor/guzzlehttp/guzzle/UPGRADING.md b/vendor/guzzlehttp/guzzle/UPGRADING.md index 45417a7e..8fa0afb5 100644 --- a/vendor/guzzlehttp/guzzle/UPGRADING.md +++ b/vendor/guzzlehttp/guzzle/UPGRADING.md @@ -27,7 +27,7 @@ Please make sure: - Function `GuzzleHttp\Exception\RequestException::getResponseBodySummary` is removed. Use `\GuzzleHttp\Psr7\get_message_body_summary` as an alternative. - Function `GuzzleHttp\Cookie\CookieJar::getCookieValue` is removed. -- Request option `exception` is removed. Please use `http_errors`. +- Request option `exceptions` is removed. Please use `http_errors`. - Request option `save_to` is removed. Please use `sink`. - Pool option `pool_size` is removed. Please use `concurrency`. - We now look for environment variables in the `$_SERVER` super global, due to thread safety issues with `getenv`. We continue to fallback to `getenv` in CLI environments, for maximum compatibility. diff --git a/vendor/guzzlehttp/guzzle/composer.json b/vendor/guzzlehttp/guzzle/composer.json index eb40a45c..72defd61 100644 --- a/vendor/guzzlehttp/guzzle/composer.json +++ b/vendor/guzzlehttp/guzzle/composer.json @@ -53,8 +53,8 @@ "require": { "php": "^7.2.5 || ^8.0", "ext-json": "*", - "guzzlehttp/promises": "^1.5", - "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "guzzlehttp/promises": "^1.5.3 || ^2.0.1", + "guzzlehttp/psr7": "^1.9.1 || ^2.5.1", "psr/http-client": "^1.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, @@ -64,7 +64,8 @@ "require-dev": { "ext-curl": "*", "bamarni/composer-bin-plugin": "^1.8.1", - "php-http/client-integration-tests": "^3.0", + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, @@ -84,9 +85,6 @@ "bamarni-bin": { "bin-links": true, "forward-command": false - }, - "branch-alias": { - "dev-master": "7.5-dev" } }, "autoload": { diff --git a/vendor/guzzlehttp/guzzle/src/Client.php b/vendor/guzzlehttp/guzzle/src/Client.php index 58f1d891..bc6efc90 100644 --- a/vendor/guzzlehttp/guzzle/src/Client.php +++ b/vendor/guzzlehttp/guzzle/src/Client.php @@ -120,13 +120,14 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface public function send(RequestInterface $request, array $options = []): ResponseInterface { $options[RequestOptions::SYNCHRONOUS] = true; + return $this->sendAsync($request, $options)->wait(); } /** * The HttpClient PSR (PSR-18) specify this method. * - * @inheritDoc + * {@inheritDoc} */ public function sendRequest(RequestInterface $request): ResponseInterface { @@ -184,6 +185,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface public function request(string $method, $uri = '', array $options = []): ResponseInterface { $options[RequestOptions::SYNCHRONOUS] = true; + return $this->requestAsync($method, $uri, $options)->wait(); } @@ -200,7 +202,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface * * @deprecated Client::getConfig will be removed in guzzlehttp/guzzle:8.0. */ - public function getConfig(?string $option = null) + public function getConfig(string $option = null) { return $option === null ? $this->config @@ -228,11 +230,11 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface { $defaults = [ 'allow_redirects' => RedirectMiddleware::$defaultSettings, - 'http_errors' => true, - 'decode_content' => true, - 'verify' => true, - 'cookies' => false, - 'idn_conversion' => false, + 'http_errors' => true, + 'decode_content' => true, + 'verify' => true, + 'cookies' => false, + 'idn_conversion' => false, ]; // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. @@ -354,10 +356,10 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface if (isset($options['form_params'])) { if (isset($options['multipart'])) { throw new InvalidArgumentException('You cannot use ' - . 'form_params and multipart at the same time. Use the ' - . 'form_params option if you want to send application/' - . 'x-www-form-urlencoded requests, and the multipart ' - . 'option to send multipart/form-data requests.'); + .'form_params and multipart at the same time. Use the ' + .'form_params option if you want to send application/' + .'x-www-form-urlencoded requests, and the multipart ' + .'option to send multipart/form-data requests.'); } $options['body'] = \http_build_query($options['form_params'], '', '&'); unset($options['form_params']); @@ -403,7 +405,7 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface // Ensure that we don't have the header in different case and set the new value. $modify['set_headers'] = Psr7\Utils::caselessRemove(['Authorization'], $modify['set_headers']); $modify['set_headers']['Authorization'] = 'Basic ' - . \base64_encode("$value[0]:$value[1]"); + .\base64_encode("$value[0]:$value[1]"); break; case 'digest': // @todo: Do not rely on curl @@ -437,13 +439,17 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface } } + if (isset($options['version'])) { + $modify['version'] = $options['version']; + } + $request = Psr7\Utils::modifyRequest($request, $modify); if ($request->getBody() instanceof Psr7\MultipartStream) { // Use a multipart/form-data POST if a Content-Type is not set. // Ensure that we don't have the header in different case and set the new value. $options['_conditional'] = Psr7\Utils::caselessRemove(['Content-Type'], $options['_conditional']); $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' - . $request->getBody()->getBoundary(); + .$request->getBody()->getBoundary(); } // Merge in conditional headers if they are not present. @@ -469,9 +475,9 @@ class Client implements ClientInterface, \Psr\Http\Client\ClientInterface private function invalidBody(): InvalidArgumentException { return new InvalidArgumentException('Passing in the "body" request ' - . 'option as an array to send a request is not supported. ' - . 'Please use the "form_params" request option to send a ' - . 'application/x-www-form-urlencoded request, or the "multipart" ' - . 'request option to send a multipart/form-data request.'); + .'option as an array to send a request is not supported. ' + .'Please use the "form_params" request option to send a ' + .'application/x-www-form-urlencoded request, or the "multipart" ' + .'request option to send a multipart/form-data request.'); } } diff --git a/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/vendor/guzzlehttp/guzzle/src/ClientInterface.php index 6aaee61a..1788e16a 100644 --- a/vendor/guzzlehttp/guzzle/src/ClientInterface.php +++ b/vendor/guzzlehttp/guzzle/src/ClientInterface.php @@ -80,5 +80,5 @@ interface ClientInterface * * @deprecated ClientInterface::getConfig will be removed in guzzlehttp/guzzle:8.0. */ - public function getConfig(?string $option = null); + public function getConfig(string $option = null); } diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php index 9985a981..fa2b10a8 100644 --- a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php +++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php @@ -50,10 +50,10 @@ class CookieJar implements CookieJarInterface $cookieJar = new self(); foreach ($cookies as $name => $value) { $cookieJar->setCookie(new SetCookie([ - 'Domain' => $domain, - 'Name' => $name, - 'Value' => $value, - 'Discard' => true + 'Domain' => $domain, + 'Name' => $name, + 'Value' => $value, + 'Discard' => true, ])); } @@ -96,9 +96,6 @@ class CookieJar implements CookieJarInterface return null; } - /** - * @inheritDoc - */ public function toArray(): array { return \array_map(static function (SetCookie $cookie): array { @@ -106,13 +103,11 @@ class CookieJar implements CookieJarInterface }, $this->getIterator()->getArrayCopy()); } - /** - * @inheritDoc - */ - public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void + public function clear(string $domain = null, string $path = null, string $name = null): void { if (!$domain) { $this->cookies = []; + return; } elseif (!$path) { $this->cookies = \array_filter( @@ -125,25 +120,22 @@ class CookieJar implements CookieJarInterface $this->cookies = \array_filter( $this->cookies, static function (SetCookie $cookie) use ($path, $domain): bool { - return !($cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); + return !($cookie->matchesPath($path) + && $cookie->matchesDomain($domain)); } ); } else { $this->cookies = \array_filter( $this->cookies, static function (SetCookie $cookie) use ($path, $domain, $name) { - return !($cookie->getName() == $name && - $cookie->matchesPath($path) && - $cookie->matchesDomain($domain)); + return !($cookie->getName() == $name + && $cookie->matchesPath($path) + && $cookie->matchesDomain($domain)); } ); } } - /** - * @inheritDoc - */ public function clearSessionCookies(): void { $this->cookies = \array_filter( @@ -154,9 +146,6 @@ class CookieJar implements CookieJarInterface ); } - /** - * @inheritDoc - */ public function setCookie(SetCookie $cookie): bool { // If the name string is empty (but not 0), ignore the set-cookie @@ -170,9 +159,10 @@ class CookieJar implements CookieJarInterface $result = $cookie->validate(); if ($result !== true) { if ($this->strictMode) { - throw new \RuntimeException('Invalid cookie: ' . $result); + throw new \RuntimeException('Invalid cookie: '.$result); } $this->removeCookieIfEmpty($cookie); + return false; } @@ -180,9 +170,9 @@ class CookieJar implements CookieJarInterface foreach ($this->cookies as $i => $c) { // Two cookies are identical, when their path, and domain are // identical. - if ($c->getPath() != $cookie->getPath() || - $c->getDomain() != $cookie->getDomain() || - $c->getName() != $cookie->getName() + if ($c->getPath() != $cookie->getPath() + || $c->getDomain() != $cookie->getDomain() + || $c->getName() != $cookie->getName() ) { continue; } @@ -253,7 +243,7 @@ class CookieJar implements CookieJarInterface /** * Computes cookie path following RFC 6265 section 5.1.4 * - * @link https://tools.ietf.org/html/rfc6265#section-5.1.4 + * @see https://tools.ietf.org/html/rfc6265#section-5.1.4 */ private function getCookiePathFromRequest(RequestInterface $request): string { @@ -284,13 +274,13 @@ class CookieJar implements CookieJarInterface $path = $uri->getPath() ?: '/'; foreach ($this->cookies as $cookie) { - if ($cookie->matchesPath($path) && - $cookie->matchesDomain($host) && - !$cookie->isExpired() && - (!$cookie->getSecure() || $scheme === 'https') + if ($cookie->matchesPath($path) + && $cookie->matchesDomain($host) + && !$cookie->isExpired() + && (!$cookie->getSecure() || $scheme === 'https') ) { - $values[] = $cookie->getName() . '=' - . $cookie->getValue(); + $values[] = $cookie->getName().'=' + .$cookie->getValue(); } } diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php index 7df374b5..8c55cc6f 100644 --- a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php +++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php @@ -13,7 +13,8 @@ use Psr\Http\Message\ResponseInterface; * necessary. Subclasses are also responsible for storing and retrieving * cookies from a file, database, etc. * - * @link https://docs.python.org/2/library/cookielib.html Inspiration + * @see https://docs.python.org/2/library/cookielib.html Inspiration + * * @extends \IteratorAggregate */ interface CookieJarInterface extends \Countable, \IteratorAggregate @@ -61,7 +62,7 @@ interface CookieJarInterface extends \Countable, \IteratorAggregate * @param string|null $path Clears cookies matching a domain and path * @param string|null $name Clears cookies matching a domain, path, and name */ - public function clear(?string $domain = null, ?string $path = null, ?string $name = null): void; + public function clear(string $domain = null, string $path = null, string $name = null): void; /** * Discard all sessions cookies. diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php index 5d51ca98..cb3e67c6 100644 --- a/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php @@ -71,7 +71,7 @@ class SessionCookieJar extends CookieJar $this->setCookie(new SetCookie($cookie)); } } elseif (\strlen($data)) { - throw new \RuntimeException("Invalid cookie data"); + throw new \RuntimeException('Invalid cookie data'); } } } diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php index a613c77b..d74915be 100644 --- a/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php @@ -11,15 +11,15 @@ class SetCookie * @var array */ private static $defaults = [ - 'Name' => null, - 'Value' => null, - 'Domain' => null, - 'Path' => '/', - 'Max-Age' => null, - 'Expires' => null, - 'Secure' => false, - 'Discard' => false, - 'HttpOnly' => false + 'Name' => null, + 'Value' => null, + 'Domain' => null, + 'Path' => '/', + 'Max-Age' => null, + 'Expires' => null, + 'Secure' => false, + 'Discard' => false, + 'HttpOnly' => false, ]; /** @@ -58,7 +58,13 @@ class SetCookie } else { foreach (\array_keys(self::$defaults) as $search) { if (!\strcasecmp($search, $key)) { - $data[$search] = $value; + if ($search === 'Max-Age') { + if (is_numeric($value)) { + $data[$search] = (int) $value; + } + } else { + $data[$search] = $value; + } continue 2; } } @@ -74,13 +80,49 @@ class SetCookie */ public function __construct(array $data = []) { - /** @var array|null $replaced will be null in case of replace error */ - $replaced = \array_replace(self::$defaults, $data); - if ($replaced === null) { - throw new \InvalidArgumentException('Unable to replace the default values for the Cookie.'); + $this->data = self::$defaults; + + if (isset($data['Name'])) { + $this->setName($data['Name']); + } + + if (isset($data['Value'])) { + $this->setValue($data['Value']); + } + + if (isset($data['Domain'])) { + $this->setDomain($data['Domain']); + } + + if (isset($data['Path'])) { + $this->setPath($data['Path']); + } + + if (isset($data['Max-Age'])) { + $this->setMaxAge($data['Max-Age']); + } + + if (isset($data['Expires'])) { + $this->setExpires($data['Expires']); + } + + if (isset($data['Secure'])) { + $this->setSecure($data['Secure']); + } + + if (isset($data['Discard'])) { + $this->setDiscard($data['Discard']); + } + + if (isset($data['HttpOnly'])) { + $this->setHttpOnly($data['HttpOnly']); + } + + // Set the remaining values that don't have extra validation logic + foreach (array_diff(array_keys($data), array_keys(self::$defaults)) as $key) { + $this->data[$key] = $data[$key]; } - $this->data = $replaced; // Extract the Expires value and turn it into a UNIX timestamp if needed if (!$this->getExpires() && $this->getMaxAge()) { // Calculate the Expires date @@ -92,13 +134,13 @@ class SetCookie public function __toString() { - $str = $this->data['Name'] . '=' . ($this->data['Value'] ?? '') . '; '; + $str = $this->data['Name'].'='.($this->data['Value'] ?? '').'; '; foreach ($this->data as $k => $v) { if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) { if ($k === 'Expires') { - $str .= 'Expires=' . \gmdate('D, d M Y H:i:s \G\M\T', $v) . '; '; + $str .= 'Expires='.\gmdate('D, d M Y H:i:s \G\M\T', $v).'; '; } else { - $str .= ($v === true ? $k : "{$k}={$v}") . '; '; + $str .= ($v === true ? $k : "{$k}={$v}").'; '; } } } @@ -394,7 +436,7 @@ class SetCookie return false; } - return (bool) \preg_match('/\.' . \preg_quote($cookieDomain, '/') . '$/', $domain); + return (bool) \preg_match('/\.'.\preg_quote($cookieDomain, '/').'$/', $domain); } /** @@ -423,8 +465,8 @@ class SetCookie $name )) { return 'Cookie name must not contain invalid characters: ASCII ' - . 'Control characters (0-31;127), space, tab and the ' - . 'following characters: ()<>@,;:\"/?={}'; + .'Control characters (0-31;127), space, tab and the ' + .'following characters: ()<>@,;:\"/?={}'; } // Value must not be null. 0 and empty string are valid. Empty strings diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php index e8f5fe8c..be88d9e4 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php @@ -51,7 +51,7 @@ class CurlFactory implements CurlFactoryInterface unset($options['curl']['body_as_string']); } - $easy = new EasyHandle; + $easy = new EasyHandle(); $easy->request = $request; $easy->options = $options; $conf = $this->getDefaultConf($easy); @@ -161,11 +161,11 @@ class CurlFactory implements CurlFactoryInterface private static function createRejection(EasyHandle $easy, array $ctx): PromiseInterface { static $connectionErrors = [ - \CURLE_OPERATION_TIMEOUTED => true, + \CURLE_OPERATION_TIMEOUTED => true, \CURLE_COULDNT_RESOLVE_HOST => true, - \CURLE_COULDNT_CONNECT => true, - \CURLE_SSL_CONNECT_ERROR => true, - \CURLE_GOT_NOTHING => true, + \CURLE_COULDNT_CONNECT => true, + \CURLE_SSL_CONNECT_ERROR => true, + \CURLE_GOT_NOTHING => true, ]; if ($easy->createResponseException) { @@ -219,12 +219,12 @@ class CurlFactory implements CurlFactoryInterface private function getDefaultConf(EasyHandle $easy): array { $conf = [ - '_headers' => $easy->request->getHeaders(), - \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), - \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), + '_headers' => $easy->request->getHeaders(), + \CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), + \CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), \CURLOPT_RETURNTRANSFER => false, - \CURLOPT_HEADER => false, - \CURLOPT_CONNECTTIMEOUT => 150, + \CURLOPT_HEADER => false, + \CURLOPT_CONNECTTIMEOUT => 300, ]; if (\defined('CURLOPT_PROTOCOLS')) { @@ -250,6 +250,7 @@ class CurlFactory implements CurlFactoryInterface if ($size === null || $size > 0) { $this->applyBody($easy->request, $easy->options, $conf); + return; } @@ -341,6 +342,7 @@ class CurlFactory implements CurlFactoryInterface foreach (\array_keys($options['_headers']) as $key) { if (!\strcasecmp($key, $name)) { unset($options['_headers'][$key]); + return; } } @@ -365,11 +367,11 @@ class CurlFactory implements CurlFactoryInterface // If it's a directory or a link to a directory use CURLOPT_CAPATH. // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. if ( - \is_dir($options['verify']) || - ( - \is_link($options['verify']) === true && - ($verifyLink = \readlink($options['verify'])) !== false && - \is_dir($verifyLink) + \is_dir($options['verify']) + || ( + \is_link($options['verify']) === true + && ($verifyLink = \readlink($options['verify'])) !== false + && \is_dir($verifyLink) ) ) { $conf[\CURLOPT_CAPATH] = $options['verify']; @@ -452,6 +454,32 @@ class CurlFactory implements CurlFactoryInterface } } + if (isset($options['crypto_method'])) { + if (\STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT === $options['crypto_method']) { + if (!defined('CURL_SSLVERSION_TLSv1_0')) { + throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.0 not supported by your version of cURL'); + } + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_0; + } elseif (\STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT === $options['crypto_method']) { + if (!defined('CURL_SSLVERSION_TLSv1_1')) { + throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.1 not supported by your version of cURL'); + } + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_1; + } elseif (\STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT === $options['crypto_method']) { + if (!defined('CURL_SSLVERSION_TLSv1_2')) { + throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.2 not supported by your version of cURL'); + } + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_2; + } elseif (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT === $options['crypto_method']) { + if (!defined('CURL_SSLVERSION_TLSv1_3')) { + throw new \InvalidArgumentException('Invalid crypto_method request option: TLS 1.3 not supported by your version of cURL'); + } + $conf[\CURLOPT_SSLVERSION] = \CURL_SSLVERSION_TLSv1_3; + } else { + throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); + } + } + if (isset($options['cert'])) { $cert = $options['cert']; if (\is_array($cert)) { @@ -461,8 +489,8 @@ class CurlFactory implements CurlFactoryInterface if (!\file_exists($cert)) { throw new \InvalidArgumentException("SSL certificate not found: {$cert}"); } - # OpenSSL (versions 0.9.3 and later) also support "P12" for PKCS#12-encoded files. - # see https://curl.se/libcurl/c/CURLOPT_SSLCERTTYPE.html + // OpenSSL (versions 0.9.3 and later) also support "P12" for PKCS#12-encoded files. + // see https://curl.se/libcurl/c/CURLOPT_SSLCERTTYPE.html $ext = pathinfo($cert, \PATHINFO_EXTENSION); if (preg_match('#^(der|p12)$#i', $ext)) { $conf[\CURLOPT_SSLCERTTYPE] = strtoupper($ext); @@ -525,9 +553,10 @@ class CurlFactory implements CurlFactoryInterface } } catch (\RuntimeException $e) { $ctx['error'] = 'The connection unexpectedly failed without ' - . 'providing an error. The request would have been retried, ' - . 'but attempting to rewind the request body failed. ' - . 'Exception: ' . $e; + .'providing an error. The request would have been retried, ' + .'but attempting to rewind the request body failed. ' + .'Exception: '.$e; + return self::createRejection($easy, $ctx); } @@ -536,14 +565,15 @@ class CurlFactory implements CurlFactoryInterface $easy->options['_curl_retries'] = 1; } elseif ($easy->options['_curl_retries'] == 2) { $ctx['error'] = 'The cURL request was retried 3 times ' - . 'and did not succeed. The most likely reason for the failure ' - . 'is that cURL was unable to rewind the body of the request ' - . 'and subsequent retries resulted in the same error. Turn on ' - . 'the debug option to see what went wrong. See ' - . 'https://bugs.php.net/bug.php?id=47204 for more information.'; + .'and did not succeed. The most likely reason for the failure ' + .'is that cURL was unable to rewind the body of the request ' + .'and subsequent retries resulted in the same error. Turn on ' + .'the debug option to see what went wrong. See ' + .'https://bugs.php.net/bug.php?id=47204 for more information.'; + return self::createRejection($easy, $ctx); } else { - $easy->options['_curl_retries']++; + ++$easy->options['_curl_retries']; } return $handler($easy->request, $easy->options); @@ -573,6 +603,7 @@ class CurlFactory implements CurlFactoryInterface $easy->createResponse(); } catch (\Exception $e) { $easy->createResponseException = $e; + return -1; } if ($onHeaders !== null) { @@ -582,6 +613,7 @@ class CurlFactory implements CurlFactoryInterface // Associate the exception with the handle and trigger // a curl header write error by returning 0. $easy->onHeadersException = $e; + return -1; } } @@ -591,7 +623,16 @@ class CurlFactory implements CurlFactoryInterface } else { $easy->headers[] = $value; } + return \strlen($h); }; } + + public function __destruct() + { + foreach ($this->handles as $id => $handle) { + \curl_close($handle); + unset($this->handles[$id]); + } + } } diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php index 4356d024..a64e1821 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php @@ -15,11 +15,8 @@ use Psr\Http\Message\RequestInterface; * associative array of curl option constants mapping to values in the * **curl** key of the provided request options. * - * @property resource|\CurlMultiHandle $_mh Internal use only. Lazy loaded multi-handle. - * * @final */ -#[\AllowDynamicProperties] class CurlMultiHandler { /** @@ -56,6 +53,9 @@ class CurlMultiHandler */ private $options = []; + /** @var resource|\CurlMultiHandle */ + private $_mh; + /** * This handler accepts the following options: * @@ -79,6 +79,10 @@ class CurlMultiHandler } $this->options = $options['options'] ?? []; + + // unsetting the property forces the first access to go through + // __get(). + unset($this->_mh); } /** @@ -164,7 +168,8 @@ class CurlMultiHandler \usleep(250); } - while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM); + while (\curl_multi_exec($this->_mh, $this->active) === \CURLM_CALL_MULTI_PERFORM) { + } $this->processMessages(); } diff --git a/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php index 224344d7..1bc39f4b 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php @@ -106,7 +106,7 @@ final class EasyHandle */ public function __get($name) { - $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: ' . $name; + $msg = $name === 'handle' ? 'The EasyHandle has been released' : 'Invalid property: '.$name; throw new \BadMethodCallException($msg); } } diff --git a/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php b/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php index a0988845..5554b8fa 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/HeaderProcessor.php @@ -14,9 +14,9 @@ final class HeaderProcessor * * @param string[] $headers * - * @throws \RuntimeException - * * @return array{0:string, 1:int, 2:?string, 3:array} + * + * @throws \RuntimeException */ public static function parseHeaders(array $headers): array { diff --git a/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php index 79664e27..77ffed52 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php @@ -138,6 +138,7 @@ class MockHandler implements \Countable if ($this->onRejected) { ($this->onRejected)($reason); } + return P\Create::rejectionFor($reason); } ); @@ -159,7 +160,7 @@ class MockHandler implements \Countable ) { $this->queue[] = $value; } else { - throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found ' . Utils::describeType($value)); + throw new \TypeError('Expected a Response, Promise, Throwable or callable. Found '.Utils::describeType($value)); } } } diff --git a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php index 543f825a..61632f56 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php @@ -67,7 +67,7 @@ class StreamHandler if (false !== \strpos($message, 'getaddrinfo') // DNS lookup failed || false !== \strpos($message, 'Connection refused') || false !== \strpos($message, "couldn't connect to host") // error on HHVM - || false !== \strpos($message, "connection attempt failed") + || false !== \strpos($message, 'connection attempt failed') ) { $e = new ConnectException($e->getMessage(), $request, $e); } else { @@ -231,9 +231,10 @@ class StreamHandler \set_error_handler(static function ($_, $msg, $file, $line) use (&$errors): bool { $errors[] = [ 'message' => $msg, - 'file' => $file, - 'line' => $line + 'file' => $file, + 'line' => $line, ]; + return true; }); @@ -247,7 +248,7 @@ class StreamHandler $message = 'Error creating resource: '; foreach ($errors as $err) { foreach ($err as $key => $value) { - $message .= "[$key] $value" . \PHP_EOL; + $message .= "[$key] $value".\PHP_EOL; } } throw new \RuntimeException(\trim($message)); @@ -350,6 +351,7 @@ class StreamHandler if (false === $records || !isset($records[0]['ip'])) { throw new ConnectException(\sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request); } + return $uri->withHost($records[0]['ip']); } if ('v6' === $options['force_ip_resolve']) { @@ -357,7 +359,8 @@ class StreamHandler if (false === $records || !isset($records[0]['ipv6'])) { throw new ConnectException(\sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request); } - return $uri->withHost('[' . $records[0]['ipv6'] . ']'); + + return $uri->withHost('['.$records[0]['ipv6'].']'); } } @@ -375,11 +378,11 @@ class StreamHandler $context = [ 'http' => [ - 'method' => $request->getMethod(), - 'header' => $headers, + 'method' => $request->getMethod(), + 'header' => $headers, 'protocol_version' => $request->getProtocolVersion(), - 'ignore_errors' => true, - 'follow_location' => 0, + 'ignore_errors' => true, + 'follow_location' => 0, ], 'ssl' => [ 'peer_name' => $request->getUri()->getHost(), @@ -388,7 +391,7 @@ class StreamHandler $body = (string) $request->getBody(); - if (!empty($body)) { + if ('' !== $body) { $context['http']['content'] = $body; // Prevent the HTTP handler from adding a Content-Type header. if (!$request->hasHeader('Content-Type')) { @@ -472,6 +475,25 @@ class StreamHandler } } + /** + * @param mixed $value as passed via Request transfer options. + */ + private function add_crypto_method(RequestInterface $request, array &$options, $value, array &$params): void + { + if ( + $value === \STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT + || $value === \STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT + || $value === \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT + || (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT') && $value === \STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT) + ) { + $options['http']['crypto_method'] = $value; + + return; + } + + throw new \InvalidArgumentException('Invalid crypto_method request option: unknown version provided'); + } + /** * @param mixed $value as passed via Request transfer options. */ @@ -542,27 +564,27 @@ class StreamHandler } static $map = [ - \STREAM_NOTIFY_CONNECT => 'CONNECT', + \STREAM_NOTIFY_CONNECT => 'CONNECT', \STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', - \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', - \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', - \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', - \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', - \STREAM_NOTIFY_PROGRESS => 'PROGRESS', - \STREAM_NOTIFY_FAILURE => 'FAILURE', - \STREAM_NOTIFY_COMPLETED => 'COMPLETED', - \STREAM_NOTIFY_RESOLVE => 'RESOLVE', + \STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', + \STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', + \STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', + \STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', + \STREAM_NOTIFY_PROGRESS => 'PROGRESS', + \STREAM_NOTIFY_FAILURE => 'FAILURE', + \STREAM_NOTIFY_COMPLETED => 'COMPLETED', + \STREAM_NOTIFY_RESOLVE => 'RESOLVE', ]; static $args = ['severity', 'message', 'message_code', 'bytes_transferred', 'bytes_max']; $value = Utils::debugResource($value); - $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); + $ident = $request->getMethod().' '.$request->getUri()->withFragment(''); self::addNotification( $params, static function (int $code, ...$passed) use ($ident, $value, $map, $args): void { \fprintf($value, '<%s> [%s] ', $ident, $map[$code]); foreach (\array_filter($passed) as $i => $v) { - \fwrite($value, $args[$i] . ': "' . $v . '" '); + \fwrite($value, $args[$i].': "'.$v.'" '); } \fwrite($value, "\n"); } @@ -577,7 +599,7 @@ class StreamHandler } else { $params['notification'] = self::callArray([ $params['notification'], - $notify + $notify, ]); } } diff --git a/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/vendor/guzzlehttp/guzzle/src/HandlerStack.php index e0a1d119..6cb12f07 100644 --- a/vendor/guzzlehttp/guzzle/src/HandlerStack.php +++ b/vendor/guzzlehttp/guzzle/src/HandlerStack.php @@ -44,7 +44,7 @@ class HandlerStack * handler is provided, the best handler for your * system will be utilized. */ - public static function create(?callable $handler = null): self + public static function create(callable $handler = null): self { $stack = new self($handler ?: Utils::chooseHandler()); $stack->push(Middleware::httpErrors(), 'http_errors'); @@ -86,14 +86,14 @@ class HandlerStack $stack = []; if ($this->handler !== null) { - $stack[] = "0) Handler: " . $this->debugCallable($this->handler); + $stack[] = '0) Handler: '.$this->debugCallable($this->handler); } $result = ''; foreach (\array_reverse($this->stack) as $tuple) { - $depth++; + ++$depth; $str = "{$depth}) Name: '{$tuple[1]}', "; - $str .= "Function: " . $this->debugCallable($tuple[0]); + $str .= 'Function: '.$this->debugCallable($tuple[0]); $result = "> {$str}\n{$result}"; $stack[] = $str; } @@ -122,7 +122,7 @@ class HandlerStack */ public function hasHandler(): bool { - return $this->handler !== null ; + return $this->handler !== null; } /** @@ -131,7 +131,7 @@ class HandlerStack * @param callable(callable): callable $middleware Middleware function * @param string $name Name to register for this middleware. */ - public function unshift(callable $middleware, ?string $name = null): void + public function unshift(callable $middleware, string $name = null): void { \array_unshift($this->stack, [$middleware, $name]); $this->cached = null; @@ -266,10 +266,10 @@ class HandlerStack if (\is_array($fn)) { return \is_string($fn[0]) ? "callable({$fn[0]}::{$fn[1]})" - : "callable(['" . \get_class($fn[0]) . "', '{$fn[1]}'])"; + : "callable(['".\get_class($fn[0])."', '{$fn[1]}'])"; } /** @var object $fn */ - return 'callable(' . \spl_object_hash($fn) . ')'; + return 'callable('.\spl_object_hash($fn).')'; } } diff --git a/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php index da499547..04e9eb37 100644 --- a/vendor/guzzlehttp/guzzle/src/MessageFormatter.php +++ b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php @@ -40,11 +40,11 @@ class MessageFormatter implements MessageFormatterInterface /** * Apache Common Log Format. * - * @link https://httpd.apache.org/docs/2.4/logs.html#common + * @see https://httpd.apache.org/docs/2.4/logs.html#common * * @var string */ - public const CLF = "{hostname} {req_header_User-Agent} - [{date_common_log}] \"{method} {target} HTTP/{version}\" {code} {res_header_Content-Length}"; + public const CLF = '{hostname} {req_header_User-Agent} - [{date_common_log}] "{method} {target} HTTP/{version}" {code} {res_header_Content-Length}'; public const DEBUG = ">>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; public const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; @@ -68,7 +68,7 @@ class MessageFormatter implements MessageFormatterInterface * @param ResponseInterface|null $response Response that was received * @param \Throwable|null $error Exception that was received */ - public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string + public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string { $cache = []; @@ -90,9 +90,9 @@ class MessageFormatter implements MessageFormatterInterface break; case 'req_headers': $result = \trim($request->getMethod() - . ' ' . $request->getRequestTarget()) - . ' HTTP/' . $request->getProtocolVersion() . "\r\n" - . $this->headers($request); + .' '.$request->getRequestTarget()) + .' HTTP/'.$request->getProtocolVersion()."\r\n" + .$this->headers($request); break; case 'res_headers': $result = $response ? @@ -101,7 +101,7 @@ class MessageFormatter implements MessageFormatterInterface $response->getProtocolVersion(), $response->getStatusCode(), $response->getReasonPhrase() - ) . "\r\n" . $this->headers($response) + )."\r\n".$this->headers($response) : 'NULL'; break; case 'req_body': @@ -177,6 +177,7 @@ class MessageFormatter implements MessageFormatterInterface } $cache[$matches[1]] = $result; + return $result; }, $this->template @@ -190,7 +191,7 @@ class MessageFormatter implements MessageFormatterInterface { $result = ''; foreach ($message->getHeaders() as $name => $values) { - $result .= $name . ': ' . \implode(', ', $values) . "\r\n"; + $result .= $name.': '.\implode(', ', $values)."\r\n"; } return \trim($result); diff --git a/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php b/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php index a39ac248..47934614 100644 --- a/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php +++ b/vendor/guzzlehttp/guzzle/src/MessageFormatterInterface.php @@ -14,5 +14,5 @@ interface MessageFormatterInterface * @param ResponseInterface|null $response Response that was received * @param \Throwable|null $error Exception that was received */ - public function format(RequestInterface $request, ?ResponseInterface $response = null, ?\Throwable $error = null): string; + public function format(RequestInterface $request, ResponseInterface $response = null, \Throwable $error = null): string; } diff --git a/vendor/guzzlehttp/guzzle/src/Middleware.php b/vendor/guzzlehttp/guzzle/src/Middleware.php index 7035c77f..7e3eb6b3 100644 --- a/vendor/guzzlehttp/guzzle/src/Middleware.php +++ b/vendor/guzzlehttp/guzzle/src/Middleware.php @@ -34,10 +34,12 @@ final class Middleware } $cookieJar = $options['cookies']; $request = $cookieJar->withCookieHeader($request); + return $handler($request, $options) ->then( static function (ResponseInterface $response) use ($cookieJar, $request): ResponseInterface { $cookieJar->extractCookies($request, $response); + return $response; } ); @@ -60,6 +62,7 @@ final class Middleware if (empty($options['http_errors'])) { return $handler($request, $options); } + return $handler($request, $options)->then( static function (ResponseInterface $response) use ($request, $bodySummarizer) { $code = $response->getStatusCode(); @@ -93,20 +96,22 @@ final class Middleware return $handler($request, $options)->then( static function ($value) use ($request, &$container, $options) { $container[] = [ - 'request' => $request, + 'request' => $request, 'response' => $value, - 'error' => null, - 'options' => $options + 'error' => null, + 'options' => $options, ]; + return $value; }, static function ($reason) use ($request, &$container, $options) { $container[] = [ - 'request' => $request, + 'request' => $request, 'response' => null, - 'error' => $reason, - 'options' => $options + 'error' => $reason, + 'options' => $options, ]; + return P\Create::rejectionFor($reason); } ); @@ -138,6 +143,7 @@ final class Middleware if ($after) { $after($request, $options, $response); } + return $response; }; }; @@ -202,12 +208,14 @@ final class Middleware static function ($response) use ($logger, $request, $formatter, $logLevel): ResponseInterface { $message = $formatter->format($request, $response); $logger->log($logLevel, $message); + return $response; }, static function ($reason) use ($logger, $request, $formatter): PromiseInterface { $response = $reason instanceof RequestException ? $reason->getResponse() : null; $message = $formatter->format($request, $response, P\Create::exceptionFor($reason)); $logger->error($message); + return P\Create::rejectionFor($reason); } ); diff --git a/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php index 7ca62833..0a8de812 100644 --- a/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php +++ b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php @@ -84,6 +84,7 @@ class PrepareBodyMiddleware // The expect header is unconditionally enabled if ($expect === true) { $modify['set_headers']['Expect'] = '100-Continue'; + return; } diff --git a/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php index f67d448b..7aa21a62 100644 --- a/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php +++ b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php @@ -27,10 +27,10 @@ class RedirectMiddleware * @var array */ public static $defaultSettings = [ - 'max' => 5, - 'protocols' => ['http', 'https'], - 'strict' => false, - 'referer' => false, + 'max' => 5, + 'protocols' => ['http', 'https'], + 'strict' => false, + 'referer' => false, 'track_redirects' => false, ]; @@ -166,8 +166,8 @@ class RedirectMiddleware // not forcing RFC compliance, but rather emulating what all browsers // would do. $statusCode = $response->getStatusCode(); - if ($statusCode == 303 || - ($statusCode <= 302 && !$options['allow_redirects']['strict']) + if ($statusCode == 303 + || ($statusCode <= 302 && !$options['allow_redirects']['strict']) ) { $safeMethods = ['GET', 'HEAD', 'OPTIONS']; $requestMethod = $request->getMethod(); diff --git a/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/vendor/guzzlehttp/guzzle/src/RequestOptions.php index 20b31bc2..bf3b02b6 100644 --- a/vendor/guzzlehttp/guzzle/src/RequestOptions.php +++ b/vendor/guzzlehttp/guzzle/src/RequestOptions.php @@ -7,7 +7,7 @@ namespace GuzzleHttp; * * More documentation for each option can be found at http://guzzlephp.org/. * - * @link http://docs.guzzlephp.org/en/v6/request-options.html + * @see http://docs.guzzlephp.org/en/v6/request-options.html */ final class RequestOptions { @@ -70,10 +70,22 @@ final class RequestOptions /** * connect_timeout: (float, default=0) Float describing the number of * seconds to wait while trying to connect to a server. Use 0 to wait - * indefinitely (the default behavior). + * 300 seconds (the default behavior). */ public const CONNECT_TIMEOUT = 'connect_timeout'; + /** + * crypto_method: (int) A value describing the minimum TLS protocol + * version to use. + * + * This setting must be set to one of the + * ``STREAM_CRYPTO_METHOD_TLS*_CLIENT`` constants. PHP 7.4 or higher is + * required in order to use TLS 1.3, and cURL 7.34.0 or higher is required + * in order to specify a crypto method, with cURL 7.52.0 or higher being + * required to use TLS 1.3. + */ + public const CRYPTO_METHOD = 'crypto_method'; + /** * debug: (bool|resource) Set to true or set to a PHP stream returned by * fopen() enable debug output with the HTTP handler used to send a diff --git a/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php b/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php index 0236a9d5..8f4d93ac 100644 --- a/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php +++ b/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php @@ -44,7 +44,7 @@ class RetryMiddleware { $this->decider = $decider; $this->nextHandler = $nextHandler; - $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; + $this->delay = $delay ?: __CLASS__.'::exponentialDelay'; } /** @@ -54,7 +54,7 @@ class RetryMiddleware */ public static function exponentialDelay(int $retries): int { - return (int) \pow(2, $retries - 1) * 1000; + return (int) 2 ** ($retries - 1) * 1000; } public function __invoke(RequestInterface $request, array $options): PromiseInterface @@ -64,6 +64,7 @@ class RetryMiddleware } $fn = $this->nextHandler; + return $fn($request, $options) ->then( $this->onFulfilled($request, $options), @@ -85,6 +86,7 @@ class RetryMiddleware )) { return $value; } + return $this->doRetry($request, $options, $value); }; } @@ -103,6 +105,7 @@ class RetryMiddleware )) { return P\Create::rejectionFor($reason); } + return $this->doRetry($req, $options); }; } diff --git a/vendor/guzzlehttp/guzzle/src/TransferStats.php b/vendor/guzzlehttp/guzzle/src/TransferStats.php index 93fa334c..2ce9e38f 100644 --- a/vendor/guzzlehttp/guzzle/src/TransferStats.php +++ b/vendor/guzzlehttp/guzzle/src/TransferStats.php @@ -46,8 +46,8 @@ final class TransferStats */ public function __construct( RequestInterface $request, - ?ResponseInterface $response = null, - ?float $transferTime = null, + ResponseInterface $response = null, + float $transferTime = null, $handlerErrorData = null, array $handlerStats = [] ) { diff --git a/vendor/guzzlehttp/guzzle/src/Utils.php b/vendor/guzzlehttp/guzzle/src/Utils.php index e355f321..fcf571d6 100644 --- a/vendor/guzzlehttp/guzzle/src/Utils.php +++ b/vendor/guzzlehttp/guzzle/src/Utils.php @@ -23,9 +23,9 @@ final class Utils { switch (\gettype($input)) { case 'object': - return 'object(' . \get_class($input) . ')'; + return 'object('.\get_class($input).')'; case 'array': - return 'array(' . \count($input) . ')'; + return 'array('.\count($input).')'; default: \ob_start(); \var_dump($input); @@ -79,9 +79,9 @@ final class Utils * * The returned handler is not wrapped by any default middlewares. * - * @throws \RuntimeException if no viable Handler is available. - * * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system. + * + * @throws \RuntimeException if no viable Handler is available. */ public static function chooseHandler(): callable { @@ -247,8 +247,8 @@ EOT } // Special match if the area when prefixed with ".". Remove any // existing leading "." and add a new leading ".". - $area = '.' . \ltrim($area, '.'); - if (\substr($host, -(\strlen($area))) === $area) { + $area = '.'.\ltrim($area, '.'); + if (\substr($host, -\strlen($area)) === $area) { return true; } } @@ -269,13 +269,13 @@ EOT * * @throws InvalidArgumentException if the JSON cannot be decoded. * - * @link https://www.php.net/manual/en/function.json-decode.php + * @see https://www.php.net/manual/en/function.json-decode.php */ public static function jsonDecode(string $json, bool $assoc = false, int $depth = 512, int $options = 0) { $data = \json_decode($json, $assoc, $depth, $options); if (\JSON_ERROR_NONE !== \json_last_error()) { - throw new InvalidArgumentException('json_decode error: ' . \json_last_error_msg()); + throw new InvalidArgumentException('json_decode error: '.\json_last_error_msg()); } return $data; @@ -290,13 +290,13 @@ EOT * * @throws InvalidArgumentException if the JSON cannot be encoded. * - * @link https://www.php.net/manual/en/function.json-encode.php + * @see https://www.php.net/manual/en/function.json-encode.php */ public static function jsonEncode($value, int $options = 0, int $depth = 512): string { $json = \json_encode($value, $options, $depth); if (\JSON_ERROR_NONE !== \json_last_error()) { - throw new InvalidArgumentException('json_encode error: ' . \json_last_error_msg()); + throw new InvalidArgumentException('json_encode error: '.\json_last_error_msg()); } /** @var string */ @@ -341,7 +341,7 @@ EOT $errorMessage = 'IDN conversion failed'; if ($errors) { - $errorMessage .= ' (errors: ' . implode(', ', $errors) . ')'; + $errorMessage .= ' (errors: '.implode(', ', $errors).')'; } throw new InvalidArgumentException($errorMessage); diff --git a/vendor/guzzlehttp/guzzle/src/functions.php b/vendor/guzzlehttp/guzzle/src/functions.php index a70d2cbf..5edc66ab 100644 --- a/vendor/guzzlehttp/guzzle/src/functions.php +++ b/vendor/guzzlehttp/guzzle/src/functions.php @@ -50,10 +50,10 @@ function debug_resource($value = null) * * The returned handler is not wrapped by any default middlewares. * - * @throws \RuntimeException if no viable Handler is available. - * * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system. * + * @throws \RuntimeException if no viable Handler is available. + * * @deprecated choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead. */ function choose_handler(): callable @@ -141,7 +141,7 @@ function is_host_in_noproxy(string $host, array $noProxyArray): bool * * @throws Exception\InvalidArgumentException if the JSON cannot be decoded. * - * @link https://www.php.net/manual/en/function.json-decode.php + * @see https://www.php.net/manual/en/function.json-decode.php * @deprecated json_decode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonDecode instead. */ function json_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0) @@ -158,7 +158,7 @@ function json_decode(string $json, bool $assoc = false, int $depth = 512, int $o * * @throws Exception\InvalidArgumentException if the JSON cannot be encoded. * - * @link https://www.php.net/manual/en/function.json-encode.php + * @see https://www.php.net/manual/en/function.json-encode.php * @deprecated json_encode will be removed in guzzlehttp/guzzle:8.0. Use Utils::jsonEncode instead. */ function json_encode($value, int $options = 0, int $depth = 512): string diff --git a/vendor/guzzlehttp/guzzle/src/functions_include.php b/vendor/guzzlehttp/guzzle/src/functions_include.php index 6636a422..394f9534 100644 --- a/vendor/guzzlehttp/guzzle/src/functions_include.php +++ b/vendor/guzzlehttp/guzzle/src/functions_include.php @@ -2,5 +2,5 @@ // Don't redefine the functions if included multiple times. if (!\function_exists('GuzzleHttp\describe_type')) { - require __DIR__ . '/functions.php'; + require __DIR__.'/functions.php'; } diff --git a/vendor/guzzlehttp/promises/CHANGELOG.md b/vendor/guzzlehttp/promises/CHANGELOG.md index 253282eb..eaf2af42 100644 --- a/vendor/guzzlehttp/promises/CHANGELOG.md +++ b/vendor/guzzlehttp/promises/CHANGELOG.md @@ -1,11 +1,43 @@ # CHANGELOG + +## 2.0.1 - 2023-08-03 + +### Changed + +- PHP 8.3 support + + +## 2.0.0 - 2023-05-21 + +### Added + +- Added PHP 7 type hints + +### Changed + +- All previously non-final non-exception classes have been marked as soft-final + +### Removed + +- Dropped PHP < 7.2 support +- All functions in the `GuzzleHttp\Promise` namespace + + +## 1.5.3 - 2023-05-21 + +### Changed + +- Removed remaining usage of deprecated functions + + ## 1.5.2 - 2022-08-07 ### Changed - Officially support PHP 8.2 + ## 1.5.1 - 2021-10-22 ### Fixed @@ -13,6 +45,7 @@ - Revert "Call handler when waiting on fulfilled/rejected Promise" - Fix pool memory leak when empty array of promises provided + ## 1.5.0 - 2021-10-07 ### Changed @@ -24,12 +57,14 @@ - Fix manually settle promises generated with `Utils::task` + ## 1.4.1 - 2021-02-18 ### Fixed - Fixed `each_limit` skipping promises and failing + ## 1.4.0 - 2020-09-30 ### Added diff --git a/vendor/guzzlehttp/promises/README.md b/vendor/guzzlehttp/promises/README.md index 1ea667ab..a32d3d29 100644 --- a/vendor/guzzlehttp/promises/README.md +++ b/vendor/guzzlehttp/promises/README.md @@ -29,6 +29,21 @@ for a general introduction to promises. `GuzzleHttp\Promise\Coroutine::of()`. +## Installation + +```shell +composer require guzzlehttp/promises +``` + + +## Version Guidance + +| Version | Status | PHP Version | +|---------|------------------------|--------------| +| 1.x | Bug and security fixes | >=5.5,<8.3 | +| 2.x | Latest | >=7.2.5,<8.4 | + + ## Quick Start A *promise* represents the eventual result of an asynchronous operation. The @@ -430,8 +445,6 @@ $loop = React\EventLoop\Factory::create(); $loop->addPeriodicTimer(0, [$queue, 'run']); ``` -*TODO*: Perhaps adding a `futureTick()` on each tick would be faster? - ## Implementation Notes @@ -501,8 +514,8 @@ $promise->resolve('foo'); A static API was first introduced in 1.4.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The -function API will be removed in 2.0.0. A migration table has been provided here -for your convenience: +function API was removed in 2.0.0. A migration table has been provided here for +your convenience: | Original Function | Replacement Method | |----------------|----------------| diff --git a/vendor/guzzlehttp/promises/composer.json b/vendor/guzzlehttp/promises/composer.json index c959fb32..fc1989ec 100644 --- a/vendor/guzzlehttp/promises/composer.json +++ b/vendor/guzzlehttp/promises/composer.json @@ -26,32 +26,32 @@ } ], "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "autoload": { "psr-4": { "GuzzleHttp\\Promise\\": "src/" - }, - "files": ["src/functions_include.php"] + } }, "autoload-dev": { "psr-4": { "GuzzleHttp\\Promise\\Tests\\": "tests/" } }, - "scripts": { - "test": "vendor/bin/simple-phpunit", - "test-ci": "vendor/bin/simple-phpunit --coverage-text" - }, "extra": { - "branch-alias": { - "dev-master": "1.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + }, "preferred-install": "dist", "sort-packages": true } diff --git a/vendor/guzzlehttp/promises/src/AggregateException.php b/vendor/guzzlehttp/promises/src/AggregateException.php index d2b5712b..40ffdbcf 100644 --- a/vendor/guzzlehttp/promises/src/AggregateException.php +++ b/vendor/guzzlehttp/promises/src/AggregateException.php @@ -1,5 +1,7 @@ generator = $generatorFn(); - $this->result = new Promise(function () { + $this->result = new Promise(function (): void { while (isset($this->currentPromise)) { $this->currentPromise->wait(); } }); try { $this->nextCoroutine($this->generator->current()); - } catch (\Exception $exception) { - $this->result->reject($exception); } catch (Throwable $throwable) { $this->result->reject($throwable); } @@ -78,10 +77,8 @@ final class Coroutine implements PromiseInterface /** * Create a new coroutine. - * - * @return self */ - public static function of(callable $generatorFn) + public static function of(callable $generatorFn): self { return new self($generatorFn); } @@ -89,42 +86,42 @@ final class Coroutine implements PromiseInterface public function then( callable $onFulfilled = null, callable $onRejected = null - ) { + ): PromiseInterface { return $this->result->then($onFulfilled, $onRejected); } - public function otherwise(callable $onRejected) + public function otherwise(callable $onRejected): PromiseInterface { return $this->result->otherwise($onRejected); } - public function wait($unwrap = true) + public function wait(bool $unwrap = true) { return $this->result->wait($unwrap); } - public function getState() + public function getState(): string { return $this->result->getState(); } - public function resolve($value) + public function resolve($value): void { $this->result->resolve($value); } - public function reject($reason) + public function reject($reason): void { $this->result->reject($reason); } - public function cancel() + public function cancel(): void { $this->currentPromise->cancel(); $this->result->cancel(); } - private function nextCoroutine($yielded) + private function nextCoroutine($yielded): void { $this->currentPromise = Create::promiseFor($yielded) ->then([$this, '_handleSuccess'], [$this, '_handleFailure']); @@ -133,7 +130,7 @@ final class Coroutine implements PromiseInterface /** * @internal */ - public function _handleSuccess($value) + public function _handleSuccess($value): void { unset($this->currentPromise); try { @@ -143,8 +140,6 @@ final class Coroutine implements PromiseInterface } else { $this->result->resolve($value); } - } catch (Exception $exception) { - $this->result->reject($exception); } catch (Throwable $throwable) { $this->result->reject($throwable); } @@ -153,15 +148,13 @@ final class Coroutine implements PromiseInterface /** * @internal */ - public function _handleFailure($reason) + public function _handleFailure($reason): void { unset($this->currentPromise); try { $nextYield = $this->generator->throw(Create::exceptionFor($reason)); // The throw was caught, so keep iterating on the coroutine $this->nextCoroutine($nextYield); - } catch (Exception $exception) { - $this->result->reject($exception); } catch (Throwable $throwable) { $this->result->reject($throwable); } diff --git a/vendor/guzzlehttp/promises/src/Create.php b/vendor/guzzlehttp/promises/src/Create.php index 8d038e9c..9d3fc4a1 100644 --- a/vendor/guzzlehttp/promises/src/Create.php +++ b/vendor/guzzlehttp/promises/src/Create.php @@ -1,5 +1,7 @@ then([$promise, 'resolve'], [$promise, 'reject']); + return $promise; } @@ -34,10 +35,8 @@ final class Create * If the provided reason is a promise, then it is returned as-is. * * @param mixed $reason Promise or reason. - * - * @return PromiseInterface */ - public static function rejectionFor($reason) + public static function rejectionFor($reason): PromiseInterface { if ($reason instanceof PromiseInterface) { return $reason; @@ -50,12 +49,10 @@ final class Create * Create an exception for a rejected promise value. * * @param mixed $reason - * - * @return \Exception|\Throwable */ - public static function exceptionFor($reason) + public static function exceptionFor($reason): \Throwable { - if ($reason instanceof \Exception || $reason instanceof \Throwable) { + if ($reason instanceof \Throwable) { return $reason; } @@ -66,10 +63,8 @@ final class Create * Returns an iterator for the given value. * * @param mixed $value - * - * @return \Iterator */ - public static function iterFor($value) + public static function iterFor($value): \Iterator { if ($value instanceof \Iterator) { return $value; diff --git a/vendor/guzzlehttp/promises/src/Each.php b/vendor/guzzlehttp/promises/src/Each.php index 1dda3549..1a7aa0fb 100644 --- a/vendor/guzzlehttp/promises/src/Each.php +++ b/vendor/guzzlehttp/promises/src/Each.php @@ -1,5 +1,7 @@ $onFulfilled, - 'rejected' => $onRejected + 'rejected' => $onRejected, ]))->promise(); } @@ -46,19 +46,17 @@ final class Each * @param int|callable $concurrency * @param callable $onFulfilled * @param callable $onRejected - * - * @return PromiseInterface */ public static function ofLimit( $iterable, $concurrency, callable $onFulfilled = null, callable $onRejected = null - ) { + ): PromiseInterface { return (new EachPromise($iterable, [ - 'fulfilled' => $onFulfilled, - 'rejected' => $onRejected, - 'concurrency' => $concurrency + 'fulfilled' => $onFulfilled, + 'rejected' => $onRejected, + 'concurrency' => $concurrency, ]))->promise(); } @@ -70,19 +68,17 @@ final class Each * @param mixed $iterable * @param int|callable $concurrency * @param callable $onFulfilled - * - * @return PromiseInterface */ public static function ofLimitAll( $iterable, $concurrency, callable $onFulfilled = null - ) { - return each_limit( + ): PromiseInterface { + return self::ofLimit( $iterable, $concurrency, $onFulfilled, - function ($reason, $idx, PromiseInterface $aggregate) { + function ($reason, $idx, PromiseInterface $aggregate): void { $aggregate->reject($reason); } ); diff --git a/vendor/guzzlehttp/promises/src/EachPromise.php b/vendor/guzzlehttp/promises/src/EachPromise.php index 280d7995..28dd9793 100644 --- a/vendor/guzzlehttp/promises/src/EachPromise.php +++ b/vendor/guzzlehttp/promises/src/EachPromise.php @@ -1,10 +1,14 @@ aggregate) { return $this->aggregate; @@ -82,21 +86,18 @@ class EachPromise implements PromisorInterface $this->refillPending(); } catch (\Throwable $e) { $this->aggregate->reject($e); - } catch (\Exception $e) { - $this->aggregate->reject($e); } /** * @psalm-suppress NullableReturnStatement - * @phpstan-ignore-next-line */ return $this->aggregate; } - private function createPromise() + private function createPromise(): void { $this->mutex = false; - $this->aggregate = new Promise(function () { + $this->aggregate = new Promise(function (): void { if ($this->checkIfFinished()) { return; } @@ -113,7 +114,7 @@ class EachPromise implements PromisorInterface }); // Clear the references when the promise is resolved. - $clearFn = function () { + $clearFn = function (): void { $this->iterable = $this->concurrency = $this->pending = null; $this->onFulfilled = $this->onRejected = null; $this->nextPendingIndex = 0; @@ -122,11 +123,13 @@ class EachPromise implements PromisorInterface $this->aggregate->then($clearFn, $clearFn); } - private function refillPending() + private function refillPending(): void { if (!$this->concurrency) { // Add all pending promises. - while ($this->addPending() && $this->advanceIterator()); + while ($this->addPending() && $this->advanceIterator()) { + } + return; } @@ -147,10 +150,11 @@ class EachPromise implements PromisorInterface // next value to yield until promise callbacks are called. while (--$concurrency && $this->advanceIterator() - && $this->addPending()); + && $this->addPending()) { + } } - private function addPending() + private function addPending(): bool { if (!$this->iterable || !$this->iterable->valid()) { return false; @@ -164,7 +168,7 @@ class EachPromise implements PromisorInterface $idx = $this->nextPendingIndex++; $this->pending[$idx] = $promise->then( - function ($value) use ($idx, $key) { + function ($value) use ($idx, $key): void { if ($this->onFulfilled) { call_user_func( $this->onFulfilled, @@ -175,7 +179,7 @@ class EachPromise implements PromisorInterface } $this->step($idx); }, - function ($reason) use ($idx, $key) { + function ($reason) use ($idx, $key): void { if ($this->onRejected) { call_user_func( $this->onRejected, @@ -191,7 +195,7 @@ class EachPromise implements PromisorInterface return true; } - private function advanceIterator() + private function advanceIterator(): bool { // Place a lock on the iterator so that we ensure to not recurse, // preventing fatal generator errors. @@ -204,19 +208,17 @@ class EachPromise implements PromisorInterface try { $this->iterable->next(); $this->mutex = false; + return true; } catch (\Throwable $e) { $this->aggregate->reject($e); $this->mutex = false; - return false; - } catch (\Exception $e) { - $this->aggregate->reject($e); - $this->mutex = false; + return false; } } - private function step($idx) + private function step(int $idx): void { // If the promise was already resolved, then ignore this step. if (Is::settled($this->aggregate)) { @@ -234,11 +236,12 @@ class EachPromise implements PromisorInterface } } - private function checkIfFinished() + private function checkIfFinished(): bool { if (!$this->pending && !$this->iterable->valid()) { // Resolve the promise if there's nothing left to do. $this->aggregate->resolve(null); + return true; } diff --git a/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/vendor/guzzlehttp/promises/src/FulfilledPromise.php index 98f72a62..ab712965 100644 --- a/vendor/guzzlehttp/promises/src/FulfilledPromise.php +++ b/vendor/guzzlehttp/promises/src/FulfilledPromise.php @@ -1,5 +1,7 @@ value; - $queue->add(static function () use ($p, $value, $onFulfilled) { + $queue->add(static function () use ($p, $value, $onFulfilled): void { if (Is::pending($p)) { try { $p->resolve($onFulfilled($value)); } catch (\Throwable $e) { $p->reject($e); - } catch (\Exception $e) { - $p->reject($e); } } }); @@ -50,34 +55,34 @@ class FulfilledPromise implements PromiseInterface return $p; } - public function otherwise(callable $onRejected) + public function otherwise(callable $onRejected): PromiseInterface { return $this->then(null, $onRejected); } - public function wait($unwrap = true, $defaultDelivery = null) + public function wait(bool $unwrap = true) { return $unwrap ? $this->value : null; } - public function getState() + public function getState(): string { return self::FULFILLED; } - public function resolve($value) + public function resolve($value): void { if ($value !== $this->value) { - throw new \LogicException("Cannot resolve a fulfilled promise"); + throw new \LogicException('Cannot resolve a fulfilled promise'); } } - public function reject($reason) + public function reject($reason): void { - throw new \LogicException("Cannot reject a fulfilled promise"); + throw new \LogicException('Cannot reject a fulfilled promise'); } - public function cancel() + public function cancel(): void { // pass } diff --git a/vendor/guzzlehttp/promises/src/Is.php b/vendor/guzzlehttp/promises/src/Is.php index c3ed8d01..f3f05038 100644 --- a/vendor/guzzlehttp/promises/src/Is.php +++ b/vendor/guzzlehttp/promises/src/Is.php @@ -1,45 +1,39 @@ getState() === PromiseInterface::PENDING; } /** * Returns true if a promise is fulfilled or rejected. - * - * @return bool */ - public static function settled(PromiseInterface $promise) + public static function settled(PromiseInterface $promise): bool { return $promise->getState() !== PromiseInterface::PENDING; } /** * Returns true if a promise is fulfilled. - * - * @return bool */ - public static function fulfilled(PromiseInterface $promise) + public static function fulfilled(PromiseInterface $promise): bool { return $promise->getState() === PromiseInterface::FULFILLED; } /** * Returns true if a promise is rejected. - * - * @return bool */ - public static function rejected(PromiseInterface $promise) + public static function rejected(PromiseInterface $promise): bool { return $promise->getState() === PromiseInterface::REJECTED; } diff --git a/vendor/guzzlehttp/promises/src/Promise.php b/vendor/guzzlehttp/promises/src/Promise.php index 75939057..1b07bdc9 100644 --- a/vendor/guzzlehttp/promises/src/Promise.php +++ b/vendor/guzzlehttp/promises/src/Promise.php @@ -1,11 +1,15 @@ state === self::PENDING) { $p = new Promise(null, [$this, 'cancel']); $this->handlers[] = [$p, $onFulfilled, $onRejected]; $p->waitList = $this->waitList; $p->waitList[] = $this; + return $p; } // Return a fulfilled promise and immediately invoke any callbacks. if ($this->state === self::FULFILLED) { $promise = Create::promiseFor($this->result); + return $onFulfilled ? $promise->then($onFulfilled) : $promise; } // It's either cancelled or rejected, so return a rejected promise // and immediately invoke any callbacks. $rejection = Create::rejectionFor($this->result); + return $onRejected ? $rejection->then(null, $onRejected) : $rejection; } - public function otherwise(callable $onRejected) + public function otherwise(callable $onRejected): PromiseInterface { return $this->then(null, $onRejected); } - public function wait($unwrap = true) + public function wait(bool $unwrap = true) { $this->waitIfPending(); @@ -73,12 +80,12 @@ class Promise implements PromiseInterface } } - public function getState() + public function getState(): string { return $this->state; } - public function cancel() + public function cancel(): void { if ($this->state !== self::PENDING) { return; @@ -93,8 +100,6 @@ class Promise implements PromiseInterface $fn(); } catch (\Throwable $e) { $this->reject($e); - } catch (\Exception $e) { - $this->reject($e); } } @@ -105,17 +110,17 @@ class Promise implements PromiseInterface } } - public function resolve($value) + public function resolve($value): void { $this->settle(self::FULFILLED, $value); } - public function reject($reason) + public function reject($reason): void { $this->settle(self::REJECTED, $reason); } - private function settle($state, $value) + private function settle(string $state, $value): void { if ($this->state !== self::PENDING) { // Ignore calls with the same resolution. @@ -148,7 +153,7 @@ class Promise implements PromiseInterface if (!is_object($value) || !method_exists($value, 'then')) { $id = $state === self::FULFILLED ? 1 : 2; // It's a success, so resolve the handlers in the queue. - Utils::queue()->add(static function () use ($id, $value, $handlers) { + Utils::queue()->add(static function () use ($id, $value, $handlers): void { foreach ($handlers as $handler) { self::callHandler($id, $value, $handler); } @@ -159,12 +164,12 @@ class Promise implements PromiseInterface } else { // Resolve the handlers when the forwarded promise is resolved. $value->then( - static function ($value) use ($handlers) { + static function ($value) use ($handlers): void { foreach ($handlers as $handler) { self::callHandler(1, $value, $handler); } }, - static function ($reason) use ($handlers) { + static function ($reason) use ($handlers): void { foreach ($handlers as $handler) { self::callHandler(2, $reason, $handler); } @@ -180,7 +185,7 @@ class Promise implements PromiseInterface * @param mixed $value Value to pass to the callback. * @param array $handler Array of handler data (promise and callbacks). */ - private static function callHandler($index, $value, array $handler) + private static function callHandler(int $index, $value, array $handler): void { /** @var PromiseInterface $promise */ $promise = $handler[0]; @@ -211,12 +216,10 @@ class Promise implements PromiseInterface } } catch (\Throwable $reason) { $promise->reject($reason); - } catch (\Exception $reason) { - $promise->reject($reason); } } - private function waitIfPending() + private function waitIfPending(): void { if ($this->state !== self::PENDING) { return; @@ -227,9 +230,9 @@ class Promise implements PromiseInterface } else { // If there's no wait function, then reject the promise. $this->reject('Cannot wait on a promise that has ' - . 'no internal wait function. You must provide a wait ' - . 'function when constructing the promise to be able to ' - . 'wait on a promise.'); + .'no internal wait function. You must provide a wait ' + .'function when constructing the promise to be able to ' + .'wait on a promise.'); } Utils::queue()->run(); @@ -240,13 +243,13 @@ class Promise implements PromiseInterface } } - private function invokeWaitFn() + private function invokeWaitFn(): void { try { $wfn = $this->waitFn; $this->waitFn = null; $wfn(true); - } catch (\Exception $reason) { + } catch (\Throwable $reason) { if ($this->state === self::PENDING) { // The promise has not been resolved yet, so reject the promise // with the exception. @@ -259,7 +262,7 @@ class Promise implements PromiseInterface } } - private function invokeWaitList() + private function invokeWaitList(): void { $waitList = $this->waitList; $this->waitList = null; diff --git a/vendor/guzzlehttp/promises/src/PromiseInterface.php b/vendor/guzzlehttp/promises/src/PromiseInterface.php index e5983314..2824802b 100644 --- a/vendor/guzzlehttp/promises/src/PromiseInterface.php +++ b/vendor/guzzlehttp/promises/src/PromiseInterface.php @@ -1,5 +1,7 @@ reason; $p = new Promise([$queue, 'run']); - $queue->add(static function () use ($p, $reason, $onRejected) { + $queue->add(static function () use ($p, $reason, $onRejected): void { if (Is::pending($p)) { try { // Return a resolved promise if onRejected does not throw. @@ -43,9 +50,6 @@ class RejectedPromise implements PromiseInterface } catch (\Throwable $e) { // onRejected threw, so return a rejected promise. $p->reject($e); - } catch (\Exception $e) { - // onRejected threw, so return a rejected promise. - $p->reject($e); } } }); @@ -53,12 +57,12 @@ class RejectedPromise implements PromiseInterface return $p; } - public function otherwise(callable $onRejected) + public function otherwise(callable $onRejected): PromiseInterface { return $this->then(null, $onRejected); } - public function wait($unwrap = true, $defaultDelivery = null) + public function wait(bool $unwrap = true) { if ($unwrap) { throw Create::exceptionFor($this->reason); @@ -67,24 +71,24 @@ class RejectedPromise implements PromiseInterface return null; } - public function getState() + public function getState(): string { return self::REJECTED; } - public function resolve($value) + public function resolve($value): void { - throw new \LogicException("Cannot resolve a rejected promise"); + throw new \LogicException('Cannot resolve a rejected promise'); } - public function reject($reason) + public function reject($reason): void { if ($reason !== $this->reason) { - throw new \LogicException("Cannot reject a rejected promise"); + throw new \LogicException('Cannot reject a rejected promise'); } } - public function cancel() + public function cancel(): void { // pass } diff --git a/vendor/guzzlehttp/promises/src/RejectionException.php b/vendor/guzzlehttp/promises/src/RejectionException.php index e2f13770..47dca862 100644 --- a/vendor/guzzlehttp/promises/src/RejectionException.php +++ b/vendor/guzzlehttp/promises/src/RejectionException.php @@ -1,5 +1,7 @@ reason = $reason; $message = 'The promise was rejected'; if ($description) { - $message .= ' with reason: ' . $description; + $message .= ' with reason: '.$description; } elseif (is_string($reason) || (is_object($reason) && method_exists($reason, '__toString')) ) { - $message .= ' with reason: ' . $this->reason; + $message .= ' with reason: '.$this->reason; } elseif ($reason instanceof \JsonSerializable) { - $message .= ' with reason: ' - . json_encode($this->reason, JSON_PRETTY_PRINT); + $message .= ' with reason: '.json_encode($this->reason, JSON_PRETTY_PRINT); } parent::__construct($message); diff --git a/vendor/guzzlehttp/promises/src/TaskQueue.php b/vendor/guzzlehttp/promises/src/TaskQueue.php index f0fba2c5..503e0b2d 100644 --- a/vendor/guzzlehttp/promises/src/TaskQueue.php +++ b/vendor/guzzlehttp/promises/src/TaskQueue.php @@ -1,5 +1,7 @@ run(); + * + * @final */ class TaskQueue implements TaskQueueInterface { private $enableShutdown = true; private $queue = []; - public function __construct($withShutdown = true) + public function __construct(bool $withShutdown = true) { if ($withShutdown) { - register_shutdown_function(function () { + register_shutdown_function(function (): void { if ($this->enableShutdown) { // Only run the tasks if an E_ERROR didn't occur. $err = error_get_last(); @@ -31,17 +35,17 @@ class TaskQueue implements TaskQueueInterface } } - public function isEmpty() + public function isEmpty(): bool { return !$this->queue; } - public function add(callable $task) + public function add(callable $task): void { $this->queue[] = $task; } - public function run() + public function run(): void { while ($task = array_shift($this->queue)) { /** @var callable $task */ @@ -60,7 +64,7 @@ class TaskQueue implements TaskQueueInterface * * Note: This shutdown will occur before any destructors are triggered. */ - public function disableShutdown() + public function disableShutdown(): void { $this->enableShutdown = false; } diff --git a/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php index 723d4d54..34c561a4 100644 --- a/vendor/guzzlehttp/promises/src/TaskQueueInterface.php +++ b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php @@ -1,24 +1,24 @@ * - * @param TaskQueueInterface $assign Optionally specify a new queue instance. - * - * @return TaskQueueInterface + * @param TaskQueueInterface|null $assign Optionally specify a new queue instance. */ - public static function queue(TaskQueueInterface $assign = null) + public static function queue(TaskQueueInterface $assign = null): TaskQueueInterface { static $queue; @@ -39,22 +39,18 @@ final class Utils * returns a promise that is fulfilled or rejected with the result. * * @param callable $task Task function to run. - * - * @return PromiseInterface */ - public static function task(callable $task) + public static function task(callable $task): PromiseInterface { $queue = self::queue(); $promise = new Promise([$queue, 'run']); - $queue->add(function () use ($task, $promise) { + $queue->add(function () use ($task, $promise): void { try { if (Is::pending($promise)) { $promise->resolve($task()); } } catch (\Throwable $e) { $promise->reject($e); - } catch (\Exception $e) { - $promise->reject($e); } }); @@ -72,22 +68,18 @@ final class Utils * key mapping to the rejection reason of the promise. * * @param PromiseInterface $promise Promise or value. - * - * @return array */ - public static function inspect(PromiseInterface $promise) + public static function inspect(PromiseInterface $promise): array { try { return [ 'state' => PromiseInterface::FULFILLED, - 'value' => $promise->wait() + 'value' => $promise->wait(), ]; } catch (RejectionException $e) { return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; } catch (\Throwable $e) { return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; - } catch (\Exception $e) { - return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; } } @@ -100,14 +92,12 @@ final class Utils * @see inspect for the inspection state array format. * * @param PromiseInterface[] $promises Traversable of promises to wait upon. - * - * @return array */ - public static function inspectAll($promises) + public static function inspectAll($promises): array { $results = []; foreach ($promises as $key => $promise) { - $results[$key] = inspect($promise); + $results[$key] = self::inspect($promise); } return $results; @@ -122,12 +112,9 @@ final class Utils * * @param iterable $promises Iterable of PromiseInterface objects to wait on. * - * @return array - * - * @throws \Exception on error - * @throws \Throwable on error in PHP >=7 + * @throws \Throwable on error */ - public static function unwrap($promises) + public static function unwrap($promises): array { $results = []; foreach ($promises as $key => $promise) { @@ -147,22 +134,21 @@ final class Utils * * @param mixed $promises Promises or values. * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. - * - * @return PromiseInterface */ - public static function all($promises, $recursive = false) + public static function all($promises, bool $recursive = false): PromiseInterface { $results = []; $promise = Each::of( $promises, - function ($value, $idx) use (&$results) { + function ($value, $idx) use (&$results): void { $results[$idx] = $value; }, - function ($reason, $idx, Promise $aggregate) { + function ($reason, $idx, Promise $aggregate): void { $aggregate->reject($reason); } )->then(function () use (&$results) { ksort($results); + return $results; }); @@ -173,6 +159,7 @@ final class Utils return self::all($promises, $recursive); } } + return $results; }); } @@ -193,17 +180,15 @@ final class Utils * * @param int $count Total number of promises. * @param mixed $promises Promises or values. - * - * @return PromiseInterface */ - public static function some($count, $promises) + public static function some(int $count, $promises): PromiseInterface { $results = []; $rejections = []; return Each::of( $promises, - function ($value, $idx, PromiseInterface $p) use (&$results, $count) { + function ($value, $idx, PromiseInterface $p) use (&$results, $count): void { if (Is::settled($p)) { return; } @@ -212,7 +197,7 @@ final class Utils $p->resolve(null); } }, - function ($reason) use (&$rejections) { + function ($reason) use (&$rejections): void { $rejections[] = $reason; } )->then( @@ -224,6 +209,7 @@ final class Utils ); } ksort($results); + return array_values($results); } ); @@ -234,10 +220,8 @@ final class Utils * fulfillment value is not an array of 1 but the value directly. * * @param mixed $promises Promises or values. - * - * @return PromiseInterface */ - public static function any($promises) + public static function any($promises): PromiseInterface { return self::some(1, $promises)->then(function ($values) { return $values[0]; @@ -253,23 +237,22 @@ final class Utils * @see inspect for the inspection state array format. * * @param mixed $promises Promises or values. - * - * @return PromiseInterface */ - public static function settle($promises) + public static function settle($promises): PromiseInterface { $results = []; return Each::of( $promises, - function ($value, $idx) use (&$results) { + function ($value, $idx) use (&$results): void { $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; }, - function ($reason, $idx) use (&$results) { + function ($reason, $idx) use (&$results): void { $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; } )->then(function () use (&$results) { ksort($results); + return $results; }); } diff --git a/vendor/guzzlehttp/promises/src/functions.php b/vendor/guzzlehttp/promises/src/functions.php deleted file mode 100644 index c03d39d0..00000000 --- a/vendor/guzzlehttp/promises/src/functions.php +++ /dev/null @@ -1,363 +0,0 @@ - - * while ($eventLoop->isRunning()) { - * GuzzleHttp\Promise\queue()->run(); - * } - * - * - * @param TaskQueueInterface $assign Optionally specify a new queue instance. - * - * @return TaskQueueInterface - * - * @deprecated queue will be removed in guzzlehttp/promises:2.0. Use Utils::queue instead. - */ -function queue(TaskQueueInterface $assign = null) -{ - return Utils::queue($assign); -} - -/** - * Adds a function to run in the task queue when it is next `run()` and returns - * a promise that is fulfilled or rejected with the result. - * - * @param callable $task Task function to run. - * - * @return PromiseInterface - * - * @deprecated task will be removed in guzzlehttp/promises:2.0. Use Utils::task instead. - */ -function task(callable $task) -{ - return Utils::task($task); -} - -/** - * Creates a promise for a value if the value is not a promise. - * - * @param mixed $value Promise or value. - * - * @return PromiseInterface - * - * @deprecated promise_for will be removed in guzzlehttp/promises:2.0. Use Create::promiseFor instead. - */ -function promise_for($value) -{ - return Create::promiseFor($value); -} - -/** - * Creates a rejected promise for a reason if the reason is not a promise. If - * the provided reason is a promise, then it is returned as-is. - * - * @param mixed $reason Promise or reason. - * - * @return PromiseInterface - * - * @deprecated rejection_for will be removed in guzzlehttp/promises:2.0. Use Create::rejectionFor instead. - */ -function rejection_for($reason) -{ - return Create::rejectionFor($reason); -} - -/** - * Create an exception for a rejected promise value. - * - * @param mixed $reason - * - * @return \Exception|\Throwable - * - * @deprecated exception_for will be removed in guzzlehttp/promises:2.0. Use Create::exceptionFor instead. - */ -function exception_for($reason) -{ - return Create::exceptionFor($reason); -} - -/** - * Returns an iterator for the given value. - * - * @param mixed $value - * - * @return \Iterator - * - * @deprecated iter_for will be removed in guzzlehttp/promises:2.0. Use Create::iterFor instead. - */ -function iter_for($value) -{ - return Create::iterFor($value); -} - -/** - * Synchronously waits on a promise to resolve and returns an inspection state - * array. - * - * Returns a state associative array containing a "state" key mapping to a - * valid promise state. If the state of the promise is "fulfilled", the array - * will contain a "value" key mapping to the fulfilled value of the promise. If - * the promise is rejected, the array will contain a "reason" key mapping to - * the rejection reason of the promise. - * - * @param PromiseInterface $promise Promise or value. - * - * @return array - * - * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspect instead. - */ -function inspect(PromiseInterface $promise) -{ - return Utils::inspect($promise); -} - -/** - * Waits on all of the provided promises, but does not unwrap rejected promises - * as thrown exception. - * - * Returns an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param PromiseInterface[] $promises Traversable of promises to wait upon. - * - * @return array - * - * @deprecated inspect will be removed in guzzlehttp/promises:2.0. Use Utils::inspectAll instead. - */ -function inspect_all($promises) -{ - return Utils::inspectAll($promises); -} - -/** - * Waits on all of the provided promises and returns the fulfilled values. - * - * Returns an array that contains the value of each promise (in the same order - * the promises were provided). An exception is thrown if any of the promises - * are rejected. - * - * @param iterable $promises Iterable of PromiseInterface objects to wait on. - * - * @return array - * - * @throws \Exception on error - * @throws \Throwable on error in PHP >=7 - * - * @deprecated unwrap will be removed in guzzlehttp/promises:2.0. Use Utils::unwrap instead. - */ -function unwrap($promises) -{ - return Utils::unwrap($promises); -} - -/** - * Given an array of promises, return a promise that is fulfilled when all the - * items in the array are fulfilled. - * - * The promise's fulfillment value is an array with fulfillment values at - * respective positions to the original array. If any promise in the array - * rejects, the returned promise is rejected with the rejection reason. - * - * @param mixed $promises Promises or values. - * @param bool $recursive If true, resolves new promises that might have been added to the stack during its own resolution. - * - * @return PromiseInterface - * - * @deprecated all will be removed in guzzlehttp/promises:2.0. Use Utils::all instead. - */ -function all($promises, $recursive = false) -{ - return Utils::all($promises, $recursive); -} - -/** - * Initiate a competitive race between multiple promises or values (values will - * become immediately fulfilled promises). - * - * When count amount of promises have been fulfilled, the returned promise is - * fulfilled with an array that contains the fulfillment values of the winners - * in order of resolution. - * - * This promise is rejected with a {@see AggregateException} if the number of - * fulfilled promises is less than the desired $count. - * - * @param int $count Total number of promises. - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * - * @deprecated some will be removed in guzzlehttp/promises:2.0. Use Utils::some instead. - */ -function some($count, $promises) -{ - return Utils::some($count, $promises); -} - -/** - * Like some(), with 1 as count. However, if the promise fulfills, the - * fulfillment value is not an array of 1 but the value directly. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * - * @deprecated any will be removed in guzzlehttp/promises:2.0. Use Utils::any instead. - */ -function any($promises) -{ - return Utils::any($promises); -} - -/** - * Returns a promise that is fulfilled when all of the provided promises have - * been fulfilled or rejected. - * - * The returned promise is fulfilled with an array of inspection state arrays. - * - * @see inspect for the inspection state array format. - * - * @param mixed $promises Promises or values. - * - * @return PromiseInterface - * - * @deprecated settle will be removed in guzzlehttp/promises:2.0. Use Utils::settle instead. - */ -function settle($promises) -{ - return Utils::settle($promises); -} - -/** - * Given an iterator that yields promises or values, returns a promise that is - * fulfilled with a null value when the iterator has been consumed or the - * aggregate promise has been fulfilled or rejected. - * - * $onFulfilled is a function that accepts the fulfilled value, iterator index, - * and the aggregate promise. The callback can invoke any necessary side - * effects and choose to resolve or reject the aggregate if needed. - * - * $onRejected is a function that accepts the rejection reason, iterator index, - * and the aggregate promise. The callback can invoke any necessary side - * effects and choose to resolve or reject the aggregate if needed. - * - * @param mixed $iterable Iterator or array to iterate over. - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - * - * @deprecated each will be removed in guzzlehttp/promises:2.0. Use Each::of instead. - */ -function each( - $iterable, - callable $onFulfilled = null, - callable $onRejected = null -) { - return Each::of($iterable, $onFulfilled, $onRejected); -} - -/** - * Like each, but only allows a certain number of outstanding promises at any - * given time. - * - * $concurrency may be an integer or a function that accepts the number of - * pending promises and returns a numeric concurrency limit value to allow for - * dynamic a concurrency size. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * @param callable $onRejected - * - * @return PromiseInterface - * - * @deprecated each_limit will be removed in guzzlehttp/promises:2.0. Use Each::ofLimit instead. - */ -function each_limit( - $iterable, - $concurrency, - callable $onFulfilled = null, - callable $onRejected = null -) { - return Each::ofLimit($iterable, $concurrency, $onFulfilled, $onRejected); -} - -/** - * Like each_limit, but ensures that no promise in the given $iterable argument - * is rejected. If any promise is rejected, then the aggregate promise is - * rejected with the encountered rejection. - * - * @param mixed $iterable - * @param int|callable $concurrency - * @param callable $onFulfilled - * - * @return PromiseInterface - * - * @deprecated each_limit_all will be removed in guzzlehttp/promises:2.0. Use Each::ofLimitAll instead. - */ -function each_limit_all( - $iterable, - $concurrency, - callable $onFulfilled = null -) { - return Each::ofLimitAll($iterable, $concurrency, $onFulfilled); -} - -/** - * Returns true if a promise is fulfilled. - * - * @return bool - * - * @deprecated is_fulfilled will be removed in guzzlehttp/promises:2.0. Use Is::fulfilled instead. - */ -function is_fulfilled(PromiseInterface $promise) -{ - return Is::fulfilled($promise); -} - -/** - * Returns true if a promise is rejected. - * - * @return bool - * - * @deprecated is_rejected will be removed in guzzlehttp/promises:2.0. Use Is::rejected instead. - */ -function is_rejected(PromiseInterface $promise) -{ - return Is::rejected($promise); -} - -/** - * Returns true if a promise is fulfilled or rejected. - * - * @return bool - * - * @deprecated is_settled will be removed in guzzlehttp/promises:2.0. Use Is::settled instead. - */ -function is_settled(PromiseInterface $promise) -{ - return Is::settled($promise); -} - -/** - * Create a new coroutine. - * - * @see Coroutine - * - * @return PromiseInterface - * - * @deprecated coroutine will be removed in guzzlehttp/promises:2.0. Use Coroutine::of instead. - */ -function coroutine(callable $generatorFn) -{ - return Coroutine::of($generatorFn); -} diff --git a/vendor/guzzlehttp/promises/src/functions_include.php b/vendor/guzzlehttp/promises/src/functions_include.php deleted file mode 100644 index 34cd1710..00000000 --- a/vendor/guzzlehttp/promises/src/functions_include.php +++ /dev/null @@ -1,6 +0,0 @@ -=5.4,<8.1 | +| 2.x | Latest | >=7.2.5,<8.4 | ## AppendStream @@ -855,14 +863,6 @@ This of course assumes they will be resolved against the same base URI. If this equivalence or difference of relative references does not mean anything. -## Version Guidance - -| Version | Status | PHP Version | -|---------|----------------|------------------| -| 1.x | Security fixes | >=5.4,<8.1 | -| 2.x | Latest | ^7.2.5 \|\| ^8.0 | - - ## Security If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/psr7/security/policy) for more information. diff --git a/vendor/guzzlehttp/psr7/src/AppendStream.php b/vendor/guzzlehttp/psr7/src/AppendStream.php index cbcfaee6..ee8f3788 100644 --- a/vendor/guzzlehttp/psr7/src/AppendStream.php +++ b/vendor/guzzlehttp/psr7/src/AppendStream.php @@ -40,12 +40,14 @@ final class AppendStream implements StreamInterface { try { $this->rewind(); + return $this->getContents(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + return ''; } } @@ -138,9 +140,9 @@ final class AppendStream implements StreamInterface public function eof(): bool { - return !$this->streams || - ($this->current >= count($this->streams) - 1 && - $this->streams[$this->current]->eof()); + return !$this->streams + || ($this->current >= count($this->streams) - 1 + && $this->streams[$this->current]->eof()); } public function rewind(): void @@ -167,7 +169,7 @@ final class AppendStream implements StreamInterface $stream->rewind(); } catch (\Exception $e) { throw new \RuntimeException('Unable to seek stream ' - . $i . ' of the AppendStream', 0, $e); + .$i.' of the AppendStream', 0, $e); } } @@ -197,7 +199,7 @@ final class AppendStream implements StreamInterface if ($this->current === $total) { break; } - $this->current++; + ++$this->current; } $result = $this->streams[$this->current]->read($remaining); @@ -237,8 +239,6 @@ final class AppendStream implements StreamInterface } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/vendor/guzzlehttp/psr7/src/BufferStream.php b/vendor/guzzlehttp/psr7/src/BufferStream.php index 21be8c0a..2b0eb77b 100644 --- a/vendor/guzzlehttp/psr7/src/BufferStream.php +++ b/vendor/guzzlehttp/psr7/src/BufferStream.php @@ -134,8 +134,6 @@ final class BufferStream implements StreamInterface } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/vendor/guzzlehttp/psr7/src/FnStream.php b/vendor/guzzlehttp/psr7/src/FnStream.php index 3a1a9512..9fdddb9c 100644 --- a/vendor/guzzlehttp/psr7/src/FnStream.php +++ b/vendor/guzzlehttp/psr7/src/FnStream.php @@ -18,7 +18,7 @@ final class FnStream implements StreamInterface private const SLOTS = [ '__toString', 'close', 'detach', 'rewind', 'getSize', 'tell', 'eof', 'isSeekable', 'seek', 'isWritable', 'write', - 'isReadable', 'read', 'getContents', 'getMetadata' + 'isReadable', 'read', 'getContents', 'getMetadata', ]; /** @var array */ @@ -33,7 +33,7 @@ final class FnStream implements StreamInterface // Create the functions on the class foreach ($methods as $name => $fn) { - $this->{'_fn_' . $name} = $fn; + $this->{'_fn_'.$name} = $fn; } } @@ -45,7 +45,7 @@ final class FnStream implements StreamInterface public function __get(string $name): void { throw new \BadMethodCallException(str_replace('_fn_', '', $name) - . '() is not implemented in the FnStream'); + .'() is not implemented in the FnStream'); } /** @@ -99,6 +99,7 @@ final class FnStream implements StreamInterface throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + return ''; } } @@ -169,8 +170,6 @@ final class FnStream implements StreamInterface } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/vendor/guzzlehttp/psr7/src/Header.php b/vendor/guzzlehttp/psr7/src/Header.php index 4d7005b2..6e38e003 100644 --- a/vendor/guzzlehttp/psr7/src/Header.php +++ b/vendor/guzzlehttp/psr7/src/Header.php @@ -89,7 +89,7 @@ final class Header $v = ''; $isQuoted = false; $isEscaped = false; - for ($i = 0, $max = \strlen($value); $i < $max; $i++) { + for ($i = 0, $max = \strlen($value); $i < $max; ++$i) { if ($isEscaped) { $v .= $value[$i]; $isEscaped = false; diff --git a/vendor/guzzlehttp/psr7/src/HttpFactory.php b/vendor/guzzlehttp/psr7/src/HttpFactory.php index 30be222f..73d17e33 100644 --- a/vendor/guzzlehttp/psr7/src/HttpFactory.php +++ b/vendor/guzzlehttp/psr7/src/HttpFactory.php @@ -23,13 +23,7 @@ use Psr\Http\Message\UriInterface; * Note: in consuming code it is recommended to require the implemented interfaces * and inject the instance of this class multiple times. */ -final class HttpFactory implements - RequestFactoryInterface, - ResponseFactoryInterface, - ServerRequestFactoryInterface, - StreamFactoryInterface, - UploadedFileFactoryInterface, - UriFactoryInterface +final class HttpFactory implements RequestFactoryInterface, ResponseFactoryInterface, ServerRequestFactoryInterface, StreamFactoryInterface, UploadedFileFactoryInterface, UriFactoryInterface { public function createUploadedFile( StreamInterface $stream, diff --git a/vendor/guzzlehttp/psr7/src/InflateStream.php b/vendor/guzzlehttp/psr7/src/InflateStream.php index 8e00f1c3..599b55da 100644 --- a/vendor/guzzlehttp/psr7/src/InflateStream.php +++ b/vendor/guzzlehttp/psr7/src/InflateStream.php @@ -13,9 +13,9 @@ use Psr\Http\Message\StreamInterface; * then appends the zlib.inflate filter. The stream is then converted back * to a Guzzle stream resource to be used as a Guzzle stream. * - * @link http://tools.ietf.org/html/rfc1950 - * @link http://tools.ietf.org/html/rfc1952 - * @link http://php.net/manual/en/filters.compression.php + * @see http://tools.ietf.org/html/rfc1950 + * @see http://tools.ietf.org/html/rfc1952 + * @see http://php.net/manual/en/filters.compression.php */ final class InflateStream implements StreamInterface { diff --git a/vendor/guzzlehttp/psr7/src/Message.php b/vendor/guzzlehttp/psr7/src/Message.php index c1e15f82..6e6c3e51 100644 --- a/vendor/guzzlehttp/psr7/src/Message.php +++ b/vendor/guzzlehttp/psr7/src/Message.php @@ -18,31 +18,31 @@ final class Message public static function toString(MessageInterface $message): string { if ($message instanceof RequestInterface) { - $msg = trim($message->getMethod() . ' ' - . $message->getRequestTarget()) - . ' HTTP/' . $message->getProtocolVersion(); + $msg = trim($message->getMethod().' ' + .$message->getRequestTarget()) + .' HTTP/'.$message->getProtocolVersion(); if (!$message->hasHeader('host')) { - $msg .= "\r\nHost: " . $message->getUri()->getHost(); + $msg .= "\r\nHost: ".$message->getUri()->getHost(); } } elseif ($message instanceof ResponseInterface) { - $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' - . $message->getStatusCode() . ' ' - . $message->getReasonPhrase(); + $msg = 'HTTP/'.$message->getProtocolVersion().' ' + .$message->getStatusCode().' ' + .$message->getReasonPhrase(); } else { throw new \InvalidArgumentException('Unknown message type'); } foreach ($message->getHeaders() as $name => $values) { - if (strtolower($name) === 'set-cookie') { + if (is_string($name) && strtolower($name) === 'set-cookie') { foreach ($values as $value) { - $msg .= "\r\n{$name}: " . $value; + $msg .= "\r\n{$name}: ".$value; } } else { - $msg .= "\r\n{$name}: " . implode(', ', $values); + $msg .= "\r\n{$name}: ".implode(', ', $values); } } - return "{$msg}\r\n\r\n" . $message->getBody(); + return "{$msg}\r\n\r\n".$message->getBody(); } /** @@ -190,7 +190,7 @@ final class Message $host = $headers[reset($hostKey)][0]; $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; - return $scheme . '://' . $host . '/' . ltrim($path, '/'); + return $scheme.'://'.$host.'/'.ltrim($path, '/'); } /** @@ -231,7 +231,7 @@ final class Message // between status-code and reason-phrase is required. But browsers accept // responses without space and reason as well. if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { - throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); + throw new \InvalidArgumentException('Invalid response string: '.$data['start-line']); } $parts = explode(' ', $data['start-line'], 3); diff --git a/vendor/guzzlehttp/psr7/src/MessageTrait.php b/vendor/guzzlehttp/psr7/src/MessageTrait.php index 464bdfaa..e05ebea8 100644 --- a/vendor/guzzlehttp/psr7/src/MessageTrait.php +++ b/vendor/guzzlehttp/psr7/src/MessageTrait.php @@ -12,11 +12,11 @@ use Psr\Http\Message\StreamInterface; */ trait MessageTrait { - /** @var array Map of all registered headers, as original name => array of values */ + /** @var string[][] Map of all registered headers, as original name => array of values */ private $headers = []; - /** @var array Map of lowercase header name => original name at registration */ - private $headerNames = []; + /** @var string[] Map of lowercase header name => original name at registration */ + private $headerNames = []; /** @var string */ private $protocol = '1.1'; @@ -37,6 +37,7 @@ trait MessageTrait $new = clone $this; $new->protocol = $version; + return $new; } @@ -135,6 +136,7 @@ trait MessageTrait $new = clone $this; $new->stream = $body; + return $new; } @@ -224,7 +226,7 @@ trait MessageTrait )); } - if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) { + if (!preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/D', $header)) { throw new \InvalidArgumentException( sprintf('"%s" is not valid header name.', $header) ); @@ -254,7 +256,7 @@ trait MessageTrait // Clients must not send a request with line folding and a server sending folded headers is // likely very rare. Line folding is a fairly obscure feature of HTTP/1.1 and thus not accepting // folding is not likely to break any legitimate use case. - if (! preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) { + if (!preg_match('/^[\x20\x09\x21-\x7E\x80-\xFF]*$/D', $value)) { throw new \InvalidArgumentException( sprintf('"%s" is not valid header value.', $value) ); diff --git a/vendor/guzzlehttp/psr7/src/MimeType.php b/vendor/guzzlehttp/psr7/src/MimeType.php index 0debbd18..b131bdbe 100644 --- a/vendor/guzzlehttp/psr7/src/MimeType.php +++ b/vendor/guzzlehttp/psr7/src/MimeType.php @@ -18,7 +18,7 @@ final class MimeType '7zip' => 'application/x-7z-compressed', '123' => 'application/vnd.lotus-1-2-3', 'aab' => 'application/x-authorware-bin', - 'aac' => 'audio/x-acc', + 'aac' => 'audio/aac', 'aam' => 'application/x-authorware-map', 'aas' => 'application/x-authorware-seg', 'abw' => 'application/x-abiword', @@ -29,6 +29,7 @@ final class MimeType 'acu' => 'application/vnd.acucobol', 'acutc' => 'application/vnd.acucorp', 'adp' => 'audio/adpcm', + 'adts' => 'audio/aac', 'aep' => 'application/vnd.audiograph', 'afm' => 'application/x-font-type1', 'afp' => 'application/vnd.ibm.modcap', @@ -41,11 +42,16 @@ final class MimeType 'air' => 'application/vnd.adobe.air-application-installer-package+zip', 'ait' => 'application/vnd.dvb.ait', 'ami' => 'application/vnd.amiga.ami', + 'aml' => 'application/automationml-aml+xml', + 'amlx' => 'application/automationml-amlx+zip', 'amr' => 'audio/amr', 'apk' => 'application/vnd.android.package-archive', 'apng' => 'image/apng', 'appcache' => 'text/cache-manifest', + 'appinstaller' => 'application/appinstaller', 'application' => 'application/x-ms-application', + 'appx' => 'application/appx', + 'appxbundle' => 'application/appxbundle', 'apr' => 'application/vnd.lotus-approach', 'arc' => 'application/x-freearc', 'arj' => 'application/x-arj', @@ -90,6 +96,7 @@ final class MimeType 'bpk' => 'application/octet-stream', 'bpmn' => 'application/octet-stream', 'bsp' => 'model/vnd.valve.source.compiled-map', + 'btf' => 'image/prs.btif', 'btif' => 'image/prs.btif', 'buffer' => 'application/octet-stream', 'bz' => 'application/x-bzip', @@ -141,6 +148,7 @@ final class MimeType 'cjs' => 'application/node', 'cla' => 'application/vnd.claymore', 'class' => 'application/octet-stream', + 'cld' => 'model/vnd.cld', 'clkk' => 'application/vnd.crick.clicker.keyboard', 'clkp' => 'application/vnd.crick.clicker.palette', 'clkt' => 'application/vnd.crick.clicker.template', @@ -175,6 +183,7 @@ final class MimeType 'csv' => 'text/csv', 'cu' => 'application/cu-seeme', 'curl' => 'text/vnd.curl', + 'cwl' => 'application/cwl', 'cww' => 'application/prs.cww', 'cxt' => 'application/x-director', 'cxx' => 'text/x-c', @@ -197,6 +206,7 @@ final class MimeType 'der' => 'application/x-x509-ca-cert', 'dfac' => 'application/vnd.dreamfactory', 'dgc' => 'application/x-dgc-compressed', + 'dib' => 'image/bmp', 'dic' => 'text/x-c', 'dir' => 'application/x-director', 'dis' => 'application/vnd.mobius.dis', @@ -219,6 +229,7 @@ final class MimeType 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', 'dp' => 'application/vnd.osgi.dp', 'dpg' => 'application/vnd.dpgraph', + 'dpx' => 'image/dpx', 'dra' => 'audio/vnd.dra', 'drle' => 'image/dicom-rle', 'dsc' => 'text/prs.lines.tag', @@ -255,7 +266,6 @@ final class MimeType 'eot' => 'application/vnd.ms-fontobject', 'eps' => 'application/postscript', 'epub' => 'application/epub+zip', - 'es' => 'application/ecmascript', 'es3' => 'application/vnd.eszigno3+xml', 'esa' => 'application/vnd.osgi.subsystem', 'esf' => 'application/vnd.epson.esf', @@ -448,6 +458,7 @@ final class MimeType 'jsonld' => 'application/ld+json', 'jsonml' => 'application/jsonml+json', 'jsx' => 'text/jsx', + 'jt' => 'model/jt', 'jxr' => 'image/jxr', 'jxra' => 'image/jxra', 'jxrs' => 'image/jxrs', @@ -552,7 +563,7 @@ final class MimeType 'mime' => 'message/rfc822', 'mj2' => 'video/mj2', 'mjp2' => 'video/mj2', - 'mjs' => 'application/javascript', + 'mjs' => 'text/javascript', 'mk3d' => 'video/x-matroska', 'mka' => 'audio/x-matroska', 'mkd' => 'text/x-markdown', @@ -602,6 +613,8 @@ final class MimeType 'msg' => 'application/vnd.ms-outlook', 'msh' => 'model/mesh', 'msi' => 'application/x-msdownload', + 'msix' => 'application/msix', + 'msixbundle' => 'application/msixbundle', 'msl' => 'application/vnd.mobius.msl', 'msm' => 'application/octet-stream', 'msp' => 'application/octet-stream', @@ -775,6 +788,8 @@ final class MimeType 'pvb' => 'application/vnd.3gpp.pic-bw-var', 'pwn' => 'application/vnd.3m.post-it-notes', 'pya' => 'audio/vnd.ms-playready.media.pya', + 'pyo' => 'model/vnd.pytha.pyox', + 'pyox' => 'model/vnd.pytha.pyox', 'pyv' => 'video/vnd.ms-playready.media.pyv', 'qam' => 'application/vnd.epson.quickanime', 'qbo' => 'application/vnd.intu.qbo', @@ -923,10 +938,12 @@ final class MimeType 'st' => 'application/vnd.sailingtracker.track', 'stc' => 'application/vnd.sun.xml.calc.template', 'std' => 'application/vnd.sun.xml.draw.template', + 'step' => 'application/STEP', 'stf' => 'application/vnd.wt.stf', 'sti' => 'application/vnd.sun.xml.impress.template', 'stk' => 'application/hyperstudio', 'stl' => 'model/stl', + 'stp' => 'application/STEP', 'stpx' => 'model/step+xml', 'stpxz' => 'model/step-xml+zip', 'stpz' => 'model/step+zip', @@ -1013,10 +1030,12 @@ final class MimeType 'ulx' => 'application/x-glulx', 'umj' => 'application/vnd.umajin', 'unityweb' => 'application/vnd.unity', + 'uo' => 'application/vnd.uoml+xml', 'uoml' => 'application/vnd.uoml+xml', 'uri' => 'text/uri-list', 'uris' => 'text/uri-list', 'urls' => 'text/uri-list', + 'usda' => 'model/vnd.usda', 'usdz' => 'model/vnd.usdz+zip', 'ustar' => 'application/x-ustar', 'utz' => 'application/vnd.uiq.theme', @@ -1096,6 +1115,7 @@ final class MimeType 'webmanifest' => 'application/manifest+json', 'webp' => 'image/webp', 'wg' => 'application/vnd.pmi.widget', + 'wgsl' => 'text/wgsl', 'wgt' => 'application/widget', 'wif' => 'application/watcherinfo+xml', 'wks' => 'application/vnd.ms-works', @@ -1150,9 +1170,10 @@ final class MimeType 'xel' => 'application/xcap-el+xml', 'xenc' => 'application/xenc+xml', 'xer' => 'application/patch-ops-error+xml', - 'xfdf' => 'application/vnd.adobe.xfdf', + 'xfdf' => 'application/xfdf', 'xfdl' => 'application/vnd.xfdl', 'xht' => 'application/xhtml+xml', + 'xhtm' => 'application/vnd.pwg-xhtml-print+xml', 'xhtml' => 'application/xhtml+xml', 'xhvml' => 'application/xv+xml', 'xif' => 'image/vnd.xiff', @@ -1183,6 +1204,7 @@ final class MimeType 'xpw' => 'application/vnd.intercon.formnet', 'xpx' => 'application/vnd.intercon.formnet', 'xsd' => 'application/xml', + 'xsf' => 'application/prs.xsf+xml', 'xsl' => 'application/xml', 'xslt' => 'application/xslt+xml', 'xsm' => 'application/vnd.syncml+xml', @@ -1218,7 +1240,7 @@ final class MimeType /** * Determines the mimetype of a file by looking at its extension. * - * @link https://raw.githubusercontent.com/jshttp/mime-db/master/db.json + * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json */ public static function fromFilename(string $filename): ?string { @@ -1228,7 +1250,7 @@ final class MimeType /** * Maps a file extensions to a mimetype. * - * @link https://raw.githubusercontent.com/jshttp/mime-db/master/db.json + * @see https://raw.githubusercontent.com/jshttp/mime-db/master/db.json */ public static function fromExtension(string $extension): ?string { diff --git a/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php index 3e12b74d..41c48eef 100644 --- a/vendor/guzzlehttp/psr7/src/MultipartStream.php +++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -60,7 +60,7 @@ final class MultipartStream implements StreamInterface $str .= "{$key}: {$value}\r\n"; } - return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n"; + return "--{$this->boundary}\r\n".trim($str)."\r\n\r\n"; } /** @@ -72,7 +72,7 @@ final class MultipartStream implements StreamInterface foreach ($elements as $element) { if (!is_array($element)) { - throw new \UnexpectedValueException("An array is expected"); + throw new \UnexpectedValueException('An array is expected'); } $this->addElement($stream, $element); } @@ -137,9 +137,7 @@ final class MultipartStream implements StreamInterface // Set a default Content-Type if one was not supplied $type = $this->getHeader($headers, 'content-type'); if (!$type && ($filename === '0' || $filename)) { - if ($type = MimeType::fromFilename($filename)) { - $headers['Content-Type'] = $type; - } + $headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream'; } return [$stream, $headers]; diff --git a/vendor/guzzlehttp/psr7/src/PumpStream.php b/vendor/guzzlehttp/psr7/src/PumpStream.php index e90389c3..5585190c 100644 --- a/vendor/guzzlehttp/psr7/src/PumpStream.php +++ b/vendor/guzzlehttp/psr7/src/PumpStream.php @@ -34,7 +34,7 @@ final class PumpStream implements StreamInterface private $buffer; /** - * @param callable(int): (string|null|false) $source Source of the stream data. The callable MAY + * @param callable(int): (string|false|null) $source Source of the stream data. The callable MAY * accept an integer argument used to control the * amount of data to return. The callable MUST * return a string when called, or false|null on error @@ -60,6 +60,7 @@ final class PumpStream implements StreamInterface throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + return ''; } } @@ -149,8 +150,6 @@ final class PumpStream implements StreamInterface } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) @@ -169,6 +168,7 @@ final class PumpStream implements StreamInterface $data = call_user_func($this->source, $length); if ($data === false || $data === null) { $this->source = null; + return; } $this->buffer->write($data); diff --git a/vendor/guzzlehttp/psr7/src/Query.php b/vendor/guzzlehttp/psr7/src/Query.php index 2faab3a8..8b949279 100644 --- a/vendor/guzzlehttp/psr7/src/Query.php +++ b/vendor/guzzlehttp/psr7/src/Query.php @@ -93,7 +93,7 @@ final class Query $qs .= $k; $v = is_bool($v) ? (int) $v : $v; if ($v !== null) { - $qs .= '=' . $encoder((string) $v); + $qs .= '='.$encoder((string) $v); } $qs .= '&'; } else { @@ -101,7 +101,7 @@ final class Query $qs .= $k; $vv = is_bool($vv) ? (int) $vv : $vv; if ($vv !== null) { - $qs .= '=' . $encoder((string) $vv); + $qs .= '='.$encoder((string) $vv); } $qs .= '&'; } diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php index b17af66a..db29d95d 100644 --- a/vendor/guzzlehttp/psr7/src/Request.php +++ b/vendor/guzzlehttp/psr7/src/Request.php @@ -69,7 +69,7 @@ class Request implements RequestInterface $target = '/'; } if ($this->uri->getQuery() != '') { - $target .= '?' . $this->uri->getQuery(); + $target .= '?'.$this->uri->getQuery(); } return $target; @@ -85,6 +85,7 @@ class Request implements RequestInterface $new = clone $this; $new->requestTarget = $requestTarget; + return $new; } @@ -98,6 +99,7 @@ class Request implements RequestInterface $this->assertMethod($method); $new = clone $this; $new->method = strtoupper($method); + return $new; } @@ -131,7 +133,7 @@ class Request implements RequestInterface } if (($port = $this->uri->getPort()) !== null) { - $host .= ':' . $port; + $host .= ':'.$port; } if (isset($this->headerNames['host'])) { diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php index 4c6ee6f0..8fc11478 100644 --- a/vendor/guzzlehttp/psr7/src/Response.php +++ b/vendor/guzzlehttp/psr7/src/Response.php @@ -138,6 +138,7 @@ class Response implements ResponseInterface $reasonPhrase = self::PHRASES[$new->statusCode]; } $new->reasonPhrase = (string) $reasonPhrase; + return $new; } diff --git a/vendor/guzzlehttp/psr7/src/Rfc7230.php b/vendor/guzzlehttp/psr7/src/Rfc7230.php index 30224018..8219dba4 100644 --- a/vendor/guzzlehttp/psr7/src/Rfc7230.php +++ b/vendor/guzzlehttp/psr7/src/Rfc7230.php @@ -14,7 +14,7 @@ final class Rfc7230 * * Note: header delimiter (\r\n) is modified to \r?\n to accept line feed only delimiters for BC reasons. * - * @link https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15 + * @see https://github.com/amphp/http/blob/v1.0.1/src/Rfc7230.php#L12-L15 * * @license https://github.com/amphp/http/blob/v1.0.1/LICENSE */ diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php index b2aa382d..c852d96f 100644 --- a/vendor/guzzlehttp/psr7/src/ServerRequest.php +++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -144,10 +144,10 @@ class ServerRequest extends Request implements ServerRequestInterface foreach (array_keys($files['tmp_name']) as $key) { $spec = [ 'tmp_name' => $files['tmp_name'][$key], - 'size' => $files['size'][$key] ?? null, - 'error' => $files['error'][$key] ?? null, - 'name' => $files['name'][$key] ?? null, - 'type' => $files['type'][$key] ?? null, + 'size' => $files['size'][$key] ?? null, + 'error' => $files['error'][$key] ?? null, + 'name' => $files['name'][$key] ?? null, + 'type' => $files['type'][$key] ?? null, ]; $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); } @@ -182,7 +182,7 @@ class ServerRequest extends Request implements ServerRequestInterface private static function extractHostAndPortFromAuthority(string $authority): array { - $uri = 'http://' . $authority; + $uri = 'http://'.$authority; $parts = parse_url($uri); if (false === $parts) { return [null, null]; @@ -286,8 +286,6 @@ class ServerRequest extends Request implements ServerRequestInterface } /** - * {@inheritdoc} - * * @return array|object|null */ public function getParsedBody() @@ -309,8 +307,6 @@ class ServerRequest extends Request implements ServerRequestInterface } /** - * {@inheritdoc} - * * @return mixed */ public function getAttribute($attribute, $default = null) diff --git a/vendor/guzzlehttp/psr7/src/Stream.php b/vendor/guzzlehttp/psr7/src/Stream.php index ecd31861..f730ddac 100644 --- a/vendor/guzzlehttp/psr7/src/Stream.php +++ b/vendor/guzzlehttp/psr7/src/Stream.php @@ -61,8 +61,8 @@ class Stream implements StreamInterface $this->stream = $stream; $meta = stream_get_meta_data($this->stream); $this->seekable = $meta['seekable']; - $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']); - $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']); + $this->readable = (bool) preg_match(self::READABLE_MODES, $meta['mode']); + $this->writable = (bool) preg_match(self::WRITABLE_MODES, $meta['mode']); $this->uri = $this->getMetadata('uri'); } @@ -80,12 +80,14 @@ class Stream implements StreamInterface if ($this->isSeekable()) { $this->seek(0); } + return $this->getContents(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + return ''; } } @@ -145,6 +147,7 @@ class Stream implements StreamInterface $stats = fstat($this->stream); if (is_array($stats) && isset($stats['size'])) { $this->size = $stats['size']; + return $this->size; } @@ -207,7 +210,7 @@ class Stream implements StreamInterface } if (fseek($this->stream, $offset, $whence) === -1) { throw new \RuntimeException('Unable to seek to stream position ' - . $offset . ' with whence ' . var_export($whence, true)); + .$offset.' with whence '.var_export($whence, true)); } } @@ -261,8 +264,6 @@ class Stream implements StreamInterface } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php index 56d4104d..96196a3e 100644 --- a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php +++ b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php @@ -31,6 +31,7 @@ trait StreamDecoratorTrait { if ($name === 'stream') { $this->stream = $this->createStream(); + return $this->stream; } @@ -43,12 +44,14 @@ trait StreamDecoratorTrait if ($this->isSeekable()) { $this->seek(0); } + return $this->getContents(); } catch (\Throwable $e) { if (\PHP_VERSION_ID >= 70400) { throw $e; } trigger_error(sprintf('%s::__toString exception: %s', self::class, (string) $e), E_USER_ERROR); + return ''; } } @@ -79,8 +82,6 @@ trait StreamDecoratorTrait } /** - * {@inheritdoc} - * * @return mixed */ public function getMetadata($key = null) diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php index 2a934640..b3655cb3 100644 --- a/vendor/guzzlehttp/psr7/src/StreamWrapper.php +++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php @@ -41,7 +41,7 @@ final class StreamWrapper $mode = 'w'; } else { throw new \InvalidArgumentException('The stream must be readable, ' - . 'writable, or both.'); + .'writable, or both.'); } return fopen('guzzle://stream', $mode, false, self::createStreamContext($stream)); @@ -55,7 +55,7 @@ final class StreamWrapper public static function createStreamContext(StreamInterface $stream) { return stream_context_create([ - 'guzzle' => ['stream' => $stream] + 'guzzle' => ['stream' => $stream], ]); } @@ -115,7 +115,7 @@ final class StreamWrapper */ public function stream_cast(int $cast_as) { - $stream = clone($this->stream); + $stream = clone $this->stream; $resource = $stream->detach(); return $resource ?? false; @@ -127,27 +127,27 @@ final class StreamWrapper public function stream_stat(): array { static $modeMap = [ - 'r' => 33060, + 'r' => 33060, 'rb' => 33060, 'r+' => 33206, - 'w' => 33188, - 'wb' => 33188 + 'w' => 33188, + 'wb' => 33188, ]; return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => $modeMap[$this->mode], - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => $this->stream->getSize() ?: 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, + 'dev' => 0, + 'ino' => 0, + 'mode' => $modeMap[$this->mode], + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => $this->stream->getSize() ?: 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, 'blksize' => 0, - 'blocks' => 0 + 'blocks' => 0, ]; } @@ -157,19 +157,19 @@ final class StreamWrapper public function url_stat(string $path, int $flags): array { return [ - 'dev' => 0, - 'ino' => 0, - 'mode' => 0, - 'nlink' => 0, - 'uid' => 0, - 'gid' => 0, - 'rdev' => 0, - 'size' => 0, - 'atime' => 0, - 'mtime' => 0, - 'ctime' => 0, + 'dev' => 0, + 'ino' => 0, + 'mode' => 0, + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, 'blksize' => 0, - 'blocks' => 0 + 'blocks' => 0, ]; } } diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php index 09e878d3..fbba7f12 100644 --- a/vendor/guzzlehttp/psr7/src/Uri.php +++ b/vendor/guzzlehttp/psr7/src/Uri.php @@ -25,7 +25,7 @@ class Uri implements UriInterface, \JsonSerializable private const HTTP_DEFAULT_HOST = 'localhost'; private const DEFAULT_PORTS = [ - 'http' => 80, + 'http' => 80, 'https' => 443, 'ftp' => 21, 'gopher' => 70, @@ -41,14 +41,14 @@ class Uri implements UriInterface, \JsonSerializable /** * Unreserved characters for use in a regex. * - * @link https://tools.ietf.org/html/rfc3986#section-2.3 + * @see https://tools.ietf.org/html/rfc3986#section-2.3 */ private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~'; /** * Sub-delims for use in a regex. * - * @link https://tools.ietf.org/html/rfc3986#section-2.2 + * @see https://tools.ietf.org/html/rfc3986#section-2.2 */ private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;='; private const QUERY_SEPARATORS_REPLACEMENT = ['=' => '%3D', '&' => '%26']; @@ -87,6 +87,7 @@ class Uri implements UriInterface, \JsonSerializable $this->applyParts($parts); } } + /** * UTF-8 aware \parse_url() replacement. * @@ -121,7 +122,7 @@ class Uri implements UriInterface, \JsonSerializable $url ); - $result = parse_url($prefix . $encodedUrl); + $result = parse_url($prefix.$encodedUrl); if ($result === false) { return false; @@ -161,7 +162,7 @@ class Uri implements UriInterface, \JsonSerializable * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to * that format). * - * @link https://tools.ietf.org/html/rfc3986#section-5.3 + * @see https://tools.ietf.org/html/rfc3986#section-5.3 */ public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment): string { @@ -169,25 +170,25 @@ class Uri implements UriInterface, \JsonSerializable // weak type checks to also accept null until we can add scalar type hints if ($scheme != '') { - $uri .= $scheme . ':'; + $uri .= $scheme.':'; } if ($authority != '' || $scheme === 'file') { - $uri .= '//' . $authority; + $uri .= '//'.$authority; } if ($authority != '' && $path != '' && $path[0] != '/') { - $path = '/' . $path; + $path = '/'.$path; } $uri .= $path; if ($query != '') { - $uri .= '?' . $query; + $uri .= '?'.$query; } if ($fragment != '') { - $uri .= '#' . $fragment; + $uri .= '#'.$fragment; } return $uri; @@ -218,7 +219,7 @@ class Uri implements UriInterface, \JsonSerializable * @see Uri::isNetworkPathReference * @see Uri::isAbsolutePathReference * @see Uri::isRelativePathReference - * @link https://tools.ietf.org/html/rfc3986#section-4 + * @see https://tools.ietf.org/html/rfc3986#section-4 */ public static function isAbsolute(UriInterface $uri): bool { @@ -230,7 +231,7 @@ class Uri implements UriInterface, \JsonSerializable * * A relative reference that begins with two slash characters is termed an network-path reference. * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 + * @see https://tools.ietf.org/html/rfc3986#section-4.2 */ public static function isNetworkPathReference(UriInterface $uri): bool { @@ -242,7 +243,7 @@ class Uri implements UriInterface, \JsonSerializable * * A relative reference that begins with a single slash character is termed an absolute-path reference. * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 + * @see https://tools.ietf.org/html/rfc3986#section-4.2 */ public static function isAbsolutePathReference(UriInterface $uri): bool { @@ -257,7 +258,7 @@ class Uri implements UriInterface, \JsonSerializable * * A relative reference that does not begin with a slash character is termed a relative-path reference. * - * @link https://tools.ietf.org/html/rfc3986#section-4.2 + * @see https://tools.ietf.org/html/rfc3986#section-4.2 */ public static function isRelativePathReference(UriInterface $uri): bool { @@ -276,7 +277,7 @@ class Uri implements UriInterface, \JsonSerializable * @param UriInterface $uri The URI to check * @param UriInterface|null $base An optional base URI to compare against * - * @link https://tools.ietf.org/html/rfc3986#section-4.4 + * @see https://tools.ietf.org/html/rfc3986#section-4.4 */ public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool { @@ -352,7 +353,7 @@ class Uri implements UriInterface, \JsonSerializable /** * Creates a URI from a hash of `parse_url` components. * - * @link http://php.net/manual/en/function.parse-url.php + * @see http://php.net/manual/en/function.parse-url.php * * @throws MalformedUriException If the components do not form a valid URI. */ @@ -374,11 +375,11 @@ class Uri implements UriInterface, \JsonSerializable { $authority = $this->host; if ($this->userInfo !== '') { - $authority = $this->userInfo . '@' . $authority; + $authority = $this->userInfo.'@'.$authority; } if ($this->port !== null) { - $authority .= ':' . $this->port; + $authority .= ':'.$this->port; } return $authority; @@ -435,7 +436,7 @@ class Uri implements UriInterface, \JsonSerializable { $info = $this->filterUserInfoComponent($user); if ($password !== null) { - $info .= ':' . $this->filterUserInfoComponent($password); + $info .= ':'.$this->filterUserInfoComponent($password); } if ($this->userInfo === $info) { @@ -563,7 +564,7 @@ class Uri implements UriInterface, \JsonSerializable ? $this->filterQueryAndFragment($parts['fragment']) : ''; if (isset($parts['pass'])) { - $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']); + $this->userInfo .= ':'.$this->filterUserInfoComponent($parts['pass']); } $this->removeDefaultPort(); @@ -595,7 +596,7 @@ class Uri implements UriInterface, \JsonSerializable } return preg_replace_callback( - '/(?:[^%' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . ']+|%(?![A-Fa-f0-9]{2}))/', + '/(?:[^%'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.']+|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $component ); @@ -627,7 +628,7 @@ class Uri implements UriInterface, \JsonSerializable } $port = (int) $port; - if (0 > $port || 0xffff < $port) { + if (0 > $port || 0xFFFF < $port) { throw new \InvalidArgumentException( sprintf('Invalid port: %d. Must be between 0 and 65535', $port) ); @@ -664,7 +665,7 @@ class Uri implements UriInterface, \JsonSerializable $queryString = strtr($key, self::QUERY_SEPARATORS_REPLACEMENT); if ($value !== null) { - $queryString .= '=' . strtr($value, self::QUERY_SEPARATORS_REPLACEMENT); + $queryString .= '='.strtr($value, self::QUERY_SEPARATORS_REPLACEMENT); } return $queryString; @@ -691,7 +692,7 @@ class Uri implements UriInterface, \JsonSerializable } return preg_replace_callback( - '/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', + '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/]++|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $path ); @@ -711,7 +712,7 @@ class Uri implements UriInterface, \JsonSerializable } return preg_replace_callback( - '/(?:[^' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', + '/(?:[^'.self::CHAR_UNRESERVED.self::CHAR_SUB_DELIMS.'%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', [$this, 'rawurlencodeMatchZero'], $str ); diff --git a/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/vendor/guzzlehttp/psr7/src/UriNormalizer.php index e12971ed..cd4c383a 100644 --- a/vendor/guzzlehttp/psr7/src/UriNormalizer.php +++ b/vendor/guzzlehttp/psr7/src/UriNormalizer.php @@ -11,7 +11,7 @@ use Psr\Http\Message\UriInterface; * * @author Tobias Schultze * - * @link https://tools.ietf.org/html/rfc3986#section-6 + * @see https://tools.ietf.org/html/rfc3986#section-6 */ final class UriNormalizer { @@ -119,7 +119,7 @@ final class UriNormalizer * @param UriInterface $uri The URI to normalize * @param int $flags A bitmask of normalizations to apply, see constants * - * @link https://tools.ietf.org/html/rfc3986#section-6.2 + * @see https://tools.ietf.org/html/rfc3986#section-6.2 */ public static function normalize(UriInterface $uri, int $flags = self::PRESERVING_NORMALIZATIONS): UriInterface { @@ -131,8 +131,8 @@ final class UriNormalizer $uri = self::decodeUnreservedCharacters($uri); } - if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === '' && - ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') + if ($flags & self::CONVERT_EMPTY_PATH && $uri->getPath() === '' + && ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') ) { $uri = $uri->withPath('/'); } @@ -174,7 +174,7 @@ final class UriNormalizer * @param UriInterface $uri2 An URI to compare * @param int $normalizations A bitmask of normalizations to apply, see constants * - * @link https://tools.ietf.org/html/rfc3986#section-6.1 + * @see https://tools.ietf.org/html/rfc3986#section-6.1 */ public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS): bool { diff --git a/vendor/guzzlehttp/psr7/src/UriResolver.php b/vendor/guzzlehttp/psr7/src/UriResolver.php index 426e5c9a..38d5793c 100644 --- a/vendor/guzzlehttp/psr7/src/UriResolver.php +++ b/vendor/guzzlehttp/psr7/src/UriResolver.php @@ -11,14 +11,14 @@ use Psr\Http\Message\UriInterface; * * @author Tobias Schultze * - * @link https://tools.ietf.org/html/rfc3986#section-5 + * @see https://tools.ietf.org/html/rfc3986#section-5 */ final class UriResolver { /** * Removes dot segments from a path and returns the new path. * - * @link http://tools.ietf.org/html/rfc3986#section-5.2.4 + * @see http://tools.ietf.org/html/rfc3986#section-5.2.4 */ public static function removeDotSegments(string $path): string { @@ -40,7 +40,7 @@ final class UriResolver if ($path[0] === '/' && (!isset($newPath[0]) || $newPath[0] !== '/')) { // Re-add the leading slash if necessary for cases like "/.." - $newPath = '/' . $newPath; + $newPath = '/'.$newPath; } elseif ($newPath !== '' && ($segment === '.' || $segment === '..')) { // Add the trailing slash if necessary // If newPath is not empty, then $segment must be set and is the last segment from the foreach @@ -53,7 +53,7 @@ final class UriResolver /** * Converts the relative URI into a new URI that is resolved against the base URI. * - * @link http://tools.ietf.org/html/rfc3986#section-5.2 + * @see http://tools.ietf.org/html/rfc3986#section-5.2 */ public static function resolve(UriInterface $base, UriInterface $rel): UriInterface { @@ -80,13 +80,13 @@ final class UriResolver $targetPath = $rel->getPath(); } else { if ($targetAuthority != '' && $base->getPath() === '') { - $targetPath = '/' . $rel->getPath(); + $targetPath = '/'.$rel->getPath(); } else { $lastSlashPos = strrpos($base->getPath(), '/'); if ($lastSlashPos === false) { $targetPath = $rel->getPath(); } else { - $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); + $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1).$rel->getPath(); } } } @@ -127,8 +127,8 @@ final class UriResolver */ public static function relativize(UriInterface $base, UriInterface $target): UriInterface { - if ($target->getScheme() !== '' && - ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') + if ($target->getScheme() !== '' + && ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') ) { return $target; } @@ -185,7 +185,7 @@ final class UriResolver } } $targetSegments[] = $targetLastSegment; - $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); + $relativePath = str_repeat('../', count($sourceSegments)).implode('/', $targetSegments); // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used diff --git a/vendor/guzzlehttp/psr7/src/Utils.php b/vendor/guzzlehttp/psr7/src/Utils.php index 3a4cf394..917c05e3 100644 --- a/vendor/guzzlehttp/psr7/src/Utils.php +++ b/vendor/guzzlehttp/psr7/src/Utils.php @@ -90,6 +90,7 @@ final class Utils } $buffer .= $buf; } + return $buffer; } @@ -174,7 +175,7 @@ final class Utils $standardPorts = ['http' => 80, 'https' => 443]; $scheme = $changes['uri']->getScheme(); if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { - $changes['set_headers']['Host'] .= ':' . $port; + $changes['set_headers']['Host'] .= ':'.$port; } } } @@ -230,7 +231,7 @@ final class Utils * @param StreamInterface $stream Stream to read from * @param int|null $maxLength Maximum buffer length */ - public static function readLine(StreamInterface $stream, ?int $maxLength = null): string + public static function readLine(StreamInterface $stream, int $maxLength = null): string { $buffer = ''; $size = 0; @@ -291,6 +292,7 @@ final class Utils fwrite($stream, (string) $resource); fseek($stream, 0); } + return new Stream($stream, $options); } @@ -308,6 +310,7 @@ final class Utils fseek($stream, 0); $resource = $stream; } + return new Stream($resource, $options); case 'object': /** @var object $resource */ @@ -320,6 +323,7 @@ final class Utils } $result = $resource->current(); $resource->next(); + return $result; }, $options); } elseif (method_exists($resource, '__toString')) { @@ -334,7 +338,7 @@ final class Utils return new PumpStream($resource, $options); } - throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource)); + throw new \InvalidArgumentException('Invalid resource type: '.gettype($resource)); } /** diff --git a/vendor/guzzlehttp/uri-template/CHANGELOG.md b/vendor/guzzlehttp/uri-template/CHANGELOG.md index bf899242..1d6aa11f 100644 --- a/vendor/guzzlehttp/uri-template/CHANGELOG.md +++ b/vendor/guzzlehttp/uri-template/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to `uri-template` will be documented in this file. Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## v1.0.2 - 2023-08-27 + +### Changed +- Officially support PHP 8.2 and 8.3 + +### Fixed +- Fixed using `0` as an expanded value + ## v1.0.1 - 2021-10-07 ### Changed diff --git a/vendor/guzzlehttp/uri-template/composer.json b/vendor/guzzlehttp/uri-template/composer.json index 11ffd33c..e44d7842 100644 --- a/vendor/guzzlehttp/uri-template/composer.json +++ b/vendor/guzzlehttp/uri-template/composer.json @@ -46,6 +46,7 @@ "symfony/polyfill-php80": "^1.17" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", "phpunit/phpunit" : "^8.5.19 || ^9.5.8", "uri-template/tests": "1.0.0" }, @@ -59,12 +60,10 @@ "GuzzleHttp\\UriTemplate\\Tests\\": "tests" } }, - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, "config": { + "allow-plugins": { + "bamarni/composer-bin-plugin": true + }, "preferred-install": "dist", "sort-packages": true } diff --git a/vendor/guzzlehttp/uri-template/src/UriTemplate.php b/vendor/guzzlehttp/uri-template/src/UriTemplate.php index c6991641..1d99474f 100644 --- a/vendor/guzzlehttp/uri-template/src/UriTemplate.php +++ b/vendor/guzzlehttp/uri-template/src/UriTemplate.php @@ -7,7 +7,7 @@ namespace GuzzleHttp\UriTemplate; /** * Expands URI templates. Userland implementation of PECL uri_template. * - * @link http://tools.ietf.org/html/rfc6570 + * @see http://tools.ietf.org/html/rfc6570 */ final class UriTemplate { @@ -170,7 +170,6 @@ final class UriTemplate } /** @var string $var */ - $kvp[$key] = $var; } @@ -207,7 +206,7 @@ final class UriTemplate } if ($actuallyUseQuery) { - if (!$expanded && $joiner !== '&') { + if ($expanded === '' && $joiner !== '&') { $expanded = $value['value']; } else { $expanded = \sprintf('%s=%s', $value['value'], $expanded); diff --git a/vendor/monolog/monolog/CHANGELOG.md b/vendor/monolog/monolog/CHANGELOG.md deleted file mode 100644 index 98d1f8b2..00000000 --- a/vendor/monolog/monolog/CHANGELOG.md +++ /dev/null @@ -1,619 +0,0 @@ -### 2.9.0 (2023-02-05) - - * Deprecated FlowdockHandler & Formatter as the flowdock service was shutdown (#1748) - * Added support for enum context values in PsrLogMessageProcessor (#1773) - * Added graylog2/gelf-php 2.x support (#1747) - * Improved `BrowserConsoleHandler` logging to use more appropriate methods than just console.log in the browser (#1739) - * Fixed `WhatFailureGroupHandler` not catching errors happening inside `close()` (#1791) - * Fixed datetime field in `GoogleCloudLoggingFormatter` (#1758) - * Fixed infinite loop detection within Fibers (#1753) - * Fixed `AmqpHandler->setExtraAttributes` not working with buffering handler wrappers (#1781) - -### 2.8.0 (2022-07-24) - - * Deprecated `CubeHandler` and `PHPConsoleHandler` as both projects are abandoned and those should not be used anymore (#1734) - * Added RFC 5424 level (`7` to `0`) support to `Logger::log` and `Logger::addRecord` to increase interoperability (#1723) - * Added support for `__toString` for objects which are not json serializable in `JsonFormatter` (#1733) - * Added `GoogleCloudLoggingFormatter` (#1719) - * Added support for Predis 2.x (#1732) - * Added `AmqpHandler->setExtraAttributes` to allow configuring attributes when using an AMQPExchange (#1724) - * Fixed serialization/unserialization of handlers to make sure private properties are included (#1727) - * Fixed allowInlineLineBreaks in LineFormatter causing issues with windows paths containing `\n` or `\r` sequences (#1720) - * Fixed max normalization depth not being taken into account when formatting exceptions with a deep chain of previous exceptions (#1726) - * Fixed PHP 8.2 deprecation warnings (#1722) - * Fixed rare race condition or filesystem issue where StreamHandler is unable to create the directory the log should go into yet it exists already (#1678) - -### 2.7.0 (2022-06-09) - - * Added `$datetime` parameter to `Logger::addRecord` as low level API to allow logging into the past or future (#1682) - * Added `Logger::useLoggingLoopDetection` to allow disabling cyclic logging detection in concurrent frameworks (#1681) - * Fixed handling of fatal errors if callPrevious is disabled in ErrorHandler (#1670) - * Marked the reusable `Monolog\Test\TestCase` class as `@internal` to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677) - * Fixed RotatingFileHandler issue when the date format contained slashes (#1671) - -### 2.6.0 (2022-05-10) - - * Deprecated `SwiftMailerHandler`, use `SymfonyMailerHandler` instead - * Added `SymfonyMailerHandler` (#1663) - * Added ElasticSearch 8.x support to the ElasticsearchHandler (#1662) - * Added a way to filter/modify stack traces in LineFormatter (#1665) - * Fixed UdpSocket not being able to reopen/reconnect after close() - * Fixed infinite loops if a Handler is triggering logging while handling log records - -### 2.5.0 (2022-04-08) - - * Added `callType` to IntrospectionProcessor (#1612) - * Fixed AsMonologProcessor syntax to be compatible with PHP 7.2 (#1651) - -### 2.4.0 (2022-03-14) - - * Added [`Monolog\LogRecord`](src/Monolog/LogRecord.php) interface that can be used to type-hint records like `array|\Monolog\LogRecord $record` to be forward compatible with the upcoming Monolog 3 changes - * Added `includeStacktraces` constructor params to LineFormatter & JsonFormatter (#1603) - * Added `persistent`, `timeout`, `writingTimeout`, `connectionTimeout`, `chunkSize` constructor params to SocketHandler and derivatives (#1600) - * Added `AsMonologProcessor` PHP attribute which can help autowiring / autoconfiguration of processors if frameworks / integrations decide to make use of it. This is useless when used purely with Monolog (#1637) - * Added support for keeping native BSON types as is in MongoDBFormatter (#1620) - * Added support for a `user_agent` key in WebProcessor, disabled by default but you can use it by configuring the $extraFields you want (#1613) - * Added support for username/userIcon in SlackWebhookHandler (#1617) - * Added extension points to BrowserConsoleHandler (#1593) - * Added record message/context/extra info to exceptions thrown when a StreamHandler cannot open its stream to avoid completely losing the data logged (#1630) - * Fixed error handler signature to accept a null $context which happens with internal PHP errors (#1614) - * Fixed a few setter methods not returning `self` (#1609) - * Fixed handling of records going over the max Telegram message length (#1616) - -### 2.3.5 (2021-10-01) - - * Fixed regression in StreamHandler since 2.3.3 on systems with the memory_limit set to >=20GB (#1592) - -### 2.3.4 (2021-09-15) - - * Fixed support for psr/log 3.x (#1589) - -### 2.3.3 (2021-09-14) - - * Fixed memory usage when using StreamHandler and calling stream_get_contents on the resource you passed to it (#1578, #1577) - * Fixed support for psr/log 2.x (#1587) - * Fixed some type annotations - -### 2.3.2 (2021-07-23) - - * Fixed compatibility with PHP 7.2 - 7.4 when experiencing PCRE errors (#1568) - -### 2.3.1 (2021-07-14) - - * Fixed Utils::getClass handling of anonymous classes not being fully compatible with PHP 8 (#1563) - * Fixed some `@inheritDoc` annotations having the wrong case - -### 2.3.0 (2021-07-05) - - * Added a ton of PHPStan type annotations as well as type aliases on Monolog\Logger for Record, Level and LevelName that you can import (#1557) - * Added ability to customize date format when using JsonFormatter (#1561) - * Fixed FilterHandler not calling reset on its internal handler when reset() is called on it (#1531) - * Fixed SyslogUdpHandler not setting the timezone correctly on DateTimeImmutable instances (#1540) - * Fixed StreamHandler thread safety - chunk size set to 2GB now to avoid interlacing when doing concurrent writes (#1553) - -### 2.2.0 (2020-12-14) - - * Added JSON_PARTIAL_OUTPUT_ON_ERROR to default json encoding flags, to avoid dropping entire context data or even records due to an invalid subset of it somewhere - * Added setDateFormat to NormalizerFormatter (and Line/Json formatters by extension) to allow changing this after object creation - * Added RedisPubSubHandler to log records to a Redis channel using PUBLISH - * Added support for Elastica 7, and deprecated the $type argument of ElasticaFormatter which is not in use anymore as of Elastica 7 - * Added support for millisecond write timeouts in SocketHandler, you can now pass floats to setWritingTimeout, e.g. 0.2 is 200ms - * Added support for unix sockets in SyslogUdpHandler (set $port to 0 to make the $host a unix socket) - * Added handleBatch support for TelegramBotHandler - * Added RFC5424e extended date format including milliseconds to SyslogUdpHandler - * Added support for configuring handlers with numeric level values in strings (coming from e.g. env vars) - * Fixed Wildfire/FirePHP/ChromePHP handling of unicode characters - * Fixed PHP 8 issues in SyslogUdpHandler - * Fixed internal type error when mbstring is missing - -### 2.1.1 (2020-07-23) - - * Fixed removing of json encoding options - * Fixed type hint of $level not accepting strings in SendGridHandler and OverflowHandler - * Fixed SwiftMailerHandler not accepting email templates with an empty subject - * Fixed array access on null in RavenHandler - * Fixed unique_id in WebProcessor not being disableable - -### 2.1.0 (2020-05-22) - - * Added `JSON_INVALID_UTF8_SUBSTITUTE` to default json flags, so that invalid UTF8 characters now get converted to [�](https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character) instead of being converted from ISO-8859-15 to UTF8 as it was before, which was hardly a comprehensive solution - * Added `$ignoreEmptyContextAndExtra` option to JsonFormatter to skip empty context/extra entirely from the output - * Added `$parseMode`, `$disableWebPagePreview` and `$disableNotification` options to TelegramBotHandler - * Added tentative support for PHP 8 - * NormalizerFormatter::addJsonEncodeOption and removeJsonEncodeOption are now public to allow modifying default json flags - * Fixed GitProcessor type error when there is no git repo present - * Fixed normalization of SoapFault objects containing deeply nested objects as "detail" - * Fixed support for relative paths in RotatingFileHandler - -### 2.0.2 (2019-12-20) - - * Fixed ElasticsearchHandler swallowing exceptions details when failing to index log records - * Fixed normalization of SoapFault objects containing non-strings as "detail" in LineFormatter - * Fixed formatting of resources in JsonFormatter - * Fixed RedisHandler failing to use MULTI properly when passed a proxied Redis instance (e.g. in Symfony with lazy services) - * Fixed FilterHandler triggering a notice when handleBatch was filtering all records passed to it - * Fixed Turkish locale messing up the conversion of level names to their constant values - -### 2.0.1 (2019-11-13) - - * Fixed normalization of Traversables to avoid traversing them as not all of them are rewindable - * Fixed setFormatter/getFormatter to forward to the nested handler in FilterHandler, FingersCrossedHandler, BufferHandler, OverflowHandler and SamplingHandler - * Fixed BrowserConsoleHandler formatting when using multiple styles - * Fixed normalization of exception codes to be always integers even for PDOException which have them as numeric strings - * Fixed normalization of SoapFault objects containing non-strings as "detail" - * Fixed json encoding across all handlers to always attempt recovery of non-UTF-8 strings instead of failing the whole encoding - * Fixed ChromePHPHandler to avoid sending more data than latest Chrome versions allow in headers (4KB down from 256KB). - * Fixed type error in BrowserConsoleHandler when the context array of log records was not associative. - -### 2.0.0 (2019-08-30) - - * BC Break: This is a major release, see [UPGRADE.md](UPGRADE.md) for details if you are coming from a 1.x release - * BC Break: Logger methods log/debug/info/notice/warning/error/critical/alert/emergency now have explicit void return types - * Added FallbackGroupHandler which works like the WhatFailureGroupHandler but stops dispatching log records as soon as one handler accepted it - * Fixed support for UTF-8 when cutting strings to avoid cutting a multibyte-character in half - * Fixed normalizers handling of exception backtraces to avoid serializing arguments in some cases - * Fixed date timezone handling in SyslogUdpHandler - -### 2.0.0-beta2 (2019-07-06) - - * BC Break: This is a major release, see [UPGRADE.md](UPGRADE.md) for details if you are coming from a 1.x release - * BC Break: PHP 7.2 is now the minimum required PHP version. - * BC Break: Removed SlackbotHandler, RavenHandler and HipChatHandler, see [UPGRADE.md](UPGRADE.md) for details - * Added OverflowHandler which will only flush log records to its nested handler when reaching a certain amount of logs (i.e. only pass through when things go really bad) - * Added TelegramBotHandler to log records to a [Telegram](https://core.telegram.org/bots/api) bot account - * Added support for JsonSerializable when normalizing exceptions - * Added support for RFC3164 (outdated BSD syslog protocol) to SyslogUdpHandler - * Added SoapFault details to formatted exceptions - * Fixed DeduplicationHandler silently failing to start when file could not be opened - * Fixed issue in GroupHandler and WhatFailureGroupHandler where setting multiple processors would duplicate records - * Fixed GelfFormatter losing some data when one attachment was too long - * Fixed issue in SignalHandler restarting syscalls functionality - * Improved performance of LogglyHandler when sending multiple logs in a single request - -### 2.0.0-beta1 (2018-12-08) - - * BC Break: This is a major release, see [UPGRADE.md](UPGRADE.md) for details if you are coming from a 1.x release - * BC Break: PHP 7.1 is now the minimum required PHP version. - * BC Break: Quite a few interface changes, only relevant if you implemented your own handlers/processors/formatters - * BC Break: Removed non-PSR-3 methods to add records, all the `add*` (e.g. `addWarning`) methods as well as `emerg`, `crit`, `err` and `warn` - * BC Break: The record timezone is now set per Logger instance and not statically anymore - * BC Break: There is no more default handler configured on empty Logger instances - * BC Break: ElasticSearchHandler renamed to ElasticaHandler - * BC Break: Various handler-specific breaks, see [UPGRADE.md](UPGRADE.md) for details - * Added scalar type hints and return hints in all the places it was possible. Switched strict_types on for more reliability. - * Added DateTimeImmutable support, all record datetime are now immutable, and will toString/json serialize with the correct date format, including microseconds (unless disabled) - * Added timezone and microseconds to the default date format - * Added SendGridHandler to use the SendGrid API to send emails - * Added LogmaticHandler to use the Logmatic.io API to store log records - * Added SqsHandler to send log records to an AWS SQS queue - * Added ElasticsearchHandler to send records via the official ES library. Elastica users should now use ElasticaHandler instead of ElasticSearchHandler - * Added NoopHandler which is similar to the NullHandle but does not prevent the bubbling of log records to handlers further down the configuration, useful for temporarily disabling a handler in configuration files - * Added ProcessHandler to write log output to the STDIN of a given process - * Added HostnameProcessor that adds the machine's hostname to log records - * Added a `$dateFormat` option to the PsrLogMessageProcessor which lets you format DateTime instances nicely - * Added support for the PHP 7.x `mongodb` extension in the MongoDBHandler - * Fixed many minor issues in various handlers, and probably added a few regressions too - -### 1.26.1 (2021-05-28) - - * Fixed PHP 8.1 deprecation warning - -### 1.26.0 (2020-12-14) - - * Added $dateFormat and $removeUsedContextFields arguments to PsrLogMessageProcessor (backport from 2.x) - -### 1.25.5 (2020-07-23) - - * Fixed array access on null in RavenHandler - * Fixed unique_id in WebProcessor not being disableable - -### 1.25.4 (2020-05-22) - - * Fixed GitProcessor type error when there is no git repo present - * Fixed normalization of SoapFault objects containing deeply nested objects as "detail" - * Fixed support for relative paths in RotatingFileHandler - -### 1.25.3 (2019-12-20) - - * Fixed formatting of resources in JsonFormatter - * Fixed RedisHandler failing to use MULTI properly when passed a proxied Redis instance (e.g. in Symfony with lazy services) - * Fixed FilterHandler triggering a notice when handleBatch was filtering all records passed to it - * Fixed Turkish locale messing up the conversion of level names to their constant values - -### 1.25.2 (2019-11-13) - - * Fixed normalization of Traversables to avoid traversing them as not all of them are rewindable - * Fixed setFormatter/getFormatter to forward to the nested handler in FilterHandler, FingersCrossedHandler, BufferHandler and SamplingHandler - * Fixed BrowserConsoleHandler formatting when using multiple styles - * Fixed normalization of exception codes to be always integers even for PDOException which have them as numeric strings - * Fixed normalization of SoapFault objects containing non-strings as "detail" - * Fixed json encoding across all handlers to always attempt recovery of non-UTF-8 strings instead of failing the whole encoding - -### 1.25.1 (2019-09-06) - - * Fixed forward-compatible interfaces to be compatible with Monolog 1.x too. - -### 1.25.0 (2019-09-06) - - * Deprecated SlackbotHandler, use SlackWebhookHandler or SlackHandler instead - * Deprecated RavenHandler, use sentry/sentry 2.x and their Sentry\Monolog\Handler instead - * Deprecated HipChatHandler, migrate to Slack and use SlackWebhookHandler or SlackHandler instead - * Added forward-compatible interfaces and traits FormattableHandlerInterface, FormattableHandlerTrait, ProcessableHandlerInterface, ProcessableHandlerTrait. If you use modern PHP and want to make code compatible with Monolog 1 and 2 this can help. You will have to require at least Monolog 1.25 though. - * Added support for RFC3164 (outdated BSD syslog protocol) to SyslogUdpHandler - * Fixed issue in GroupHandler and WhatFailureGroupHandler where setting multiple processors would duplicate records - * Fixed issue in SignalHandler restarting syscalls functionality - * Fixed normalizers handling of exception backtraces to avoid serializing arguments in some cases - * Fixed ZendMonitorHandler to work with the latest Zend Server versions - * Fixed ChromePHPHandler to avoid sending more data than latest Chrome versions allow in headers (4KB down from 256KB). - -### 1.24.0 (2018-11-05) - - * BC Notice: If you are extending any of the Monolog's Formatters' `normalize` method, make sure you add the new `$depth = 0` argument to your function signature to avoid strict PHP warnings. - * Added a `ResettableInterface` in order to reset/reset/clear/flush handlers and processors - * Added a `ProcessorInterface` as an optional way to label a class as being a processor (mostly useful for autowiring dependency containers) - * Added a way to log signals being received using Monolog\SignalHandler - * Added ability to customize error handling at the Logger level using Logger::setExceptionHandler - * Added InsightOpsHandler to migrate users of the LogEntriesHandler - * Added protection to NormalizerFormatter against circular and very deep structures, it now stops normalizing at a depth of 9 - * Added capture of stack traces to ErrorHandler when logging PHP errors - * Added RavenHandler support for a `contexts` context or extra key to forward that to Sentry's contexts - * Added forwarding of context info to FluentdFormatter - * Added SocketHandler::setChunkSize to override the default chunk size in case you must send large log lines to rsyslog for example - * Added ability to extend/override BrowserConsoleHandler - * Added SlackWebhookHandler::getWebhookUrl and SlackHandler::getToken to enable class extensibility - * Added SwiftMailerHandler::getSubjectFormatter to enable class extensibility - * Dropped official support for HHVM in test builds - * Fixed normalization of exception traces when call_user_func is used to avoid serializing objects and the data they contain - * Fixed naming of fields in Slack handler, all field names are now capitalized in all cases - * Fixed HipChatHandler bug where slack dropped messages randomly - * Fixed normalization of objects in Slack handlers - * Fixed support for PHP7's Throwable in NewRelicHandler - * Fixed race bug when StreamHandler sometimes incorrectly reported it failed to create a directory - * Fixed table row styling issues in HtmlFormatter - * Fixed RavenHandler dropping the message when logging exception - * Fixed WhatFailureGroupHandler skipping processors when using handleBatch - and implement it where possible - * Fixed display of anonymous class names - -### 1.23.0 (2017-06-19) - - * Improved SyslogUdpHandler's support for RFC5424 and added optional `$ident` argument - * Fixed GelfHandler truncation to be per field and not per message - * Fixed compatibility issue with PHP <5.3.6 - * Fixed support for headless Chrome in ChromePHPHandler - * Fixed support for latest Aws SDK in DynamoDbHandler - * Fixed support for SwiftMailer 6.0+ in SwiftMailerHandler - -### 1.22.1 (2017-03-13) - - * Fixed lots of minor issues in the new Slack integrations - * Fixed support for allowInlineLineBreaks in LineFormatter when formatting exception backtraces - -### 1.22.0 (2016-11-26) - - * Added SlackbotHandler and SlackWebhookHandler to set up Slack integration more easily - * Added MercurialProcessor to add mercurial revision and branch names to log records - * Added support for AWS SDK v3 in DynamoDbHandler - * Fixed fatal errors occurring when normalizing generators that have been fully consumed - * Fixed RollbarHandler to include a level (rollbar level), monolog_level (original name), channel and datetime (unix) - * Fixed RollbarHandler not flushing records automatically, calling close() explicitly is not necessary anymore - * Fixed SyslogUdpHandler to avoid sending empty frames - * Fixed a few PHP 7.0 and 7.1 compatibility issues - -### 1.21.0 (2016-07-29) - - * Break: Reverted the addition of $context when the ErrorHandler handles regular php errors from 1.20.0 as it was causing issues - * Added support for more formats in RotatingFileHandler::setFilenameFormat as long as they have Y, m and d in order - * Added ability to format the main line of text the SlackHandler sends by explicitly setting a formatter on the handler - * Added information about SoapFault instances in NormalizerFormatter - * Added $handleOnlyReportedErrors option on ErrorHandler::registerErrorHandler (default true) to allow logging of all errors no matter the error_reporting level - -### 1.20.0 (2016-07-02) - - * Added FingersCrossedHandler::activate() to manually trigger the handler regardless of the activation policy - * Added StreamHandler::getUrl to retrieve the stream's URL - * Added ability to override addRow/addTitle in HtmlFormatter - * Added the $context to context information when the ErrorHandler handles a regular php error - * Deprecated RotatingFileHandler::setFilenameFormat to only support 3 formats: Y, Y-m and Y-m-d - * Fixed WhatFailureGroupHandler to work with PHP7 throwables - * Fixed a few minor bugs - -### 1.19.0 (2016-04-12) - - * Break: StreamHandler will not close streams automatically that it does not own. If you pass in a stream (not a path/url), then it will not close it for you. You can retrieve those using getStream() if needed - * Added DeduplicationHandler to remove duplicate records from notifications across multiple requests, useful for email or other notifications on errors - * Added ability to use `%message%` and other LineFormatter replacements in the subject line of emails sent with NativeMailHandler and SwiftMailerHandler - * Fixed HipChatHandler handling of long messages - -### 1.18.2 (2016-04-02) - - * Fixed ElasticaFormatter to use more precise dates - * Fixed GelfMessageFormatter sending too long messages - -### 1.18.1 (2016-03-13) - - * Fixed SlackHandler bug where slack dropped messages randomly - * Fixed RedisHandler issue when using with the PHPRedis extension - * Fixed AmqpHandler content-type being incorrectly set when using with the AMQP extension - * Fixed BrowserConsoleHandler regression - -### 1.18.0 (2016-03-01) - - * Added optional reduction of timestamp precision via `Logger->useMicrosecondTimestamps(false)`, disabling it gets you a bit of performance boost but reduces the precision to the second instead of microsecond - * Added possibility to skip some extra stack frames in IntrospectionProcessor if you have some library wrapping Monolog that is always adding frames - * Added `Logger->withName` to clone a logger (keeping all handlers) with a new name - * Added FluentdFormatter for the Fluentd unix socket protocol - * Added HandlerWrapper base class to ease the creation of handler wrappers, just extend it and override as needed - * Added support for replacing context sub-keys using `%context.*%` in LineFormatter - * Added support for `payload` context value in RollbarHandler - * Added setRelease to RavenHandler to describe the application version, sent with every log - * Added support for `fingerprint` context value in RavenHandler - * Fixed JSON encoding errors that would gobble up the whole log record, we now handle those more gracefully by dropping chars as needed - * Fixed write timeouts in SocketHandler and derivatives, set to 10sec by default, lower it with `setWritingTimeout()` - * Fixed PHP7 compatibility with regard to Exception/Throwable handling in a few places - -### 1.17.2 (2015-10-14) - - * Fixed ErrorHandler compatibility with non-Monolog PSR-3 loggers - * Fixed SlackHandler handling to use slack functionalities better - * Fixed SwiftMailerHandler bug when sending multiple emails they all had the same id - * Fixed 5.3 compatibility regression - -### 1.17.1 (2015-08-31) - - * Fixed RollbarHandler triggering PHP notices - -### 1.17.0 (2015-08-30) - - * Added support for `checksum` and `release` context/extra values in RavenHandler - * Added better support for exceptions in RollbarHandler - * Added UidProcessor::getUid - * Added support for showing the resource type in NormalizedFormatter - * Fixed IntrospectionProcessor triggering PHP notices - -### 1.16.0 (2015-08-09) - - * Added IFTTTHandler to notify ifttt.com triggers - * Added Logger::setHandlers() to allow setting/replacing all handlers - * Added $capSize in RedisHandler to cap the log size - * Fixed StreamHandler creation of directory to only trigger when the first log write happens - * Fixed bug in the handling of curl failures - * Fixed duplicate logging of fatal errors when both error and fatal error handlers are registered in monolog's ErrorHandler - * Fixed missing fatal errors records with handlers that need to be closed to flush log records - * Fixed TagProcessor::addTags support for associative arrays - -### 1.15.0 (2015-07-12) - - * Added addTags and setTags methods to change a TagProcessor - * Added automatic creation of directories if they are missing for a StreamHandler to open a log file - * Added retry functionality to Loggly, Cube and Mandrill handlers so they retry up to 5 times in case of network failure - * Fixed process exit code being incorrectly reset to 0 if ErrorHandler::registerExceptionHandler was used - * Fixed HTML/JS escaping in BrowserConsoleHandler - * Fixed JSON encoding errors being silently suppressed (PHP 5.5+ only) - -### 1.14.0 (2015-06-19) - - * Added PHPConsoleHandler to send record to Chrome's PHP Console extension and library - * Added support for objects implementing __toString in the NormalizerFormatter - * Added support for HipChat's v2 API in HipChatHandler - * Added Logger::setTimezone() to initialize the timezone monolog should use in case date.timezone isn't correct for your app - * Added an option to send formatted message instead of the raw record on PushoverHandler via ->useFormattedMessage(true) - * Fixed curl errors being silently suppressed - -### 1.13.1 (2015-03-09) - - * Fixed regression in HipChat requiring a new token to be created - -### 1.13.0 (2015-03-05) - - * Added Registry::hasLogger to check for the presence of a logger instance - * Added context.user support to RavenHandler - * Added HipChat API v2 support in the HipChatHandler - * Added NativeMailerHandler::addParameter to pass params to the mail() process - * Added context data to SlackHandler when $includeContextAndExtra is true - * Added ability to customize the Swift_Message per-email in SwiftMailerHandler - * Fixed SwiftMailerHandler to lazily create message instances if a callback is provided - * Fixed serialization of INF and NaN values in Normalizer and LineFormatter - -### 1.12.0 (2014-12-29) - - * Break: HandlerInterface::isHandling now receives a partial record containing only a level key. This was always the intent and does not break any Monolog handler but is strictly speaking a BC break and you should check if you relied on any other field in your own handlers. - * Added PsrHandler to forward records to another PSR-3 logger - * Added SamplingHandler to wrap around a handler and include only every Nth record - * Added MongoDBFormatter to support better storage with MongoDBHandler (it must be enabled manually for now) - * Added exception codes in the output of most formatters - * Added LineFormatter::includeStacktraces to enable exception stack traces in logs (uses more than one line) - * Added $useShortAttachment to SlackHandler to minify attachment size and $includeExtra to append extra data - * Added $host to HipChatHandler for users of private instances - * Added $transactionName to NewRelicHandler and support for a transaction_name context value - * Fixed MandrillHandler to avoid outputting API call responses - * Fixed some non-standard behaviors in SyslogUdpHandler - -### 1.11.0 (2014-09-30) - - * Break: The NewRelicHandler extra and context data are now prefixed with extra_ and context_ to avoid clashes. Watch out if you have scripts reading those from the API and rely on names - * Added WhatFailureGroupHandler to suppress any exception coming from the wrapped handlers and avoid chain failures if a logging service fails - * Added MandrillHandler to send emails via the Mandrillapp.com API - * Added SlackHandler to log records to a Slack.com account - * Added FleepHookHandler to log records to a Fleep.io account - * Added LogglyHandler::addTag to allow adding tags to an existing handler - * Added $ignoreEmptyContextAndExtra to LineFormatter to avoid empty [] at the end - * Added $useLocking to StreamHandler and RotatingFileHandler to enable flock() while writing - * Added support for PhpAmqpLib in the AmqpHandler - * Added FingersCrossedHandler::clear and BufferHandler::clear to reset them between batches in long running jobs - * Added support for adding extra fields from $_SERVER in the WebProcessor - * Fixed support for non-string values in PrsLogMessageProcessor - * Fixed SwiftMailer messages being sent with the wrong date in long running scripts - * Fixed minor PHP 5.6 compatibility issues - * Fixed BufferHandler::close being called twice - -### 1.10.0 (2014-06-04) - - * Added Logger::getHandlers() and Logger::getProcessors() methods - * Added $passthruLevel argument to FingersCrossedHandler to let it always pass some records through even if the trigger level is not reached - * Added support for extra data in NewRelicHandler - * Added $expandNewlines flag to the ErrorLogHandler to create multiple log entries when a message has multiple lines - -### 1.9.1 (2014-04-24) - - * Fixed regression in RotatingFileHandler file permissions - * Fixed initialization of the BufferHandler to make sure it gets flushed after receiving records - * Fixed ChromePHPHandler and FirePHPHandler's activation strategies to be more conservative - -### 1.9.0 (2014-04-20) - - * Added LogEntriesHandler to send logs to a LogEntries account - * Added $filePermissions to tweak file mode on StreamHandler and RotatingFileHandler - * Added $useFormatting flag to MemoryProcessor to make it send raw data in bytes - * Added support for table formatting in FirePHPHandler via the table context key - * Added a TagProcessor to add tags to records, and support for tags in RavenHandler - * Added $appendNewline flag to the JsonFormatter to enable using it when logging to files - * Added sound support to the PushoverHandler - * Fixed multi-threading support in StreamHandler - * Fixed empty headers issue when ChromePHPHandler received no records - * Fixed default format of the ErrorLogHandler - -### 1.8.0 (2014-03-23) - - * Break: the LineFormatter now strips newlines by default because this was a bug, set $allowInlineLineBreaks to true if you need them - * Added BrowserConsoleHandler to send logs to any browser's console via console.log() injection in the output - * Added FilterHandler to filter records and only allow those of a given list of levels through to the wrapped handler - * Added FlowdockHandler to send logs to a Flowdock account - * Added RollbarHandler to send logs to a Rollbar account - * Added HtmlFormatter to send prettier log emails with colors for each log level - * Added GitProcessor to add the current branch/commit to extra record data - * Added a Monolog\Registry class to allow easier global access to pre-configured loggers - * Added support for the new official graylog2/gelf-php lib for GelfHandler, upgrade if you can by replacing the mlehner/gelf-php requirement - * Added support for HHVM - * Added support for Loggly batch uploads - * Added support for tweaking the content type and encoding in NativeMailerHandler - * Added $skipClassesPartials to tweak the ignored classes in the IntrospectionProcessor - * Fixed batch request support in GelfHandler - -### 1.7.0 (2013-11-14) - - * Added ElasticSearchHandler to send logs to an Elastic Search server - * Added DynamoDbHandler and ScalarFormatter to send logs to Amazon's Dynamo DB - * Added SyslogUdpHandler to send logs to a remote syslogd server - * Added LogglyHandler to send logs to a Loggly account - * Added $level to IntrospectionProcessor so it only adds backtraces when needed - * Added $version to LogstashFormatter to allow using the new v1 Logstash format - * Added $appName to NewRelicHandler - * Added configuration of Pushover notification retries/expiry - * Added $maxColumnWidth to NativeMailerHandler to change the 70 chars default - * Added chainability to most setters for all handlers - * Fixed RavenHandler batch processing so it takes the message from the record with highest priority - * Fixed HipChatHandler batch processing so it sends all messages at once - * Fixed issues with eAccelerator - * Fixed and improved many small things - -### 1.6.0 (2013-07-29) - - * Added HipChatHandler to send logs to a HipChat chat room - * Added ErrorLogHandler to send logs to PHP's error_log function - * Added NewRelicHandler to send logs to NewRelic's service - * Added Monolog\ErrorHandler helper class to register a Logger as exception/error/fatal handler - * Added ChannelLevelActivationStrategy for the FingersCrossedHandler to customize levels by channel - * Added stack traces output when normalizing exceptions (json output & co) - * Added Monolog\Logger::API constant (currently 1) - * Added support for ChromePHP's v4.0 extension - * Added support for message priorities in PushoverHandler, see $highPriorityLevel and $emergencyLevel - * Added support for sending messages to multiple users at once with the PushoverHandler - * Fixed RavenHandler's support for batch sending of messages (when behind a Buffer or FingersCrossedHandler) - * Fixed normalization of Traversables with very large data sets, only the first 1000 items are shown now - * Fixed issue in RotatingFileHandler when an open_basedir restriction is active - * Fixed minor issues in RavenHandler and bumped the API to Raven 0.5.0 - * Fixed SyslogHandler issue when many were used concurrently with different facilities - -### 1.5.0 (2013-04-23) - - * Added ProcessIdProcessor to inject the PID in log records - * Added UidProcessor to inject a unique identifier to all log records of one request/run - * Added support for previous exceptions in the LineFormatter exception serialization - * Added Monolog\Logger::getLevels() to get all available levels - * Fixed ChromePHPHandler so it avoids sending headers larger than Chrome can handle - -### 1.4.1 (2013-04-01) - - * Fixed exception formatting in the LineFormatter to be more minimalistic - * Fixed RavenHandler's handling of context/extra data, requires Raven client >0.1.0 - * Fixed log rotation in RotatingFileHandler to work with long running scripts spanning multiple days - * Fixed WebProcessor array access so it checks for data presence - * Fixed Buffer, Group and FingersCrossed handlers to make use of their processors - -### 1.4.0 (2013-02-13) - - * Added RedisHandler to log to Redis via the Predis library or the phpredis extension - * Added ZendMonitorHandler to log to the Zend Server monitor - * Added the possibility to pass arrays of handlers and processors directly in the Logger constructor - * Added `$useSSL` option to the PushoverHandler which is enabled by default - * Fixed ChromePHPHandler and FirePHPHandler issue when multiple instances are used simultaneously - * Fixed header injection capability in the NativeMailHandler - -### 1.3.1 (2013-01-11) - - * Fixed LogstashFormatter to be usable with stream handlers - * Fixed GelfMessageFormatter levels on Windows - -### 1.3.0 (2013-01-08) - - * Added PSR-3 compliance, the `Monolog\Logger` class is now an instance of `Psr\Log\LoggerInterface` - * Added PsrLogMessageProcessor that you can selectively enable for full PSR-3 compliance - * Added LogstashFormatter (combine with SocketHandler or StreamHandler to send logs to Logstash) - * Added PushoverHandler to send mobile notifications - * Added CouchDBHandler and DoctrineCouchDBHandler - * Added RavenHandler to send data to Sentry servers - * Added support for the new MongoClient class in MongoDBHandler - * Added microsecond precision to log records' timestamps - * Added `$flushOnOverflow` param to BufferHandler to flush by batches instead of losing - the oldest entries - * Fixed normalization of objects with cyclic references - -### 1.2.1 (2012-08-29) - - * Added new $logopts arg to SyslogHandler to provide custom openlog options - * Fixed fatal error in SyslogHandler - -### 1.2.0 (2012-08-18) - - * Added AmqpHandler (for use with AMQP servers) - * Added CubeHandler - * Added NativeMailerHandler::addHeader() to send custom headers in mails - * Added the possibility to specify more than one recipient in NativeMailerHandler - * Added the possibility to specify float timeouts in SocketHandler - * Added NOTICE and EMERGENCY levels to conform with RFC 5424 - * Fixed the log records to use the php default timezone instead of UTC - * Fixed BufferHandler not being flushed properly on PHP fatal errors - * Fixed normalization of exotic resource types - * Fixed the default format of the SyslogHandler to avoid duplicating datetimes in syslog - -### 1.1.0 (2012-04-23) - - * Added Monolog\Logger::isHandling() to check if a handler will - handle the given log level - * Added ChromePHPHandler - * Added MongoDBHandler - * Added GelfHandler (for use with Graylog2 servers) - * Added SocketHandler (for use with syslog-ng for example) - * Added NormalizerFormatter - * Added the possibility to change the activation strategy of the FingersCrossedHandler - * Added possibility to show microseconds in logs - * Added `server` and `referer` to WebProcessor output - -### 1.0.2 (2011-10-24) - - * Fixed bug in IE with large response headers and FirePHPHandler - -### 1.0.1 (2011-08-25) - - * Added MemoryPeakUsageProcessor and MemoryUsageProcessor - * Added Monolog\Logger::getName() to get a logger's channel name - -### 1.0.0 (2011-07-06) - - * Added IntrospectionProcessor to get info from where the logger was called - * Fixed WebProcessor in CLI - -### 1.0.0-RC1 (2011-07-01) - - * Initial release diff --git a/vendor/monolog/monolog/LICENSE b/vendor/monolog/monolog/LICENSE deleted file mode 100644 index aa2a0426..00000000 --- a/vendor/monolog/monolog/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011-2020 Jordi Boggiano - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/monolog/monolog/README.md b/vendor/monolog/monolog/README.md deleted file mode 100644 index bfcae0c0..00000000 --- a/vendor/monolog/monolog/README.md +++ /dev/null @@ -1,112 +0,0 @@ -# Monolog - Logging for PHP [![Continuous Integration](https://github.com/Seldaek/monolog/workflows/Continuous%20Integration/badge.svg?branch=main)](https://github.com/Seldaek/monolog/actions) - -[![Total Downloads](https://img.shields.io/packagist/dt/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog) -[![Latest Stable Version](https://img.shields.io/packagist/v/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog) - - -Monolog sends your logs to files, sockets, inboxes, databases and various -web services. See the complete list of handlers below. Special handlers -allow you to build advanced logging strategies. - -This library implements the [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) -interface that you can type-hint against in your own libraries to keep -a maximum of interoperability. You can also use it in your applications to -make sure you can always use another compatible logger at a later time. -As of 1.11.0 Monolog public APIs will also accept PSR-3 log levels. -Internally Monolog still uses its own level scheme since it predates PSR-3. - -## Installation - -Install the latest version with - -```bash -$ composer require monolog/monolog -``` - -## Basic Usage - -```php -pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING)); - -// add records to the log -$log->warning('Foo'); -$log->error('Bar'); -``` - -## Documentation - -- [Usage Instructions](doc/01-usage.md) -- [Handlers, Formatters and Processors](doc/02-handlers-formatters-processors.md) -- [Utility Classes](doc/03-utilities.md) -- [Extending Monolog](doc/04-extending.md) -- [Log Record Structure](doc/message-structure.md) - -## Support Monolog Financially - -Get supported Monolog and help fund the project with the [Tidelift Subscription](https://tidelift.com/subscription/pkg/packagist-monolog-monolog?utm_source=packagist-monolog-monolog&utm_medium=referral&utm_campaign=enterprise) or via [GitHub sponsorship](https://github.com/sponsors/Seldaek). - -Tidelift delivers commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. - -## Third Party Packages - -Third party handlers, formatters and processors are -[listed in the wiki](https://github.com/Seldaek/monolog/wiki/Third-Party-Packages). You -can also add your own there if you publish one. - -## About - -### Requirements - -- Monolog `^2.0` works with PHP 7.2 or above, use Monolog `^1.25` for PHP 5.3+ support. - -### Support - -Monolog 1.x support is somewhat limited at this point and only important fixes will be done. You should migrate to Monolog 2 where possible to benefit from all the latest features and fixes. - -### Submitting bugs and feature requests - -Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues) - -### Framework Integrations - -- Frameworks and libraries using [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) - can be used very easily with Monolog since it implements the interface. -- [Symfony](http://symfony.com) comes out of the box with Monolog. -- [Laravel](http://laravel.com/) comes out of the box with Monolog. -- [Lumen](http://lumen.laravel.com/) comes out of the box with Monolog. -- [PPI](https://github.com/ppi/framework) comes out of the box with Monolog. -- [CakePHP](http://cakephp.org/) is usable with Monolog via the [cakephp-monolog](https://github.com/jadb/cakephp-monolog) plugin. -- [Slim](http://www.slimframework.com/) is usable with Monolog via the [Slim-Monolog](https://github.com/Flynsarmy/Slim-Monolog) log writer. -- [XOOPS 2.6](http://xoops.org/) comes out of the box with Monolog. -- [Aura.Web_Project](https://github.com/auraphp/Aura.Web_Project) comes out of the box with Monolog. -- [Nette Framework](http://nette.org/en/) is usable with Monolog via the [contributte/monolog](https://github.com/contributte/monolog) or [orisai/nette-monolog](https://github.com/orisai/nette-monolog) extensions. -- [Proton Micro Framework](https://github.com/alexbilbie/Proton) comes out of the box with Monolog. -- [FuelPHP](http://fuelphp.com/) comes out of the box with Monolog. -- [Equip Framework](https://github.com/equip/framework) comes out of the box with Monolog. -- [Yii 2](http://www.yiiframework.com/) is usable with Monolog via the [yii2-monolog](https://github.com/merorafael/yii2-monolog) or [yii2-psr-log-target](https://github.com/samdark/yii2-psr-log-target) plugins. -- [Hawkbit Micro Framework](https://github.com/HawkBitPhp/hawkbit) comes out of the box with Monolog. -- [SilverStripe 4](https://www.silverstripe.org/) comes out of the box with Monolog. -- [Drupal](https://www.drupal.org/) is usable with Monolog via the [monolog](https://www.drupal.org/project/monolog) module. -- [Aimeos ecommerce framework](https://aimeos.org/) is usable with Monolog via the [ai-monolog](https://github.com/aimeos/ai-monolog) extension. -- [Magento](https://magento.com/) comes out of the box with Monolog. - -### Author - -Jordi Boggiano - -
-See also the list of [contributors](https://github.com/Seldaek/monolog/contributors) who participated in this project. - -### License - -Monolog is licensed under the MIT License - see the [LICENSE](LICENSE) file for details - -### Acknowledgements - -This library is heavily inspired by Python's [Logbook](https://logbook.readthedocs.io/en/stable/) -library, although most concepts have been adjusted to fit to the PHP world. diff --git a/vendor/monolog/monolog/UPGRADE.md b/vendor/monolog/monolog/UPGRADE.md deleted file mode 100644 index 84e15e6b..00000000 --- a/vendor/monolog/monolog/UPGRADE.md +++ /dev/null @@ -1,72 +0,0 @@ -### 2.0.0 - -- `Monolog\Logger::API` can be used to distinguish between a Monolog `1` and `2` - install of Monolog when writing integration code. - -- Removed non-PSR-3 methods to add records, all the `add*` (e.g. `addWarning`) - methods as well as `emerg`, `crit`, `err` and `warn`. - -- DateTime are now formatted with a timezone and microseconds (unless disabled). - Various formatters and log output might be affected, which may mess with log parsing - in some cases. - -- The `datetime` in every record array is now a DateTimeImmutable, not that you - should have been modifying these anyway. - -- The timezone is now set per Logger instance and not statically, either - via ->setTimezone or passed in the constructor. Calls to Logger::setTimezone - should be converted. - -- `HandlerInterface` has been split off and two new interfaces now exist for - more granular controls: `ProcessableHandlerInterface` and - `FormattableHandlerInterface`. Handlers not extending `AbstractHandler` - should make sure to implement the relevant interfaces. - -- `HandlerInterface` now requires the `close` method to be implemented. This - only impacts you if you implement the interface yourself, but you can extend - the new `Monolog\Handler\Handler` base class too. - -- There is no more default handler configured on empty Logger instances, if - you were relying on that you will not get any output anymore, make sure to - configure the handler you need. - -#### LogglyFormatter - -- The records' `datetime` is not sent anymore. Only `timestamp` is sent to Loggly. - -#### AmqpHandler - -- Log levels are not shortened to 4 characters anymore. e.g. a warning record - will be sent using the `warning.channel` routing key instead of `warn.channel` - as in 1.x. -- The exchange name does not default to 'log' anymore, and it is completely ignored - now for the AMQP extension users. Only PHPAmqpLib uses it if provided. - -#### RotatingFileHandler - -- The file name format must now contain `{date}` and the date format must be set - to one of the predefined FILE_PER_* constants to avoid issues with file rotation. - See `setFilenameFormat`. - -#### LogstashFormatter - -- Removed Logstash V0 support -- Context/extra prefix has been removed in favor of letting users configure the exact key being sent -- Context/extra data are now sent as an object instead of single keys - -#### HipChatHandler - -- Removed deprecated HipChat handler, migrate to Slack and use SlackWebhookHandler or SlackHandler instead - -#### SlackbotHandler - -- Removed deprecated SlackbotHandler handler, use SlackWebhookHandler or SlackHandler instead - -#### RavenHandler - -- Removed deprecated RavenHandler handler, use sentry/sentry 2.x and their Sentry\Monolog\Handler instead - -#### ElasticSearchHandler - -- As support for the official Elasticsearch library was added, the former ElasticSearchHandler has been - renamed to ElasticaHandler and the new one added as ElasticsearchHandler. diff --git a/vendor/monolog/monolog/composer.json b/vendor/monolog/monolog/composer.json deleted file mode 100644 index b9437d6d..00000000 --- a/vendor/monolog/monolog/composer.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "monolog/monolog", - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "keywords": ["log", "logging", "psr-3"], - "homepage": "https://github.com/Seldaek/monolog", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "https://seld.be" - } - ], - "require": { - "php": ">=7.2", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" - }, - "require-dev": { - "ext-json": "*", - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", - "guzzlehttp/guzzle": "^7.4", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5.14", - "predis/predis": "^1.1 || ^2.0", - "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": "^7", - "swiftmailer/swiftmailer": "^5.3|^6.0", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" - }, - "suggest": { - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ext-mbstring": "Allow to work properly with unicode symbols", - "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", - "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", - "ext-openssl": "Required to send log messages using SSL" - }, - "autoload": { - "psr-4": {"Monolog\\": "src/Monolog"} - }, - "autoload-dev": { - "psr-4": {"Monolog\\": "tests/Monolog"} - }, - "provide": { - "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" - }, - "extra": { - "branch-alias": { - "dev-main": "2.x-dev" - } - }, - "scripts": { - "test": "@php vendor/bin/phpunit", - "phpstan": "@php vendor/bin/phpstan analyse" - }, - "config": { - "lock": false, - "sort-packages": true, - "platform-check": false, - "allow-plugins": { - "composer/package-versions-deprecated": true - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php b/vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php deleted file mode 100644 index 188bbb0d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Attribute/AsMonologProcessor.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Attribute; - -/** - * A reusable attribute to help configure a class or a method as a processor. - * - * Using it offers no guarantee: it needs to be leveraged by a Monolog third-party consumer. - * - * Using it with the Monolog library only has no effect at all: processors should still be turned into a callable if - * needed and manually pushed to the loggers and to the processable handlers. - */ -#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] -class AsMonologProcessor -{ - /** @var string|null */ - public $channel = null; - /** @var string|null */ - public $handler = null; - /** @var string|null */ - public $method = null; - - /** - * @param string|null $channel The logging channel the processor should be pushed to. - * @param string|null $handler The handler the processor should be pushed to. - * @param string|null $method The method that processes the records (if the attribute is used at the class level). - */ - public function __construct( - ?string $channel = null, - ?string $handler = null, - ?string $method = null - ) { - $this->channel = $channel; - $this->handler = $handler; - $this->method = $method; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php b/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php deleted file mode 100644 index 6a1ba9b2..00000000 --- a/vendor/monolog/monolog/src/Monolog/DateTimeImmutable.php +++ /dev/null @@ -1,49 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use DateTimeZone; - -/** - * Overrides default json encoding of date time objects - * - * @author Menno Holtkamp - * @author Jordi Boggiano - */ -class DateTimeImmutable extends \DateTimeImmutable implements \JsonSerializable -{ - /** - * @var bool - */ - private $useMicroseconds; - - public function __construct(bool $useMicroseconds, ?DateTimeZone $timezone = null) - { - $this->useMicroseconds = $useMicroseconds; - - parent::__construct('now', $timezone); - } - - public function jsonSerialize(): string - { - if ($this->useMicroseconds) { - return $this->format('Y-m-d\TH:i:s.uP'); - } - - return $this->format('Y-m-d\TH:i:sP'); - } - - public function __toString(): string - { - return $this->jsonSerialize(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php deleted file mode 100644 index 576f1713..00000000 --- a/vendor/monolog/monolog/src/Monolog/ErrorHandler.php +++ /dev/null @@ -1,307 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; - -/** - * Monolog error handler - * - * A facility to enable logging of runtime errors, exceptions and fatal errors. - * - * Quick setup: ErrorHandler::register($logger); - * - * @author Jordi Boggiano - */ -class ErrorHandler -{ - /** @var LoggerInterface */ - private $logger; - - /** @var ?callable */ - private $previousExceptionHandler = null; - /** @var array an array of class name to LogLevel::* constant mapping */ - private $uncaughtExceptionLevelMap = []; - - /** @var callable|true|null */ - private $previousErrorHandler = null; - /** @var array an array of E_* constant to LogLevel::* constant mapping */ - private $errorLevelMap = []; - /** @var bool */ - private $handleOnlyReportedErrors = true; - - /** @var bool */ - private $hasFatalErrorHandler = false; - /** @var LogLevel::* */ - private $fatalLevel = LogLevel::ALERT; - /** @var ?string */ - private $reservedMemory = null; - /** @var ?array{type: int, message: string, file: string, line: int, trace: mixed} */ - private $lastFatalData = null; - /** @var int[] */ - private static $fatalErrors = [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR]; - - public function __construct(LoggerInterface $logger) - { - $this->logger = $logger; - } - - /** - * Registers a new ErrorHandler for a given Logger - * - * By default it will handle errors, exceptions and fatal errors - * - * @param LoggerInterface $logger - * @param array|false $errorLevelMap an array of E_* constant to LogLevel::* constant mapping, or false to disable error handling - * @param array|false $exceptionLevelMap an array of class name to LogLevel::* constant mapping, or false to disable exception handling - * @param LogLevel::*|null|false $fatalLevel a LogLevel::* constant, null to use the default LogLevel::ALERT or false to disable fatal error handling - * @return ErrorHandler - */ - public static function register(LoggerInterface $logger, $errorLevelMap = [], $exceptionLevelMap = [], $fatalLevel = null): self - { - /** @phpstan-ignore-next-line */ - $handler = new static($logger); - if ($errorLevelMap !== false) { - $handler->registerErrorHandler($errorLevelMap); - } - if ($exceptionLevelMap !== false) { - $handler->registerExceptionHandler($exceptionLevelMap); - } - if ($fatalLevel !== false) { - $handler->registerFatalHandler($fatalLevel); - } - - return $handler; - } - - /** - * @param array $levelMap an array of class name to LogLevel::* constant mapping - * @return $this - */ - public function registerExceptionHandler(array $levelMap = [], bool $callPrevious = true): self - { - $prev = set_exception_handler(function (\Throwable $e): void { - $this->handleException($e); - }); - $this->uncaughtExceptionLevelMap = $levelMap; - foreach ($this->defaultExceptionLevelMap() as $class => $level) { - if (!isset($this->uncaughtExceptionLevelMap[$class])) { - $this->uncaughtExceptionLevelMap[$class] = $level; - } - } - if ($callPrevious && $prev) { - $this->previousExceptionHandler = $prev; - } - - return $this; - } - - /** - * @param array $levelMap an array of E_* constant to LogLevel::* constant mapping - * @return $this - */ - public function registerErrorHandler(array $levelMap = [], bool $callPrevious = true, int $errorTypes = -1, bool $handleOnlyReportedErrors = true): self - { - $prev = set_error_handler([$this, 'handleError'], $errorTypes); - $this->errorLevelMap = array_replace($this->defaultErrorLevelMap(), $levelMap); - if ($callPrevious) { - $this->previousErrorHandler = $prev ?: true; - } else { - $this->previousErrorHandler = null; - } - - $this->handleOnlyReportedErrors = $handleOnlyReportedErrors; - - return $this; - } - - /** - * @param LogLevel::*|null $level a LogLevel::* constant, null to use the default LogLevel::ALERT - * @param int $reservedMemorySize Amount of KBs to reserve in memory so that it can be freed when handling fatal errors giving Monolog some room in memory to get its job done - */ - public function registerFatalHandler($level = null, int $reservedMemorySize = 20): self - { - register_shutdown_function([$this, 'handleFatalError']); - - $this->reservedMemory = str_repeat(' ', 1024 * $reservedMemorySize); - $this->fatalLevel = null === $level ? LogLevel::ALERT : $level; - $this->hasFatalErrorHandler = true; - - return $this; - } - - /** - * @return array - */ - protected function defaultExceptionLevelMap(): array - { - return [ - 'ParseError' => LogLevel::CRITICAL, - 'Throwable' => LogLevel::ERROR, - ]; - } - - /** - * @return array - */ - protected function defaultErrorLevelMap(): array - { - return [ - E_ERROR => LogLevel::CRITICAL, - E_WARNING => LogLevel::WARNING, - E_PARSE => LogLevel::ALERT, - E_NOTICE => LogLevel::NOTICE, - E_CORE_ERROR => LogLevel::CRITICAL, - E_CORE_WARNING => LogLevel::WARNING, - E_COMPILE_ERROR => LogLevel::ALERT, - E_COMPILE_WARNING => LogLevel::WARNING, - E_USER_ERROR => LogLevel::ERROR, - E_USER_WARNING => LogLevel::WARNING, - E_USER_NOTICE => LogLevel::NOTICE, - E_STRICT => LogLevel::NOTICE, - E_RECOVERABLE_ERROR => LogLevel::ERROR, - E_DEPRECATED => LogLevel::NOTICE, - E_USER_DEPRECATED => LogLevel::NOTICE, - ]; - } - - /** - * @phpstan-return never - */ - private function handleException(\Throwable $e): void - { - $level = LogLevel::ERROR; - foreach ($this->uncaughtExceptionLevelMap as $class => $candidate) { - if ($e instanceof $class) { - $level = $candidate; - break; - } - } - - $this->logger->log( - $level, - sprintf('Uncaught Exception %s: "%s" at %s line %s', Utils::getClass($e), $e->getMessage(), $e->getFile(), $e->getLine()), - ['exception' => $e] - ); - - if ($this->previousExceptionHandler) { - ($this->previousExceptionHandler)($e); - } - - if (!headers_sent() && !ini_get('display_errors')) { - http_response_code(500); - } - - exit(255); - } - - /** - * @private - * - * @param mixed[] $context - */ - public function handleError(int $code, string $message, string $file = '', int $line = 0, ?array $context = []): bool - { - if ($this->handleOnlyReportedErrors && !(error_reporting() & $code)) { - return false; - } - - // fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries - if (!$this->hasFatalErrorHandler || !in_array($code, self::$fatalErrors, true)) { - $level = $this->errorLevelMap[$code] ?? LogLevel::CRITICAL; - $this->logger->log($level, self::codeToString($code).': '.$message, ['code' => $code, 'message' => $message, 'file' => $file, 'line' => $line]); - } else { - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - array_shift($trace); // Exclude handleError from trace - $this->lastFatalData = ['type' => $code, 'message' => $message, 'file' => $file, 'line' => $line, 'trace' => $trace]; - } - - if ($this->previousErrorHandler === true) { - return false; - } elseif ($this->previousErrorHandler) { - return (bool) ($this->previousErrorHandler)($code, $message, $file, $line, $context); - } - - return true; - } - - /** - * @private - */ - public function handleFatalError(): void - { - $this->reservedMemory = ''; - - if (is_array($this->lastFatalData)) { - $lastError = $this->lastFatalData; - } else { - $lastError = error_get_last(); - } - - if ($lastError && in_array($lastError['type'], self::$fatalErrors, true)) { - $trace = $lastError['trace'] ?? null; - $this->logger->log( - $this->fatalLevel, - 'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'], - ['code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $trace] - ); - - if ($this->logger instanceof Logger) { - foreach ($this->logger->getHandlers() as $handler) { - $handler->close(); - } - } - } - } - - /** - * @param int $code - */ - private static function codeToString($code): string - { - switch ($code) { - case E_ERROR: - return 'E_ERROR'; - case E_WARNING: - return 'E_WARNING'; - case E_PARSE: - return 'E_PARSE'; - case E_NOTICE: - return 'E_NOTICE'; - case E_CORE_ERROR: - return 'E_CORE_ERROR'; - case E_CORE_WARNING: - return 'E_CORE_WARNING'; - case E_COMPILE_ERROR: - return 'E_COMPILE_ERROR'; - case E_COMPILE_WARNING: - return 'E_COMPILE_WARNING'; - case E_USER_ERROR: - return 'E_USER_ERROR'; - case E_USER_WARNING: - return 'E_USER_WARNING'; - case E_USER_NOTICE: - return 'E_USER_NOTICE'; - case E_STRICT: - return 'E_STRICT'; - case E_RECOVERABLE_ERROR: - return 'E_RECOVERABLE_ERROR'; - case E_DEPRECATED: - return 'E_DEPRECATED'; - case E_USER_DEPRECATED: - return 'E_USER_DEPRECATED'; - } - - return 'Unknown PHP error'; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php deleted file mode 100644 index aa1884b9..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -/** - * Formats a log message according to the ChromePHP array format - * - * @author Christophe Coevoet - */ -class ChromePHPFormatter implements FormatterInterface -{ - /** - * Translates Monolog log levels to Wildfire levels. - * - * @var array - */ - private $logLevels = [ - Logger::DEBUG => 'log', - Logger::INFO => 'info', - Logger::NOTICE => 'info', - Logger::WARNING => 'warn', - Logger::ERROR => 'error', - Logger::CRITICAL => 'error', - Logger::ALERT => 'error', - Logger::EMERGENCY => 'error', - ]; - - /** - * {@inheritDoc} - */ - public function format(array $record) - { - // Retrieve the line and file if set and remove them from the formatted extra - $backtrace = 'unknown'; - if (isset($record['extra']['file'], $record['extra']['line'])) { - $backtrace = $record['extra']['file'].' : '.$record['extra']['line']; - unset($record['extra']['file'], $record['extra']['line']); - } - - $message = ['message' => $record['message']]; - if ($record['context']) { - $message['context'] = $record['context']; - } - if ($record['extra']) { - $message['extra'] = $record['extra']; - } - if (count($message) === 1) { - $message = reset($message); - } - - return [ - $record['channel'], - $message, - $backtrace, - $this->logLevels[$record['level']], - ]; - } - - /** - * {@inheritDoc} - */ - public function formatBatch(array $records) - { - $formatted = []; - - foreach ($records as $record) { - $formatted[] = $this->format($record); - } - - return $formatted; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php deleted file mode 100644 index 6c8a9ab5..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Elastica\Document; - -/** - * Format a log message into an Elastica Document - * - * @author Jelle Vink - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class ElasticaFormatter extends NormalizerFormatter -{ - /** - * @var string Elastic search index name - */ - protected $index; - - /** - * @var ?string Elastic search document type - */ - protected $type; - - /** - * @param string $index Elastic Search index name - * @param ?string $type Elastic Search document type, deprecated as of Elastica 7 - */ - public function __construct(string $index, ?string $type) - { - // elasticsearch requires a ISO 8601 format date with optional millisecond precision. - parent::__construct('Y-m-d\TH:i:s.uP'); - - $this->index = $index; - $this->type = $type; - } - - /** - * {@inheritDoc} - */ - public function format(array $record) - { - $record = parent::format($record); - - return $this->getDocument($record); - } - - public function getIndex(): string - { - return $this->index; - } - - /** - * @deprecated since Elastica 7 type has no effect - */ - public function getType(): string - { - /** @phpstan-ignore-next-line */ - return $this->type; - } - - /** - * Convert a log message into an Elastica Document - * - * @phpstan-param Record $record - */ - protected function getDocument(array $record): Document - { - $document = new Document(); - $document->setData($record); - if (method_exists($document, 'setType')) { - /** @phpstan-ignore-next-line */ - $document->setType($this->type); - } - $document->setIndex($this->index); - - return $document; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php deleted file mode 100644 index b792b819..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/ElasticsearchFormatter.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use DateTimeInterface; - -/** - * Format a log message into an Elasticsearch record - * - * @author Avtandil Kikabidze - */ -class ElasticsearchFormatter extends NormalizerFormatter -{ - /** - * @var string Elasticsearch index name - */ - protected $index; - - /** - * @var string Elasticsearch record type - */ - protected $type; - - /** - * @param string $index Elasticsearch index name - * @param string $type Elasticsearch record type - */ - public function __construct(string $index, string $type) - { - // Elasticsearch requires an ISO 8601 format date with optional millisecond precision. - parent::__construct(DateTimeInterface::ISO8601); - - $this->index = $index; - $this->type = $type; - } - - /** - * {@inheritDoc} - */ - public function format(array $record) - { - $record = parent::format($record); - - return $this->getDocument($record); - } - - /** - * Getter index - * - * @return string - */ - public function getIndex(): string - { - return $this->index; - } - - /** - * Getter type - * - * @return string - */ - public function getType(): string - { - return $this->type; - } - - /** - * Convert a log message into an Elasticsearch record - * - * @param mixed[] $record Log message - * @return mixed[] - */ - protected function getDocument(array $record): array - { - $record['_index'] = $this->index; - $record['_type'] = $this->type; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php deleted file mode 100644 index 867ae586..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * formats the record to be used in the FlowdockHandler - * - * @author Dominik Liebler - * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 - */ -class FlowdockFormatter implements FormatterInterface -{ - /** - * @var string - */ - private $source; - - /** - * @var string - */ - private $sourceEmail; - - public function __construct(string $source, string $sourceEmail) - { - $this->source = $source; - $this->sourceEmail = $sourceEmail; - } - - /** - * {@inheritDoc} - * - * @return mixed[] - */ - public function format(array $record): array - { - $tags = [ - '#logs', - '#' . strtolower($record['level_name']), - '#' . $record['channel'], - ]; - - foreach ($record['extra'] as $value) { - $tags[] = '#' . $value; - } - - $subject = sprintf( - 'in %s: %s - %s', - $this->source, - $record['level_name'], - $this->getShortMessage($record['message']) - ); - - $record['flowdock'] = [ - 'source' => $this->source, - 'from_address' => $this->sourceEmail, - 'subject' => $subject, - 'content' => $record['message'], - 'tags' => $tags, - 'project' => $this->source, - ]; - - return $record; - } - - /** - * {@inheritDoc} - * - * @return mixed[][] - */ - public function formatBatch(array $records): array - { - $formatted = []; - - foreach ($records as $record) { - $formatted[] = $this->format($record); - } - - return $formatted; - } - - public function getShortMessage(string $message): string - { - static $hasMbString; - - if (null === $hasMbString) { - $hasMbString = function_exists('mb_strlen'); - } - - $maxLength = 45; - - if ($hasMbString) { - if (mb_strlen($message, 'UTF-8') > $maxLength) { - $message = mb_substr($message, 0, $maxLength - 4, 'UTF-8') . ' ...'; - } - } else { - if (strlen($message) > $maxLength) { - $message = substr($message, 0, $maxLength - 4) . ' ...'; - } - } - - return $message; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php deleted file mode 100644 index 29b14d30..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Utils; - -/** - * Class FluentdFormatter - * - * Serializes a log message to Fluentd unix socket protocol - * - * Fluentd config: - * - * - * type unix - * path /var/run/td-agent/td-agent.sock - * - * - * Monolog setup: - * - * $logger = new Monolog\Logger('fluent.tag'); - * $fluentHandler = new Monolog\Handler\SocketHandler('unix:///var/run/td-agent/td-agent.sock'); - * $fluentHandler->setFormatter(new Monolog\Formatter\FluentdFormatter()); - * $logger->pushHandler($fluentHandler); - * - * @author Andrius Putna - */ -class FluentdFormatter implements FormatterInterface -{ - /** - * @var bool $levelTag should message level be a part of the fluentd tag - */ - protected $levelTag = false; - - public function __construct(bool $levelTag = false) - { - if (!function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s FluentdUnixFormatter'); - } - - $this->levelTag = $levelTag; - } - - public function isUsingLevelsInTag(): bool - { - return $this->levelTag; - } - - public function format(array $record): string - { - $tag = $record['channel']; - if ($this->levelTag) { - $tag .= '.' . strtolower($record['level_name']); - } - - $message = [ - 'message' => $record['message'], - 'context' => $record['context'], - 'extra' => $record['extra'], - ]; - - if (!$this->levelTag) { - $message['level'] = $record['level']; - $message['level_name'] = $record['level_name']; - } - - return Utils::jsonEncode([$tag, $record['datetime']->getTimestamp(), $message]); - } - - public function formatBatch(array $records): string - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php b/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php deleted file mode 100644 index 19617ec5..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php +++ /dev/null @@ -1,42 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Interface for formatters - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - */ -interface FormatterInterface -{ - /** - * Formats a log record. - * - * @param array $record A record to format - * @return mixed The formatted record - * - * @phpstan-param Record $record - */ - public function format(array $record); - - /** - * Formats a set of log records. - * - * @param array $records A set of records to format - * @return mixed The formatted set of records - * - * @phpstan-param Record[] $records - */ - public function formatBatch(array $records); -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php deleted file mode 100644 index 3b3e1e7f..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php +++ /dev/null @@ -1,175 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; -use Gelf\Message; -use Monolog\Utils; - -/** - * Serializes a log message to GELF - * @see http://docs.graylog.org/en/latest/pages/gelf.html - * - * @author Matt Lehner - * - * @phpstan-import-type Level from \Monolog\Logger - */ -class GelfMessageFormatter extends NormalizerFormatter -{ - protected const DEFAULT_MAX_LENGTH = 32766; - - /** - * @var string the name of the system for the Gelf log message - */ - protected $systemName; - - /** - * @var string a prefix for 'extra' fields from the Monolog record (optional) - */ - protected $extraPrefix; - - /** - * @var string a prefix for 'context' fields from the Monolog record (optional) - */ - protected $contextPrefix; - - /** - * @var int max length per field - */ - protected $maxLength; - - /** - * @var int - */ - private $gelfVersion = 2; - - /** - * Translates Monolog log levels to Graylog2 log priorities. - * - * @var array - * - * @phpstan-var array - */ - private $logLevels = [ - Logger::DEBUG => 7, - Logger::INFO => 6, - Logger::NOTICE => 5, - Logger::WARNING => 4, - Logger::ERROR => 3, - Logger::CRITICAL => 2, - Logger::ALERT => 1, - Logger::EMERGENCY => 0, - ]; - - public function __construct(?string $systemName = null, ?string $extraPrefix = null, string $contextPrefix = 'ctxt_', ?int $maxLength = null) - { - if (!class_exists(Message::class)) { - throw new \RuntimeException('Composer package graylog2/gelf-php is required to use Monolog\'s GelfMessageFormatter'); - } - - parent::__construct('U.u'); - - $this->systemName = (is_null($systemName) || $systemName === '') ? (string) gethostname() : $systemName; - - $this->extraPrefix = is_null($extraPrefix) ? '' : $extraPrefix; - $this->contextPrefix = $contextPrefix; - $this->maxLength = is_null($maxLength) ? self::DEFAULT_MAX_LENGTH : $maxLength; - - if (method_exists(Message::class, 'setFacility')) { - $this->gelfVersion = 1; - } - } - - /** - * {@inheritDoc} - */ - public function format(array $record): Message - { - $context = $extra = []; - if (isset($record['context'])) { - /** @var mixed[] $context */ - $context = parent::normalize($record['context']); - } - if (isset($record['extra'])) { - /** @var mixed[] $extra */ - $extra = parent::normalize($record['extra']); - } - - if (!isset($record['datetime'], $record['message'], $record['level'])) { - throw new \InvalidArgumentException('The record should at least contain datetime, message and level keys, '.var_export($record, true).' given'); - } - - $message = new Message(); - $message - ->setTimestamp($record['datetime']) - ->setShortMessage((string) $record['message']) - ->setHost($this->systemName) - ->setLevel($this->logLevels[$record['level']]); - - // message length + system name length + 200 for padding / metadata - $len = 200 + strlen((string) $record['message']) + strlen($this->systemName); - - if ($len > $this->maxLength) { - $message->setShortMessage(Utils::substr($record['message'], 0, $this->maxLength)); - } - - if ($this->gelfVersion === 1) { - if (isset($record['channel'])) { - $message->setFacility($record['channel']); - } - if (isset($extra['line'])) { - $message->setLine($extra['line']); - unset($extra['line']); - } - if (isset($extra['file'])) { - $message->setFile($extra['file']); - unset($extra['file']); - } - } else { - $message->setAdditional('facility', $record['channel']); - } - - foreach ($extra as $key => $val) { - $val = is_scalar($val) || null === $val ? $val : $this->toJson($val); - $len = strlen($this->extraPrefix . $key . $val); - if ($len > $this->maxLength) { - $message->setAdditional($this->extraPrefix . $key, Utils::substr((string) $val, 0, $this->maxLength)); - - continue; - } - $message->setAdditional($this->extraPrefix . $key, $val); - } - - foreach ($context as $key => $val) { - $val = is_scalar($val) || null === $val ? $val : $this->toJson($val); - $len = strlen($this->contextPrefix . $key . $val); - if ($len > $this->maxLength) { - $message->setAdditional($this->contextPrefix . $key, Utils::substr((string) $val, 0, $this->maxLength)); - - continue; - } - $message->setAdditional($this->contextPrefix . $key, $val); - } - - if ($this->gelfVersion === 1) { - /** @phpstan-ignore-next-line */ - if (null === $message->getFile() && isset($context['exception']['file'])) { - if (preg_match("/^(.+):([0-9]+)$/", $context['exception']['file'], $matches)) { - $message->setFile($matches[1]); - $message->setLine($matches[2]); - } - } - } - - return $message; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php deleted file mode 100644 index ca52ebf4..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/GoogleCloudLoggingFormatter.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use DateTimeInterface; -use Monolog\LogRecord; - -/** - * Encodes message information into JSON in a format compatible with Cloud logging. - * - * @see https://cloud.google.com/logging/docs/structured-logging - * @see https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry - * - * @author Luís Cobucci - */ -final class GoogleCloudLoggingFormatter extends JsonFormatter -{ - /** {@inheritdoc} **/ - public function format(array $record): string - { - // Re-key level for GCP logging - $record['severity'] = $record['level_name']; - $record['time'] = $record['datetime']->format(DateTimeInterface::RFC3339_EXTENDED); - - // Remove keys that are not used by GCP - unset($record['level'], $record['level_name'], $record['datetime']); - - return parent::format($record); - } -} - diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php deleted file mode 100644 index 10a4311c..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php +++ /dev/null @@ -1,142 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * Formats incoming records into an HTML table - * - * This is especially useful for html email logging - * - * @author Tiago Brito - */ -class HtmlFormatter extends NormalizerFormatter -{ - /** - * Translates Monolog log levels to html color priorities. - * - * @var array - */ - protected $logLevels = [ - Logger::DEBUG => '#CCCCCC', - Logger::INFO => '#28A745', - Logger::NOTICE => '#17A2B8', - Logger::WARNING => '#FFC107', - Logger::ERROR => '#FD7E14', - Logger::CRITICAL => '#DC3545', - Logger::ALERT => '#821722', - Logger::EMERGENCY => '#000000', - ]; - - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - */ - public function __construct(?string $dateFormat = null) - { - parent::__construct($dateFormat); - } - - /** - * Creates an HTML table row - * - * @param string $th Row header content - * @param string $td Row standard cell content - * @param bool $escapeTd false if td content must not be html escaped - */ - protected function addRow(string $th, string $td = ' ', bool $escapeTd = true): string - { - $th = htmlspecialchars($th, ENT_NOQUOTES, 'UTF-8'); - if ($escapeTd) { - $td = '
'.htmlspecialchars($td, ENT_NOQUOTES, 'UTF-8').'
'; - } - - return "\n$th:\n".$td."\n"; - } - - /** - * Create a HTML h1 tag - * - * @param string $title Text to be in the h1 - * @param int $level Error level - * @return string - */ - protected function addTitle(string $title, int $level): string - { - $title = htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8'); - - return '

'.$title.'

'; - } - - /** - * Formats a log record. - * - * @return string The formatted record - */ - public function format(array $record): string - { - $output = $this->addTitle($record['level_name'], $record['level']); - $output .= ''; - - $output .= $this->addRow('Message', (string) $record['message']); - $output .= $this->addRow('Time', $this->formatDate($record['datetime'])); - $output .= $this->addRow('Channel', $record['channel']); - if ($record['context']) { - $embeddedTable = '
'; - foreach ($record['context'] as $key => $value) { - $embeddedTable .= $this->addRow((string) $key, $this->convertToString($value)); - } - $embeddedTable .= '
'; - $output .= $this->addRow('Context', $embeddedTable, false); - } - if ($record['extra']) { - $embeddedTable = ''; - foreach ($record['extra'] as $key => $value) { - $embeddedTable .= $this->addRow((string) $key, $this->convertToString($value)); - } - $embeddedTable .= '
'; - $output .= $this->addRow('Extra', $embeddedTable, false); - } - - return $output.''; - } - - /** - * Formats a set of log records. - * - * @return string The formatted set of records - */ - public function formatBatch(array $records): string - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } - - /** - * @param mixed $data - */ - protected function convertToString($data): string - { - if (null === $data || is_scalar($data)) { - return (string) $data; - } - - $data = $this->normalize($data); - - return Utils::jsonEncode($data, JSON_PRETTY_PRINT | Utils::DEFAULT_JSON_FLAGS, true); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php deleted file mode 100644 index b737d82e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php +++ /dev/null @@ -1,224 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Throwable; - -/** - * Encodes whatever record data is passed to it as json - * - * This can be useful to log to databases or remote APIs - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class JsonFormatter extends NormalizerFormatter -{ - public const BATCH_MODE_JSON = 1; - public const BATCH_MODE_NEWLINES = 2; - - /** @var self::BATCH_MODE_* */ - protected $batchMode; - /** @var bool */ - protected $appendNewline; - /** @var bool */ - protected $ignoreEmptyContextAndExtra; - /** @var bool */ - protected $includeStacktraces = false; - - /** - * @param self::BATCH_MODE_* $batchMode - */ - public function __construct(int $batchMode = self::BATCH_MODE_JSON, bool $appendNewline = true, bool $ignoreEmptyContextAndExtra = false, bool $includeStacktraces = false) - { - $this->batchMode = $batchMode; - $this->appendNewline = $appendNewline; - $this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra; - $this->includeStacktraces = $includeStacktraces; - - parent::__construct(); - } - - /** - * The batch mode option configures the formatting style for - * multiple records. By default, multiple records will be - * formatted as a JSON-encoded array. However, for - * compatibility with some API endpoints, alternative styles - * are available. - */ - public function getBatchMode(): int - { - return $this->batchMode; - } - - /** - * True if newlines are appended to every formatted record - */ - public function isAppendingNewlines(): bool - { - return $this->appendNewline; - } - - /** - * {@inheritDoc} - */ - public function format(array $record): string - { - $normalized = $this->normalize($record); - - if (isset($normalized['context']) && $normalized['context'] === []) { - if ($this->ignoreEmptyContextAndExtra) { - unset($normalized['context']); - } else { - $normalized['context'] = new \stdClass; - } - } - if (isset($normalized['extra']) && $normalized['extra'] === []) { - if ($this->ignoreEmptyContextAndExtra) { - unset($normalized['extra']); - } else { - $normalized['extra'] = new \stdClass; - } - } - - return $this->toJson($normalized, true) . ($this->appendNewline ? "\n" : ''); - } - - /** - * {@inheritDoc} - */ - public function formatBatch(array $records): string - { - switch ($this->batchMode) { - case static::BATCH_MODE_NEWLINES: - return $this->formatBatchNewlines($records); - - case static::BATCH_MODE_JSON: - default: - return $this->formatBatchJson($records); - } - } - - /** - * @return self - */ - public function includeStacktraces(bool $include = true): self - { - $this->includeStacktraces = $include; - - return $this; - } - - /** - * Return a JSON-encoded array of records. - * - * @phpstan-param Record[] $records - */ - protected function formatBatchJson(array $records): string - { - return $this->toJson($this->normalize($records), true); - } - - /** - * Use new lines to separate records instead of a - * JSON-encoded array. - * - * @phpstan-param Record[] $records - */ - protected function formatBatchNewlines(array $records): string - { - $instance = $this; - - $oldNewline = $this->appendNewline; - $this->appendNewline = false; - array_walk($records, function (&$value, $key) use ($instance) { - $value = $instance->format($value); - }); - $this->appendNewline = $oldNewline; - - return implode("\n", $records); - } - - /** - * Normalizes given $data. - * - * @param mixed $data - * - * @return mixed - */ - protected function normalize($data, int $depth = 0) - { - if ($depth > $this->maxNormalizeDepth) { - return 'Over '.$this->maxNormalizeDepth.' levels deep, aborting normalization'; - } - - if (is_array($data)) { - $normalized = []; - - $count = 1; - foreach ($data as $key => $value) { - if ($count++ > $this->maxNormalizeItemCount) { - $normalized['...'] = 'Over '.$this->maxNormalizeItemCount.' items ('.count($data).' total), aborting normalization'; - break; - } - - $normalized[$key] = $this->normalize($value, $depth + 1); - } - - return $normalized; - } - - if (is_object($data)) { - if ($data instanceof \DateTimeInterface) { - return $this->formatDate($data); - } - - if ($data instanceof Throwable) { - return $this->normalizeException($data, $depth); - } - - // if the object has specific json serializability we want to make sure we skip the __toString treatment below - if ($data instanceof \JsonSerializable) { - return $data; - } - - if (method_exists($data, '__toString')) { - return $data->__toString(); - } - - return $data; - } - - if (is_resource($data)) { - return parent::normalize($data); - } - - return $data; - } - - /** - * Normalizes given exception with or without its own stack trace based on - * `includeStacktraces` property. - * - * {@inheritDoc} - */ - protected function normalizeException(Throwable $e, int $depth = 0): array - { - $data = parent::normalizeException($e, $depth); - if (!$this->includeStacktraces) { - unset($data['trace']); - } - - return $data; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php deleted file mode 100644 index b31b2971..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php +++ /dev/null @@ -1,246 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Utils; - -/** - * Formats incoming records into a one-line string - * - * This is especially useful for logging to files - * - * @author Jordi Boggiano - * @author Christophe Coevoet - */ -class LineFormatter extends NormalizerFormatter -{ - public const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"; - - /** @var string */ - protected $format; - /** @var bool */ - protected $allowInlineLineBreaks; - /** @var bool */ - protected $ignoreEmptyContextAndExtra; - /** @var bool */ - protected $includeStacktraces; - /** @var ?callable */ - protected $stacktracesParser; - - /** - * @param string|null $format The format of the message - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * @param bool $allowInlineLineBreaks Whether to allow inline line breaks in log entries - * @param bool $ignoreEmptyContextAndExtra - */ - public function __construct(?string $format = null, ?string $dateFormat = null, bool $allowInlineLineBreaks = false, bool $ignoreEmptyContextAndExtra = false, bool $includeStacktraces = false) - { - $this->format = $format === null ? static::SIMPLE_FORMAT : $format; - $this->allowInlineLineBreaks = $allowInlineLineBreaks; - $this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra; - $this->includeStacktraces($includeStacktraces); - parent::__construct($dateFormat); - } - - public function includeStacktraces(bool $include = true, ?callable $parser = null): self - { - $this->includeStacktraces = $include; - if ($this->includeStacktraces) { - $this->allowInlineLineBreaks = true; - $this->stacktracesParser = $parser; - } - - return $this; - } - - public function allowInlineLineBreaks(bool $allow = true): self - { - $this->allowInlineLineBreaks = $allow; - - return $this; - } - - public function ignoreEmptyContextAndExtra(bool $ignore = true): self - { - $this->ignoreEmptyContextAndExtra = $ignore; - - return $this; - } - - /** - * {@inheritDoc} - */ - public function format(array $record): string - { - $vars = parent::format($record); - - $output = $this->format; - - foreach ($vars['extra'] as $var => $val) { - if (false !== strpos($output, '%extra.'.$var.'%')) { - $output = str_replace('%extra.'.$var.'%', $this->stringify($val), $output); - unset($vars['extra'][$var]); - } - } - - foreach ($vars['context'] as $var => $val) { - if (false !== strpos($output, '%context.'.$var.'%')) { - $output = str_replace('%context.'.$var.'%', $this->stringify($val), $output); - unset($vars['context'][$var]); - } - } - - if ($this->ignoreEmptyContextAndExtra) { - if (empty($vars['context'])) { - unset($vars['context']); - $output = str_replace('%context%', '', $output); - } - - if (empty($vars['extra'])) { - unset($vars['extra']); - $output = str_replace('%extra%', '', $output); - } - } - - foreach ($vars as $var => $val) { - if (false !== strpos($output, '%'.$var.'%')) { - $output = str_replace('%'.$var.'%', $this->stringify($val), $output); - } - } - - // remove leftover %extra.xxx% and %context.xxx% if any - if (false !== strpos($output, '%')) { - $output = preg_replace('/%(?:extra|context)\..+?%/', '', $output); - if (null === $output) { - $pcreErrorCode = preg_last_error(); - throw new \RuntimeException('Failed to run preg_replace: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); - } - } - - return $output; - } - - public function formatBatch(array $records): string - { - $message = ''; - foreach ($records as $record) { - $message .= $this->format($record); - } - - return $message; - } - - /** - * @param mixed $value - */ - public function stringify($value): string - { - return $this->replaceNewlines($this->convertToString($value)); - } - - protected function normalizeException(\Throwable $e, int $depth = 0): string - { - $str = $this->formatException($e); - - if ($previous = $e->getPrevious()) { - do { - $depth++; - if ($depth > $this->maxNormalizeDepth) { - $str .= '\n[previous exception] Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; - break; - } - - $str .= "\n[previous exception] " . $this->formatException($previous); - } while ($previous = $previous->getPrevious()); - } - - return $str; - } - - /** - * @param mixed $data - */ - protected function convertToString($data): string - { - if (null === $data || is_bool($data)) { - return var_export($data, true); - } - - if (is_scalar($data)) { - return (string) $data; - } - - return $this->toJson($data, true); - } - - protected function replaceNewlines(string $str): string - { - if ($this->allowInlineLineBreaks) { - if (0 === strpos($str, '{')) { - $str = preg_replace('/(?getCode(); - if ($e instanceof \SoapFault) { - if (isset($e->faultcode)) { - $str .= ' faultcode: ' . $e->faultcode; - } - - if (isset($e->faultactor)) { - $str .= ' faultactor: ' . $e->faultactor; - } - - if (isset($e->detail)) { - if (is_string($e->detail)) { - $str .= ' detail: ' . $e->detail; - } elseif (is_object($e->detail) || is_array($e->detail)) { - $str .= ' detail: ' . $this->toJson($e->detail, true); - } - } - } - $str .= '): ' . $e->getMessage() . ' at ' . $e->getFile() . ':' . $e->getLine() . ')'; - - if ($this->includeStacktraces) { - $str .= $this->stacktracesParser($e); - } - - return $str; - } - - private function stacktracesParser(\Throwable $e): string - { - $trace = $e->getTraceAsString(); - - if ($this->stacktracesParser) { - $trace = $this->stacktracesParserCustom($trace); - } - - return "\n[stacktrace]\n" . $trace . "\n"; - } - - private function stacktracesParserCustom(string $trace): string - { - return implode("\n", array_filter(array_map($this->stacktracesParser, explode("\n", $trace)))); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php deleted file mode 100644 index 29841aa3..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php +++ /dev/null @@ -1,45 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Encodes message information into JSON in a format compatible with Loggly. - * - * @author Adam Pancutt - */ -class LogglyFormatter extends JsonFormatter -{ - /** - * Overrides the default batch mode to new lines for compatibility with the - * Loggly bulk API. - */ - public function __construct(int $batchMode = self::BATCH_MODE_NEWLINES, bool $appendNewline = false) - { - parent::__construct($batchMode, $appendNewline); - } - - /** - * Appends the 'timestamp' parameter for indexing by Loggly. - * - * @see https://www.loggly.com/docs/automated-parsing/#json - * @see \Monolog\Formatter\JsonFormatter::format() - */ - public function format(array $record): string - { - if (isset($record["datetime"]) && ($record["datetime"] instanceof \DateTimeInterface)) { - $record["timestamp"] = $record["datetime"]->format("Y-m-d\TH:i:s.uO"); - unset($record["datetime"]); - } - - return parent::format($record); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php deleted file mode 100644 index b0451aba..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/LogmaticFormatter.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Encodes message information into JSON in a format compatible with Logmatic. - * - * @author Julien Breux - */ -class LogmaticFormatter extends JsonFormatter -{ - protected const MARKERS = ["sourcecode", "php"]; - - /** - * @var string - */ - protected $hostname = ''; - - /** - * @var string - */ - protected $appname = ''; - - public function setHostname(string $hostname): self - { - $this->hostname = $hostname; - - return $this; - } - - public function setAppname(string $appname): self - { - $this->appname = $appname; - - return $this; - } - - /** - * Appends the 'hostname' and 'appname' parameter for indexing by Logmatic. - * - * @see http://doc.logmatic.io/docs/basics-to-send-data - * @see \Monolog\Formatter\JsonFormatter::format() - */ - public function format(array $record): string - { - if (!empty($this->hostname)) { - $record["hostname"] = $this->hostname; - } - if (!empty($this->appname)) { - $record["appname"] = $this->appname; - } - - $record["@marker"] = static::MARKERS; - - return parent::format($record); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php deleted file mode 100644 index f8de0d33..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Serializes a log message to Logstash Event Format - * - * @see https://www.elastic.co/products/logstash - * @see https://github.com/elastic/logstash/blob/master/logstash-core/src/main/java/org/logstash/Event.java - * - * @author Tim Mower - */ -class LogstashFormatter extends NormalizerFormatter -{ - /** - * @var string the name of the system for the Logstash log message, used to fill the @source field - */ - protected $systemName; - - /** - * @var string an application name for the Logstash log message, used to fill the @type field - */ - protected $applicationName; - - /** - * @var string the key for 'extra' fields from the Monolog record - */ - protected $extraKey; - - /** - * @var string the key for 'context' fields from the Monolog record - */ - protected $contextKey; - - /** - * @param string $applicationName The application that sends the data, used as the "type" field of logstash - * @param string|null $systemName The system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine - * @param string $extraKey The key for extra keys inside logstash "fields", defaults to extra - * @param string $contextKey The key for context keys inside logstash "fields", defaults to context - */ - public function __construct(string $applicationName, ?string $systemName = null, string $extraKey = 'extra', string $contextKey = 'context') - { - // logstash requires a ISO 8601 format date with optional millisecond precision. - parent::__construct('Y-m-d\TH:i:s.uP'); - - $this->systemName = $systemName === null ? (string) gethostname() : $systemName; - $this->applicationName = $applicationName; - $this->extraKey = $extraKey; - $this->contextKey = $contextKey; - } - - /** - * {@inheritDoc} - */ - public function format(array $record): string - { - $record = parent::format($record); - - if (empty($record['datetime'])) { - $record['datetime'] = gmdate('c'); - } - $message = [ - '@timestamp' => $record['datetime'], - '@version' => 1, - 'host' => $this->systemName, - ]; - if (isset($record['message'])) { - $message['message'] = $record['message']; - } - if (isset($record['channel'])) { - $message['type'] = $record['channel']; - $message['channel'] = $record['channel']; - } - if (isset($record['level_name'])) { - $message['level'] = $record['level_name']; - } - if (isset($record['level'])) { - $message['monolog_level'] = $record['level']; - } - if ($this->applicationName) { - $message['type'] = $this->applicationName; - } - if (!empty($record['extra'])) { - $message[$this->extraKey] = $record['extra']; - } - if (!empty($record['context'])) { - $message[$this->contextKey] = $record['context']; - } - - return $this->toJson($message) . "\n"; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php deleted file mode 100644 index fca69a89..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php +++ /dev/null @@ -1,162 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use MongoDB\BSON\Type; -use MongoDB\BSON\UTCDateTime; -use Monolog\Utils; - -/** - * Formats a record for use with the MongoDBHandler. - * - * @author Florian Plattner - */ -class MongoDBFormatter implements FormatterInterface -{ - /** @var bool */ - private $exceptionTraceAsString; - /** @var int */ - private $maxNestingLevel; - /** @var bool */ - private $isLegacyMongoExt; - - /** - * @param int $maxNestingLevel 0 means infinite nesting, the $record itself is level 1, $record['context'] is 2 - * @param bool $exceptionTraceAsString set to false to log exception traces as a sub documents instead of strings - */ - public function __construct(int $maxNestingLevel = 3, bool $exceptionTraceAsString = true) - { - $this->maxNestingLevel = max($maxNestingLevel, 0); - $this->exceptionTraceAsString = $exceptionTraceAsString; - - $this->isLegacyMongoExt = extension_loaded('mongodb') && version_compare((string) phpversion('mongodb'), '1.1.9', '<='); - } - - /** - * {@inheritDoc} - * - * @return mixed[] - */ - public function format(array $record): array - { - /** @var mixed[] $res */ - $res = $this->formatArray($record); - - return $res; - } - - /** - * {@inheritDoc} - * - * @return array - */ - public function formatBatch(array $records): array - { - $formatted = []; - foreach ($records as $key => $record) { - $formatted[$key] = $this->format($record); - } - - return $formatted; - } - - /** - * @param mixed[] $array - * @return mixed[]|string Array except when max nesting level is reached then a string "[...]" - */ - protected function formatArray(array $array, int $nestingLevel = 0) - { - if ($this->maxNestingLevel > 0 && $nestingLevel > $this->maxNestingLevel) { - return '[...]'; - } - - foreach ($array as $name => $value) { - if ($value instanceof \DateTimeInterface) { - $array[$name] = $this->formatDate($value, $nestingLevel + 1); - } elseif ($value instanceof \Throwable) { - $array[$name] = $this->formatException($value, $nestingLevel + 1); - } elseif (is_array($value)) { - $array[$name] = $this->formatArray($value, $nestingLevel + 1); - } elseif (is_object($value) && !$value instanceof Type) { - $array[$name] = $this->formatObject($value, $nestingLevel + 1); - } - } - - return $array; - } - - /** - * @param mixed $value - * @return mixed[]|string - */ - protected function formatObject($value, int $nestingLevel) - { - $objectVars = get_object_vars($value); - $objectVars['class'] = Utils::getClass($value); - - return $this->formatArray($objectVars, $nestingLevel); - } - - /** - * @return mixed[]|string - */ - protected function formatException(\Throwable $exception, int $nestingLevel) - { - $formattedException = [ - 'class' => Utils::getClass($exception), - 'message' => $exception->getMessage(), - 'code' => (int) $exception->getCode(), - 'file' => $exception->getFile() . ':' . $exception->getLine(), - ]; - - if ($this->exceptionTraceAsString === true) { - $formattedException['trace'] = $exception->getTraceAsString(); - } else { - $formattedException['trace'] = $exception->getTrace(); - } - - return $this->formatArray($formattedException, $nestingLevel); - } - - protected function formatDate(\DateTimeInterface $value, int $nestingLevel): UTCDateTime - { - if ($this->isLegacyMongoExt) { - return $this->legacyGetMongoDbDateTime($value); - } - - return $this->getMongoDbDateTime($value); - } - - private function getMongoDbDateTime(\DateTimeInterface $value): UTCDateTime - { - return new UTCDateTime((int) floor(((float) $value->format('U.u')) * 1000)); - } - - /** - * This is needed to support MongoDB Driver v1.19 and below - * - * See https://github.com/mongodb/mongo-php-driver/issues/426 - * - * It can probably be removed in 2.1 or later once MongoDB's 1.2 is released and widely adopted - */ - private function legacyGetMongoDbDateTime(\DateTimeInterface $value): UTCDateTime - { - $milliseconds = floor(((float) $value->format('U.u')) * 1000); - - $milliseconds = (PHP_INT_SIZE == 8) //64-bit OS? - ? (int) $milliseconds - : (string) $milliseconds; - - // @phpstan-ignore-next-line - return new UTCDateTime($milliseconds); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php deleted file mode 100644 index 5441bc0a..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php +++ /dev/null @@ -1,287 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\DateTimeImmutable; -use Monolog\Utils; -use Throwable; - -/** - * Normalizes incoming records to remove objects/resources so it's easier to dump to various targets - * - * @author Jordi Boggiano - */ -class NormalizerFormatter implements FormatterInterface -{ - public const SIMPLE_DATE = "Y-m-d\TH:i:sP"; - - /** @var string */ - protected $dateFormat; - /** @var int */ - protected $maxNormalizeDepth = 9; - /** @var int */ - protected $maxNormalizeItemCount = 1000; - - /** @var int */ - private $jsonEncodeOptions = Utils::DEFAULT_JSON_FLAGS; - - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - */ - public function __construct(?string $dateFormat = null) - { - $this->dateFormat = null === $dateFormat ? static::SIMPLE_DATE : $dateFormat; - if (!function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s NormalizerFormatter'); - } - } - - /** - * {@inheritDoc} - * - * @param mixed[] $record - */ - public function format(array $record) - { - return $this->normalize($record); - } - - /** - * {@inheritDoc} - */ - public function formatBatch(array $records) - { - foreach ($records as $key => $record) { - $records[$key] = $this->format($record); - } - - return $records; - } - - public function getDateFormat(): string - { - return $this->dateFormat; - } - - public function setDateFormat(string $dateFormat): self - { - $this->dateFormat = $dateFormat; - - return $this; - } - - /** - * The maximum number of normalization levels to go through - */ - public function getMaxNormalizeDepth(): int - { - return $this->maxNormalizeDepth; - } - - public function setMaxNormalizeDepth(int $maxNormalizeDepth): self - { - $this->maxNormalizeDepth = $maxNormalizeDepth; - - return $this; - } - - /** - * The maximum number of items to normalize per level - */ - public function getMaxNormalizeItemCount(): int - { - return $this->maxNormalizeItemCount; - } - - public function setMaxNormalizeItemCount(int $maxNormalizeItemCount): self - { - $this->maxNormalizeItemCount = $maxNormalizeItemCount; - - return $this; - } - - /** - * Enables `json_encode` pretty print. - */ - public function setJsonPrettyPrint(bool $enable): self - { - if ($enable) { - $this->jsonEncodeOptions |= JSON_PRETTY_PRINT; - } else { - $this->jsonEncodeOptions &= ~JSON_PRETTY_PRINT; - } - - return $this; - } - - /** - * @param mixed $data - * @return null|scalar|array - */ - protected function normalize($data, int $depth = 0) - { - if ($depth > $this->maxNormalizeDepth) { - return 'Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization'; - } - - if (null === $data || is_scalar($data)) { - if (is_float($data)) { - if (is_infinite($data)) { - return ($data > 0 ? '' : '-') . 'INF'; - } - if (is_nan($data)) { - return 'NaN'; - } - } - - return $data; - } - - if (is_array($data)) { - $normalized = []; - - $count = 1; - foreach ($data as $key => $value) { - if ($count++ > $this->maxNormalizeItemCount) { - $normalized['...'] = 'Over ' . $this->maxNormalizeItemCount . ' items ('.count($data).' total), aborting normalization'; - break; - } - - $normalized[$key] = $this->normalize($value, $depth + 1); - } - - return $normalized; - } - - if ($data instanceof \DateTimeInterface) { - return $this->formatDate($data); - } - - if (is_object($data)) { - if ($data instanceof Throwable) { - return $this->normalizeException($data, $depth); - } - - if ($data instanceof \JsonSerializable) { - /** @var null|scalar|array $value */ - $value = $data->jsonSerialize(); - } elseif (method_exists($data, '__toString')) { - /** @var string $value */ - $value = $data->__toString(); - } else { - // the rest is normalized by json encoding and decoding it - /** @var null|scalar|array $value */ - $value = json_decode($this->toJson($data, true), true); - } - - return [Utils::getClass($data) => $value]; - } - - if (is_resource($data)) { - return sprintf('[resource(%s)]', get_resource_type($data)); - } - - return '[unknown('.gettype($data).')]'; - } - - /** - * @return mixed[] - */ - protected function normalizeException(Throwable $e, int $depth = 0) - { - if ($depth > $this->maxNormalizeDepth) { - return ['Over ' . $this->maxNormalizeDepth . ' levels deep, aborting normalization']; - } - - if ($e instanceof \JsonSerializable) { - return (array) $e->jsonSerialize(); - } - - $data = [ - 'class' => Utils::getClass($e), - 'message' => $e->getMessage(), - 'code' => (int) $e->getCode(), - 'file' => $e->getFile().':'.$e->getLine(), - ]; - - if ($e instanceof \SoapFault) { - if (isset($e->faultcode)) { - $data['faultcode'] = $e->faultcode; - } - - if (isset($e->faultactor)) { - $data['faultactor'] = $e->faultactor; - } - - if (isset($e->detail)) { - if (is_string($e->detail)) { - $data['detail'] = $e->detail; - } elseif (is_object($e->detail) || is_array($e->detail)) { - $data['detail'] = $this->toJson($e->detail, true); - } - } - } - - $trace = $e->getTrace(); - foreach ($trace as $frame) { - if (isset($frame['file'])) { - $data['trace'][] = $frame['file'].':'.$frame['line']; - } - } - - if ($previous = $e->getPrevious()) { - $data['previous'] = $this->normalizeException($previous, $depth + 1); - } - - return $data; - } - - /** - * Return the JSON representation of a value - * - * @param mixed $data - * @throws \RuntimeException if encoding fails and errors are not ignored - * @return string if encoding fails and ignoreErrors is true 'null' is returned - */ - protected function toJson($data, bool $ignoreErrors = false): string - { - return Utils::jsonEncode($data, $this->jsonEncodeOptions, $ignoreErrors); - } - - /** - * @return string - */ - protected function formatDate(\DateTimeInterface $date) - { - // in case the date format isn't custom then we defer to the custom DateTimeImmutable - // formatting logic, which will pick the right format based on whether useMicroseconds is on - if ($this->dateFormat === self::SIMPLE_DATE && $date instanceof DateTimeImmutable) { - return (string) $date; - } - - return $date->format($this->dateFormat); - } - - public function addJsonEncodeOption(int $option): self - { - $this->jsonEncodeOptions |= $option; - - return $this; - } - - public function removeJsonEncodeOption(int $option): self - { - $this->jsonEncodeOptions &= ~$option; - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php deleted file mode 100644 index 187bc550..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -/** - * Formats data into an associative array of scalar values. - * Objects and arrays will be JSON encoded. - * - * @author Andrew Lawson - */ -class ScalarFormatter extends NormalizerFormatter -{ - /** - * {@inheritDoc} - * - * @phpstan-return array $record - */ - public function format(array $record): array - { - $result = []; - foreach ($record as $key => $value) { - $result[$key] = $this->normalizeValue($value); - } - - return $result; - } - - /** - * @param mixed $value - * @return scalar|null - */ - protected function normalizeValue($value) - { - $normalized = $this->normalize($value); - - if (is_array($normalized)) { - return $this->toJson($normalized, true); - } - - return $normalized; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php deleted file mode 100644 index 6539b347..00000000 --- a/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php +++ /dev/null @@ -1,139 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Formatter; - -use Monolog\Logger; - -/** - * Serializes a log message according to Wildfire's header requirements - * - * @author Eric Clemmons (@ericclemmons) - * @author Christophe Coevoet - * @author Kirill chEbba Chebunin - * - * @phpstan-import-type Level from \Monolog\Logger - */ -class WildfireFormatter extends NormalizerFormatter -{ - /** - * Translates Monolog log levels to Wildfire levels. - * - * @var array - */ - private $logLevels = [ - Logger::DEBUG => 'LOG', - Logger::INFO => 'INFO', - Logger::NOTICE => 'INFO', - Logger::WARNING => 'WARN', - Logger::ERROR => 'ERROR', - Logger::CRITICAL => 'ERROR', - Logger::ALERT => 'ERROR', - Logger::EMERGENCY => 'ERROR', - ]; - - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - */ - public function __construct(?string $dateFormat = null) - { - parent::__construct($dateFormat); - - // http headers do not like non-ISO-8559-1 characters - $this->removeJsonEncodeOption(JSON_UNESCAPED_UNICODE); - } - - /** - * {@inheritDoc} - * - * @return string - */ - public function format(array $record): string - { - // Retrieve the line and file if set and remove them from the formatted extra - $file = $line = ''; - if (isset($record['extra']['file'])) { - $file = $record['extra']['file']; - unset($record['extra']['file']); - } - if (isset($record['extra']['line'])) { - $line = $record['extra']['line']; - unset($record['extra']['line']); - } - - /** @var mixed[] $record */ - $record = $this->normalize($record); - $message = ['message' => $record['message']]; - $handleError = false; - if ($record['context']) { - $message['context'] = $record['context']; - $handleError = true; - } - if ($record['extra']) { - $message['extra'] = $record['extra']; - $handleError = true; - } - if (count($message) === 1) { - $message = reset($message); - } - - if (isset($record['context']['table'])) { - $type = 'TABLE'; - $label = $record['channel'] .': '. $record['message']; - $message = $record['context']['table']; - } else { - $type = $this->logLevels[$record['level']]; - $label = $record['channel']; - } - - // Create JSON object describing the appearance of the message in the console - $json = $this->toJson([ - [ - 'Type' => $type, - 'File' => $file, - 'Line' => $line, - 'Label' => $label, - ], - $message, - ], $handleError); - - // The message itself is a serialization of the above JSON object + it's length - return sprintf( - '%d|%s|', - strlen($json), - $json - ); - } - - /** - * {@inheritDoc} - * - * @phpstan-return never - */ - public function formatBatch(array $records) - { - throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter'); - } - - /** - * {@inheritDoc} - * - * @return null|scalar|array|object - */ - protected function normalize($data, int $depth = 0) - { - if (is_object($data) && !$data instanceof \DateTimeInterface) { - return $data; - } - - return parent::normalize($data, $depth); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php deleted file mode 100644 index a5cdaa71..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php +++ /dev/null @@ -1,112 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\ResettableInterface; -use Psr\Log\LogLevel; - -/** - * Base Handler class providing basic level/bubble support - * - * @author Jordi Boggiano - * - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -abstract class AbstractHandler extends Handler implements ResettableInterface -{ - /** - * @var int - * @phpstan-var Level - */ - protected $level = Logger::DEBUG; - /** @var bool */ - protected $bubble = true; - - /** - * @param int|string $level The minimum logging level at which this handler will be triggered - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function __construct($level = Logger::DEBUG, bool $bubble = true) - { - $this->setLevel($level); - $this->bubble = $bubble; - } - - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - return $record['level'] >= $this->level; - } - - /** - * Sets minimum logging level at which this handler will be triggered. - * - * @param Level|LevelName|LogLevel::* $level Level or level name - * @return self - */ - public function setLevel($level): self - { - $this->level = Logger::toMonologLevel($level); - - return $this; - } - - /** - * Gets minimum logging level at which this handler will be triggered. - * - * @return int - * - * @phpstan-return Level - */ - public function getLevel(): int - { - return $this->level; - } - - /** - * Sets the bubbling behavior. - * - * @param bool $bubble true means that this handler allows bubbling. - * false means that bubbling is not permitted. - * @return self - */ - public function setBubble(bool $bubble): self - { - $this->bubble = $bubble; - - return $this; - } - - /** - * Gets the bubbling behavior. - * - * @return bool true means that this handler allows bubbling. - * false means that bubbling is not permitted. - */ - public function getBubble(): bool - { - return $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function reset() - { - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php deleted file mode 100644 index 77e533fc..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Base Handler class providing the Handler structure, including processors and formatters - * - * Classes extending it should (in most cases) only implement write($record) - * - * @author Jordi Boggiano - * @author Christophe Coevoet - * - * @phpstan-import-type LevelName from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-type FormattedRecord array{message: string, context: mixed[], level: Level, level_name: LevelName, channel: string, datetime: \DateTimeImmutable, extra: mixed[], formatted: mixed} - */ -abstract class AbstractProcessingHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - use FormattableHandlerTrait; - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if (!$this->isHandling($record)) { - return false; - } - - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - $record['formatted'] = $this->getFormatter()->format($record); - - $this->write($record); - - return false === $this->bubble; - } - - /** - * Writes the record down to the log of the implementing handler - * - * @phpstan-param FormattedRecord $record - */ - abstract protected function write(array $record): void; - - /** - * @return void - */ - public function reset() - { - parent::reset(); - - $this->resetProcessors(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php deleted file mode 100644 index 5e5ad1c1..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; - -/** - * Common syslog functionality - * - * @phpstan-import-type Level from \Monolog\Logger - */ -abstract class AbstractSyslogHandler extends AbstractProcessingHandler -{ - /** @var int */ - protected $facility; - - /** - * Translates Monolog log levels to syslog log priorities. - * @var array - * @phpstan-var array - */ - protected $logLevels = [ - Logger::DEBUG => LOG_DEBUG, - Logger::INFO => LOG_INFO, - Logger::NOTICE => LOG_NOTICE, - Logger::WARNING => LOG_WARNING, - Logger::ERROR => LOG_ERR, - Logger::CRITICAL => LOG_CRIT, - Logger::ALERT => LOG_ALERT, - Logger::EMERGENCY => LOG_EMERG, - ]; - - /** - * List of valid log facility names. - * @var array - */ - protected $facilities = [ - 'auth' => LOG_AUTH, - 'authpriv' => LOG_AUTHPRIV, - 'cron' => LOG_CRON, - 'daemon' => LOG_DAEMON, - 'kern' => LOG_KERN, - 'lpr' => LOG_LPR, - 'mail' => LOG_MAIL, - 'news' => LOG_NEWS, - 'syslog' => LOG_SYSLOG, - 'user' => LOG_USER, - 'uucp' => LOG_UUCP, - ]; - - /** - * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant - */ - public function __construct($facility = LOG_USER, $level = Logger::DEBUG, bool $bubble = true) - { - parent::__construct($level, $bubble); - - if (!defined('PHP_WINDOWS_VERSION_BUILD')) { - $this->facilities['local0'] = LOG_LOCAL0; - $this->facilities['local1'] = LOG_LOCAL1; - $this->facilities['local2'] = LOG_LOCAL2; - $this->facilities['local3'] = LOG_LOCAL3; - $this->facilities['local4'] = LOG_LOCAL4; - $this->facilities['local5'] = LOG_LOCAL5; - $this->facilities['local6'] = LOG_LOCAL6; - $this->facilities['local7'] = LOG_LOCAL7; - } else { - $this->facilities['local0'] = 128; // LOG_LOCAL0 - $this->facilities['local1'] = 136; // LOG_LOCAL1 - $this->facilities['local2'] = 144; // LOG_LOCAL2 - $this->facilities['local3'] = 152; // LOG_LOCAL3 - $this->facilities['local4'] = 160; // LOG_LOCAL4 - $this->facilities['local5'] = 168; // LOG_LOCAL5 - $this->facilities['local6'] = 176; // LOG_LOCAL6 - $this->facilities['local7'] = 184; // LOG_LOCAL7 - } - - // convert textual description of facility to syslog constant - if (is_string($facility) && array_key_exists(strtolower($facility), $this->facilities)) { - $facility = $this->facilities[strtolower($facility)]; - } elseif (!in_array($facility, array_values($this->facilities), true)) { - throw new \UnexpectedValueException('Unknown facility value "'.$facility.'" given'); - } - - $this->facility = $facility; - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('%channel%.%level_name%: %message% %context% %extra%'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php deleted file mode 100644 index 994872ce..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php +++ /dev/null @@ -1,171 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\JsonFormatter; -use PhpAmqpLib\Message\AMQPMessage; -use PhpAmqpLib\Channel\AMQPChannel; -use AMQPExchange; - -/** - * @phpstan-import-type Record from \Monolog\Logger - */ -class AmqpHandler extends AbstractProcessingHandler -{ - /** - * @var AMQPExchange|AMQPChannel $exchange - */ - protected $exchange; - /** @var array */ - private $extraAttributes = []; - - /** - * @return array - */ - public function getExtraAttributes(): array - { - return $this->extraAttributes; - } - - /** - * Configure extra attributes to pass to the AMQPExchange (if you are using the amqp extension) - * - * @param array $extraAttributes One of content_type, content_encoding, - * message_id, user_id, app_id, delivery_mode, - * priority, timestamp, expiration, type - * or reply_to, headers. - * @return AmqpHandler - */ - public function setExtraAttributes(array $extraAttributes): self - { - $this->extraAttributes = $extraAttributes; - return $this; - } - - /** - * @var string - */ - protected $exchangeName; - - /** - * @param AMQPExchange|AMQPChannel $exchange AMQPExchange (php AMQP ext) or PHP AMQP lib channel, ready for use - * @param string|null $exchangeName Optional exchange name, for AMQPChannel (PhpAmqpLib) only - */ - public function __construct($exchange, ?string $exchangeName = null, $level = Logger::DEBUG, bool $bubble = true) - { - if ($exchange instanceof AMQPChannel) { - $this->exchangeName = (string) $exchangeName; - } elseif (!$exchange instanceof AMQPExchange) { - throw new \InvalidArgumentException('PhpAmqpLib\Channel\AMQPChannel or AMQPExchange instance required'); - } elseif ($exchangeName) { - @trigger_error('The $exchangeName parameter can only be passed when using PhpAmqpLib, if using an AMQPExchange instance configure it beforehand', E_USER_DEPRECATED); - } - $this->exchange = $exchange; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $data = $record["formatted"]; - $routingKey = $this->getRoutingKey($record); - - if ($this->exchange instanceof AMQPExchange) { - $attributes = [ - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ]; - if ($this->extraAttributes) { - $attributes = array_merge($attributes, $this->extraAttributes); - } - $this->exchange->publish( - $data, - $routingKey, - 0, - $attributes - ); - } else { - $this->exchange->basic_publish( - $this->createAmqpMessage($data), - $this->exchangeName, - $routingKey - ); - } - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - if ($this->exchange instanceof AMQPExchange) { - parent::handleBatch($records); - - return; - } - - foreach ($records as $record) { - if (!$this->isHandling($record)) { - continue; - } - - /** @var Record $record */ - $record = $this->processRecord($record); - $data = $this->getFormatter()->format($record); - - $this->exchange->batch_basic_publish( - $this->createAmqpMessage($data), - $this->exchangeName, - $this->getRoutingKey($record) - ); - } - - $this->exchange->publish_batch(); - } - - /** - * Gets the routing key for the AMQP exchange - * - * @phpstan-param Record $record - */ - protected function getRoutingKey(array $record): string - { - $routingKey = sprintf('%s.%s', $record['level_name'], $record['channel']); - - return strtolower($routingKey); - } - - private function createAmqpMessage(string $data): AMQPMessage - { - $attributes = [ - 'delivery_mode' => 2, - 'content_type' => 'application/json', - ]; - if ($this->extraAttributes) { - $attributes = array_merge($attributes, $this->extraAttributes); - } - return new AMQPMessage($data, $attributes); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php deleted file mode 100644 index 95bbfed4..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php +++ /dev/null @@ -1,308 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Monolog\Utils; -use Monolog\Logger; - -use function count; -use function headers_list; -use function stripos; -use function trigger_error; - -use const E_USER_DEPRECATED; - -/** - * Handler sending logs to browser's javascript console with no browser extension required - * - * @author Olivier Poitrey - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class BrowserConsoleHandler extends AbstractProcessingHandler -{ - /** @var bool */ - protected static $initialized = false; - /** @var FormattedRecord[] */ - protected static $records = []; - - protected const FORMAT_HTML = 'html'; - protected const FORMAT_JS = 'js'; - protected const FORMAT_UNKNOWN = 'unknown'; - - /** - * {@inheritDoc} - * - * Formatted output may contain some formatting markers to be transferred to `console.log` using the %c format. - * - * Example of formatted string: - * - * You can do [[blue text]]{color: blue} or [[green background]]{background-color: green; color: white} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('[[%channel%]]{macro: autolabel} [[%level_name%]]{font-weight: bold} %message%'); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - // Accumulate records - static::$records[] = $record; - - // Register shutdown handler if not already done - if (!static::$initialized) { - static::$initialized = true; - $this->registerShutdownFunction(); - } - } - - /** - * Convert records to javascript console commands and send it to the browser. - * This method is automatically called on PHP shutdown if output is HTML or Javascript. - */ - public static function send(): void - { - $format = static::getResponseFormat(); - if ($format === self::FORMAT_UNKNOWN) { - return; - } - - if (count(static::$records)) { - if ($format === self::FORMAT_HTML) { - static::writeOutput(''); - } elseif ($format === self::FORMAT_JS) { - static::writeOutput(static::generateScript()); - } - static::resetStatic(); - } - } - - public function close(): void - { - self::resetStatic(); - } - - public function reset() - { - parent::reset(); - - self::resetStatic(); - } - - /** - * Forget all logged records - */ - public static function resetStatic(): void - { - static::$records = []; - } - - /** - * Wrapper for register_shutdown_function to allow overriding - */ - protected function registerShutdownFunction(): void - { - if (PHP_SAPI !== 'cli') { - register_shutdown_function(['Monolog\Handler\BrowserConsoleHandler', 'send']); - } - } - - /** - * Wrapper for echo to allow overriding - */ - protected static function writeOutput(string $str): void - { - echo $str; - } - - /** - * Checks the format of the response - * - * If Content-Type is set to application/javascript or text/javascript -> js - * If Content-Type is set to text/html, or is unset -> html - * If Content-Type is anything else -> unknown - * - * @return string One of 'js', 'html' or 'unknown' - * @phpstan-return self::FORMAT_* - */ - protected static function getResponseFormat(): string - { - // Check content type - foreach (headers_list() as $header) { - if (stripos($header, 'content-type:') === 0) { - return static::getResponseFormatFromContentType($header); - } - } - - return self::FORMAT_HTML; - } - - /** - * @return string One of 'js', 'html' or 'unknown' - * @phpstan-return self::FORMAT_* - */ - protected static function getResponseFormatFromContentType(string $contentType): string - { - // This handler only works with HTML and javascript outputs - // text/javascript is obsolete in favour of application/javascript, but still used - if (stripos($contentType, 'application/javascript') !== false || stripos($contentType, 'text/javascript') !== false) { - return self::FORMAT_JS; - } - - if (stripos($contentType, 'text/html') !== false) { - return self::FORMAT_HTML; - } - - return self::FORMAT_UNKNOWN; - } - - private static function generateScript(): string - { - $script = []; - foreach (static::$records as $record) { - $context = static::dump('Context', $record['context']); - $extra = static::dump('Extra', $record['extra']); - - if (empty($context) && empty($extra)) { - $script[] = static::call_array(static::getConsoleMethodForLevel($record['level']), static::handleStyles($record['formatted'])); - } else { - $script = array_merge( - $script, - [static::call_array('groupCollapsed', static::handleStyles($record['formatted']))], - $context, - $extra, - [static::call('groupEnd')] - ); - } - } - - return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);"; - } - - private static function getConsoleMethodForLevel(int $level): string - { - return [ - Logger::DEBUG => 'debug', - Logger::INFO => 'info', - Logger::NOTICE => 'info', - Logger::WARNING => 'warn', - Logger::ERROR => 'error', - Logger::CRITICAL => 'error', - Logger::ALERT => 'error', - Logger::EMERGENCY => 'error', - ][$level] ?? 'log'; - } - - /** - * @return string[] - */ - private static function handleStyles(string $formatted): array - { - $args = []; - $format = '%c' . $formatted; - preg_match_all('/\[\[(.*?)\]\]\{([^}]*)\}/s', $format, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); - - foreach (array_reverse($matches) as $match) { - $args[] = '"font-weight: normal"'; - $args[] = static::quote(static::handleCustomStyles($match[2][0], $match[1][0])); - - $pos = $match[0][1]; - $format = Utils::substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . Utils::substr($format, $pos + strlen($match[0][0])); - } - - $args[] = static::quote('font-weight: normal'); - $args[] = static::quote($format); - - return array_reverse($args); - } - - private static function handleCustomStyles(string $style, string $string): string - { - static $colors = ['blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey']; - static $labels = []; - - $style = preg_replace_callback('/macro\s*:(.*?)(?:;|$)/', function (array $m) use ($string, &$colors, &$labels) { - if (trim($m[1]) === 'autolabel') { - // Format the string as a label with consistent auto assigned background color - if (!isset($labels[$string])) { - $labels[$string] = $colors[count($labels) % count($colors)]; - } - $color = $labels[$string]; - - return "background-color: $color; color: white; border-radius: 3px; padding: 0 2px 0 2px"; - } - - return $m[1]; - }, $style); - - if (null === $style) { - $pcreErrorCode = preg_last_error(); - throw new \RuntimeException('Failed to run preg_replace_callback: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); - } - - return $style; - } - - /** - * @param mixed[] $dict - * @return mixed[] - */ - private static function dump(string $title, array $dict): array - { - $script = []; - $dict = array_filter($dict); - if (empty($dict)) { - return $script; - } - $script[] = static::call('log', static::quote('%c%s'), static::quote('font-weight: bold'), static::quote($title)); - foreach ($dict as $key => $value) { - $value = json_encode($value); - if (empty($value)) { - $value = static::quote(''); - } - $script[] = static::call('log', static::quote('%s: %o'), static::quote((string) $key), $value); - } - - return $script; - } - - private static function quote(string $arg): string - { - return '"' . addcslashes($arg, "\"\n\\") . '"'; - } - - /** - * @param mixed $args - */ - private static function call(...$args): string - { - $method = array_shift($args); - if (!is_string($method)) { - throw new \UnexpectedValueException('Expected the first arg to be a string, got: '.var_export($method, true)); - } - - return static::call_array($method, $args); - } - - /** - * @param mixed[] $args - */ - private static function call_array(string $method, array $args): string - { - return 'c.' . $method . '(' . implode(', ', $args) . ');'; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php deleted file mode 100644 index fcce5d63..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php +++ /dev/null @@ -1,167 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; - -/** - * Buffers all records until closing the handler and then pass them as batch. - * - * This is useful for a MailHandler to send only one mail per request instead of - * sending one per log message. - * - * @author Christophe Coevoet - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class BufferHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** @var HandlerInterface */ - protected $handler; - /** @var int */ - protected $bufferSize = 0; - /** @var int */ - protected $bufferLimit; - /** @var bool */ - protected $flushOnOverflow; - /** @var Record[] */ - protected $buffer = []; - /** @var bool */ - protected $initialized = false; - - /** - * @param HandlerInterface $handler Handler. - * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded - */ - public function __construct(HandlerInterface $handler, int $bufferLimit = 0, $level = Logger::DEBUG, bool $bubble = true, bool $flushOnOverflow = false) - { - parent::__construct($level, $bubble); - $this->handler = $handler; - $this->bufferLimit = $bufferLimit; - $this->flushOnOverflow = $flushOnOverflow; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if ($record['level'] < $this->level) { - return false; - } - - if (!$this->initialized) { - // __destructor() doesn't get called on Fatal errors - register_shutdown_function([$this, 'close']); - $this->initialized = true; - } - - if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) { - if ($this->flushOnOverflow) { - $this->flush(); - } else { - array_shift($this->buffer); - $this->bufferSize--; - } - } - - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - $this->buffer[] = $record; - $this->bufferSize++; - - return false === $this->bubble; - } - - public function flush(): void - { - if ($this->bufferSize === 0) { - return; - } - - $this->handler->handleBatch($this->buffer); - $this->clear(); - } - - public function __destruct() - { - // suppress the parent behavior since we already have register_shutdown_function() - // to call close(), and the reference contained there will prevent this from being - // GC'd until the end of the request - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - $this->flush(); - - $this->handler->close(); - } - - /** - * Clears the buffer without flushing any messages down to the wrapped handler. - */ - public function clear(): void - { - $this->bufferSize = 0; - $this->buffer = []; - } - - public function reset() - { - $this->flush(); - - parent::reset(); - - $this->resetProcessors(); - - if ($this->handler instanceof ResettableInterface) { - $this->handler->reset(); - } - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - $this->handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.'); - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - return $this->handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php deleted file mode 100644 index 234ecf61..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php +++ /dev/null @@ -1,196 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\ChromePHPFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Monolog\Utils; - -/** - * Handler sending logs to the ChromePHP extension (http://www.chromephp.com/) - * - * This also works out of the box with Firefox 43+ - * - * @author Christophe Coevoet - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class ChromePHPHandler extends AbstractProcessingHandler -{ - use WebRequestRecognizerTrait; - - /** - * Version of the extension - */ - protected const VERSION = '4.0'; - - /** - * Header name - */ - protected const HEADER_NAME = 'X-ChromeLogger-Data'; - - /** - * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+) - */ - protected const USER_AGENT_REGEX = '{\b(?:Chrome/\d+(?:\.\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}'; - - /** @var bool */ - protected static $initialized = false; - - /** - * Tracks whether we sent too much data - * - * Chrome limits the headers to 4KB, so when we sent 3KB we stop sending - * - * @var bool - */ - protected static $overflowed = false; - - /** @var mixed[] */ - protected static $json = [ - 'version' => self::VERSION, - 'columns' => ['label', 'log', 'backtrace', 'type'], - 'rows' => [], - ]; - - /** @var bool */ - protected static $sendHeaders = true; - - public function __construct($level = Logger::DEBUG, bool $bubble = true) - { - parent::__construct($level, $bubble); - if (!function_exists('json_encode')) { - throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s ChromePHPHandler'); - } - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - if (!$this->isWebRequest()) { - return; - } - - $messages = []; - - foreach ($records as $record) { - if ($record['level'] < $this->level) { - continue; - } - /** @var Record $message */ - $message = $this->processRecord($record); - $messages[] = $message; - } - - if (!empty($messages)) { - $messages = $this->getFormatter()->formatBatch($messages); - self::$json['rows'] = array_merge(self::$json['rows'], $messages); - $this->send(); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ChromePHPFormatter(); - } - - /** - * Creates & sends header for a record - * - * @see sendHeader() - * @see send() - */ - protected function write(array $record): void - { - if (!$this->isWebRequest()) { - return; - } - - self::$json['rows'][] = $record['formatted']; - - $this->send(); - } - - /** - * Sends the log header - * - * @see sendHeader() - */ - protected function send(): void - { - if (self::$overflowed || !self::$sendHeaders) { - return; - } - - if (!self::$initialized) { - self::$initialized = true; - - self::$sendHeaders = $this->headersAccepted(); - if (!self::$sendHeaders) { - return; - } - - self::$json['request_uri'] = $_SERVER['REQUEST_URI'] ?? ''; - } - - $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true); - $data = base64_encode($json); - if (strlen($data) > 3 * 1024) { - self::$overflowed = true; - - $record = [ - 'message' => 'Incomplete logs, chrome header size limit reached', - 'context' => [], - 'level' => Logger::WARNING, - 'level_name' => Logger::getLevelName(Logger::WARNING), - 'channel' => 'monolog', - 'datetime' => new \DateTimeImmutable(), - 'extra' => [], - ]; - self::$json['rows'][count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); - $json = Utils::jsonEncode(self::$json, Utils::DEFAULT_JSON_FLAGS & ~JSON_UNESCAPED_UNICODE, true); - $data = base64_encode($json); - } - - if (trim($data) !== '') { - $this->sendHeader(static::HEADER_NAME, $data); - } - } - - /** - * Send header string to the client - */ - protected function sendHeader(string $header, string $content): void - { - if (!headers_sent() && self::$sendHeaders) { - header(sprintf('%s: %s', $header, $content)); - } - } - - /** - * Verifies if the headers are accepted by the current user agent - */ - protected function headersAccepted(): bool - { - if (empty($_SERVER['HTTP_USER_AGENT'])) { - return false; - } - - return preg_match(static::USER_AGENT_REGEX, $_SERVER['HTTP_USER_AGENT']) === 1; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php deleted file mode 100644 index 52657613..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\JsonFormatter; -use Monolog\Logger; - -/** - * CouchDB handler - * - * @author Markus Bachmann - */ -class CouchDBHandler extends AbstractProcessingHandler -{ - /** @var mixed[] */ - private $options; - - /** - * @param mixed[] $options - */ - public function __construct(array $options = [], $level = Logger::DEBUG, bool $bubble = true) - { - $this->options = array_merge([ - 'host' => 'localhost', - 'port' => 5984, - 'dbname' => 'logger', - 'username' => null, - 'password' => null, - ], $options); - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $basicAuth = null; - if ($this->options['username']) { - $basicAuth = sprintf('%s:%s@', $this->options['username'], $this->options['password']); - } - - $url = 'http://'.$basicAuth.$this->options['host'].':'.$this->options['port'].'/'.$this->options['dbname']; - $context = stream_context_create([ - 'http' => [ - 'method' => 'POST', - 'content' => $record['formatted'], - 'ignore_errors' => true, - 'max_redirects' => 0, - 'header' => 'Content-type: application/json', - ], - ]); - - if (false === @file_get_contents($url, false, $context)) { - throw new \RuntimeException(sprintf('Could not connect to %s', $url)); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php deleted file mode 100644 index 3535a4fc..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php +++ /dev/null @@ -1,167 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * Logs to Cube. - * - * @link https://github.com/square/cube/wiki - * @author Wan Chen - * @deprecated Since 2.8.0 and 3.2.0, Cube appears abandoned and thus we will drop this handler in Monolog 4 - */ -class CubeHandler extends AbstractProcessingHandler -{ - /** @var resource|\Socket|null */ - private $udpConnection = null; - /** @var resource|\CurlHandle|null */ - private $httpConnection = null; - /** @var string */ - private $scheme; - /** @var string */ - private $host; - /** @var int */ - private $port; - /** @var string[] */ - private $acceptedSchemes = ['http', 'udp']; - - /** - * Create a Cube handler - * - * @throws \UnexpectedValueException when given url is not a valid url. - * A valid url must consist of three parts : protocol://host:port - * Only valid protocols used by Cube are http and udp - */ - public function __construct(string $url, $level = Logger::DEBUG, bool $bubble = true) - { - $urlInfo = parse_url($url); - - if ($urlInfo === false || !isset($urlInfo['scheme'], $urlInfo['host'], $urlInfo['port'])) { - throw new \UnexpectedValueException('URL "'.$url.'" is not valid'); - } - - if (!in_array($urlInfo['scheme'], $this->acceptedSchemes)) { - throw new \UnexpectedValueException( - 'Invalid protocol (' . $urlInfo['scheme'] . ').' - . ' Valid options are ' . implode(', ', $this->acceptedSchemes) - ); - } - - $this->scheme = $urlInfo['scheme']; - $this->host = $urlInfo['host']; - $this->port = (int) $urlInfo['port']; - - parent::__construct($level, $bubble); - } - - /** - * Establish a connection to an UDP socket - * - * @throws \LogicException when unable to connect to the socket - * @throws MissingExtensionException when there is no socket extension - */ - protected function connectUdp(): void - { - if (!extension_loaded('sockets')) { - throw new MissingExtensionException('The sockets extension is required to use udp URLs with the CubeHandler'); - } - - $udpConnection = socket_create(AF_INET, SOCK_DGRAM, 0); - if (false === $udpConnection) { - throw new \LogicException('Unable to create a socket'); - } - - $this->udpConnection = $udpConnection; - if (!socket_connect($this->udpConnection, $this->host, $this->port)) { - throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port); - } - } - - /** - * Establish a connection to an http server - * - * @throws \LogicException when unable to connect to the socket - * @throws MissingExtensionException when no curl extension - */ - protected function connectHttp(): void - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is required to use http URLs with the CubeHandler'); - } - - $httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put'); - if (false === $httpConnection) { - throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port); - } - - $this->httpConnection = $httpConnection; - curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, "POST"); - curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $date = $record['datetime']; - - $data = ['time' => $date->format('Y-m-d\TH:i:s.uO')]; - unset($record['datetime']); - - if (isset($record['context']['type'])) { - $data['type'] = $record['context']['type']; - unset($record['context']['type']); - } else { - $data['type'] = $record['channel']; - } - - $data['data'] = $record['context']; - $data['data']['level'] = $record['level']; - - if ($this->scheme === 'http') { - $this->writeHttp(Utils::jsonEncode($data)); - } else { - $this->writeUdp(Utils::jsonEncode($data)); - } - } - - private function writeUdp(string $data): void - { - if (!$this->udpConnection) { - $this->connectUdp(); - } - - socket_send($this->udpConnection, $data, strlen($data), 0); - } - - private function writeHttp(string $data): void - { - if (!$this->httpConnection) { - $this->connectHttp(); - } - - if (null === $this->httpConnection) { - throw new \LogicException('No connection could be established'); - } - - curl_setopt($this->httpConnection, CURLOPT_POSTFIELDS, '['.$data.']'); - curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, [ - 'Content-Type: application/json', - 'Content-Length: ' . strlen('['.$data.']'), - ]); - - Curl\Util::execute($this->httpConnection, 5, false); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php b/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php deleted file mode 100644 index 7213e8ee..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\Curl; - -use CurlHandle; - -/** - * This class is marked as internal and it is not under the BC promise of the package. - * - * @internal - */ -final class Util -{ - /** @var array */ - private static $retriableErrorCodes = [ - CURLE_COULDNT_RESOLVE_HOST, - CURLE_COULDNT_CONNECT, - CURLE_HTTP_NOT_FOUND, - CURLE_READ_ERROR, - CURLE_OPERATION_TIMEOUTED, - CURLE_HTTP_POST_ERROR, - CURLE_SSL_CONNECT_ERROR, - ]; - - /** - * Executes a CURL request with optional retries and exception on failure - * - * @param resource|CurlHandle $ch curl handler - * @param int $retries - * @param bool $closeAfterDone - * @return bool|string @see curl_exec - */ - public static function execute($ch, int $retries = 5, bool $closeAfterDone = true) - { - while ($retries--) { - $curlResponse = curl_exec($ch); - if ($curlResponse === false) { - $curlErrno = curl_errno($ch); - - if (false === in_array($curlErrno, self::$retriableErrorCodes, true) || !$retries) { - $curlError = curl_error($ch); - - if ($closeAfterDone) { - curl_close($ch); - } - - throw new \RuntimeException(sprintf('Curl error (code %d): %s', $curlErrno, $curlError)); - } - - continue; - } - - if ($closeAfterDone) { - curl_close($ch); - } - - return $curlResponse; - } - - return false; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php deleted file mode 100644 index 9b85ae7e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php +++ /dev/null @@ -1,186 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Simple handler wrapper that deduplicates log records across multiple requests - * - * It also includes the BufferHandler functionality and will buffer - * all messages until the end of the request or flush() is called. - * - * This works by storing all log records' messages above $deduplicationLevel - * to the file specified by $deduplicationStore. When further logs come in at the end of the - * request (or when flush() is called), all those above $deduplicationLevel are checked - * against the existing stored logs. If they match and the timestamps in the stored log is - * not older than $time seconds, the new log record is discarded. If no log record is new, the - * whole data set is discarded. - * - * This is mainly useful in combination with Mail handlers or things like Slack or HipChat handlers - * that send messages to people, to avoid spamming with the same message over and over in case of - * a major component failure like a database server being down which makes all requests fail in the - * same way. - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - */ -class DeduplicationHandler extends BufferHandler -{ - /** - * @var string - */ - protected $deduplicationStore; - - /** - * @var Level - */ - protected $deduplicationLevel; - - /** - * @var int - */ - protected $time; - - /** - * @var bool - */ - private $gc = false; - - /** - * @param HandlerInterface $handler Handler. - * @param string $deduplicationStore The file/path where the deduplication log should be kept - * @param string|int $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes - * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @phpstan-param Level|LevelName|LogLevel::* $deduplicationLevel - */ - public function __construct(HandlerInterface $handler, ?string $deduplicationStore = null, $deduplicationLevel = Logger::ERROR, int $time = 60, bool $bubble = true) - { - parent::__construct($handler, 0, Logger::DEBUG, $bubble, false); - - $this->deduplicationStore = $deduplicationStore === null ? sys_get_temp_dir() . '/monolog-dedup-' . substr(md5(__FILE__), 0, 20) .'.log' : $deduplicationStore; - $this->deduplicationLevel = Logger::toMonologLevel($deduplicationLevel); - $this->time = $time; - } - - public function flush(): void - { - if ($this->bufferSize === 0) { - return; - } - - $passthru = null; - - foreach ($this->buffer as $record) { - if ($record['level'] >= $this->deduplicationLevel) { - $passthru = $passthru || !$this->isDuplicate($record); - if ($passthru) { - $this->appendRecord($record); - } - } - } - - // default of null is valid as well as if no record matches duplicationLevel we just pass through - if ($passthru === true || $passthru === null) { - $this->handler->handleBatch($this->buffer); - } - - $this->clear(); - - if ($this->gc) { - $this->collectLogs(); - } - } - - /** - * @phpstan-param Record $record - */ - private function isDuplicate(array $record): bool - { - if (!file_exists($this->deduplicationStore)) { - return false; - } - - $store = file($this->deduplicationStore, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); - if (!is_array($store)) { - return false; - } - - $yesterday = time() - 86400; - $timestampValidity = $record['datetime']->getTimestamp() - $this->time; - $expectedMessage = preg_replace('{[\r\n].*}', '', $record['message']); - - for ($i = count($store) - 1; $i >= 0; $i--) { - list($timestamp, $level, $message) = explode(':', $store[$i], 3); - - if ($level === $record['level_name'] && $message === $expectedMessage && $timestamp > $timestampValidity) { - return true; - } - - if ($timestamp < $yesterday) { - $this->gc = true; - } - } - - return false; - } - - private function collectLogs(): void - { - if (!file_exists($this->deduplicationStore)) { - return; - } - - $handle = fopen($this->deduplicationStore, 'rw+'); - - if (!$handle) { - throw new \RuntimeException('Failed to open file for reading and writing: ' . $this->deduplicationStore); - } - - flock($handle, LOCK_EX); - $validLogs = []; - - $timestampValidity = time() - $this->time; - - while (!feof($handle)) { - $log = fgets($handle); - if ($log && substr($log, 0, 10) >= $timestampValidity) { - $validLogs[] = $log; - } - } - - ftruncate($handle, 0); - rewind($handle); - foreach ($validLogs as $log) { - fwrite($handle, $log); - } - - flock($handle, LOCK_UN); - fclose($handle); - - $this->gc = false; - } - - /** - * @phpstan-param Record $record - */ - private function appendRecord(array $record): void - { - file_put_contents($this->deduplicationStore, $record['datetime']->getTimestamp() . ':' . $record['level_name'] . ':' . preg_replace('{[\r\n].*}', '', $record['message']) . "\n", FILE_APPEND); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php deleted file mode 100644 index ebd52c3a..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; -use Doctrine\CouchDB\CouchDBClient; - -/** - * CouchDB handler for Doctrine CouchDB ODM - * - * @author Markus Bachmann - */ -class DoctrineCouchDBHandler extends AbstractProcessingHandler -{ - /** @var CouchDBClient */ - private $client; - - public function __construct(CouchDBClient $client, $level = Logger::DEBUG, bool $bubble = true) - { - $this->client = $client; - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->client->postDocument($record['formatted']); - } - - protected function getDefaultFormatter(): FormatterInterface - { - return new NormalizerFormatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php deleted file mode 100644 index 21840bf6..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php +++ /dev/null @@ -1,104 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Aws\Sdk; -use Aws\DynamoDb\DynamoDbClient; -use Monolog\Formatter\FormatterInterface; -use Aws\DynamoDb\Marshaler; -use Monolog\Formatter\ScalarFormatter; -use Monolog\Logger; - -/** - * Amazon DynamoDB handler (http://aws.amazon.com/dynamodb/) - * - * @link https://github.com/aws/aws-sdk-php/ - * @author Andrew Lawson - */ -class DynamoDbHandler extends AbstractProcessingHandler -{ - public const DATE_FORMAT = 'Y-m-d\TH:i:s.uO'; - - /** - * @var DynamoDbClient - */ - protected $client; - - /** - * @var string - */ - protected $table; - - /** - * @var int - */ - protected $version; - - /** - * @var Marshaler - */ - protected $marshaler; - - public function __construct(DynamoDbClient $client, string $table, $level = Logger::DEBUG, bool $bubble = true) - { - /** @phpstan-ignore-next-line */ - if (defined('Aws\Sdk::VERSION') && version_compare(Sdk::VERSION, '3.0', '>=')) { - $this->version = 3; - $this->marshaler = new Marshaler; - } else { - $this->version = 2; - } - - $this->client = $client; - $this->table = $table; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $filtered = $this->filterEmptyFields($record['formatted']); - if ($this->version === 3) { - $formatted = $this->marshaler->marshalItem($filtered); - } else { - /** @phpstan-ignore-next-line */ - $formatted = $this->client->formatAttributes($filtered); - } - - $this->client->putItem([ - 'TableName' => $this->table, - 'Item' => $formatted, - ]); - } - - /** - * @param mixed[] $record - * @return mixed[] - */ - protected function filterEmptyFields(array $record): array - { - return array_filter($record, function ($value) { - return !empty($value) || false === $value || 0 === $value; - }); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ScalarFormatter(self::DATE_FORMAT); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php deleted file mode 100644 index fc92ca42..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ElasticaHandler.php +++ /dev/null @@ -1,129 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Elastica\Document; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\ElasticaFormatter; -use Monolog\Logger; -use Elastica\Client; -use Elastica\Exception\ExceptionInterface; - -/** - * Elastic Search handler - * - * Usage example: - * - * $client = new \Elastica\Client(); - * $options = array( - * 'index' => 'elastic_index_name', - * 'type' => 'elastic_doc_type', Types have been removed in Elastica 7 - * ); - * $handler = new ElasticaHandler($client, $options); - * $log = new Logger('application'); - * $log->pushHandler($handler); - * - * @author Jelle Vink - */ -class ElasticaHandler extends AbstractProcessingHandler -{ - /** - * @var Client - */ - protected $client; - - /** - * @var mixed[] Handler config options - */ - protected $options = []; - - /** - * @param Client $client Elastica Client object - * @param mixed[] $options Handler configuration - */ - public function __construct(Client $client, array $options = [], $level = Logger::DEBUG, bool $bubble = true) - { - parent::__construct($level, $bubble); - $this->client = $client; - $this->options = array_merge( - [ - 'index' => 'monolog', // Elastic index name - 'type' => 'record', // Elastic document type - 'ignore_error' => false, // Suppress Elastica exceptions - ], - $options - ); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->bulkSend([$record['formatted']]); - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($formatter instanceof ElasticaFormatter) { - return parent::setFormatter($formatter); - } - - throw new \InvalidArgumentException('ElasticaHandler is only compatible with ElasticaFormatter'); - } - - /** - * @return mixed[] - */ - public function getOptions(): array - { - return $this->options; - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ElasticaFormatter($this->options['index'], $this->options['type']); - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - $documents = $this->getFormatter()->formatBatch($records); - $this->bulkSend($documents); - } - - /** - * Use Elasticsearch bulk API to send list of documents - * - * @param Document[] $documents - * - * @throws \RuntimeException - */ - protected function bulkSend(array $documents): void - { - try { - $this->client->addDocuments($documents); - } catch (ExceptionInterface $e) { - if (!$this->options['ignore_error']) { - throw new \RuntimeException("Error sending messages to Elasticsearch", 0, $e); - } - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php deleted file mode 100644 index e88375c0..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ElasticsearchHandler.php +++ /dev/null @@ -1,218 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Elastic\Elasticsearch\Response\Elasticsearch; -use Throwable; -use RuntimeException; -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\ElasticsearchFormatter; -use InvalidArgumentException; -use Elasticsearch\Common\Exceptions\RuntimeException as ElasticsearchRuntimeException; -use Elasticsearch\Client; -use Elastic\Elasticsearch\Exception\InvalidArgumentException as ElasticInvalidArgumentException; -use Elastic\Elasticsearch\Client as Client8; - -/** - * Elasticsearch handler - * - * @link https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html - * - * Simple usage example: - * - * $client = \Elasticsearch\ClientBuilder::create() - * ->setHosts($hosts) - * ->build(); - * - * $options = array( - * 'index' => 'elastic_index_name', - * 'type' => 'elastic_doc_type', - * ); - * $handler = new ElasticsearchHandler($client, $options); - * $log = new Logger('application'); - * $log->pushHandler($handler); - * - * @author Avtandil Kikabidze - */ -class ElasticsearchHandler extends AbstractProcessingHandler -{ - /** - * @var Client|Client8 - */ - protected $client; - - /** - * @var mixed[] Handler config options - */ - protected $options = []; - - /** - * @var bool - */ - private $needsType; - - /** - * @param Client|Client8 $client Elasticsearch Client object - * @param mixed[] $options Handler configuration - */ - public function __construct($client, array $options = [], $level = Logger::DEBUG, bool $bubble = true) - { - if (!$client instanceof Client && !$client instanceof Client8) { - throw new \TypeError('Elasticsearch\Client or Elastic\Elasticsearch\Client instance required'); - } - - parent::__construct($level, $bubble); - $this->client = $client; - $this->options = array_merge( - [ - 'index' => 'monolog', // Elastic index name - 'type' => '_doc', // Elastic document type - 'ignore_error' => false, // Suppress Elasticsearch exceptions - ], - $options - ); - - if ($client instanceof Client8 || $client::VERSION[0] === '7') { - $this->needsType = false; - // force the type to _doc for ES8/ES7 - $this->options['type'] = '_doc'; - } else { - $this->needsType = true; - } - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->bulkSend([$record['formatted']]); - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($formatter instanceof ElasticsearchFormatter) { - return parent::setFormatter($formatter); - } - - throw new InvalidArgumentException('ElasticsearchHandler is only compatible with ElasticsearchFormatter'); - } - - /** - * Getter options - * - * @return mixed[] - */ - public function getOptions(): array - { - return $this->options; - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new ElasticsearchFormatter($this->options['index'], $this->options['type']); - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - $documents = $this->getFormatter()->formatBatch($records); - $this->bulkSend($documents); - } - - /** - * Use Elasticsearch bulk API to send list of documents - * - * @param array[] $records Records + _index/_type keys - * @throws \RuntimeException - */ - protected function bulkSend(array $records): void - { - try { - $params = [ - 'body' => [], - ]; - - foreach ($records as $record) { - $params['body'][] = [ - 'index' => $this->needsType ? [ - '_index' => $record['_index'], - '_type' => $record['_type'], - ] : [ - '_index' => $record['_index'], - ], - ]; - unset($record['_index'], $record['_type']); - - $params['body'][] = $record; - } - - /** @var Elasticsearch */ - $responses = $this->client->bulk($params); - - if ($responses['errors'] === true) { - throw $this->createExceptionFromResponses($responses); - } - } catch (Throwable $e) { - if (! $this->options['ignore_error']) { - throw new RuntimeException('Error sending messages to Elasticsearch', 0, $e); - } - } - } - - /** - * Creates elasticsearch exception from responses array - * - * Only the first error is converted into an exception. - * - * @param mixed[]|Elasticsearch $responses returned by $this->client->bulk() - */ - protected function createExceptionFromResponses($responses): Throwable - { - foreach ($responses['items'] ?? [] as $item) { - if (isset($item['index']['error'])) { - return $this->createExceptionFromError($item['index']['error']); - } - } - - if (class_exists(ElasticInvalidArgumentException::class)) { - return new ElasticInvalidArgumentException('Elasticsearch failed to index one or more records.'); - } - - return new ElasticsearchRuntimeException('Elasticsearch failed to index one or more records.'); - } - - /** - * Creates elasticsearch exception from error array - * - * @param mixed[] $error - */ - protected function createExceptionFromError(array $error): Throwable - { - $previous = isset($error['caused_by']) ? $this->createExceptionFromError($error['caused_by']) : null; - - if (class_exists(ElasticInvalidArgumentException::class)) { - return new ElasticInvalidArgumentException($error['type'] . ': ' . $error['reason'], 0, $previous); - } - - return new ElasticsearchRuntimeException($error['type'] . ': ' . $error['reason'], 0, $previous); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php deleted file mode 100644 index f2e22036..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php +++ /dev/null @@ -1,91 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Monolog\Utils; - -/** - * Stores to PHP error_log() handler. - * - * @author Elan Ruusamäe - */ -class ErrorLogHandler extends AbstractProcessingHandler -{ - public const OPERATING_SYSTEM = 0; - public const SAPI = 4; - - /** @var int */ - protected $messageType; - /** @var bool */ - protected $expandNewlines; - - /** - * @param int $messageType Says where the error should go. - * @param bool $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries - */ - public function __construct(int $messageType = self::OPERATING_SYSTEM, $level = Logger::DEBUG, bool $bubble = true, bool $expandNewlines = false) - { - parent::__construct($level, $bubble); - - if (false === in_array($messageType, self::getAvailableTypes(), true)) { - $message = sprintf('The given message type "%s" is not supported', print_r($messageType, true)); - - throw new \InvalidArgumentException($message); - } - - $this->messageType = $messageType; - $this->expandNewlines = $expandNewlines; - } - - /** - * @return int[] With all available types - */ - public static function getAvailableTypes(): array - { - return [ - self::OPERATING_SYSTEM, - self::SAPI, - ]; - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('[%datetime%] %channel%.%level_name%: %message% %context% %extra%'); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if (!$this->expandNewlines) { - error_log((string) $record['formatted'], $this->messageType); - - return; - } - - $lines = preg_split('{[\r\n]+}', (string) $record['formatted']); - if ($lines === false) { - $pcreErrorCode = preg_last_error(); - throw new \RuntimeException('Failed to preg_split formatted string: ' . $pcreErrorCode . ' / '. Utils::pcreLastErrorMessage($pcreErrorCode)); - } - foreach ($lines as $line) { - error_log($line, $this->messageType); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php deleted file mode 100644 index d4e234ce..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FallbackGroupHandler.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Throwable; - -/** - * Forwards records to at most one handler - * - * If a handler fails, the exception is suppressed and the record is forwarded to the next handler. - * - * As soon as one handler handles a record successfully, the handling stops there. - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class FallbackGroupHandler extends GroupHandler -{ - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - foreach ($this->handlers as $handler) { - try { - $handler->handle($record); - break; - } catch (Throwable $e) { - // What throwable? - } - } - - return false === $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - if ($this->processors) { - $processed = []; - foreach ($records as $record) { - $processed[] = $this->processRecord($record); - } - /** @var Record[] $records */ - $records = $processed; - } - - foreach ($this->handlers as $handler) { - try { - $handler->handleBatch($records); - break; - } catch (Throwable $e) { - // What throwable? - } - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php deleted file mode 100644 index 718f17ef..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php +++ /dev/null @@ -1,212 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; -use Psr\Log\LogLevel; - -/** - * Simple handler wrapper that filters records based on a list of levels - * - * It can be configured with an exact list of levels to allow, or a min/max level. - * - * @author Hennadiy Verkh - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class FilterHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** - * Handler or factory callable($record, $this) - * - * @var callable|HandlerInterface - * @phpstan-var callable(?Record, HandlerInterface): HandlerInterface|HandlerInterface - */ - protected $handler; - - /** - * Minimum level for logs that are passed to handler - * - * @var int[] - * @phpstan-var array - */ - protected $acceptedLevels; - - /** - * Whether the messages that are handled can bubble up the stack or not - * - * @var bool - */ - protected $bubble; - - /** - * @psalm-param HandlerInterface|callable(?Record, HandlerInterface): HandlerInterface $handler - * - * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $filterHandler). - * @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided - * @param int|string $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * - * @phpstan-param Level|LevelName|LogLevel::*|array $minLevelOrList - * @phpstan-param Level|LevelName|LogLevel::* $maxLevel - */ - public function __construct($handler, $minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY, bool $bubble = true) - { - $this->handler = $handler; - $this->bubble = $bubble; - $this->setAcceptedLevels($minLevelOrList, $maxLevel); - - if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { - throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); - } - } - - /** - * @phpstan-return array - */ - public function getAcceptedLevels(): array - { - return array_flip($this->acceptedLevels); - } - - /** - * @param int|string|array $minLevelOrList A list of levels to accept or a minimum level or level name if maxLevel is provided - * @param int|string $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array - * - * @phpstan-param Level|LevelName|LogLevel::*|array $minLevelOrList - * @phpstan-param Level|LevelName|LogLevel::* $maxLevel - */ - public function setAcceptedLevels($minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY): self - { - if (is_array($minLevelOrList)) { - $acceptedLevels = array_map('Monolog\Logger::toMonologLevel', $minLevelOrList); - } else { - $minLevelOrList = Logger::toMonologLevel($minLevelOrList); - $maxLevel = Logger::toMonologLevel($maxLevel); - $acceptedLevels = array_values(array_filter(Logger::getLevels(), function ($level) use ($minLevelOrList, $maxLevel) { - return $level >= $minLevelOrList && $level <= $maxLevel; - })); - } - $this->acceptedLevels = array_flip($acceptedLevels); - - return $this; - } - - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - return isset($this->acceptedLevels[$record['level']]); - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if (!$this->isHandling($record)) { - return false; - } - - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - $this->getHandler($record)->handle($record); - - return false === $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - $filtered = []; - foreach ($records as $record) { - if ($this->isHandling($record)) { - $filtered[] = $record; - } - } - - if (count($filtered) > 0) { - $this->getHandler($filtered[count($filtered) - 1])->handleBatch($filtered); - } - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory callable, this will trigger the handler's instantiation. - * - * @return HandlerInterface - * - * @phpstan-param Record $record - */ - public function getHandler(array $record = null) - { - if (!$this->handler instanceof HandlerInterface) { - $this->handler = ($this->handler)($record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - - return $this->handler; - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - return $handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } - - public function reset() - { - $this->resetProcessors(); - - if ($this->getHandler() instanceof ResettableInterface) { - $this->getHandler()->reset(); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php deleted file mode 100644 index 0aa5607b..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -/** - * Interface for activation strategies for the FingersCrossedHandler. - * - * @author Johannes M. Schmitt - * - * @phpstan-import-type Record from \Monolog\Logger - */ -interface ActivationStrategyInterface -{ - /** - * Returns whether the given record activates the handler. - * - * @phpstan-param Record $record - */ - public function isHandlerActivated(array $record): bool; -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php deleted file mode 100644 index 7b9abb58..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Channel and Error level based monolog activation strategy. Allows to trigger activation - * based on level per channel. e.g. trigger activation on level 'ERROR' by default, except - * for records of the 'sql' channel; those should trigger activation on level 'WARN'. - * - * Example: - * - * - * $activationStrategy = new ChannelLevelActivationStrategy( - * Logger::CRITICAL, - * array( - * 'request' => Logger::ALERT, - * 'sensitive' => Logger::ERROR, - * ) - * ); - * $handler = new FingersCrossedHandler(new StreamHandler('php://stderr'), $activationStrategy); - * - * - * @author Mike Meessen - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class ChannelLevelActivationStrategy implements ActivationStrategyInterface -{ - /** - * @var Level - */ - private $defaultActionLevel; - - /** - * @var array - */ - private $channelToActionLevel; - - /** - * @param int|string $defaultActionLevel The default action level to be used if the record's category doesn't match any - * @param array $channelToActionLevel An array that maps channel names to action levels. - * - * @phpstan-param array $channelToActionLevel - * @phpstan-param Level|LevelName|LogLevel::* $defaultActionLevel - */ - public function __construct($defaultActionLevel, array $channelToActionLevel = []) - { - $this->defaultActionLevel = Logger::toMonologLevel($defaultActionLevel); - $this->channelToActionLevel = array_map('Monolog\Logger::toMonologLevel', $channelToActionLevel); - } - - /** - * @phpstan-param Record $record - */ - public function isHandlerActivated(array $record): bool - { - if (isset($this->channelToActionLevel[$record['channel']])) { - return $record['level'] >= $this->channelToActionLevel[$record['channel']]; - } - - return $record['level'] >= $this->defaultActionLevel; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php deleted file mode 100644 index 5ec88eab..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\FingersCrossed; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Error level based activation strategy. - * - * @author Johannes M. Schmitt - * - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class ErrorLevelActivationStrategy implements ActivationStrategyInterface -{ - /** - * @var Level - */ - private $actionLevel; - - /** - * @param int|string $actionLevel Level or name or value - * - * @phpstan-param Level|LevelName|LogLevel::* $actionLevel - */ - public function __construct($actionLevel) - { - $this->actionLevel = Logger::toMonologLevel($actionLevel); - } - - public function isHandlerActivated(array $record): bool - { - return $record['level'] >= $this->actionLevel; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php deleted file mode 100644 index 0627b445..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php +++ /dev/null @@ -1,252 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; -use Monolog\Handler\FingersCrossed\ActivationStrategyInterface; -use Monolog\Logger; -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; -use Psr\Log\LogLevel; - -/** - * Buffers all records until a certain level is reached - * - * The advantage of this approach is that you don't get any clutter in your log files. - * Only requests which actually trigger an error (or whatever your actionLevel is) will be - * in the logs, but they will contain all records, not only those above the level threshold. - * - * You can then have a passthruLevel as well which means that at the end of the request, - * even if it did not get activated, it will still send through log records of e.g. at least a - * warning level. - * - * You can find the various activation strategies in the - * Monolog\Handler\FingersCrossed\ namespace. - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class FingersCrossedHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** - * @var callable|HandlerInterface - * @phpstan-var callable(?Record, HandlerInterface): HandlerInterface|HandlerInterface - */ - protected $handler; - /** @var ActivationStrategyInterface */ - protected $activationStrategy; - /** @var bool */ - protected $buffering = true; - /** @var int */ - protected $bufferSize; - /** @var Record[] */ - protected $buffer = []; - /** @var bool */ - protected $stopBuffering; - /** - * @var ?int - * @phpstan-var ?Level - */ - protected $passthruLevel; - /** @var bool */ - protected $bubble; - - /** - * @psalm-param HandlerInterface|callable(?Record, HandlerInterface): HandlerInterface $handler - * - * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $fingersCrossedHandler). - * @param int|string|ActivationStrategyInterface $activationStrategy Strategy which determines when this handler takes action, or a level name/value at which the handler is activated - * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true) - * @param int|string $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered - * - * @phpstan-param Level|LevelName|LogLevel::* $passthruLevel - * @phpstan-param Level|LevelName|LogLevel::*|ActivationStrategyInterface $activationStrategy - */ - public function __construct($handler, $activationStrategy = null, int $bufferSize = 0, bool $bubble = true, bool $stopBuffering = true, $passthruLevel = null) - { - if (null === $activationStrategy) { - $activationStrategy = new ErrorLevelActivationStrategy(Logger::WARNING); - } - - // convert simple int activationStrategy to an object - if (!$activationStrategy instanceof ActivationStrategyInterface) { - $activationStrategy = new ErrorLevelActivationStrategy($activationStrategy); - } - - $this->handler = $handler; - $this->activationStrategy = $activationStrategy; - $this->bufferSize = $bufferSize; - $this->bubble = $bubble; - $this->stopBuffering = $stopBuffering; - - if ($passthruLevel !== null) { - $this->passthruLevel = Logger::toMonologLevel($passthruLevel); - } - - if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { - throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); - } - } - - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - return true; - } - - /** - * Manually activate this logger regardless of the activation strategy - */ - public function activate(): void - { - if ($this->stopBuffering) { - $this->buffering = false; - } - - $this->getHandler(end($this->buffer) ?: null)->handleBatch($this->buffer); - $this->buffer = []; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - if ($this->buffering) { - $this->buffer[] = $record; - if ($this->bufferSize > 0 && count($this->buffer) > $this->bufferSize) { - array_shift($this->buffer); - } - if ($this->activationStrategy->isHandlerActivated($record)) { - $this->activate(); - } - } else { - $this->getHandler($record)->handle($record); - } - - return false === $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - $this->flushBuffer(); - - $this->getHandler()->close(); - } - - public function reset() - { - $this->flushBuffer(); - - $this->resetProcessors(); - - if ($this->getHandler() instanceof ResettableInterface) { - $this->getHandler()->reset(); - } - } - - /** - * Clears the buffer without flushing any messages down to the wrapped handler. - * - * It also resets the handler to its initial buffering state. - */ - public function clear(): void - { - $this->buffer = []; - $this->reset(); - } - - /** - * Resets the state of the handler. Stops forwarding records to the wrapped handler. - */ - private function flushBuffer(): void - { - if (null !== $this->passthruLevel) { - $level = $this->passthruLevel; - $this->buffer = array_filter($this->buffer, function ($record) use ($level) { - return $record['level'] >= $level; - }); - if (count($this->buffer) > 0) { - $this->getHandler(end($this->buffer))->handleBatch($this->buffer); - } - } - - $this->buffer = []; - $this->buffering = true; - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory callable, this will trigger the handler's instantiation. - * - * @return HandlerInterface - * - * @phpstan-param Record $record - */ - public function getHandler(array $record = null) - { - if (!$this->handler instanceof HandlerInterface) { - $this->handler = ($this->handler)($record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - - return $this->handler; - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - return $handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php deleted file mode 100644 index 72718de6..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php +++ /dev/null @@ -1,180 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\WildfireFormatter; -use Monolog\Formatter\FormatterInterface; - -/** - * Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol. - * - * @author Eric Clemmons (@ericclemmons) - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class FirePHPHandler extends AbstractProcessingHandler -{ - use WebRequestRecognizerTrait; - - /** - * WildFire JSON header message format - */ - protected const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'; - - /** - * FirePHP structure for parsing messages & their presentation - */ - protected const STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'; - - /** - * Must reference a "known" plugin, otherwise headers won't display in FirePHP - */ - protected const PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'; - - /** - * Header prefix for Wildfire to recognize & parse headers - */ - protected const HEADER_PREFIX = 'X-Wf'; - - /** - * Whether or not Wildfire vendor-specific headers have been generated & sent yet - * @var bool - */ - protected static $initialized = false; - - /** - * Shared static message index between potentially multiple handlers - * @var int - */ - protected static $messageIndex = 1; - - /** @var bool */ - protected static $sendHeaders = true; - - /** - * Base header creation function used by init headers & record headers - * - * @param array $meta Wildfire Plugin, Protocol & Structure Indexes - * @param string $message Log message - * - * @return array Complete header string ready for the client as key and message as value - * - * @phpstan-return non-empty-array - */ - protected function createHeader(array $meta, string $message): array - { - $header = sprintf('%s-%s', static::HEADER_PREFIX, join('-', $meta)); - - return [$header => $message]; - } - - /** - * Creates message header from record - * - * @return array - * - * @phpstan-return non-empty-array - * - * @see createHeader() - * - * @phpstan-param FormattedRecord $record - */ - protected function createRecordHeader(array $record): array - { - // Wildfire is extensible to support multiple protocols & plugins in a single request, - // but we're not taking advantage of that (yet), so we're using "1" for simplicity's sake. - return $this->createHeader( - [1, 1, 1, self::$messageIndex++], - $record['formatted'] - ); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new WildfireFormatter(); - } - - /** - * Wildfire initialization headers to enable message parsing - * - * @see createHeader() - * @see sendHeader() - * - * @return array - */ - protected function getInitHeaders(): array - { - // Initial payload consists of required headers for Wildfire - return array_merge( - $this->createHeader(['Protocol', 1], static::PROTOCOL_URI), - $this->createHeader([1, 'Structure', 1], static::STRUCTURE_URI), - $this->createHeader([1, 'Plugin', 1], static::PLUGIN_URI) - ); - } - - /** - * Send header string to the client - */ - protected function sendHeader(string $header, string $content): void - { - if (!headers_sent() && self::$sendHeaders) { - header(sprintf('%s: %s', $header, $content)); - } - } - - /** - * Creates & sends header for a record, ensuring init headers have been sent prior - * - * @see sendHeader() - * @see sendInitHeaders() - */ - protected function write(array $record): void - { - if (!self::$sendHeaders || !$this->isWebRequest()) { - return; - } - - // WildFire-specific headers must be sent prior to any messages - if (!self::$initialized) { - self::$initialized = true; - - self::$sendHeaders = $this->headersAccepted(); - if (!self::$sendHeaders) { - return; - } - - foreach ($this->getInitHeaders() as $header => $content) { - $this->sendHeader($header, $content); - } - } - - $header = $this->createRecordHeader($record); - if (trim(current($header)) !== '') { - $this->sendHeader(key($header), current($header)); - } - } - - /** - * Verifies if the headers are accepted by the current user agent - */ - protected function headersAccepted(): bool - { - if (!empty($_SERVER['HTTP_USER_AGENT']) && preg_match('{\bFirePHP/\d+\.\d+\b}', $_SERVER['HTTP_USER_AGENT'])) { - return true; - } - - return isset($_SERVER['HTTP_X_FIREPHP_VERSION']); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php deleted file mode 100644 index 85c95b9d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php +++ /dev/null @@ -1,135 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Monolog\Logger; - -/** - * Sends logs to Fleep.io using Webhook integrations - * - * You'll need a Fleep.io account to use this handler. - * - * @see https://fleep.io/integrations/webhooks/ Fleep Webhooks Documentation - * @author Ando Roots - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class FleepHookHandler extends SocketHandler -{ - protected const FLEEP_HOST = 'fleep.io'; - - protected const FLEEP_HOOK_URI = '/hook/'; - - /** - * @var string Webhook token (specifies the conversation where logs are sent) - */ - protected $token; - - /** - * Construct a new Fleep.io Handler. - * - * For instructions on how to create a new web hook in your conversations - * see https://fleep.io/integrations/webhooks/ - * - * @param string $token Webhook token - * @throws MissingExtensionException - */ - public function __construct( - string $token, - $level = Logger::DEBUG, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if (!extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FleepHookHandler'); - } - - $this->token = $token; - - $connectionString = 'ssl://' . static::FLEEP_HOST . ':443'; - parent::__construct( - $connectionString, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - } - - /** - * Returns the default formatter to use with this handler - * - * Overloaded to remove empty context and extra arrays from the end of the log message. - * - * @return LineFormatter - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(null, null, true, true); - } - - /** - * Handles a log record - */ - public function write(array $record): void - { - parent::write($record); - $this->closeSocket(); - } - - /** - * {@inheritDoc} - */ - protected function generateDataStream(array $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the header of the API Call - */ - private function buildHeader(string $content): string - { - $header = "POST " . static::FLEEP_HOOK_URI . $this->token . " HTTP/1.1\r\n"; - $header .= "Host: " . static::FLEEP_HOST . "\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - /** - * Builds the body of API call - * - * @phpstan-param FormattedRecord $record - */ - private function buildContent(array $record): string - { - $dataArray = [ - 'message' => $record['formatted'], - ]; - - return http_build_query($dataArray); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php deleted file mode 100644 index 5715d580..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php +++ /dev/null @@ -1,133 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\FlowdockFormatter; -use Monolog\Formatter\FormatterInterface; - -/** - * Sends notifications through the Flowdock push API - * - * This must be configured with a FlowdockFormatter instance via setFormatter() - * - * Notes: - * API token - Flowdock API token - * - * @author Dominik Liebler - * @see https://www.flowdock.com/api/push - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - * @deprecated Since 2.9.0 and 3.3.0, Flowdock was shutdown we will thus drop this handler in Monolog 4 - */ -class FlowdockHandler extends SocketHandler -{ - /** - * @var string - */ - protected $apiToken; - - /** - * @throws MissingExtensionException if OpenSSL is missing - */ - public function __construct( - string $apiToken, - $level = Logger::DEBUG, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if (!extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FlowdockHandler'); - } - - parent::__construct( - 'ssl://api.flowdock.com:443', - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - $this->apiToken = $apiToken; - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if (!$formatter instanceof FlowdockFormatter) { - throw new \InvalidArgumentException('The FlowdockHandler requires an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); - } - - return parent::setFormatter($formatter); - } - - /** - * Gets the default formatter. - */ - protected function getDefaultFormatter(): FormatterInterface - { - throw new \InvalidArgumentException('The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - parent::write($record); - - $this->closeSocket(); - } - - /** - * {@inheritDoc} - */ - protected function generateDataStream(array $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the body of API call - * - * @phpstan-param FormattedRecord $record - */ - private function buildContent(array $record): string - { - return Utils::jsonEncode($record['formatted']['flowdock']); - } - - /** - * Builds the header of the API Call - */ - private function buildHeader(string $content): string - { - $header = "POST /v1/messages/team_inbox/" . $this->apiToken . " HTTP/1.1\r\n"; - $header .= "Host: api.flowdock.com\r\n"; - $header .= "Content-Type: application/json\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php deleted file mode 100644 index fc1693cd..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; - -/** - * Interface to describe loggers that have a formatter - * - * @author Jordi Boggiano - */ -interface FormattableHandlerInterface -{ - /** - * Sets the formatter. - * - * @param FormatterInterface $formatter - * @return HandlerInterface self - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface; - - /** - * Gets the formatter. - * - * @return FormatterInterface - */ - public function getFormatter(): FormatterInterface; -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php b/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php deleted file mode 100644 index b60bdce0..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/FormattableHandlerTrait.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; - -/** - * Helper trait for implementing FormattableInterface - * - * @author Jordi Boggiano - */ -trait FormattableHandlerTrait -{ - /** - * @var ?FormatterInterface - */ - protected $formatter; - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $this->formatter = $formatter; - - return $this; - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - if (!$this->formatter) { - $this->formatter = $this->getDefaultFormatter(); - } - - return $this->formatter; - } - - /** - * Gets the default formatter. - * - * Overwrite this if the LineFormatter is not a good default for your handler. - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php deleted file mode 100644 index 4ff26c4c..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Gelf\PublisherInterface; -use Monolog\Logger; -use Monolog\Formatter\GelfMessageFormatter; -use Monolog\Formatter\FormatterInterface; - -/** - * Handler to send messages to a Graylog2 (http://www.graylog2.org) server - * - * @author Matt Lehner - * @author Benjamin Zikarsky - */ -class GelfHandler extends AbstractProcessingHandler -{ - /** - * @var PublisherInterface the publisher object that sends the message to the server - */ - protected $publisher; - - /** - * @param PublisherInterface $publisher a gelf publisher object - */ - public function __construct(PublisherInterface $publisher, $level = Logger::DEBUG, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->publisher = $publisher; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->publisher->publish($record['formatted']); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new GelfMessageFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php deleted file mode 100644 index 3c9dc4b3..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\ResettableInterface; - -/** - * Forwards records to multiple handlers - * - * @author Lenar Lõhmus - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class GroupHandler extends Handler implements ProcessableHandlerInterface, ResettableInterface -{ - use ProcessableHandlerTrait; - - /** @var HandlerInterface[] */ - protected $handlers; - /** @var bool */ - protected $bubble; - - /** - * @param HandlerInterface[] $handlers Array of Handlers. - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - */ - public function __construct(array $handlers, bool $bubble = true) - { - foreach ($handlers as $handler) { - if (!$handler instanceof HandlerInterface) { - throw new \InvalidArgumentException('The first argument of the GroupHandler must be an array of HandlerInterface instances.'); - } - } - - $this->handlers = $handlers; - $this->bubble = $bubble; - } - - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - foreach ($this->handlers as $handler) { - if ($handler->isHandling($record)) { - return true; - } - } - - return false; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - foreach ($this->handlers as $handler) { - $handler->handle($record); - } - - return false === $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - if ($this->processors) { - $processed = []; - foreach ($records as $record) { - $processed[] = $this->processRecord($record); - } - /** @var Record[] $records */ - $records = $processed; - } - - foreach ($this->handlers as $handler) { - $handler->handleBatch($records); - } - } - - public function reset() - { - $this->resetProcessors(); - - foreach ($this->handlers as $handler) { - if ($handler instanceof ResettableInterface) { - $handler->reset(); - } - } - } - - public function close(): void - { - parent::close(); - - foreach ($this->handlers as $handler) { - $handler->close(); - } - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - foreach ($this->handlers as $handler) { - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - } - } - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Handler.php b/vendor/monolog/monolog/src/Monolog/Handler/Handler.php deleted file mode 100644 index 34b4935d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/Handler.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Base Handler class providing basic close() support as well as handleBatch - * - * @author Jordi Boggiano - */ -abstract class Handler implements HandlerInterface -{ - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - foreach ($records as $record) { - $this->handle($record); - } - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - } - - public function __destruct() - { - try { - $this->close(); - } catch (\Throwable $e) { - // do nothing - } - } - - public function __sleep() - { - $this->close(); - - $reflClass = new \ReflectionClass($this); - - $keys = []; - foreach ($reflClass->getProperties() as $reflProp) { - if (!$reflProp->isStatic()) { - $keys[] = $reflProp->getName(); - } - } - - return $keys; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php deleted file mode 100644 index affcc51f..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Interface that all Monolog Handlers must implement - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - */ -interface HandlerInterface -{ - /** - * Checks whether the given record will be handled by this handler. - * - * This is mostly done for performance reasons, to avoid calling processors for nothing. - * - * Handlers should still check the record levels within handle(), returning false in isHandling() - * is no guarantee that handle() will not be called, and isHandling() might not be called - * for a given record. - * - * @param array $record Partial log record containing only a level key - * - * @return bool - * - * @phpstan-param array{level: Level} $record - */ - public function isHandling(array $record): bool; - - /** - * Handles a record. - * - * All records may be passed to this method, and the handler should discard - * those that it does not want to handle. - * - * The return value of this function controls the bubbling process of the handler stack. - * Unless the bubbling is interrupted (by returning true), the Logger class will keep on - * calling further handlers in the stack with a given log record. - * - * @param array $record The record to handle - * @return bool true means that this handler handled the record, and that bubbling is not permitted. - * false means the record was either not processed or that this handler allows bubbling. - * - * @phpstan-param Record $record - */ - public function handle(array $record): bool; - - /** - * Handles a set of records at once. - * - * @param array $records The records to handle (an array of record arrays) - * - * @phpstan-param Record[] $records - */ - public function handleBatch(array $records): void; - - /** - * Closes the handler. - * - * Ends a log cycle and frees all resources used by the handler. - * - * Closing a Handler means flushing all buffers and freeing any open resources/handles. - * - * Implementations have to be idempotent (i.e. it should be possible to call close several times without breakage) - * and ideally handlers should be able to reopen themselves on handle() after they have been closed. - * - * This is useful at the end of a request and will be called automatically when the object - * is destroyed if you extend Monolog\Handler\Handler. - * - * If you are thinking of calling this method yourself, most likely you should be - * calling ResettableInterface::reset instead. Have a look. - */ - public function close(): void; -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php deleted file mode 100644 index d4351b9f..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php +++ /dev/null @@ -1,136 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\ResettableInterface; -use Monolog\Formatter\FormatterInterface; - -/** - * This simple wrapper class can be used to extend handlers functionality. - * - * Example: A custom filtering that can be applied to any handler. - * - * Inherit from this class and override handle() like this: - * - * public function handle(array $record) - * { - * if ($record meets certain conditions) { - * return false; - * } - * return $this->handler->handle($record); - * } - * - * @author Alexey Karapetov - */ -class HandlerWrapper implements HandlerInterface, ProcessableHandlerInterface, FormattableHandlerInterface, ResettableInterface -{ - /** - * @var HandlerInterface - */ - protected $handler; - - public function __construct(HandlerInterface $handler) - { - $this->handler = $handler; - } - - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - return $this->handler->isHandling($record); - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - return $this->handler->handle($record); - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - $this->handler->handleBatch($records); - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - $this->handler->close(); - } - - /** - * {@inheritDoc} - */ - public function pushProcessor(callable $callback): HandlerInterface - { - if ($this->handler instanceof ProcessableHandlerInterface) { - $this->handler->pushProcessor($callback); - - return $this; - } - - throw new \LogicException('The wrapped handler does not implement ' . ProcessableHandlerInterface::class); - } - - /** - * {@inheritDoc} - */ - public function popProcessor(): callable - { - if ($this->handler instanceof ProcessableHandlerInterface) { - return $this->handler->popProcessor(); - } - - throw new \LogicException('The wrapped handler does not implement ' . ProcessableHandlerInterface::class); - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - $this->handler->setFormatter($formatter); - - return $this; - } - - throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class); - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - return $this->handler->getFormatter(); - } - - throw new \LogicException('The wrapped handler does not implement ' . FormattableHandlerInterface::class); - } - - public function reset() - { - if ($this->handler instanceof ResettableInterface) { - $this->handler->reset(); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php deleted file mode 100644 index 000ccea4..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php +++ /dev/null @@ -1,74 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * IFTTTHandler uses cURL to trigger IFTTT Maker actions - * - * Register a secret key and trigger/event name at https://ifttt.com/maker - * - * value1 will be the channel from monolog's Logger constructor, - * value2 will be the level name (ERROR, WARNING, ..) - * value3 will be the log record's message - * - * @author Nehal Patel - */ -class IFTTTHandler extends AbstractProcessingHandler -{ - /** @var string */ - private $eventName; - /** @var string */ - private $secretKey; - - /** - * @param string $eventName The name of the IFTTT Maker event that should be triggered - * @param string $secretKey A valid IFTTT secret key - */ - public function __construct(string $eventName, string $secretKey, $level = Logger::ERROR, bool $bubble = true) - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the IFTTTHandler'); - } - - $this->eventName = $eventName; - $this->secretKey = $secretKey; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - public function write(array $record): void - { - $postData = [ - "value1" => $record["channel"], - "value2" => $record["level_name"], - "value3" => $record["message"], - ]; - $postString = Utils::jsonEncode($postData); - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, $postString); - curl_setopt($ch, CURLOPT_HTTPHEADER, [ - "Content-Type: application/json", - ]); - - Curl\Util::execute($ch); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php deleted file mode 100644 index 71f64a26..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php +++ /dev/null @@ -1,76 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Inspired on LogEntriesHandler. - * - * @author Robert Kaufmann III - * @author Gabriel Machado - */ -class InsightOpsHandler extends SocketHandler -{ - /** - * @var string - */ - protected $logToken; - - /** - * @param string $token Log token supplied by InsightOps - * @param string $region Region where InsightOps account is hosted. Could be 'us' or 'eu'. - * @param bool $useSSL Whether or not SSL encryption should be used - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct( - string $token, - string $region = 'us', - bool $useSSL = true, - $level = Logger::DEBUG, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if ($useSSL && !extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for InsightOpsHandler'); - } - - $endpoint = $useSSL - ? 'ssl://' . $region . '.data.logs.insight.rapid7.com:443' - : $region . '.data.logs.insight.rapid7.com:80'; - - parent::__construct( - $endpoint, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - $this->logToken = $token; - } - - /** - * {@inheritDoc} - */ - protected function generateDataStream(array $record): string - { - return $this->logToken . ' ' . $record['formatted']; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php deleted file mode 100644 index 25fcd159..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php +++ /dev/null @@ -1,70 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * @author Robert Kaufmann III - */ -class LogEntriesHandler extends SocketHandler -{ - /** - * @var string - */ - protected $logToken; - - /** - * @param string $token Log token supplied by LogEntries - * @param bool $useSSL Whether or not SSL encryption should be used. - * @param string $host Custom hostname to send the data to if needed - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct( - string $token, - bool $useSSL = true, - $level = Logger::DEBUG, - bool $bubble = true, - string $host = 'data.logentries.com', - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if ($useSSL && !extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler'); - } - - $endpoint = $useSSL ? 'ssl://' . $host . ':443' : $host . ':80'; - parent::__construct( - $endpoint, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - $this->logToken = $token; - } - - /** - * {@inheritDoc} - */ - protected function generateDataStream(array $record): string - { - return $this->logToken . ' ' . $record['formatted']; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php deleted file mode 100644 index 6d13db37..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php +++ /dev/null @@ -1,160 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LogglyFormatter; -use function array_key_exists; -use CurlHandle; - -/** - * Sends errors to Loggly. - * - * @author Przemek Sobstel - * @author Adam Pancutt - * @author Gregory Barchard - */ -class LogglyHandler extends AbstractProcessingHandler -{ - protected const HOST = 'logs-01.loggly.com'; - protected const ENDPOINT_SINGLE = 'inputs'; - protected const ENDPOINT_BATCH = 'bulk'; - - /** - * Caches the curl handlers for every given endpoint. - * - * @var resource[]|CurlHandle[] - */ - protected $curlHandlers = []; - - /** @var string */ - protected $token; - - /** @var string[] */ - protected $tag = []; - - /** - * @param string $token API token supplied by Loggly - * - * @throws MissingExtensionException If the curl extension is missing - */ - public function __construct(string $token, $level = Logger::DEBUG, bool $bubble = true) - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the LogglyHandler'); - } - - $this->token = $token; - - parent::__construct($level, $bubble); - } - - /** - * Loads and returns the shared curl handler for the given endpoint. - * - * @param string $endpoint - * - * @return resource|CurlHandle - */ - protected function getCurlHandler(string $endpoint) - { - if (!array_key_exists($endpoint, $this->curlHandlers)) { - $this->curlHandlers[$endpoint] = $this->loadCurlHandle($endpoint); - } - - return $this->curlHandlers[$endpoint]; - } - - /** - * Starts a fresh curl session for the given endpoint and returns its handler. - * - * @param string $endpoint - * - * @return resource|CurlHandle - */ - private function loadCurlHandle(string $endpoint) - { - $url = sprintf("https://%s/%s/%s/", static::HOST, $endpoint, $this->token); - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_POST, true); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - - return $ch; - } - - /** - * @param string[]|string $tag - */ - public function setTag($tag): self - { - $tag = !empty($tag) ? $tag : []; - $this->tag = is_array($tag) ? $tag : [$tag]; - - return $this; - } - - /** - * @param string[]|string $tag - */ - public function addTag($tag): self - { - if (!empty($tag)) { - $tag = is_array($tag) ? $tag : [$tag]; - $this->tag = array_unique(array_merge($this->tag, $tag)); - } - - return $this; - } - - protected function write(array $record): void - { - $this->send($record["formatted"], static::ENDPOINT_SINGLE); - } - - public function handleBatch(array $records): void - { - $level = $this->level; - - $records = array_filter($records, function ($record) use ($level) { - return ($record['level'] >= $level); - }); - - if ($records) { - $this->send($this->getFormatter()->formatBatch($records), static::ENDPOINT_BATCH); - } - } - - protected function send(string $data, string $endpoint): void - { - $ch = $this->getCurlHandler($endpoint); - - $headers = ['Content-Type: application/json']; - - if (!empty($this->tag)) { - $headers[] = 'X-LOGGLY-TAG: '.implode(',', $this->tag); - } - - curl_setopt($ch, CURLOPT_POSTFIELDS, $data); - curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); - - Curl\Util::execute($ch, 5, false); - } - - protected function getDefaultFormatter(): FormatterInterface - { - return new LogglyFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php deleted file mode 100644 index 859a4690..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/LogmaticHandler.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LogmaticFormatter; - -/** - * @author Julien Breux - */ -class LogmaticHandler extends SocketHandler -{ - /** - * @var string - */ - private $logToken; - - /** - * @var string - */ - private $hostname; - - /** - * @var string - */ - private $appname; - - /** - * @param string $token Log token supplied by Logmatic. - * @param string $hostname Host name supplied by Logmatic. - * @param string $appname Application name supplied by Logmatic. - * @param bool $useSSL Whether or not SSL encryption should be used. - * - * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing - */ - public function __construct( - string $token, - string $hostname = '', - string $appname = '', - bool $useSSL = true, - $level = Logger::DEBUG, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if ($useSSL && !extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use SSL encrypted connection for LogmaticHandler'); - } - - $endpoint = $useSSL ? 'ssl://api.logmatic.io:10515' : 'api.logmatic.io:10514'; - $endpoint .= '/v1/'; - - parent::__construct( - $endpoint, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - - $this->logToken = $token; - $this->hostname = $hostname; - $this->appname = $appname; - } - - /** - * {@inheritDoc} - */ - protected function generateDataStream(array $record): string - { - return $this->logToken . ' ' . $record['formatted']; - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - $formatter = new LogmaticFormatter(); - - if (!empty($this->hostname)) { - $formatter->setHostname($this->hostname); - } - if (!empty($this->appname)) { - $formatter->setAppname($this->appname); - } - - return $formatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php deleted file mode 100644 index 97f34320..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\HtmlFormatter; - -/** - * Base class for all mail handlers - * - * @author Gyula Sallai - * - * @phpstan-import-type Record from \Monolog\Logger - */ -abstract class MailHandler extends AbstractProcessingHandler -{ - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - $messages = []; - - foreach ($records as $record) { - if ($record['level'] < $this->level) { - continue; - } - /** @var Record $message */ - $message = $this->processRecord($record); - $messages[] = $message; - } - - if (!empty($messages)) { - $this->send((string) $this->getFormatter()->formatBatch($messages), $messages); - } - } - - /** - * Send a mail with the given content - * - * @param string $content formatted email body to be sent - * @param array $records the array of log records that formed this content - * - * @phpstan-param Record[] $records - */ - abstract protected function send(string $content, array $records): void; - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->send((string) $record['formatted'], [$record]); - } - - /** - * @phpstan-param non-empty-array $records - * @phpstan-return Record - */ - protected function getHighestRecord(array $records): array - { - $highestRecord = null; - foreach ($records as $record) { - if ($highestRecord === null || $highestRecord['level'] < $record['level']) { - $highestRecord = $record; - } - } - - return $highestRecord; - } - - protected function isHtmlBody(string $body): bool - { - return ($body[0] ?? null) === '<'; - } - - /** - * Gets the default formatter. - * - * @return FormatterInterface - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new HtmlFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php deleted file mode 100644 index 3003500e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php +++ /dev/null @@ -1,83 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Swift; -use Swift_Message; - -/** - * MandrillHandler uses cURL to send the emails to the Mandrill API - * - * @author Adam Nicholson - */ -class MandrillHandler extends MailHandler -{ - /** @var Swift_Message */ - protected $message; - /** @var string */ - protected $apiKey; - - /** - * @psalm-param Swift_Message|callable(): Swift_Message $message - * - * @param string $apiKey A valid Mandrill API key - * @param callable|Swift_Message $message An example message for real messages, only the body will be replaced - */ - public function __construct(string $apiKey, $message, $level = Logger::ERROR, bool $bubble = true) - { - parent::__construct($level, $bubble); - - if (!$message instanceof Swift_Message && is_callable($message)) { - $message = $message(); - } - if (!$message instanceof Swift_Message) { - throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it'); - } - $this->message = $message; - $this->apiKey = $apiKey; - } - - /** - * {@inheritDoc} - */ - protected function send(string $content, array $records): void - { - $mime = 'text/plain'; - if ($this->isHtmlBody($content)) { - $mime = 'text/html'; - } - - $message = clone $this->message; - $message->setBody($content, $mime); - /** @phpstan-ignore-next-line */ - if (version_compare(Swift::VERSION, '6.0.0', '>=')) { - $message->setDate(new \DateTimeImmutable()); - } else { - /** @phpstan-ignore-next-line */ - $message->setDate(time()); - } - - $ch = curl_init(); - - curl_setopt($ch, CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json'); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ - 'key' => $this->apiKey, - 'raw_message' => (string) $message, - 'async' => false, - ])); - - Curl\Util::execute($ch); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php b/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php deleted file mode 100644 index 3965aeea..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Exception can be thrown if an extension for a handler is missing - * - * @author Christian Bergau - */ -class MissingExtensionException extends \Exception -{ -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php deleted file mode 100644 index 30630911..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php +++ /dev/null @@ -1,86 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use MongoDB\Driver\BulkWrite; -use MongoDB\Driver\Manager; -use MongoDB\Client; -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\MongoDBFormatter; - -/** - * Logs to a MongoDB database. - * - * Usage example: - * - * $log = new \Monolog\Logger('application'); - * $client = new \MongoDB\Client('mongodb://localhost:27017'); - * $mongodb = new \Monolog\Handler\MongoDBHandler($client, 'logs', 'prod'); - * $log->pushHandler($mongodb); - * - * The above examples uses the MongoDB PHP library's client class; however, the - * MongoDB\Driver\Manager class from ext-mongodb is also supported. - */ -class MongoDBHandler extends AbstractProcessingHandler -{ - /** @var \MongoDB\Collection */ - private $collection; - /** @var Client|Manager */ - private $manager; - /** @var string */ - private $namespace; - - /** - * Constructor. - * - * @param Client|Manager $mongodb MongoDB library or driver client - * @param string $database Database name - * @param string $collection Collection name - */ - public function __construct($mongodb, string $database, string $collection, $level = Logger::DEBUG, bool $bubble = true) - { - if (!($mongodb instanceof Client || $mongodb instanceof Manager)) { - throw new \InvalidArgumentException('MongoDB\Client or MongoDB\Driver\Manager instance required'); - } - - if ($mongodb instanceof Client) { - $this->collection = $mongodb->selectCollection($database, $collection); - } else { - $this->manager = $mongodb; - $this->namespace = $database . '.' . $collection; - } - - parent::__construct($level, $bubble); - } - - protected function write(array $record): void - { - if (isset($this->collection)) { - $this->collection->insertOne($record['formatted']); - } - - if (isset($this->manager, $this->namespace)) { - $bulk = new BulkWrite; - $bulk->insert($record["formatted"]); - $this->manager->executeBulkWrite($this->namespace, $bulk); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new MongoDBFormatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php deleted file mode 100644 index 0c0a3bdb..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php +++ /dev/null @@ -1,174 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\LineFormatter; - -/** - * NativeMailerHandler uses the mail() function to send the emails - * - * @author Christophe Coevoet - * @author Mark Garrett - */ -class NativeMailerHandler extends MailHandler -{ - /** - * The email addresses to which the message will be sent - * @var string[] - */ - protected $to; - - /** - * The subject of the email - * @var string - */ - protected $subject; - - /** - * Optional headers for the message - * @var string[] - */ - protected $headers = []; - - /** - * Optional parameters for the message - * @var string[] - */ - protected $parameters = []; - - /** - * The wordwrap length for the message - * @var int - */ - protected $maxColumnWidth; - - /** - * The Content-type for the message - * @var string|null - */ - protected $contentType; - - /** - * The encoding for the message - * @var string - */ - protected $encoding = 'utf-8'; - - /** - * @param string|string[] $to The receiver of the mail - * @param string $subject The subject of the mail - * @param string $from The sender of the mail - * @param int $maxColumnWidth The maximum column width that the message lines will have - */ - public function __construct($to, string $subject, string $from, $level = Logger::ERROR, bool $bubble = true, int $maxColumnWidth = 70) - { - parent::__construct($level, $bubble); - $this->to = (array) $to; - $this->subject = $subject; - $this->addHeader(sprintf('From: %s', $from)); - $this->maxColumnWidth = $maxColumnWidth; - } - - /** - * Add headers to the message - * - * @param string|string[] $headers Custom added headers - */ - public function addHeader($headers): self - { - foreach ((array) $headers as $header) { - if (strpos($header, "\n") !== false || strpos($header, "\r") !== false) { - throw new \InvalidArgumentException('Headers can not contain newline characters for security reasons'); - } - $this->headers[] = $header; - } - - return $this; - } - - /** - * Add parameters to the message - * - * @param string|string[] $parameters Custom added parameters - */ - public function addParameter($parameters): self - { - $this->parameters = array_merge($this->parameters, (array) $parameters); - - return $this; - } - - /** - * {@inheritDoc} - */ - protected function send(string $content, array $records): void - { - $contentType = $this->getContentType() ?: ($this->isHtmlBody($content) ? 'text/html' : 'text/plain'); - - if ($contentType !== 'text/html') { - $content = wordwrap($content, $this->maxColumnWidth); - } - - $headers = ltrim(implode("\r\n", $this->headers) . "\r\n", "\r\n"); - $headers .= 'Content-type: ' . $contentType . '; charset=' . $this->getEncoding() . "\r\n"; - if ($contentType === 'text/html' && false === strpos($headers, 'MIME-Version:')) { - $headers .= 'MIME-Version: 1.0' . "\r\n"; - } - - $subject = $this->subject; - if ($records) { - $subjectFormatter = new LineFormatter($this->subject); - $subject = $subjectFormatter->format($this->getHighestRecord($records)); - } - - $parameters = implode(' ', $this->parameters); - foreach ($this->to as $to) { - mail($to, $subject, $content, $headers, $parameters); - } - } - - public function getContentType(): ?string - { - return $this->contentType; - } - - public function getEncoding(): string - { - return $this->encoding; - } - - /** - * @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML messages. - */ - public function setContentType(string $contentType): self - { - if (strpos($contentType, "\n") !== false || strpos($contentType, "\r") !== false) { - throw new \InvalidArgumentException('The content type can not contain newline characters to prevent email header injection'); - } - - $this->contentType = $contentType; - - return $this; - } - - public function setEncoding(string $encoding): self - { - if (strpos($encoding, "\n") !== false || strpos($encoding, "\r") !== false) { - throw new \InvalidArgumentException('The encoding can not contain newline characters to prevent email header injection'); - } - - $this->encoding = $encoding; - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php deleted file mode 100644 index 114d749e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php +++ /dev/null @@ -1,199 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; - -/** - * Class to record a log on a NewRelic application. - * Enabling New Relic High Security mode may prevent capture of useful information. - * - * This handler requires a NormalizerFormatter to function and expects an array in $record['formatted'] - * - * @see https://docs.newrelic.com/docs/agents/php-agent - * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security - */ -class NewRelicHandler extends AbstractProcessingHandler -{ - /** - * Name of the New Relic application that will receive logs from this handler. - * - * @var ?string - */ - protected $appName; - - /** - * Name of the current transaction - * - * @var ?string - */ - protected $transactionName; - - /** - * Some context and extra data is passed into the handler as arrays of values. Do we send them as is - * (useful if we are using the API), or explode them for display on the NewRelic RPM website? - * - * @var bool - */ - protected $explodeArrays; - - /** - * {@inheritDoc} - * - * @param string|null $appName - * @param bool $explodeArrays - * @param string|null $transactionName - */ - public function __construct( - $level = Logger::ERROR, - bool $bubble = true, - ?string $appName = null, - bool $explodeArrays = false, - ?string $transactionName = null - ) { - parent::__construct($level, $bubble); - - $this->appName = $appName; - $this->explodeArrays = $explodeArrays; - $this->transactionName = $transactionName; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if (!$this->isNewRelicEnabled()) { - throw new MissingExtensionException('The newrelic PHP extension is required to use the NewRelicHandler'); - } - - if ($appName = $this->getAppName($record['context'])) { - $this->setNewRelicAppName($appName); - } - - if ($transactionName = $this->getTransactionName($record['context'])) { - $this->setNewRelicTransactionName($transactionName); - unset($record['formatted']['context']['transaction_name']); - } - - if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) { - newrelic_notice_error($record['message'], $record['context']['exception']); - unset($record['formatted']['context']['exception']); - } else { - newrelic_notice_error($record['message']); - } - - if (isset($record['formatted']['context']) && is_array($record['formatted']['context'])) { - foreach ($record['formatted']['context'] as $key => $parameter) { - if (is_array($parameter) && $this->explodeArrays) { - foreach ($parameter as $paramKey => $paramValue) { - $this->setNewRelicParameter('context_' . $key . '_' . $paramKey, $paramValue); - } - } else { - $this->setNewRelicParameter('context_' . $key, $parameter); - } - } - } - - if (isset($record['formatted']['extra']) && is_array($record['formatted']['extra'])) { - foreach ($record['formatted']['extra'] as $key => $parameter) { - if (is_array($parameter) && $this->explodeArrays) { - foreach ($parameter as $paramKey => $paramValue) { - $this->setNewRelicParameter('extra_' . $key . '_' . $paramKey, $paramValue); - } - } else { - $this->setNewRelicParameter('extra_' . $key, $parameter); - } - } - } - } - - /** - * Checks whether the NewRelic extension is enabled in the system. - * - * @return bool - */ - protected function isNewRelicEnabled(): bool - { - return extension_loaded('newrelic'); - } - - /** - * Returns the appname where this log should be sent. Each log can override the default appname, set in this - * handler's constructor, by providing the appname in it's context. - * - * @param mixed[] $context - */ - protected function getAppName(array $context): ?string - { - if (isset($context['appname'])) { - return $context['appname']; - } - - return $this->appName; - } - - /** - * Returns the name of the current transaction. Each log can override the default transaction name, set in this - * handler's constructor, by providing the transaction_name in it's context - * - * @param mixed[] $context - */ - protected function getTransactionName(array $context): ?string - { - if (isset($context['transaction_name'])) { - return $context['transaction_name']; - } - - return $this->transactionName; - } - - /** - * Sets the NewRelic application that should receive this log. - */ - protected function setNewRelicAppName(string $appName): void - { - newrelic_set_appname($appName); - } - - /** - * Overwrites the name of the current transaction - */ - protected function setNewRelicTransactionName(string $transactionName): void - { - newrelic_name_transaction($transactionName); - } - - /** - * @param string $key - * @param mixed $value - */ - protected function setNewRelicParameter(string $key, $value): void - { - if (null === $value || is_scalar($value)) { - newrelic_add_custom_parameter($key, $value); - } else { - newrelic_add_custom_parameter($key, Utils::jsonEncode($value, null, true)); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new NormalizerFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php deleted file mode 100644 index 1ddf0beb..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NoopHandler.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * No-op - * - * This handler handles anything, but does nothing, and does not stop bubbling to the rest of the stack. - * This can be used for testing, or to disable a handler when overriding a configuration without - * influencing the rest of the stack. - * - * @author Roel Harbers - */ -class NoopHandler extends Handler -{ - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - return true; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - return false; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php deleted file mode 100644 index e75ee0c6..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Blackhole - * - * Any record it can handle will be thrown away. This can be used - * to put on top of an existing stack to override it temporarily. - * - * @author Jordi Boggiano - * - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class NullHandler extends Handler -{ - /** - * @var int - */ - private $level; - - /** - * @param string|int $level The minimum logging level at which this handler will be triggered - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function __construct($level = Logger::DEBUG) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * {@inheritDoc} - */ - public function isHandling(array $record): bool - { - return $record['level'] >= $this->level; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - return $record['level'] >= $this->level; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php deleted file mode 100644 index 22068c9a..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/OverflowHandler.php +++ /dev/null @@ -1,149 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Formatter\FormatterInterface; - -/** - * Handler to only pass log messages when a certain threshold of number of messages is reached. - * - * This can be useful in cases of processing a batch of data, but you're for example only interested - * in case it fails catastrophically instead of a warning for 1 or 2 events. Worse things can happen, right? - * - * Usage example: - * - * ``` - * $log = new Logger('application'); - * $handler = new SomeHandler(...) - * - * // Pass all warnings to the handler when more than 10 & all error messages when more then 5 - * $overflow = new OverflowHandler($handler, [Logger::WARNING => 10, Logger::ERROR => 5]); - * - * $log->pushHandler($overflow); - *``` - * - * @author Kris Buist - */ -class OverflowHandler extends AbstractHandler implements FormattableHandlerInterface -{ - /** @var HandlerInterface */ - private $handler; - - /** @var int[] */ - private $thresholdMap = [ - Logger::DEBUG => 0, - Logger::INFO => 0, - Logger::NOTICE => 0, - Logger::WARNING => 0, - Logger::ERROR => 0, - Logger::CRITICAL => 0, - Logger::ALERT => 0, - Logger::EMERGENCY => 0, - ]; - - /** - * Buffer of all messages passed to the handler before the threshold was reached - * - * @var mixed[][] - */ - private $buffer = []; - - /** - * @param HandlerInterface $handler - * @param int[] $thresholdMap Dictionary of logger level => threshold - */ - public function __construct( - HandlerInterface $handler, - array $thresholdMap = [], - $level = Logger::DEBUG, - bool $bubble = true - ) { - $this->handler = $handler; - foreach ($thresholdMap as $thresholdLevel => $threshold) { - $this->thresholdMap[$thresholdLevel] = $threshold; - } - parent::__construct($level, $bubble); - } - - /** - * Handles a record. - * - * All records may be passed to this method, and the handler should discard - * those that it does not want to handle. - * - * The return value of this function controls the bubbling process of the handler stack. - * Unless the bubbling is interrupted (by returning true), the Logger class will keep on - * calling further handlers in the stack with a given log record. - * - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if ($record['level'] < $this->level) { - return false; - } - - $level = $record['level']; - - if (!isset($this->thresholdMap[$level])) { - $this->thresholdMap[$level] = 0; - } - - if ($this->thresholdMap[$level] > 0) { - // The overflow threshold is not yet reached, so we're buffering the record and lowering the threshold by 1 - $this->thresholdMap[$level]--; - $this->buffer[$level][] = $record; - - return false === $this->bubble; - } - - if ($this->thresholdMap[$level] == 0) { - // This current message is breaking the threshold. Flush the buffer and continue handling the current record - foreach ($this->buffer[$level] ?? [] as $buffered) { - $this->handler->handle($buffered); - } - $this->thresholdMap[$level]--; - unset($this->buffer[$level]); - } - - $this->handler->handle($record); - - return false === $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - $this->handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.'); - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - if ($this->handler instanceof FormattableHandlerInterface) { - return $this->handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($this->handler).' does not support formatters.'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php deleted file mode 100644 index 23a1d117..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php +++ /dev/null @@ -1,263 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Monolog\Utils; -use PhpConsole\Connector; -use PhpConsole\Handler as VendorPhpConsoleHandler; -use PhpConsole\Helper; - -/** - * Monolog handler for Google Chrome extension "PHP Console" - * - * Display PHP error/debug log messages in Google Chrome console and notification popups, executes PHP code remotely - * - * Usage: - * 1. Install Google Chrome extension [now dead and removed from the chrome store] - * 2. See overview https://github.com/barbushin/php-console#overview - * 3. Install PHP Console library https://github.com/barbushin/php-console#installation - * 4. Example (result will looks like http://i.hizliresim.com/vg3Pz4.png) - * - * $logger = new \Monolog\Logger('all', array(new \Monolog\Handler\PHPConsoleHandler())); - * \Monolog\ErrorHandler::register($logger); - * echo $undefinedVar; - * $logger->debug('SELECT * FROM users', array('db', 'time' => 0.012)); - * PC::debug($_SERVER); // PHP Console debugger for any type of vars - * - * @author Sergey Barbushin https://www.linkedin.com/in/barbushin - * - * @phpstan-import-type Record from \Monolog\Logger - * @deprecated Since 2.8.0 and 3.2.0, PHPConsole is abandoned and thus we will drop this handler in Monolog 4 - */ -class PHPConsoleHandler extends AbstractProcessingHandler -{ - /** @var array */ - private $options = [ - 'enabled' => true, // bool Is PHP Console server enabled - 'classesPartialsTraceIgnore' => ['Monolog\\'], // array Hide calls of classes started with... - 'debugTagsKeysInContext' => [0, 'tag'], // bool Is PHP Console server enabled - 'useOwnErrorsHandler' => false, // bool Enable errors handling - 'useOwnExceptionsHandler' => false, // bool Enable exceptions handling - 'sourcesBasePath' => null, // string Base path of all project sources to strip in errors source paths - 'registerHelper' => true, // bool Register PhpConsole\Helper that allows short debug calls like PC::debug($var, 'ta.g.s') - 'serverEncoding' => null, // string|null Server internal encoding - 'headersLimit' => null, // int|null Set headers size limit for your web-server - 'password' => null, // string|null Protect PHP Console connection by password - 'enableSslOnlyMode' => false, // bool Force connection by SSL for clients with PHP Console installed - 'ipMasks' => [], // array Set IP masks of clients that will be allowed to connect to PHP Console: array('192.168.*.*', '127.0.0.1') - 'enableEvalListener' => false, // bool Enable eval request to be handled by eval dispatcher(if enabled, 'password' option is also required) - 'dumperDetectCallbacks' => false, // bool Convert callback items in dumper vars to (callback SomeClass::someMethod) strings - 'dumperLevelLimit' => 5, // int Maximum dumped vars array or object nested dump level - 'dumperItemsCountLimit' => 100, // int Maximum dumped var same level array items or object properties number - 'dumperItemSizeLimit' => 5000, // int Maximum length of any string or dumped array item - 'dumperDumpSizeLimit' => 500000, // int Maximum approximate size of dumped vars result formatted in JSON - 'detectDumpTraceAndSource' => false, // bool Autodetect and append trace data to debug - 'dataStorage' => null, // \PhpConsole\Storage|null Fixes problem with custom $_SESSION handler(see http://goo.gl/Ne8juJ) - ]; - - /** @var Connector */ - private $connector; - - /** - * @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details - * @param Connector|null $connector Instance of \PhpConsole\Connector class (optional) - * @throws \RuntimeException - */ - public function __construct(array $options = [], ?Connector $connector = null, $level = Logger::DEBUG, bool $bubble = true) - { - if (!class_exists('PhpConsole\Connector')) { - throw new \RuntimeException('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); - } - parent::__construct($level, $bubble); - $this->options = $this->initOptions($options); - $this->connector = $this->initConnector($connector); - } - - /** - * @param array $options - * - * @return array - */ - private function initOptions(array $options): array - { - $wrongOptions = array_diff(array_keys($options), array_keys($this->options)); - if ($wrongOptions) { - throw new \RuntimeException('Unknown options: ' . implode(', ', $wrongOptions)); - } - - return array_replace($this->options, $options); - } - - private function initConnector(?Connector $connector = null): Connector - { - if (!$connector) { - if ($this->options['dataStorage']) { - Connector::setPostponeStorage($this->options['dataStorage']); - } - $connector = Connector::getInstance(); - } - - if ($this->options['registerHelper'] && !Helper::isRegistered()) { - Helper::register(); - } - - if ($this->options['enabled'] && $connector->isActiveClient()) { - if ($this->options['useOwnErrorsHandler'] || $this->options['useOwnExceptionsHandler']) { - $handler = VendorPhpConsoleHandler::getInstance(); - $handler->setHandleErrors($this->options['useOwnErrorsHandler']); - $handler->setHandleExceptions($this->options['useOwnExceptionsHandler']); - $handler->start(); - } - if ($this->options['sourcesBasePath']) { - $connector->setSourcesBasePath($this->options['sourcesBasePath']); - } - if ($this->options['serverEncoding']) { - $connector->setServerEncoding($this->options['serverEncoding']); - } - if ($this->options['password']) { - $connector->setPassword($this->options['password']); - } - if ($this->options['enableSslOnlyMode']) { - $connector->enableSslOnlyMode(); - } - if ($this->options['ipMasks']) { - $connector->setAllowedIpMasks($this->options['ipMasks']); - } - if ($this->options['headersLimit']) { - $connector->setHeadersLimit($this->options['headersLimit']); - } - if ($this->options['detectDumpTraceAndSource']) { - $connector->getDebugDispatcher()->detectTraceAndSource = true; - } - $dumper = $connector->getDumper(); - $dumper->levelLimit = $this->options['dumperLevelLimit']; - $dumper->itemsCountLimit = $this->options['dumperItemsCountLimit']; - $dumper->itemSizeLimit = $this->options['dumperItemSizeLimit']; - $dumper->dumpSizeLimit = $this->options['dumperDumpSizeLimit']; - $dumper->detectCallbacks = $this->options['dumperDetectCallbacks']; - if ($this->options['enableEvalListener']) { - $connector->startEvalRequestsListener(); - } - } - - return $connector; - } - - public function getConnector(): Connector - { - return $this->connector; - } - - /** - * @return array - */ - public function getOptions(): array - { - return $this->options; - } - - public function handle(array $record): bool - { - if ($this->options['enabled'] && $this->connector->isActiveClient()) { - return parent::handle($record); - } - - return !$this->bubble; - } - - /** - * Writes the record down to the log of the implementing handler - */ - protected function write(array $record): void - { - if ($record['level'] < Logger::NOTICE) { - $this->handleDebugRecord($record); - } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) { - $this->handleExceptionRecord($record); - } else { - $this->handleErrorRecord($record); - } - } - - /** - * @phpstan-param Record $record - */ - private function handleDebugRecord(array $record): void - { - $tags = $this->getRecordTags($record); - $message = $record['message']; - if ($record['context']) { - $message .= ' ' . Utils::jsonEncode($this->connector->getDumper()->dump(array_filter($record['context'])), null, true); - } - $this->connector->getDebugDispatcher()->dispatchDebug($message, $tags, $this->options['classesPartialsTraceIgnore']); - } - - /** - * @phpstan-param Record $record - */ - private function handleExceptionRecord(array $record): void - { - $this->connector->getErrorsDispatcher()->dispatchException($record['context']['exception']); - } - - /** - * @phpstan-param Record $record - */ - private function handleErrorRecord(array $record): void - { - $context = $record['context']; - - $this->connector->getErrorsDispatcher()->dispatchError( - $context['code'] ?? null, - $context['message'] ?? $record['message'], - $context['file'] ?? null, - $context['line'] ?? null, - $this->options['classesPartialsTraceIgnore'] - ); - } - - /** - * @phpstan-param Record $record - * @return string - */ - private function getRecordTags(array &$record) - { - $tags = null; - if (!empty($record['context'])) { - $context = & $record['context']; - foreach ($this->options['debugTagsKeysInContext'] as $key) { - if (!empty($context[$key])) { - $tags = $context[$key]; - if ($key === 0) { - array_shift($context); - } else { - unset($context[$key]); - } - break; - } - } - } - - return $tags ?: strtolower($record['level_name']); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter('%message%'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php deleted file mode 100644 index 8a8cf1be..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php +++ /dev/null @@ -1,191 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Stores to STDIN of any process, specified by a command. - * - * Usage example: - *
- * $log = new Logger('myLogger');
- * $log->pushHandler(new ProcessHandler('/usr/bin/php /var/www/monolog/someScript.php'));
- * 
- * - * @author Kolja Zuelsdorf - */ -class ProcessHandler extends AbstractProcessingHandler -{ - /** - * Holds the process to receive data on its STDIN. - * - * @var resource|bool|null - */ - private $process; - - /** - * @var string - */ - private $command; - - /** - * @var string|null - */ - private $cwd; - - /** - * @var resource[] - */ - private $pipes = []; - - /** - * @var array - */ - protected const DESCRIPTOR_SPEC = [ - 0 => ['pipe', 'r'], // STDIN is a pipe that the child will read from - 1 => ['pipe', 'w'], // STDOUT is a pipe that the child will write to - 2 => ['pipe', 'w'], // STDERR is a pipe to catch the any errors - ]; - - /** - * @param string $command Command for the process to start. Absolute paths are recommended, - * especially if you do not use the $cwd parameter. - * @param string|null $cwd "Current working directory" (CWD) for the process to be executed in. - * @throws \InvalidArgumentException - */ - public function __construct(string $command, $level = Logger::DEBUG, bool $bubble = true, ?string $cwd = null) - { - if ($command === '') { - throw new \InvalidArgumentException('The command argument must be a non-empty string.'); - } - if ($cwd === '') { - throw new \InvalidArgumentException('The optional CWD argument must be a non-empty string or null.'); - } - - parent::__construct($level, $bubble); - - $this->command = $command; - $this->cwd = $cwd; - } - - /** - * Writes the record down to the log of the implementing handler - * - * @throws \UnexpectedValueException - */ - protected function write(array $record): void - { - $this->ensureProcessIsStarted(); - - $this->writeProcessInput($record['formatted']); - - $errors = $this->readProcessErrors(); - if (empty($errors) === false) { - throw new \UnexpectedValueException(sprintf('Errors while writing to process: %s', $errors)); - } - } - - /** - * Makes sure that the process is actually started, and if not, starts it, - * assigns the stream pipes, and handles startup errors, if any. - */ - private function ensureProcessIsStarted(): void - { - if (is_resource($this->process) === false) { - $this->startProcess(); - - $this->handleStartupErrors(); - } - } - - /** - * Starts the actual process and sets all streams to non-blocking. - */ - private function startProcess(): void - { - $this->process = proc_open($this->command, static::DESCRIPTOR_SPEC, $this->pipes, $this->cwd); - - foreach ($this->pipes as $pipe) { - stream_set_blocking($pipe, false); - } - } - - /** - * Selects the STDERR stream, handles upcoming startup errors, and throws an exception, if any. - * - * @throws \UnexpectedValueException - */ - private function handleStartupErrors(): void - { - $selected = $this->selectErrorStream(); - if (false === $selected) { - throw new \UnexpectedValueException('Something went wrong while selecting a stream.'); - } - - $errors = $this->readProcessErrors(); - - if (is_resource($this->process) === false || empty($errors) === false) { - throw new \UnexpectedValueException( - sprintf('The process "%s" could not be opened: ' . $errors, $this->command) - ); - } - } - - /** - * Selects the STDERR stream. - * - * @return int|bool - */ - protected function selectErrorStream() - { - $empty = []; - $errorPipes = [$this->pipes[2]]; - - return stream_select($errorPipes, $empty, $empty, 1); - } - - /** - * Reads the errors of the process, if there are any. - * - * @codeCoverageIgnore - * @return string Empty string if there are no errors. - */ - protected function readProcessErrors(): string - { - return (string) stream_get_contents($this->pipes[2]); - } - - /** - * Writes to the input stream of the opened process. - * - * @codeCoverageIgnore - */ - protected function writeProcessInput(string $string): void - { - fwrite($this->pipes[0], $string); - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - if (is_resource($this->process)) { - foreach ($this->pipes as $pipe) { - fclose($pipe); - } - proc_close($this->process); - $this->process = null; - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php deleted file mode 100644 index 3adec7a4..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerInterface.php +++ /dev/null @@ -1,44 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Processor\ProcessorInterface; - -/** - * Interface to describe loggers that have processors - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - */ -interface ProcessableHandlerInterface -{ - /** - * Adds a processor in the stack. - * - * @psalm-param ProcessorInterface|callable(Record): Record $callback - * - * @param ProcessorInterface|callable $callback - * @return HandlerInterface self - */ - public function pushProcessor(callable $callback): HandlerInterface; - - /** - * Removes the processor on top of the stack and returns it. - * - * @psalm-return ProcessorInterface|callable(Record): Record $callback - * - * @throws \LogicException In case the processor stack is empty - * @return callable|ProcessorInterface - */ - public function popProcessor(): callable; -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php b/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php deleted file mode 100644 index 9ef6e301..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ProcessableHandlerTrait.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\ResettableInterface; -use Monolog\Processor\ProcessorInterface; - -/** - * Helper trait for implementing ProcessableInterface - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - */ -trait ProcessableHandlerTrait -{ - /** - * @var callable[] - * @phpstan-var array - */ - protected $processors = []; - - /** - * {@inheritDoc} - */ - public function pushProcessor(callable $callback): HandlerInterface - { - array_unshift($this->processors, $callback); - - return $this; - } - - /** - * {@inheritDoc} - */ - public function popProcessor(): callable - { - if (!$this->processors) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - /** - * Processes a record. - * - * @phpstan-param Record $record - * @phpstan-return Record - */ - protected function processRecord(array $record): array - { - foreach ($this->processors as $processor) { - $record = $processor($record); - } - - return $record; - } - - protected function resetProcessors(): void - { - foreach ($this->processors as $processor) { - if ($processor instanceof ResettableInterface) { - $processor->reset(); - } - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php deleted file mode 100644 index 36e19ccc..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php +++ /dev/null @@ -1,95 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Psr\Log\LoggerInterface; -use Monolog\Formatter\FormatterInterface; - -/** - * Proxies log messages to an existing PSR-3 compliant logger. - * - * If a formatter is configured, the formatter's output MUST be a string and the - * formatted message will be fed to the wrapped PSR logger instead of the original - * log record's message. - * - * @author Michael Moussa - */ -class PsrHandler extends AbstractHandler implements FormattableHandlerInterface -{ - /** - * PSR-3 compliant logger - * - * @var LoggerInterface - */ - protected $logger; - - /** - * @var FormatterInterface|null - */ - protected $formatter; - - /** - * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied - */ - public function __construct(LoggerInterface $logger, $level = Logger::DEBUG, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->logger = $logger; - } - - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if (!$this->isHandling($record)) { - return false; - } - - if ($this->formatter) { - $formatted = $this->formatter->format($record); - $this->logger->log(strtolower($record['level_name']), (string) $formatted, $record['context']); - } else { - $this->logger->log(strtolower($record['level_name']), $record['message'], $record['context']); - } - - return false === $this->bubble; - } - - /** - * Sets the formatter. - * - * @param FormatterInterface $formatter - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $this->formatter = $formatter; - - return $this; - } - - /** - * Gets the formatter. - * - * @return FormatterInterface - */ - public function getFormatter(): FormatterInterface - { - if (!$this->formatter) { - throw new \LogicException('No formatter has been set and this handler does not have a default formatter'); - } - - return $this->formatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php deleted file mode 100644 index fed2303d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php +++ /dev/null @@ -1,246 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Psr\Log\LogLevel; - -/** - * Sends notifications through the pushover api to mobile phones - * - * @author Sebastian Göttschkes - * @see https://www.pushover.net/api - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class PushoverHandler extends SocketHandler -{ - /** @var string */ - private $token; - /** @var array */ - private $users; - /** @var string */ - private $title; - /** @var string|int|null */ - private $user = null; - /** @var int */ - private $retry; - /** @var int */ - private $expire; - - /** @var int */ - private $highPriorityLevel; - /** @var int */ - private $emergencyLevel; - /** @var bool */ - private $useFormattedMessage = false; - - /** - * All parameters that can be sent to Pushover - * @see https://pushover.net/api - * @var array - */ - private $parameterNames = [ - 'token' => true, - 'user' => true, - 'message' => true, - 'device' => true, - 'title' => true, - 'url' => true, - 'url_title' => true, - 'priority' => true, - 'timestamp' => true, - 'sound' => true, - 'retry' => true, - 'expire' => true, - 'callback' => true, - ]; - - /** - * Sounds the api supports by default - * @see https://pushover.net/api#sounds - * @var string[] - */ - private $sounds = [ - 'pushover', 'bike', 'bugle', 'cashregister', 'classical', 'cosmic', 'falling', 'gamelan', 'incoming', - 'intermission', 'magic', 'mechanical', 'pianobar', 'siren', 'spacealarm', 'tugboat', 'alien', 'climb', - 'persistent', 'echo', 'updown', 'none', - ]; - - /** - * @param string $token Pushover api token - * @param string|array $users Pushover user id or array of ids the message will be sent to - * @param string|null $title Title sent to the Pushover API - * @param bool $useSSL Whether to connect via SSL. Required when pushing messages to users that are not - * the pushover.net app owner. OpenSSL is required for this option. - * @param string|int $highPriorityLevel The minimum logging level at which this handler will start - * sending "high priority" requests to the Pushover API - * @param string|int $emergencyLevel The minimum logging level at which this handler will start - * sending "emergency" requests to the Pushover API - * @param int $retry The retry parameter specifies how often (in seconds) the Pushover servers will - * send the same notification to the user. - * @param int $expire The expire parameter specifies how many seconds your notification will continue - * to be retried for (every retry seconds). - * - * @phpstan-param string|array $users - * @phpstan-param Level|LevelName|LogLevel::* $highPriorityLevel - * @phpstan-param Level|LevelName|LogLevel::* $emergencyLevel - */ - public function __construct( - string $token, - $users, - ?string $title = null, - $level = Logger::CRITICAL, - bool $bubble = true, - bool $useSSL = true, - $highPriorityLevel = Logger::CRITICAL, - $emergencyLevel = Logger::EMERGENCY, - int $retry = 30, - int $expire = 25200, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - $connectionString = $useSSL ? 'ssl://api.pushover.net:443' : 'api.pushover.net:80'; - parent::__construct( - $connectionString, - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - - $this->token = $token; - $this->users = (array) $users; - $this->title = $title ?: (string) gethostname(); - $this->highPriorityLevel = Logger::toMonologLevel($highPriorityLevel); - $this->emergencyLevel = Logger::toMonologLevel($emergencyLevel); - $this->retry = $retry; - $this->expire = $expire; - } - - protected function generateDataStream(array $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * @phpstan-param FormattedRecord $record - */ - private function buildContent(array $record): string - { - // Pushover has a limit of 512 characters on title and message combined. - $maxMessageLength = 512 - strlen($this->title); - - $message = ($this->useFormattedMessage) ? $record['formatted'] : $record['message']; - $message = Utils::substr($message, 0, $maxMessageLength); - - $timestamp = $record['datetime']->getTimestamp(); - - $dataArray = [ - 'token' => $this->token, - 'user' => $this->user, - 'message' => $message, - 'title' => $this->title, - 'timestamp' => $timestamp, - ]; - - if (isset($record['level']) && $record['level'] >= $this->emergencyLevel) { - $dataArray['priority'] = 2; - $dataArray['retry'] = $this->retry; - $dataArray['expire'] = $this->expire; - } elseif (isset($record['level']) && $record['level'] >= $this->highPriorityLevel) { - $dataArray['priority'] = 1; - } - - // First determine the available parameters - $context = array_intersect_key($record['context'], $this->parameterNames); - $extra = array_intersect_key($record['extra'], $this->parameterNames); - - // Least important info should be merged with subsequent info - $dataArray = array_merge($extra, $context, $dataArray); - - // Only pass sounds that are supported by the API - if (isset($dataArray['sound']) && !in_array($dataArray['sound'], $this->sounds)) { - unset($dataArray['sound']); - } - - return http_build_query($dataArray); - } - - private function buildHeader(string $content): string - { - $header = "POST /1/messages.json HTTP/1.1\r\n"; - $header .= "Host: api.pushover.net\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - protected function write(array $record): void - { - foreach ($this->users as $user) { - $this->user = $user; - - parent::write($record); - $this->closeSocket(); - } - - $this->user = null; - } - - /** - * @param int|string $value - * - * @phpstan-param Level|LevelName|LogLevel::* $value - */ - public function setHighPriorityLevel($value): self - { - $this->highPriorityLevel = Logger::toMonologLevel($value); - - return $this; - } - - /** - * @param int|string $value - * - * @phpstan-param Level|LevelName|LogLevel::* $value - */ - public function setEmergencyLevel($value): self - { - $this->emergencyLevel = Logger::toMonologLevel($value); - - return $this; - } - - /** - * Use the formatted message? - */ - public function useFormattedMessage(bool $value): self - { - $this->useFormattedMessage = $value; - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php deleted file mode 100644 index 91d16eaf..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; - -/** - * Logs to a Redis key using rpush - * - * usage example: - * - * $log = new Logger('application'); - * $redis = new RedisHandler(new Predis\Client("tcp://localhost:6379"), "logs", "prod"); - * $log->pushHandler($redis); - * - * @author Thomas Tourlourat - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class RedisHandler extends AbstractProcessingHandler -{ - /** @var \Predis\Client<\Predis\Client>|\Redis */ - private $redisClient; - /** @var string */ - private $redisKey; - /** @var int */ - protected $capSize; - - /** - * @param \Predis\Client<\Predis\Client>|\Redis $redis The redis instance - * @param string $key The key name to push records to - * @param int $capSize Number of entries to limit list size to, 0 = unlimited - */ - public function __construct($redis, string $key, $level = Logger::DEBUG, bool $bubble = true, int $capSize = 0) - { - if (!(($redis instanceof \Predis\Client) || ($redis instanceof \Redis))) { - throw new \InvalidArgumentException('Predis\Client or Redis instance required'); - } - - $this->redisClient = $redis; - $this->redisKey = $key; - $this->capSize = $capSize; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if ($this->capSize) { - $this->writeCapped($record); - } else { - $this->redisClient->rpush($this->redisKey, $record["formatted"]); - } - } - - /** - * Write and cap the collection - * Writes the record to the redis list and caps its - * - * @phpstan-param FormattedRecord $record - */ - protected function writeCapped(array $record): void - { - if ($this->redisClient instanceof \Redis) { - $mode = defined('\Redis::MULTI') ? \Redis::MULTI : 1; - $this->redisClient->multi($mode) - ->rpush($this->redisKey, $record["formatted"]) - ->ltrim($this->redisKey, -$this->capSize, -1) - ->exec(); - } else { - $redisKey = $this->redisKey; - $capSize = $this->capSize; - $this->redisClient->transaction(function ($tx) use ($record, $redisKey, $capSize) { - $tx->rpush($redisKey, $record["formatted"]); - $tx->ltrim($redisKey, -$capSize, -1); - }); - } - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php deleted file mode 100644 index 7789309c..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RedisPubSubHandler.php +++ /dev/null @@ -1,67 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\LineFormatter; -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; - -/** - * Sends the message to a Redis Pub/Sub channel using PUBLISH - * - * usage example: - * - * $log = new Logger('application'); - * $redis = new RedisPubSubHandler(new Predis\Client("tcp://localhost:6379"), "logs", Logger::WARNING); - * $log->pushHandler($redis); - * - * @author Gaëtan Faugère - */ -class RedisPubSubHandler extends AbstractProcessingHandler -{ - /** @var \Predis\Client<\Predis\Client>|\Redis */ - private $redisClient; - /** @var string */ - private $channelKey; - - /** - * @param \Predis\Client<\Predis\Client>|\Redis $redis The redis instance - * @param string $key The channel key to publish records to - */ - public function __construct($redis, string $key, $level = Logger::DEBUG, bool $bubble = true) - { - if (!(($redis instanceof \Predis\Client) || ($redis instanceof \Redis))) { - throw new \InvalidArgumentException('Predis\Client or Redis instance required'); - } - - $this->redisClient = $redis; - $this->channelKey = $key; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->redisClient->publish($this->channelKey, $record["formatted"]); - } - - /** - * {@inheritDoc} - */ - protected function getDefaultFormatter(): FormatterInterface - { - return new LineFormatter(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php deleted file mode 100644 index adcc9395..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php +++ /dev/null @@ -1,131 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Rollbar\RollbarLogger; -use Throwable; -use Monolog\Logger; - -/** - * Sends errors to Rollbar - * - * If the context data contains a `payload` key, that is used as an array - * of payload options to RollbarLogger's log method. - * - * Rollbar's context info will contain the context + extra keys from the log record - * merged, and then on top of that a few keys: - * - * - level (rollbar level name) - * - monolog_level (monolog level name, raw level, as rollbar only has 5 but monolog 8) - * - channel - * - datetime (unix timestamp) - * - * @author Paul Statezny - */ -class RollbarHandler extends AbstractProcessingHandler -{ - /** - * @var RollbarLogger - */ - protected $rollbarLogger; - - /** @var string[] */ - protected $levelMap = [ - Logger::DEBUG => 'debug', - Logger::INFO => 'info', - Logger::NOTICE => 'info', - Logger::WARNING => 'warning', - Logger::ERROR => 'error', - Logger::CRITICAL => 'critical', - Logger::ALERT => 'critical', - Logger::EMERGENCY => 'critical', - ]; - - /** - * Records whether any log records have been added since the last flush of the rollbar notifier - * - * @var bool - */ - private $hasRecords = false; - - /** @var bool */ - protected $initialized = false; - - /** - * @param RollbarLogger $rollbarLogger RollbarLogger object constructed with valid token - */ - public function __construct(RollbarLogger $rollbarLogger, $level = Logger::ERROR, bool $bubble = true) - { - $this->rollbarLogger = $rollbarLogger; - - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if (!$this->initialized) { - // __destructor() doesn't get called on Fatal errors - register_shutdown_function(array($this, 'close')); - $this->initialized = true; - } - - $context = $record['context']; - $context = array_merge($context, $record['extra'], [ - 'level' => $this->levelMap[$record['level']], - 'monolog_level' => $record['level_name'], - 'channel' => $record['channel'], - 'datetime' => $record['datetime']->format('U'), - ]); - - if (isset($context['exception']) && $context['exception'] instanceof Throwable) { - $exception = $context['exception']; - unset($context['exception']); - $toLog = $exception; - } else { - $toLog = $record['message']; - } - - // @phpstan-ignore-next-line - $this->rollbarLogger->log($context['level'], $toLog, $context); - - $this->hasRecords = true; - } - - public function flush(): void - { - if ($this->hasRecords) { - $this->rollbarLogger->flush(); - $this->hasRecords = false; - } - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - $this->flush(); - } - - /** - * {@inheritDoc} - */ - public function reset() - { - $this->flush(); - - parent::reset(); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php deleted file mode 100644 index 17745d22..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php +++ /dev/null @@ -1,207 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use InvalidArgumentException; -use Monolog\Logger; -use Monolog\Utils; - -/** - * Stores logs to files that are rotated every day and a limited number of files are kept. - * - * This rotation is only intended to be used as a workaround. Using logrotate to - * handle the rotation is strongly encouraged when you can use it. - * - * @author Christophe Coevoet - * @author Jordi Boggiano - */ -class RotatingFileHandler extends StreamHandler -{ - public const FILE_PER_DAY = 'Y-m-d'; - public const FILE_PER_MONTH = 'Y-m'; - public const FILE_PER_YEAR = 'Y'; - - /** @var string */ - protected $filename; - /** @var int */ - protected $maxFiles; - /** @var bool */ - protected $mustRotate; - /** @var \DateTimeImmutable */ - protected $nextRotation; - /** @var string */ - protected $filenameFormat; - /** @var string */ - protected $dateFormat; - - /** - * @param string $filename - * @param int $maxFiles The maximal amount of files to keep (0 means unlimited) - * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) - * @param bool $useLocking Try to lock log file before doing any writes - */ - public function __construct(string $filename, int $maxFiles = 0, $level = Logger::DEBUG, bool $bubble = true, ?int $filePermission = null, bool $useLocking = false) - { - $this->filename = Utils::canonicalizePath($filename); - $this->maxFiles = $maxFiles; - $this->nextRotation = new \DateTimeImmutable('tomorrow'); - $this->filenameFormat = '{filename}-{date}'; - $this->dateFormat = static::FILE_PER_DAY; - - parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking); - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - parent::close(); - - if (true === $this->mustRotate) { - $this->rotate(); - } - } - - /** - * {@inheritDoc} - */ - public function reset() - { - parent::reset(); - - if (true === $this->mustRotate) { - $this->rotate(); - } - } - - public function setFilenameFormat(string $filenameFormat, string $dateFormat): self - { - if (!preg_match('{^[Yy](([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) { - throw new InvalidArgumentException( - 'Invalid date format - format must be one of '. - 'RotatingFileHandler::FILE_PER_DAY ("Y-m-d"), RotatingFileHandler::FILE_PER_MONTH ("Y-m") '. - 'or RotatingFileHandler::FILE_PER_YEAR ("Y"), or you can set one of the '. - 'date formats using slashes, underscores and/or dots instead of dashes.' - ); - } - if (substr_count($filenameFormat, '{date}') === 0) { - throw new InvalidArgumentException( - 'Invalid filename format - format must contain at least `{date}`, because otherwise rotating is impossible.' - ); - } - $this->filenameFormat = $filenameFormat; - $this->dateFormat = $dateFormat; - $this->url = $this->getTimedFilename(); - $this->close(); - - return $this; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - // on the first record written, if the log is new, we should rotate (once per day) - if (null === $this->mustRotate) { - $this->mustRotate = null === $this->url || !file_exists($this->url); - } - - if ($this->nextRotation <= $record['datetime']) { - $this->mustRotate = true; - $this->close(); - } - - parent::write($record); - } - - /** - * Rotates the files. - */ - protected function rotate(): void - { - // update filename - $this->url = $this->getTimedFilename(); - $this->nextRotation = new \DateTimeImmutable('tomorrow'); - - // skip GC of old logs if files are unlimited - if (0 === $this->maxFiles) { - return; - } - - $logFiles = glob($this->getGlobPattern()); - if (false === $logFiles) { - // failed to glob - return; - } - - if ($this->maxFiles >= count($logFiles)) { - // no files to remove - return; - } - - // Sorting the files by name to remove the older ones - usort($logFiles, function ($a, $b) { - return strcmp($b, $a); - }); - - foreach (array_slice($logFiles, $this->maxFiles) as $file) { - if (is_writable($file)) { - // suppress errors here as unlink() might fail if two processes - // are cleaning up/rotating at the same time - set_error_handler(function (int $errno, string $errstr, string $errfile, int $errline): bool { - return false; - }); - unlink($file); - restore_error_handler(); - } - } - - $this->mustRotate = false; - } - - protected function getTimedFilename(): string - { - $fileInfo = pathinfo($this->filename); - $timedFilename = str_replace( - ['{filename}', '{date}'], - [$fileInfo['filename'], date($this->dateFormat)], - $fileInfo['dirname'] . '/' . $this->filenameFormat - ); - - if (isset($fileInfo['extension'])) { - $timedFilename .= '.'.$fileInfo['extension']; - } - - return $timedFilename; - } - - protected function getGlobPattern(): string - { - $fileInfo = pathinfo($this->filename); - $glob = str_replace( - ['{filename}', '{date}'], - [$fileInfo['filename'], str_replace( - ['Y', 'y', 'm', 'd'], - ['[0-9][0-9][0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]', '[0-9][0-9]'], - $this->dateFormat) - ], - $fileInfo['dirname'] . '/' . $this->filenameFormat - ); - if (isset($fileInfo['extension'])) { - $glob .= '.'.$fileInfo['extension']; - } - - return $glob; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php deleted file mode 100644 index c128a32d..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php +++ /dev/null @@ -1,132 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; - -/** - * Sampling handler - * - * A sampled event stream can be useful for logging high frequency events in - * a production environment where you only need an idea of what is happening - * and are not concerned with capturing every occurrence. Since the decision to - * handle or not handle a particular event is determined randomly, the - * resulting sampled log is not guaranteed to contain 1/N of the events that - * occurred in the application, but based on the Law of large numbers, it will - * tend to be close to this ratio with a large number of attempts. - * - * @author Bryan Davis - * @author Kunal Mehta - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - */ -class SamplingHandler extends AbstractHandler implements ProcessableHandlerInterface, FormattableHandlerInterface -{ - use ProcessableHandlerTrait; - - /** - * @var HandlerInterface|callable - * @phpstan-var HandlerInterface|callable(Record|array{level: Level}|null, HandlerInterface): HandlerInterface - */ - protected $handler; - - /** - * @var int $factor - */ - protected $factor; - - /** - * @psalm-param HandlerInterface|callable(Record|array{level: Level}|null, HandlerInterface): HandlerInterface $handler - * - * @param callable|HandlerInterface $handler Handler or factory callable($record|null, $samplingHandler). - * @param int $factor Sample factor (e.g. 10 means every ~10th record is sampled) - */ - public function __construct($handler, int $factor) - { - parent::__construct(); - $this->handler = $handler; - $this->factor = $factor; - - if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { - throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); - } - } - - public function isHandling(array $record): bool - { - return $this->getHandler($record)->isHandling($record); - } - - public function handle(array $record): bool - { - if ($this->isHandling($record) && mt_rand(1, $this->factor) === 1) { - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - $this->getHandler($record)->handle($record); - } - - return false === $this->bubble; - } - - /** - * Return the nested handler - * - * If the handler was provided as a factory callable, this will trigger the handler's instantiation. - * - * @phpstan-param Record|array{level: Level}|null $record - * - * @return HandlerInterface - */ - public function getHandler(array $record = null) - { - if (!$this->handler instanceof HandlerInterface) { - $this->handler = ($this->handler)($record, $this); - if (!$this->handler instanceof HandlerInterface) { - throw new \RuntimeException("The factory callable should return a HandlerInterface"); - } - } - - return $this->handler; - } - - /** - * {@inheritDoc} - */ - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - $handler->setFormatter($formatter); - - return $this; - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } - - /** - * {@inheritDoc} - */ - public function getFormatter(): FormatterInterface - { - $handler = $this->getHandler(); - if ($handler instanceof FormattableHandlerInterface) { - return $handler->getFormatter(); - } - - throw new \UnexpectedValueException('The nested handler of type '.get_class($handler).' does not support formatters.'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php deleted file mode 100644 index 1280ee70..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SendGridHandler.php +++ /dev/null @@ -1,102 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * SendGridrHandler uses the SendGrid API v2 function to send Log emails, more information in https://sendgrid.com/docs/API_Reference/Web_API/mail.html - * - * @author Ricardo Fontanelli - */ -class SendGridHandler extends MailHandler -{ - /** - * The SendGrid API User - * @var string - */ - protected $apiUser; - - /** - * The SendGrid API Key - * @var string - */ - protected $apiKey; - - /** - * The email addresses to which the message will be sent - * @var string - */ - protected $from; - - /** - * The email addresses to which the message will be sent - * @var string[] - */ - protected $to; - - /** - * The subject of the email - * @var string - */ - protected $subject; - - /** - * @param string $apiUser The SendGrid API User - * @param string $apiKey The SendGrid API Key - * @param string $from The sender of the email - * @param string|string[] $to The recipients of the email - * @param string $subject The subject of the mail - */ - public function __construct(string $apiUser, string $apiKey, string $from, $to, string $subject, $level = Logger::ERROR, bool $bubble = true) - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the SendGridHandler'); - } - - parent::__construct($level, $bubble); - $this->apiUser = $apiUser; - $this->apiKey = $apiKey; - $this->from = $from; - $this->to = (array) $to; - $this->subject = $subject; - } - - /** - * {@inheritDoc} - */ - protected function send(string $content, array $records): void - { - $message = []; - $message['api_user'] = $this->apiUser; - $message['api_key'] = $this->apiKey; - $message['from'] = $this->from; - foreach ($this->to as $recipient) { - $message['to[]'] = $recipient; - } - $message['subject'] = $this->subject; - $message['date'] = date('r'); - - if ($this->isHtmlBody($content)) { - $message['html'] = $content; - } else { - $message['text'] = $content; - } - - $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, 'https://api.sendgrid.com/api/mail.send.json'); - curl_setopt($ch, CURLOPT_POST, 1); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($message)); - Curl\Util::execute($ch, 2); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php b/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php deleted file mode 100644 index 71a41094..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php +++ /dev/null @@ -1,387 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\Slack; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Formatter\FormatterInterface; - -/** - * Slack record utility helping to log to Slack webhooks or API. - * - * @author Greg Kedzierski - * @author Haralan Dobrev - * @see https://api.slack.com/incoming-webhooks - * @see https://api.slack.com/docs/message-attachments - * - * @phpstan-import-type FormattedRecord from \Monolog\Handler\AbstractProcessingHandler - * @phpstan-import-type Record from \Monolog\Logger - */ -class SlackRecord -{ - public const COLOR_DANGER = 'danger'; - - public const COLOR_WARNING = 'warning'; - - public const COLOR_GOOD = 'good'; - - public const COLOR_DEFAULT = '#e3e4e6'; - - /** - * Slack channel (encoded ID or name) - * @var string|null - */ - private $channel; - - /** - * Name of a bot - * @var string|null - */ - private $username; - - /** - * User icon e.g. 'ghost', 'http://example.com/user.png' - * @var string|null - */ - private $userIcon; - - /** - * Whether the message should be added to Slack as attachment (plain text otherwise) - * @var bool - */ - private $useAttachment; - - /** - * Whether the the context/extra messages added to Slack as attachments are in a short style - * @var bool - */ - private $useShortAttachment; - - /** - * Whether the attachment should include context and extra data - * @var bool - */ - private $includeContextAndExtra; - - /** - * Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * @var string[] - */ - private $excludeFields; - - /** - * @var ?FormatterInterface - */ - private $formatter; - - /** - * @var NormalizerFormatter - */ - private $normalizerFormatter; - - /** - * @param string[] $excludeFields - */ - public function __construct( - ?string $channel = null, - ?string $username = null, - bool $useAttachment = true, - ?string $userIcon = null, - bool $useShortAttachment = false, - bool $includeContextAndExtra = false, - array $excludeFields = array(), - FormatterInterface $formatter = null - ) { - $this - ->setChannel($channel) - ->setUsername($username) - ->useAttachment($useAttachment) - ->setUserIcon($userIcon) - ->useShortAttachment($useShortAttachment) - ->includeContextAndExtra($includeContextAndExtra) - ->excludeFields($excludeFields) - ->setFormatter($formatter); - - if ($this->includeContextAndExtra) { - $this->normalizerFormatter = new NormalizerFormatter(); - } - } - - /** - * Returns required data in format that Slack - * is expecting. - * - * @phpstan-param FormattedRecord $record - * @phpstan-return mixed[] - */ - public function getSlackData(array $record): array - { - $dataArray = array(); - $record = $this->removeExcludedFields($record); - - if ($this->username) { - $dataArray['username'] = $this->username; - } - - if ($this->channel) { - $dataArray['channel'] = $this->channel; - } - - if ($this->formatter && !$this->useAttachment) { - /** @phpstan-ignore-next-line */ - $message = $this->formatter->format($record); - } else { - $message = $record['message']; - } - - if ($this->useAttachment) { - $attachment = array( - 'fallback' => $message, - 'text' => $message, - 'color' => $this->getAttachmentColor($record['level']), - 'fields' => array(), - 'mrkdwn_in' => array('fields'), - 'ts' => $record['datetime']->getTimestamp(), - 'footer' => $this->username, - 'footer_icon' => $this->userIcon, - ); - - if ($this->useShortAttachment) { - $attachment['title'] = $record['level_name']; - } else { - $attachment['title'] = 'Message'; - $attachment['fields'][] = $this->generateAttachmentField('Level', $record['level_name']); - } - - if ($this->includeContextAndExtra) { - foreach (array('extra', 'context') as $key) { - if (empty($record[$key])) { - continue; - } - - if ($this->useShortAttachment) { - $attachment['fields'][] = $this->generateAttachmentField( - (string) $key, - $record[$key] - ); - } else { - // Add all extra fields as individual fields in attachment - $attachment['fields'] = array_merge( - $attachment['fields'], - $this->generateAttachmentFields($record[$key]) - ); - } - } - } - - $dataArray['attachments'] = array($attachment); - } else { - $dataArray['text'] = $message; - } - - if ($this->userIcon) { - if (filter_var($this->userIcon, FILTER_VALIDATE_URL)) { - $dataArray['icon_url'] = $this->userIcon; - } else { - $dataArray['icon_emoji'] = ":{$this->userIcon}:"; - } - } - - return $dataArray; - } - - /** - * Returns a Slack message attachment color associated with - * provided level. - */ - public function getAttachmentColor(int $level): string - { - switch (true) { - case $level >= Logger::ERROR: - return static::COLOR_DANGER; - case $level >= Logger::WARNING: - return static::COLOR_WARNING; - case $level >= Logger::INFO: - return static::COLOR_GOOD; - default: - return static::COLOR_DEFAULT; - } - } - - /** - * Stringifies an array of key/value pairs to be used in attachment fields - * - * @param mixed[] $fields - */ - public function stringify(array $fields): string - { - /** @var Record $fields */ - $normalized = $this->normalizerFormatter->format($fields); - - $hasSecondDimension = count(array_filter($normalized, 'is_array')); - $hasNonNumericKeys = !count(array_filter(array_keys($normalized), 'is_numeric')); - - return $hasSecondDimension || $hasNonNumericKeys - ? Utils::jsonEncode($normalized, JSON_PRETTY_PRINT|Utils::DEFAULT_JSON_FLAGS) - : Utils::jsonEncode($normalized, Utils::DEFAULT_JSON_FLAGS); - } - - /** - * Channel used by the bot when posting - * - * @param ?string $channel - * - * @return static - */ - public function setChannel(?string $channel = null): self - { - $this->channel = $channel; - - return $this; - } - - /** - * Username used by the bot when posting - * - * @param ?string $username - * - * @return static - */ - public function setUsername(?string $username = null): self - { - $this->username = $username; - - return $this; - } - - public function useAttachment(bool $useAttachment = true): self - { - $this->useAttachment = $useAttachment; - - return $this; - } - - public function setUserIcon(?string $userIcon = null): self - { - $this->userIcon = $userIcon; - - if (\is_string($userIcon)) { - $this->userIcon = trim($userIcon, ':'); - } - - return $this; - } - - public function useShortAttachment(bool $useShortAttachment = false): self - { - $this->useShortAttachment = $useShortAttachment; - - return $this; - } - - public function includeContextAndExtra(bool $includeContextAndExtra = false): self - { - $this->includeContextAndExtra = $includeContextAndExtra; - - if ($this->includeContextAndExtra) { - $this->normalizerFormatter = new NormalizerFormatter(); - } - - return $this; - } - - /** - * @param string[] $excludeFields - */ - public function excludeFields(array $excludeFields = []): self - { - $this->excludeFields = $excludeFields; - - return $this; - } - - public function setFormatter(?FormatterInterface $formatter = null): self - { - $this->formatter = $formatter; - - return $this; - } - - /** - * Generates attachment field - * - * @param string|mixed[] $value - * - * @return array{title: string, value: string, short: false} - */ - private function generateAttachmentField(string $title, $value): array - { - $value = is_array($value) - ? sprintf('```%s```', substr($this->stringify($value), 0, 1990)) - : $value; - - return array( - 'title' => ucfirst($title), - 'value' => $value, - 'short' => false, - ); - } - - /** - * Generates a collection of attachment fields from array - * - * @param mixed[] $data - * - * @return array - */ - private function generateAttachmentFields(array $data): array - { - /** @var Record $data */ - $normalized = $this->normalizerFormatter->format($data); - - $fields = array(); - foreach ($normalized as $key => $value) { - $fields[] = $this->generateAttachmentField((string) $key, $value); - } - - return $fields; - } - - /** - * Get a copy of record with fields excluded according to $this->excludeFields - * - * @phpstan-param FormattedRecord $record - * - * @return mixed[] - */ - private function removeExcludedFields(array $record): array - { - foreach ($this->excludeFields as $field) { - $keys = explode('.', $field); - $node = &$record; - $lastKey = end($keys); - foreach ($keys as $key) { - if (!isset($node[$key])) { - break; - } - if ($lastKey === $key) { - unset($node[$key]); - break; - } - $node = &$node[$key]; - } - } - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php deleted file mode 100644 index a648513e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php +++ /dev/null @@ -1,256 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Handler\Slack\SlackRecord; - -/** - * Sends notifications through Slack API - * - * @author Greg Kedzierski - * @see https://api.slack.com/ - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class SlackHandler extends SocketHandler -{ - /** - * Slack API token - * @var string - */ - private $token; - - /** - * Instance of the SlackRecord util class preparing data for Slack API. - * @var SlackRecord - */ - private $slackRecord; - - /** - * @param string $token Slack API token - * @param string $channel Slack channel (encoded ID or name) - * @param string|null $username Name of a bot - * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) - * @param string|null $iconEmoji The emoji name to use (or null) - * @param bool $useShortAttachment Whether the context/extra messages added to Slack as attachments are in a short style - * @param bool $includeContextAndExtra Whether the attachment should include context and extra data - * @param string[] $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - * @throws MissingExtensionException If no OpenSSL PHP extension configured - */ - public function __construct( - string $token, - string $channel, - ?string $username = null, - bool $useAttachment = true, - ?string $iconEmoji = null, - $level = Logger::CRITICAL, - bool $bubble = true, - bool $useShortAttachment = false, - bool $includeContextAndExtra = false, - array $excludeFields = array(), - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - if (!extension_loaded('openssl')) { - throw new MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler'); - } - - parent::__construct( - 'ssl://slack.com:443', - $level, - $bubble, - $persistent, - $timeout, - $writingTimeout, - $connectionTimeout, - $chunkSize - ); - - $this->slackRecord = new SlackRecord( - $channel, - $username, - $useAttachment, - $iconEmoji, - $useShortAttachment, - $includeContextAndExtra, - $excludeFields - ); - - $this->token = $token; - } - - public function getSlackRecord(): SlackRecord - { - return $this->slackRecord; - } - - public function getToken(): string - { - return $this->token; - } - - /** - * {@inheritDoc} - */ - protected function generateDataStream(array $record): string - { - $content = $this->buildContent($record); - - return $this->buildHeader($content) . $content; - } - - /** - * Builds the body of API call - * - * @phpstan-param FormattedRecord $record - */ - private function buildContent(array $record): string - { - $dataArray = $this->prepareContentData($record); - - return http_build_query($dataArray); - } - - /** - * @phpstan-param FormattedRecord $record - * @return string[] - */ - protected function prepareContentData(array $record): array - { - $dataArray = $this->slackRecord->getSlackData($record); - $dataArray['token'] = $this->token; - - if (!empty($dataArray['attachments'])) { - $dataArray['attachments'] = Utils::jsonEncode($dataArray['attachments']); - } - - return $dataArray; - } - - /** - * Builds the header of the API Call - */ - private function buildHeader(string $content): string - { - $header = "POST /api/chat.postMessage HTTP/1.1\r\n"; - $header .= "Host: slack.com\r\n"; - $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; - $header .= "Content-Length: " . strlen($content) . "\r\n"; - $header .= "\r\n"; - - return $header; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - parent::write($record); - $this->finalizeWrite(); - } - - /** - * Finalizes the request by reading some bytes and then closing the socket - * - * If we do not read some but close the socket too early, slack sometimes - * drops the request entirely. - */ - protected function finalizeWrite(): void - { - $res = $this->getResource(); - if (is_resource($res)) { - @fread($res, 2048); - } - $this->closeSocket(); - } - - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - parent::setFormatter($formatter); - $this->slackRecord->setFormatter($formatter); - - return $this; - } - - public function getFormatter(): FormatterInterface - { - $formatter = parent::getFormatter(); - $this->slackRecord->setFormatter($formatter); - - return $formatter; - } - - /** - * Channel used by the bot when posting - */ - public function setChannel(string $channel): self - { - $this->slackRecord->setChannel($channel); - - return $this; - } - - /** - * Username used by the bot when posting - */ - public function setUsername(string $username): self - { - $this->slackRecord->setUsername($username); - - return $this; - } - - public function useAttachment(bool $useAttachment): self - { - $this->slackRecord->useAttachment($useAttachment); - - return $this; - } - - public function setIconEmoji(string $iconEmoji): self - { - $this->slackRecord->setUserIcon($iconEmoji); - - return $this; - } - - public function useShortAttachment(bool $useShortAttachment): self - { - $this->slackRecord->useShortAttachment($useShortAttachment); - - return $this; - } - - public function includeContextAndExtra(bool $includeContextAndExtra): self - { - $this->slackRecord->includeContextAndExtra($includeContextAndExtra); - - return $this; - } - - /** - * @param string[] $excludeFields - */ - public function excludeFields(array $excludeFields): self - { - $this->slackRecord->excludeFields($excludeFields); - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php deleted file mode 100644 index 8ae3c788..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php +++ /dev/null @@ -1,130 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Handler\Slack\SlackRecord; - -/** - * Sends notifications through Slack Webhooks - * - * @author Haralan Dobrev - * @see https://api.slack.com/incoming-webhooks - */ -class SlackWebhookHandler extends AbstractProcessingHandler -{ - /** - * Slack Webhook token - * @var string - */ - private $webhookUrl; - - /** - * Instance of the SlackRecord util class preparing data for Slack API. - * @var SlackRecord - */ - private $slackRecord; - - /** - * @param string $webhookUrl Slack Webhook URL - * @param string|null $channel Slack channel (encoded ID or name) - * @param string|null $username Name of a bot - * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) - * @param string|null $iconEmoji The emoji name to use (or null) - * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style - * @param bool $includeContextAndExtra Whether the attachment should include context and extra data - * @param string[] $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] - */ - public function __construct( - string $webhookUrl, - ?string $channel = null, - ?string $username = null, - bool $useAttachment = true, - ?string $iconEmoji = null, - bool $useShortAttachment = false, - bool $includeContextAndExtra = false, - $level = Logger::CRITICAL, - bool $bubble = true, - array $excludeFields = array() - ) { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the SlackWebhookHandler'); - } - - parent::__construct($level, $bubble); - - $this->webhookUrl = $webhookUrl; - - $this->slackRecord = new SlackRecord( - $channel, - $username, - $useAttachment, - $iconEmoji, - $useShortAttachment, - $includeContextAndExtra, - $excludeFields - ); - } - - public function getSlackRecord(): SlackRecord - { - return $this->slackRecord; - } - - public function getWebhookUrl(): string - { - return $this->webhookUrl; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $postData = $this->slackRecord->getSlackData($record); - $postString = Utils::jsonEncode($postData); - - $ch = curl_init(); - $options = array( - CURLOPT_URL => $this->webhookUrl, - CURLOPT_POST => true, - CURLOPT_RETURNTRANSFER => true, - CURLOPT_HTTPHEADER => array('Content-type: application/json'), - CURLOPT_POSTFIELDS => $postString, - ); - if (defined('CURLOPT_SAFE_UPLOAD')) { - $options[CURLOPT_SAFE_UPLOAD] = true; - } - - curl_setopt_array($ch, $options); - - Curl\Util::execute($ch); - } - - public function setFormatter(FormatterInterface $formatter): HandlerInterface - { - parent::setFormatter($formatter); - $this->slackRecord->setFormatter($formatter); - - return $this; - } - - public function getFormatter(): FormatterInterface - { - $formatter = parent::getFormatter(); - $this->slackRecord->setFormatter($formatter); - - return $formatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php deleted file mode 100644 index 21701afa..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php +++ /dev/null @@ -1,448 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; - -/** - * Stores to any socket - uses fsockopen() or pfsockopen(). - * - * @author Pablo de Leon Belloc - * @see http://php.net/manual/en/function.fsockopen.php - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class SocketHandler extends AbstractProcessingHandler -{ - /** @var string */ - private $connectionString; - /** @var float */ - private $connectionTimeout; - /** @var resource|null */ - private $resource; - /** @var float */ - private $timeout; - /** @var float */ - private $writingTimeout; - /** @var ?int */ - private $lastSentBytes = null; - /** @var ?int */ - private $chunkSize; - /** @var bool */ - private $persistent; - /** @var ?int */ - private $errno = null; - /** @var ?string */ - private $errstr = null; - /** @var ?float */ - private $lastWritingAt = null; - - /** - * @param string $connectionString Socket connection string - * @param bool $persistent Flag to enable/disable persistent connections - * @param float $timeout Socket timeout to wait until the request is being aborted - * @param float $writingTimeout Socket timeout to wait until the request should've been sent/written - * @param float|null $connectionTimeout Socket connect timeout to wait until the connection should've been - * established - * @param int|null $chunkSize Sets the chunk size. Only has effect during connection in the writing cycle - * - * @throws \InvalidArgumentException If an invalid timeout value (less than 0) is passed. - */ - public function __construct( - string $connectionString, - $level = Logger::DEBUG, - bool $bubble = true, - bool $persistent = false, - float $timeout = 0.0, - float $writingTimeout = 10.0, - ?float $connectionTimeout = null, - ?int $chunkSize = null - ) { - parent::__construct($level, $bubble); - $this->connectionString = $connectionString; - - if ($connectionTimeout !== null) { - $this->validateTimeout($connectionTimeout); - } - - $this->connectionTimeout = $connectionTimeout ?? (float) ini_get('default_socket_timeout'); - $this->persistent = $persistent; - $this->validateTimeout($timeout); - $this->timeout = $timeout; - $this->validateTimeout($writingTimeout); - $this->writingTimeout = $writingTimeout; - $this->chunkSize = $chunkSize; - } - - /** - * Connect (if necessary) and write to the socket - * - * {@inheritDoc} - * - * @throws \UnexpectedValueException - * @throws \RuntimeException - */ - protected function write(array $record): void - { - $this->connectIfNotConnected(); - $data = $this->generateDataStream($record); - $this->writeToSocket($data); - } - - /** - * We will not close a PersistentSocket instance so it can be reused in other requests. - */ - public function close(): void - { - if (!$this->isPersistent()) { - $this->closeSocket(); - } - } - - /** - * Close socket, if open - */ - public function closeSocket(): void - { - if (is_resource($this->resource)) { - fclose($this->resource); - $this->resource = null; - } - } - - /** - * Set socket connection to be persistent. It only has effect before the connection is initiated. - */ - public function setPersistent(bool $persistent): self - { - $this->persistent = $persistent; - - return $this; - } - - /** - * Set connection timeout. Only has effect before we connect. - * - * @see http://php.net/manual/en/function.fsockopen.php - */ - public function setConnectionTimeout(float $seconds): self - { - $this->validateTimeout($seconds); - $this->connectionTimeout = $seconds; - - return $this; - } - - /** - * Set write timeout. Only has effect before we connect. - * - * @see http://php.net/manual/en/function.stream-set-timeout.php - */ - public function setTimeout(float $seconds): self - { - $this->validateTimeout($seconds); - $this->timeout = $seconds; - - return $this; - } - - /** - * Set writing timeout. Only has effect during connection in the writing cycle. - * - * @param float $seconds 0 for no timeout - */ - public function setWritingTimeout(float $seconds): self - { - $this->validateTimeout($seconds); - $this->writingTimeout = $seconds; - - return $this; - } - - /** - * Set chunk size. Only has effect during connection in the writing cycle. - */ - public function setChunkSize(int $bytes): self - { - $this->chunkSize = $bytes; - - return $this; - } - - /** - * Get current connection string - */ - public function getConnectionString(): string - { - return $this->connectionString; - } - - /** - * Get persistent setting - */ - public function isPersistent(): bool - { - return $this->persistent; - } - - /** - * Get current connection timeout setting - */ - public function getConnectionTimeout(): float - { - return $this->connectionTimeout; - } - - /** - * Get current in-transfer timeout - */ - public function getTimeout(): float - { - return $this->timeout; - } - - /** - * Get current local writing timeout - * - * @return float - */ - public function getWritingTimeout(): float - { - return $this->writingTimeout; - } - - /** - * Get current chunk size - */ - public function getChunkSize(): ?int - { - return $this->chunkSize; - } - - /** - * Check to see if the socket is currently available. - * - * UDP might appear to be connected but might fail when writing. See http://php.net/fsockopen for details. - */ - public function isConnected(): bool - { - return is_resource($this->resource) - && !feof($this->resource); // on TCP - other party can close connection. - } - - /** - * Wrapper to allow mocking - * - * @return resource|false - */ - protected function pfsockopen() - { - return @pfsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); - } - - /** - * Wrapper to allow mocking - * - * @return resource|false - */ - protected function fsockopen() - { - return @fsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); - } - - /** - * Wrapper to allow mocking - * - * @see http://php.net/manual/en/function.stream-set-timeout.php - * - * @return bool - */ - protected function streamSetTimeout() - { - $seconds = floor($this->timeout); - $microseconds = round(($this->timeout - $seconds) * 1e6); - - if (!is_resource($this->resource)) { - throw new \LogicException('streamSetTimeout called but $this->resource is not a resource'); - } - - return stream_set_timeout($this->resource, (int) $seconds, (int) $microseconds); - } - - /** - * Wrapper to allow mocking - * - * @see http://php.net/manual/en/function.stream-set-chunk-size.php - * - * @return int|bool - */ - protected function streamSetChunkSize() - { - if (!is_resource($this->resource)) { - throw new \LogicException('streamSetChunkSize called but $this->resource is not a resource'); - } - - if (null === $this->chunkSize) { - throw new \LogicException('streamSetChunkSize called but $this->chunkSize is not set'); - } - - return stream_set_chunk_size($this->resource, $this->chunkSize); - } - - /** - * Wrapper to allow mocking - * - * @return int|bool - */ - protected function fwrite(string $data) - { - if (!is_resource($this->resource)) { - throw new \LogicException('fwrite called but $this->resource is not a resource'); - } - - return @fwrite($this->resource, $data); - } - - /** - * Wrapper to allow mocking - * - * @return mixed[]|bool - */ - protected function streamGetMetadata() - { - if (!is_resource($this->resource)) { - throw new \LogicException('streamGetMetadata called but $this->resource is not a resource'); - } - - return stream_get_meta_data($this->resource); - } - - private function validateTimeout(float $value): void - { - if ($value < 0) { - throw new \InvalidArgumentException("Timeout must be 0 or a positive float (got $value)"); - } - } - - private function connectIfNotConnected(): void - { - if ($this->isConnected()) { - return; - } - $this->connect(); - } - - /** - * @phpstan-param FormattedRecord $record - */ - protected function generateDataStream(array $record): string - { - return (string) $record['formatted']; - } - - /** - * @return resource|null - */ - protected function getResource() - { - return $this->resource; - } - - private function connect(): void - { - $this->createSocketResource(); - $this->setSocketTimeout(); - $this->setStreamChunkSize(); - } - - private function createSocketResource(): void - { - if ($this->isPersistent()) { - $resource = $this->pfsockopen(); - } else { - $resource = $this->fsockopen(); - } - if (is_bool($resource)) { - throw new \UnexpectedValueException("Failed connecting to $this->connectionString ($this->errno: $this->errstr)"); - } - $this->resource = $resource; - } - - private function setSocketTimeout(): void - { - if (!$this->streamSetTimeout()) { - throw new \UnexpectedValueException("Failed setting timeout with stream_set_timeout()"); - } - } - - private function setStreamChunkSize(): void - { - if ($this->chunkSize && !$this->streamSetChunkSize()) { - throw new \UnexpectedValueException("Failed setting chunk size with stream_set_chunk_size()"); - } - } - - private function writeToSocket(string $data): void - { - $length = strlen($data); - $sent = 0; - $this->lastSentBytes = $sent; - while ($this->isConnected() && $sent < $length) { - if (0 == $sent) { - $chunk = $this->fwrite($data); - } else { - $chunk = $this->fwrite(substr($data, $sent)); - } - if ($chunk === false) { - throw new \RuntimeException("Could not write to socket"); - } - $sent += $chunk; - $socketInfo = $this->streamGetMetadata(); - if (is_array($socketInfo) && $socketInfo['timed_out']) { - throw new \RuntimeException("Write timed-out"); - } - - if ($this->writingIsTimedOut($sent)) { - throw new \RuntimeException("Write timed-out, no data sent for `{$this->writingTimeout}` seconds, probably we got disconnected (sent $sent of $length)"); - } - } - if (!$this->isConnected() && $sent < $length) { - throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent $sent of $length)"); - } - } - - private function writingIsTimedOut(int $sent): bool - { - // convert to ms - if (0.0 == $this->writingTimeout) { - return false; - } - - if ($sent !== $this->lastSentBytes) { - $this->lastWritingAt = microtime(true); - $this->lastSentBytes = $sent; - - return false; - } else { - usleep(100); - } - - if ((microtime(true) - $this->lastWritingAt) >= $this->writingTimeout) { - $this->closeSocket(); - - return true; - } - - return false; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php deleted file mode 100644 index dcf282b4..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SqsHandler.php +++ /dev/null @@ -1,62 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Aws\Sqs\SqsClient; -use Monolog\Logger; -use Monolog\Utils; - -/** - * Writes to any sqs queue. - * - * @author Martijn van Calker - */ -class SqsHandler extends AbstractProcessingHandler -{ - /** 256 KB in bytes - maximum message size in SQS */ - protected const MAX_MESSAGE_SIZE = 262144; - /** 100 KB in bytes - head message size for new error log */ - protected const HEAD_MESSAGE_SIZE = 102400; - - /** @var SqsClient */ - private $client; - /** @var string */ - private $queueUrl; - - public function __construct(SqsClient $sqsClient, string $queueUrl, $level = Logger::DEBUG, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->client = $sqsClient; - $this->queueUrl = $queueUrl; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if (!isset($record['formatted']) || 'string' !== gettype($record['formatted'])) { - throw new \InvalidArgumentException('SqsHandler accepts only formatted records as a string' . Utils::getRecordMessageForException($record)); - } - - $messageBody = $record['formatted']; - if (strlen($messageBody) >= static::MAX_MESSAGE_SIZE) { - $messageBody = Utils::substr($messageBody, 0, static::HEAD_MESSAGE_SIZE); - } - - $this->client->sendMessage([ - 'QueueUrl' => $this->queueUrl, - 'MessageBody' => $messageBody, - ]); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php deleted file mode 100644 index 65183512..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php +++ /dev/null @@ -1,221 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * Stores to any stream resource - * - * Can be used to store into php://stderr, remote and local files, etc. - * - * @author Jordi Boggiano - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class StreamHandler extends AbstractProcessingHandler -{ - /** @const int */ - protected const MAX_CHUNK_SIZE = 2147483647; - /** @const int 10MB */ - protected const DEFAULT_CHUNK_SIZE = 10 * 1024 * 1024; - /** @var int */ - protected $streamChunkSize; - /** @var resource|null */ - protected $stream; - /** @var ?string */ - protected $url = null; - /** @var ?string */ - private $errorMessage = null; - /** @var ?int */ - protected $filePermission; - /** @var bool */ - protected $useLocking; - /** @var true|null */ - private $dirCreated = null; - - /** - * @param resource|string $stream If a missing path can't be created, an UnexpectedValueException will be thrown on first write - * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) - * @param bool $useLocking Try to lock log file before doing any writes - * - * @throws \InvalidArgumentException If stream is not a resource or string - */ - public function __construct($stream, $level = Logger::DEBUG, bool $bubble = true, ?int $filePermission = null, bool $useLocking = false) - { - parent::__construct($level, $bubble); - - if (($phpMemoryLimit = Utils::expandIniShorthandBytes(ini_get('memory_limit'))) !== false) { - if ($phpMemoryLimit > 0) { - // use max 10% of allowed memory for the chunk size, and at least 100KB - $this->streamChunkSize = min(static::MAX_CHUNK_SIZE, max((int) ($phpMemoryLimit / 10), 100 * 1024)); - } else { - // memory is unlimited, set to the default 10MB - $this->streamChunkSize = static::DEFAULT_CHUNK_SIZE; - } - } else { - // no memory limit information, set to the default 10MB - $this->streamChunkSize = static::DEFAULT_CHUNK_SIZE; - } - - if (is_resource($stream)) { - $this->stream = $stream; - - stream_set_chunk_size($this->stream, $this->streamChunkSize); - } elseif (is_string($stream)) { - $this->url = Utils::canonicalizePath($stream); - } else { - throw new \InvalidArgumentException('A stream must either be a resource or a string.'); - } - - $this->filePermission = $filePermission; - $this->useLocking = $useLocking; - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - if ($this->url && is_resource($this->stream)) { - fclose($this->stream); - } - $this->stream = null; - $this->dirCreated = null; - } - - /** - * Return the currently active stream if it is open - * - * @return resource|null - */ - public function getStream() - { - return $this->stream; - } - - /** - * Return the stream URL if it was configured with a URL and not an active resource - * - * @return string|null - */ - public function getUrl(): ?string - { - return $this->url; - } - - /** - * @return int - */ - public function getStreamChunkSize(): int - { - return $this->streamChunkSize; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if (!is_resource($this->stream)) { - $url = $this->url; - if (null === $url || '' === $url) { - throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().' . Utils::getRecordMessageForException($record)); - } - $this->createDir($url); - $this->errorMessage = null; - set_error_handler([$this, 'customErrorHandler']); - $stream = fopen($url, 'a'); - if ($this->filePermission !== null) { - @chmod($url, $this->filePermission); - } - restore_error_handler(); - if (!is_resource($stream)) { - $this->stream = null; - - throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $url) . Utils::getRecordMessageForException($record)); - } - stream_set_chunk_size($stream, $this->streamChunkSize); - $this->stream = $stream; - } - - $stream = $this->stream; - if (!is_resource($stream)) { - throw new \LogicException('No stream was opened yet' . Utils::getRecordMessageForException($record)); - } - - if ($this->useLocking) { - // ignoring errors here, there's not much we can do about them - flock($stream, LOCK_EX); - } - - $this->streamWrite($stream, $record); - - if ($this->useLocking) { - flock($stream, LOCK_UN); - } - } - - /** - * Write to stream - * @param resource $stream - * @param array $record - * - * @phpstan-param FormattedRecord $record - */ - protected function streamWrite($stream, array $record): void - { - fwrite($stream, (string) $record['formatted']); - } - - private function customErrorHandler(int $code, string $msg): bool - { - $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); - - return true; - } - - private function getDirFromStream(string $stream): ?string - { - $pos = strpos($stream, '://'); - if ($pos === false) { - return dirname($stream); - } - - if ('file://' === substr($stream, 0, 7)) { - return dirname(substr($stream, 7)); - } - - return null; - } - - private function createDir(string $url): void - { - // Do not try to create dir if it has already been tried. - if ($this->dirCreated) { - return; - } - - $dir = $this->getDirFromStream($url); - if (null !== $dir && !is_dir($dir)) { - $this->errorMessage = null; - set_error_handler([$this, 'customErrorHandler']); - $status = mkdir($dir, 0777, true); - restore_error_handler(); - if (false === $status && !is_dir($dir) && strpos((string) $this->errorMessage, 'File exists') === false) { - throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and it could not be created: '.$this->errorMessage, $dir)); - } - } - $this->dirCreated = true; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php deleted file mode 100644 index fae92514..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php +++ /dev/null @@ -1,115 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Swift_Message; -use Swift; - -/** - * SwiftMailerHandler uses Swift_Mailer to send the emails - * - * @author Gyula Sallai - * - * @phpstan-import-type Record from \Monolog\Logger - * @deprecated Since Monolog 2.6. Use SymfonyMailerHandler instead. - */ -class SwiftMailerHandler extends MailHandler -{ - /** @var \Swift_Mailer */ - protected $mailer; - /** @var Swift_Message|callable(string, Record[]): Swift_Message */ - private $messageTemplate; - - /** - * @psalm-param Swift_Message|callable(string, Record[]): Swift_Message $message - * - * @param \Swift_Mailer $mailer The mailer to use - * @param callable|Swift_Message $message An example message for real messages, only the body will be replaced - */ - public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, bool $bubble = true) - { - parent::__construct($level, $bubble); - - @trigger_error('The SwiftMailerHandler is deprecated since Monolog 2.6. Use SymfonyMailerHandler instead.', E_USER_DEPRECATED); - - $this->mailer = $mailer; - $this->messageTemplate = $message; - } - - /** - * {@inheritDoc} - */ - protected function send(string $content, array $records): void - { - $this->mailer->send($this->buildMessage($content, $records)); - } - - /** - * Gets the formatter for the Swift_Message subject. - * - * @param string|null $format The format of the subject - */ - protected function getSubjectFormatter(?string $format): FormatterInterface - { - return new LineFormatter($format); - } - - /** - * Creates instance of Swift_Message to be sent - * - * @param string $content formatted email body to be sent - * @param array $records Log records that formed the content - * @return Swift_Message - * - * @phpstan-param Record[] $records - */ - protected function buildMessage(string $content, array $records): Swift_Message - { - $message = null; - if ($this->messageTemplate instanceof Swift_Message) { - $message = clone $this->messageTemplate; - $message->generateId(); - } elseif (is_callable($this->messageTemplate)) { - $message = ($this->messageTemplate)($content, $records); - } - - if (!$message instanceof Swift_Message) { - $record = reset($records); - throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it' . ($record ? Utils::getRecordMessageForException($record) : '')); - } - - if ($records) { - $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); - $message->setSubject($subjectFormatter->format($this->getHighestRecord($records))); - } - - $mime = 'text/plain'; - if ($this->isHtmlBody($content)) { - $mime = 'text/html'; - } - - $message->setBody($content, $mime); - /** @phpstan-ignore-next-line */ - if (version_compare(Swift::VERSION, '6.0.0', '>=')) { - $message->setDate(new \DateTimeImmutable()); - } else { - /** @phpstan-ignore-next-line */ - $message->setDate(time()); - } - - return $message; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php deleted file mode 100644 index 130e6f1f..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SymfonyMailerHandler.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\LineFormatter; -use Symfony\Component\Mailer\MailerInterface; -use Symfony\Component\Mailer\Transport\TransportInterface; -use Symfony\Component\Mime\Email; - -/** - * SymfonyMailerHandler uses Symfony's Mailer component to send the emails - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class SymfonyMailerHandler extends MailHandler -{ - /** @var MailerInterface|TransportInterface */ - protected $mailer; - /** @var Email|callable(string, Record[]): Email */ - private $emailTemplate; - - /** - * @psalm-param Email|callable(string, Record[]): Email $email - * - * @param MailerInterface|TransportInterface $mailer The mailer to use - * @param callable|Email $email An email template, the subject/body will be replaced - */ - public function __construct($mailer, $email, $level = Logger::ERROR, bool $bubble = true) - { - parent::__construct($level, $bubble); - - $this->mailer = $mailer; - $this->emailTemplate = $email; - } - - /** - * {@inheritDoc} - */ - protected function send(string $content, array $records): void - { - $this->mailer->send($this->buildMessage($content, $records)); - } - - /** - * Gets the formatter for the Swift_Message subject. - * - * @param string|null $format The format of the subject - */ - protected function getSubjectFormatter(?string $format): FormatterInterface - { - return new LineFormatter($format); - } - - /** - * Creates instance of Email to be sent - * - * @param string $content formatted email body to be sent - * @param array $records Log records that formed the content - * - * @phpstan-param Record[] $records - */ - protected function buildMessage(string $content, array $records): Email - { - $message = null; - if ($this->emailTemplate instanceof Email) { - $message = clone $this->emailTemplate; - } elseif (is_callable($this->emailTemplate)) { - $message = ($this->emailTemplate)($content, $records); - } - - if (!$message instanceof Email) { - $record = reset($records); - throw new \InvalidArgumentException('Could not resolve message as instance of Email or a callable returning it' . ($record ? Utils::getRecordMessageForException($record) : '')); - } - - if ($records) { - $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); - $message->subject($subjectFormatter->format($this->getHighestRecord($records))); - } - - if ($this->isHtmlBody($content)) { - if (null !== ($charset = $message->getHtmlCharset())) { - $message->html($content, $charset); - } else { - $message->html($content); - } - } else { - if (null !== ($charset = $message->getTextCharset())) { - $message->text($content, $charset); - } else { - $message->text($content); - } - } - - return $message->date(new \DateTimeImmutable()); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php deleted file mode 100644 index 1d543b7e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php +++ /dev/null @@ -1,68 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Monolog\Utils; - -/** - * Logs to syslog service. - * - * usage example: - * - * $log = new Logger('application'); - * $syslog = new SyslogHandler('myfacility', 'local6'); - * $formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%"); - * $syslog->setFormatter($formatter); - * $log->pushHandler($syslog); - * - * @author Sven Paulus - */ -class SyslogHandler extends AbstractSyslogHandler -{ - /** @var string */ - protected $ident; - /** @var int */ - protected $logopts; - - /** - * @param string $ident - * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant - * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID - */ - public function __construct(string $ident, $facility = LOG_USER, $level = Logger::DEBUG, bool $bubble = true, int $logopts = LOG_PID) - { - parent::__construct($facility, $level, $bubble); - - $this->ident = $ident; - $this->logopts = $logopts; - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - closelog(); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - if (!openlog($this->ident, $this->logopts, $this->facility)) { - throw new \LogicException('Can\'t open syslog for ident "'.$this->ident.'" and facility "'.$this->facility.'"' . Utils::getRecordMessageForException($record)); - } - syslog($this->logLevels[$record['level']], (string) $record['formatted']); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php deleted file mode 100644 index dbd8ef69..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler\SyslogUdp; - -use Monolog\Utils; -use Socket; - -class UdpSocket -{ - protected const DATAGRAM_MAX_LENGTH = 65023; - - /** @var string */ - protected $ip; - /** @var int */ - protected $port; - /** @var resource|Socket|null */ - protected $socket = null; - - public function __construct(string $ip, int $port = 514) - { - $this->ip = $ip; - $this->port = $port; - } - - /** - * @param string $line - * @param string $header - * @return void - */ - public function write($line, $header = "") - { - $this->send($this->assembleMessage($line, $header)); - } - - public function close(): void - { - if (is_resource($this->socket) || $this->socket instanceof Socket) { - socket_close($this->socket); - $this->socket = null; - } - } - - /** - * @return resource|Socket - */ - protected function getSocket() - { - if (null !== $this->socket) { - return $this->socket; - } - - $domain = AF_INET; - $protocol = SOL_UDP; - // Check if we are using unix sockets. - if ($this->port === 0) { - $domain = AF_UNIX; - $protocol = IPPROTO_IP; - } - - $this->socket = socket_create($domain, SOCK_DGRAM, $protocol) ?: null; - if (null === $this->socket) { - throw new \RuntimeException('The UdpSocket to '.$this->ip.':'.$this->port.' could not be opened via socket_create'); - } - - return $this->socket; - } - - protected function send(string $chunk): void - { - socket_sendto($this->getSocket(), $chunk, strlen($chunk), $flags = 0, $this->ip, $this->port); - } - - protected function assembleMessage(string $line, string $header): string - { - $chunkSize = static::DATAGRAM_MAX_LENGTH - strlen($header); - - return $header . Utils::substr($line, 0, $chunkSize); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php deleted file mode 100644 index deaa19f8..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use DateTimeInterface; -use Monolog\Logger; -use Monolog\Handler\SyslogUdp\UdpSocket; -use Monolog\Utils; - -/** - * A Handler for logging to a remote syslogd server. - * - * @author Jesper Skovgaard Nielsen - * @author Dominik Kukacka - */ -class SyslogUdpHandler extends AbstractSyslogHandler -{ - const RFC3164 = 0; - const RFC5424 = 1; - const RFC5424e = 2; - - /** @var array */ - private $dateFormats = array( - self::RFC3164 => 'M d H:i:s', - self::RFC5424 => \DateTime::RFC3339, - self::RFC5424e => \DateTime::RFC3339_EXTENDED, - ); - - /** @var UdpSocket */ - protected $socket; - /** @var string */ - protected $ident; - /** @var self::RFC* */ - protected $rfc; - - /** - * @param string $host Either IP/hostname or a path to a unix socket (port must be 0 then) - * @param int $port Port number, or 0 if $host is a unix socket - * @param string|int $facility Either one of the names of the keys in $this->facilities, or a LOG_* facility constant - * @param bool $bubble Whether the messages that are handled can bubble up the stack or not - * @param string $ident Program name or tag for each log message. - * @param int $rfc RFC to format the message for. - * @throws MissingExtensionException - * - * @phpstan-param self::RFC* $rfc - */ - public function __construct(string $host, int $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, bool $bubble = true, string $ident = 'php', int $rfc = self::RFC5424) - { - if (!extension_loaded('sockets')) { - throw new MissingExtensionException('The sockets extension is required to use the SyslogUdpHandler'); - } - - parent::__construct($facility, $level, $bubble); - - $this->ident = $ident; - $this->rfc = $rfc; - - $this->socket = new UdpSocket($host, $port); - } - - protected function write(array $record): void - { - $lines = $this->splitMessageIntoLines($record['formatted']); - - $header = $this->makeCommonSyslogHeader($this->logLevels[$record['level']], $record['datetime']); - - foreach ($lines as $line) { - $this->socket->write($line, $header); - } - } - - public function close(): void - { - $this->socket->close(); - } - - /** - * @param string|string[] $message - * @return string[] - */ - private function splitMessageIntoLines($message): array - { - if (is_array($message)) { - $message = implode("\n", $message); - } - - $lines = preg_split('/$\R?^/m', (string) $message, -1, PREG_SPLIT_NO_EMPTY); - if (false === $lines) { - $pcreErrorCode = preg_last_error(); - throw new \RuntimeException('Could not preg_split: ' . $pcreErrorCode . ' / ' . Utils::pcreLastErrorMessage($pcreErrorCode)); - } - - return $lines; - } - - /** - * Make common syslog header (see rfc5424 or rfc3164) - */ - protected function makeCommonSyslogHeader(int $severity, DateTimeInterface $datetime): string - { - $priority = $severity + $this->facility; - - if (!$pid = getmypid()) { - $pid = '-'; - } - - if (!$hostname = gethostname()) { - $hostname = '-'; - } - - if ($this->rfc === self::RFC3164) { - // see https://github.com/phpstan/phpstan/issues/5348 - // @phpstan-ignore-next-line - $dateNew = $datetime->setTimezone(new \DateTimeZone('UTC')); - $date = $dateNew->format($this->dateFormats[$this->rfc]); - - return "<$priority>" . - $date . " " . - $hostname . " " . - $this->ident . "[" . $pid . "]: "; - } - - $date = $datetime->format($this->dateFormats[$this->rfc]); - - return "<$priority>1 " . - $date . " " . - $hostname . " " . - $this->ident . " " . - $pid . " - - "; - } - - /** - * Inject your own socket, mainly used for testing - */ - public function setSocket(UdpSocket $socket): self - { - $this->socket = $socket; - - return $this; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php deleted file mode 100644 index 8912eba5..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/TelegramBotHandler.php +++ /dev/null @@ -1,274 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use RuntimeException; -use Monolog\Logger; -use Monolog\Utils; - -/** - * Handler send logs to Telegram using Telegram Bot API. - * - * How to use: - * 1) Create telegram bot with https://telegram.me/BotFather - * 2) Create a telegram channel where logs will be recorded. - * 3) Add created bot from step 1 to the created channel from step 2. - * - * Use telegram bot API key from step 1 and channel name with '@' prefix from step 2 to create instance of TelegramBotHandler - * - * @link https://core.telegram.org/bots/api - * - * @author Mazur Alexandr - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class TelegramBotHandler extends AbstractProcessingHandler -{ - private const BOT_API = 'https://api.telegram.org/bot'; - - /** - * The available values of parseMode according to the Telegram api documentation - */ - private const AVAILABLE_PARSE_MODES = [ - 'HTML', - 'MarkdownV2', - 'Markdown', // legacy mode without underline and strikethrough, use MarkdownV2 instead - ]; - - /** - * The maximum number of characters allowed in a message according to the Telegram api documentation - */ - private const MAX_MESSAGE_LENGTH = 4096; - - /** - * Telegram bot access token provided by BotFather. - * Create telegram bot with https://telegram.me/BotFather and use access token from it. - * @var string - */ - private $apiKey; - - /** - * Telegram channel name. - * Since to start with '@' symbol as prefix. - * @var string - */ - private $channel; - - /** - * The kind of formatting that is used for the message. - * See available options at https://core.telegram.org/bots/api#formatting-options - * or in AVAILABLE_PARSE_MODES - * @var ?string - */ - private $parseMode; - - /** - * Disables link previews for links in the message. - * @var ?bool - */ - private $disableWebPagePreview; - - /** - * Sends the message silently. Users will receive a notification with no sound. - * @var ?bool - */ - private $disableNotification; - - /** - * True - split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages. - * False - truncates a message that is too long. - * @var bool - */ - private $splitLongMessages; - - /** - * Adds 1-second delay between sending a split message (according to Telegram API to avoid 429 Too Many Requests). - * @var bool - */ - private $delayBetweenMessages; - - /** - * @param string $apiKey Telegram bot access token provided by BotFather - * @param string $channel Telegram channel name - * @param bool $splitLongMessages Split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages - * @param bool $delayBetweenMessages Adds delay between sending a split message according to Telegram API - * @throws MissingExtensionException - */ - public function __construct( - string $apiKey, - string $channel, - $level = Logger::DEBUG, - bool $bubble = true, - string $parseMode = null, - bool $disableWebPagePreview = null, - bool $disableNotification = null, - bool $splitLongMessages = false, - bool $delayBetweenMessages = false - ) - { - if (!extension_loaded('curl')) { - throw new MissingExtensionException('The curl extension is needed to use the TelegramBotHandler'); - } - - parent::__construct($level, $bubble); - - $this->apiKey = $apiKey; - $this->channel = $channel; - $this->setParseMode($parseMode); - $this->disableWebPagePreview($disableWebPagePreview); - $this->disableNotification($disableNotification); - $this->splitLongMessages($splitLongMessages); - $this->delayBetweenMessages($delayBetweenMessages); - } - - public function setParseMode(string $parseMode = null): self - { - if ($parseMode !== null && !in_array($parseMode, self::AVAILABLE_PARSE_MODES)) { - throw new \InvalidArgumentException('Unknown parseMode, use one of these: ' . implode(', ', self::AVAILABLE_PARSE_MODES) . '.'); - } - - $this->parseMode = $parseMode; - - return $this; - } - - public function disableWebPagePreview(bool $disableWebPagePreview = null): self - { - $this->disableWebPagePreview = $disableWebPagePreview; - - return $this; - } - - public function disableNotification(bool $disableNotification = null): self - { - $this->disableNotification = $disableNotification; - - return $this; - } - - /** - * True - split a message longer than MAX_MESSAGE_LENGTH into parts and send in multiple messages. - * False - truncates a message that is too long. - * @param bool $splitLongMessages - * @return $this - */ - public function splitLongMessages(bool $splitLongMessages = false): self - { - $this->splitLongMessages = $splitLongMessages; - - return $this; - } - - /** - * Adds 1-second delay between sending a split message (according to Telegram API to avoid 429 Too Many Requests). - * @param bool $delayBetweenMessages - * @return $this - */ - public function delayBetweenMessages(bool $delayBetweenMessages = false): self - { - $this->delayBetweenMessages = $delayBetweenMessages; - - return $this; - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - /** @var Record[] $messages */ - $messages = []; - - foreach ($records as $record) { - if (!$this->isHandling($record)) { - continue; - } - - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - $messages[] = $record; - } - - if (!empty($messages)) { - $this->send((string)$this->getFormatter()->formatBatch($messages)); - } - } - - /** - * @inheritDoc - */ - protected function write(array $record): void - { - $this->send($record['formatted']); - } - - /** - * Send request to @link https://api.telegram.org/bot on SendMessage action. - * @param string $message - */ - protected function send(string $message): void - { - $messages = $this->handleMessageLength($message); - - foreach ($messages as $key => $msg) { - if ($this->delayBetweenMessages && $key > 0) { - sleep(1); - } - - $this->sendCurl($msg); - } - } - - protected function sendCurl(string $message): void - { - $ch = curl_init(); - $url = self::BOT_API . $this->apiKey . '/SendMessage'; - curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); - curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([ - 'text' => $message, - 'chat_id' => $this->channel, - 'parse_mode' => $this->parseMode, - 'disable_web_page_preview' => $this->disableWebPagePreview, - 'disable_notification' => $this->disableNotification, - ])); - - $result = Curl\Util::execute($ch); - if (!is_string($result)) { - throw new RuntimeException('Telegram API error. Description: No response'); - } - $result = json_decode($result, true); - - if ($result['ok'] === false) { - throw new RuntimeException('Telegram API error. Description: ' . $result['description']); - } - } - - /** - * Handle a message that is too long: truncates or splits into several - * @param string $message - * @return string[] - */ - private function handleMessageLength(string $message): array - { - $truncatedMarker = ' (...truncated)'; - if (!$this->splitLongMessages && strlen($message) > self::MAX_MESSAGE_LENGTH) { - return [Utils::substr($message, 0, self::MAX_MESSAGE_LENGTH - strlen($truncatedMarker)) . $truncatedMarker]; - } - - return str_split($message, self::MAX_MESSAGE_LENGTH); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php deleted file mode 100644 index 0986da27..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php +++ /dev/null @@ -1,231 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Used for testing purposes. - * - * It records all records and gives you access to them for verification. - * - * @author Jordi Boggiano - * - * @method bool hasEmergency($record) - * @method bool hasAlert($record) - * @method bool hasCritical($record) - * @method bool hasError($record) - * @method bool hasWarning($record) - * @method bool hasNotice($record) - * @method bool hasInfo($record) - * @method bool hasDebug($record) - * - * @method bool hasEmergencyRecords() - * @method bool hasAlertRecords() - * @method bool hasCriticalRecords() - * @method bool hasErrorRecords() - * @method bool hasWarningRecords() - * @method bool hasNoticeRecords() - * @method bool hasInfoRecords() - * @method bool hasDebugRecords() - * - * @method bool hasEmergencyThatContains($message) - * @method bool hasAlertThatContains($message) - * @method bool hasCriticalThatContains($message) - * @method bool hasErrorThatContains($message) - * @method bool hasWarningThatContains($message) - * @method bool hasNoticeThatContains($message) - * @method bool hasInfoThatContains($message) - * @method bool hasDebugThatContains($message) - * - * @method bool hasEmergencyThatMatches($message) - * @method bool hasAlertThatMatches($message) - * @method bool hasCriticalThatMatches($message) - * @method bool hasErrorThatMatches($message) - * @method bool hasWarningThatMatches($message) - * @method bool hasNoticeThatMatches($message) - * @method bool hasInfoThatMatches($message) - * @method bool hasDebugThatMatches($message) - * - * @method bool hasEmergencyThatPasses($message) - * @method bool hasAlertThatPasses($message) - * @method bool hasCriticalThatPasses($message) - * @method bool hasErrorThatPasses($message) - * @method bool hasWarningThatPasses($message) - * @method bool hasNoticeThatPasses($message) - * @method bool hasInfoThatPasses($message) - * @method bool hasDebugThatPasses($message) - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class TestHandler extends AbstractProcessingHandler -{ - /** @var Record[] */ - protected $records = []; - /** @var array */ - protected $recordsByLevel = []; - /** @var bool */ - private $skipReset = false; - - /** - * @return array - * - * @phpstan-return Record[] - */ - public function getRecords() - { - return $this->records; - } - - /** - * @return void - */ - public function clear() - { - $this->records = []; - $this->recordsByLevel = []; - } - - /** - * @return void - */ - public function reset() - { - if (!$this->skipReset) { - $this->clear(); - } - } - - /** - * @return void - */ - public function setSkipReset(bool $skipReset) - { - $this->skipReset = $skipReset; - } - - /** - * @param string|int $level Logging level value or name - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function hasRecords($level): bool - { - return isset($this->recordsByLevel[Logger::toMonologLevel($level)]); - } - - /** - * @param string|array $record Either a message string or an array containing message and optionally context keys that will be checked against all records - * @param string|int $level Logging level value or name - * - * @phpstan-param array{message: string, context?: mixed[]}|string $record - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function hasRecord($record, $level): bool - { - if (is_string($record)) { - $record = array('message' => $record); - } - - return $this->hasRecordThatPasses(function ($rec) use ($record) { - if ($rec['message'] !== $record['message']) { - return false; - } - if (isset($record['context']) && $rec['context'] !== $record['context']) { - return false; - } - - return true; - }, $level); - } - - /** - * @param string|int $level Logging level value or name - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function hasRecordThatContains(string $message, $level): bool - { - return $this->hasRecordThatPasses(function ($rec) use ($message) { - return strpos($rec['message'], $message) !== false; - }, $level); - } - - /** - * @param string|int $level Logging level value or name - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function hasRecordThatMatches(string $regex, $level): bool - { - return $this->hasRecordThatPasses(function (array $rec) use ($regex): bool { - return preg_match($regex, $rec['message']) > 0; - }, $level); - } - - /** - * @param string|int $level Logging level value or name - * @return bool - * - * @psalm-param callable(Record, int): mixed $predicate - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function hasRecordThatPasses(callable $predicate, $level) - { - $level = Logger::toMonologLevel($level); - - if (!isset($this->recordsByLevel[$level])) { - return false; - } - - foreach ($this->recordsByLevel[$level] as $i => $rec) { - if ($predicate($rec, $i)) { - return true; - } - } - - return false; - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->recordsByLevel[$record['level']][] = $record; - $this->records[] = $record; - } - - /** - * @param string $method - * @param mixed[] $args - * @return bool - */ - public function __call($method, $args) - { - if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { - $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; - $level = constant('Monolog\Logger::' . strtoupper($matches[2])); - $callback = [$this, $genericMethod]; - if (is_callable($callback)) { - $args[] = $level; - - return call_user_func_array($callback, $args); - } - } - - throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php b/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php deleted file mode 100644 index c8183528..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/WebRequestRecognizerTrait.php +++ /dev/null @@ -1,24 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -trait WebRequestRecognizerTrait -{ - /** - * Checks if PHP's serving a web request - * @return bool - */ - protected function isWebRequest(): bool - { - return 'cli' !== \PHP_SAPI && 'phpdbg' !== \PHP_SAPI; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php deleted file mode 100644 index b6d3d3b1..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php +++ /dev/null @@ -1,81 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -/** - * Forwards records to multiple handlers suppressing failures of each handler - * and continuing through to give every handler a chance to succeed. - * - * @author Craig D'Amelio - * - * @phpstan-import-type Record from \Monolog\Logger - */ -class WhatFailureGroupHandler extends GroupHandler -{ - /** - * {@inheritDoc} - */ - public function handle(array $record): bool - { - if ($this->processors) { - /** @var Record $record */ - $record = $this->processRecord($record); - } - - foreach ($this->handlers as $handler) { - try { - $handler->handle($record); - } catch (\Throwable $e) { - // What failure? - } - } - - return false === $this->bubble; - } - - /** - * {@inheritDoc} - */ - public function handleBatch(array $records): void - { - if ($this->processors) { - $processed = array(); - foreach ($records as $record) { - $processed[] = $this->processRecord($record); - } - /** @var Record[] $records */ - $records = $processed; - } - - foreach ($this->handlers as $handler) { - try { - $handler->handleBatch($records); - } catch (\Throwable $e) { - // What failure? - } - } - } - - /** - * {@inheritDoc} - */ - public function close(): void - { - foreach ($this->handlers as $handler) { - try { - $handler->close(); - } catch (\Throwable $e) { - // What failure? - } - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php deleted file mode 100644 index ddd46d8c..00000000 --- a/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php +++ /dev/null @@ -1,101 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Handler; - -use Monolog\Formatter\FormatterInterface; -use Monolog\Formatter\NormalizerFormatter; -use Monolog\Logger; - -/** - * Handler sending logs to Zend Monitor - * - * @author Christian Bergau - * @author Jason Davis - * - * @phpstan-import-type FormattedRecord from AbstractProcessingHandler - */ -class ZendMonitorHandler extends AbstractProcessingHandler -{ - /** - * Monolog level / ZendMonitor Custom Event priority map - * - * @var array - */ - protected $levelMap = []; - - /** - * @throws MissingExtensionException - */ - public function __construct($level = Logger::DEBUG, bool $bubble = true) - { - if (!function_exists('zend_monitor_custom_event')) { - throw new MissingExtensionException( - 'You must have Zend Server installed with Zend Monitor enabled in order to use this handler' - ); - } - //zend monitor constants are not defined if zend monitor is not enabled. - $this->levelMap = [ - Logger::DEBUG => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Logger::INFO => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Logger::NOTICE => \ZEND_MONITOR_EVENT_SEVERITY_INFO, - Logger::WARNING => \ZEND_MONITOR_EVENT_SEVERITY_WARNING, - Logger::ERROR => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Logger::CRITICAL => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Logger::ALERT => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - Logger::EMERGENCY => \ZEND_MONITOR_EVENT_SEVERITY_ERROR, - ]; - parent::__construct($level, $bubble); - } - - /** - * {@inheritDoc} - */ - protected function write(array $record): void - { - $this->writeZendMonitorCustomEvent( - Logger::getLevelName($record['level']), - $record['message'], - $record['formatted'], - $this->levelMap[$record['level']] - ); - } - - /** - * Write to Zend Monitor Events - * @param string $type Text displayed in "Class Name (custom)" field - * @param string $message Text displayed in "Error String" - * @param array $formatted Displayed in Custom Variables tab - * @param int $severity Set the event severity level (-1,0,1) - * - * @phpstan-param FormattedRecord $formatted - */ - protected function writeZendMonitorCustomEvent(string $type, string $message, array $formatted, int $severity): void - { - zend_monitor_custom_event($type, $message, $formatted, $severity); - } - - /** - * {@inheritDoc} - */ - public function getDefaultFormatter(): FormatterInterface - { - return new NormalizerFormatter(); - } - - /** - * @return array - */ - public function getLevelMap(): array - { - return $this->levelMap; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/LogRecord.php b/vendor/monolog/monolog/src/Monolog/LogRecord.php deleted file mode 100644 index 702807d7..00000000 --- a/vendor/monolog/monolog/src/Monolog/LogRecord.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use ArrayAccess; - -/** - * Monolog log record interface for forward compatibility with Monolog 3.0 - * - * This is just present in Monolog 2.4+ to allow interoperable code to be written against - * both versions by type-hinting arguments as `array|\Monolog\LogRecord $record` - * - * Do not rely on this interface for other purposes, and do not implement it. - * - * @author Jordi Boggiano - * @template-extends \ArrayAccess<'message'|'level'|'context'|'level_name'|'channel'|'datetime'|'extra'|'formatted', mixed> - * @phpstan-import-type Record from Logger - */ -interface LogRecord extends \ArrayAccess -{ - /** - * @phpstan-return Record - */ - public function toArray(): array; -} diff --git a/vendor/monolog/monolog/src/Monolog/Logger.php b/vendor/monolog/monolog/src/Monolog/Logger.php deleted file mode 100644 index 775d7cf1..00000000 --- a/vendor/monolog/monolog/src/Monolog/Logger.php +++ /dev/null @@ -1,725 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use DateTimeZone; -use Monolog\Handler\HandlerInterface; -use Psr\Log\LoggerInterface; -use Psr\Log\InvalidArgumentException; -use Psr\Log\LogLevel; -use Throwable; -use Stringable; - -/** - * Monolog log channel - * - * It contains a stack of Handlers and a stack of Processors, - * and uses them to store records that are added to it. - * - * @author Jordi Boggiano - * - * @phpstan-type Level Logger::DEBUG|Logger::INFO|Logger::NOTICE|Logger::WARNING|Logger::ERROR|Logger::CRITICAL|Logger::ALERT|Logger::EMERGENCY - * @phpstan-type LevelName 'DEBUG'|'INFO'|'NOTICE'|'WARNING'|'ERROR'|'CRITICAL'|'ALERT'|'EMERGENCY' - * @phpstan-type Record array{message: string, context: mixed[], level: Level, level_name: LevelName, channel: string, datetime: \DateTimeImmutable, extra: mixed[]} - */ -class Logger implements LoggerInterface, ResettableInterface -{ - /** - * Detailed debug information - */ - public const DEBUG = 100; - - /** - * Interesting events - * - * Examples: User logs in, SQL logs. - */ - public const INFO = 200; - - /** - * Uncommon events - */ - public const NOTICE = 250; - - /** - * Exceptional occurrences that are not errors - * - * Examples: Use of deprecated APIs, poor use of an API, - * undesirable things that are not necessarily wrong. - */ - public const WARNING = 300; - - /** - * Runtime errors - */ - public const ERROR = 400; - - /** - * Critical conditions - * - * Example: Application component unavailable, unexpected exception. - */ - public const CRITICAL = 500; - - /** - * Action must be taken immediately - * - * Example: Entire website down, database unavailable, etc. - * This should trigger the SMS alerts and wake you up. - */ - public const ALERT = 550; - - /** - * Urgent alert. - */ - public const EMERGENCY = 600; - - /** - * Monolog API version - * - * This is only bumped when API breaks are done and should - * follow the major version of the library - * - * @var int - */ - public const API = 2; - - /** - * This is a static variable and not a constant to serve as an extension point for custom levels - * - * @var array $levels Logging levels with the levels as key - * - * @phpstan-var array $levels Logging levels with the levels as key - */ - protected static $levels = [ - self::DEBUG => 'DEBUG', - self::INFO => 'INFO', - self::NOTICE => 'NOTICE', - self::WARNING => 'WARNING', - self::ERROR => 'ERROR', - self::CRITICAL => 'CRITICAL', - self::ALERT => 'ALERT', - self::EMERGENCY => 'EMERGENCY', - ]; - - /** - * Mapping between levels numbers defined in RFC 5424 and Monolog ones - * - * @phpstan-var array $rfc_5424_levels - */ - private const RFC_5424_LEVELS = [ - 7 => self::DEBUG, - 6 => self::INFO, - 5 => self::NOTICE, - 4 => self::WARNING, - 3 => self::ERROR, - 2 => self::CRITICAL, - 1 => self::ALERT, - 0 => self::EMERGENCY, - ]; - - /** - * @var string - */ - protected $name; - - /** - * The handler stack - * - * @var HandlerInterface[] - */ - protected $handlers; - - /** - * Processors that will process all log records - * - * To process records of a single handler instead, add the processor on that specific handler - * - * @var callable[] - */ - protected $processors; - - /** - * @var bool - */ - protected $microsecondTimestamps = true; - - /** - * @var DateTimeZone - */ - protected $timezone; - - /** - * @var callable|null - */ - protected $exceptionHandler; - - /** - * @var int Keeps track of depth to prevent infinite logging loops - */ - private $logDepth = 0; - - /** - * @var \WeakMap<\Fiber, int>|null Keeps track of depth inside fibers to prevent infinite logging loops - */ - private $fiberLogDepth; - - /** - * @var bool Whether to detect infinite logging loops - * - * This can be disabled via {@see useLoggingLoopDetection} if you have async handlers that do not play well with this - */ - private $detectCycles = true; - - /** - * @psalm-param array $processors - * - * @param string $name The logging channel, a simple descriptive name that is attached to all log records - * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc. - * @param callable[] $processors Optional array of processors - * @param DateTimeZone|null $timezone Optional timezone, if not provided date_default_timezone_get() will be used - */ - public function __construct(string $name, array $handlers = [], array $processors = [], ?DateTimeZone $timezone = null) - { - $this->name = $name; - $this->setHandlers($handlers); - $this->processors = $processors; - $this->timezone = $timezone ?: new DateTimeZone(date_default_timezone_get() ?: 'UTC'); - - if (\PHP_VERSION_ID >= 80100) { - // Local variable for phpstan, see https://github.com/phpstan/phpstan/issues/6732#issuecomment-1111118412 - /** @var \WeakMap<\Fiber, int> $fiberLogDepth */ - $fiberLogDepth = new \WeakMap(); - $this->fiberLogDepth = $fiberLogDepth; - } - } - - public function getName(): string - { - return $this->name; - } - - /** - * Return a new cloned instance with the name changed - */ - public function withName(string $name): self - { - $new = clone $this; - $new->name = $name; - - return $new; - } - - /** - * Pushes a handler on to the stack. - */ - public function pushHandler(HandlerInterface $handler): self - { - array_unshift($this->handlers, $handler); - - return $this; - } - - /** - * Pops a handler from the stack - * - * @throws \LogicException If empty handler stack - */ - public function popHandler(): HandlerInterface - { - if (!$this->handlers) { - throw new \LogicException('You tried to pop from an empty handler stack.'); - } - - return array_shift($this->handlers); - } - - /** - * Set handlers, replacing all existing ones. - * - * If a map is passed, keys will be ignored. - * - * @param HandlerInterface[] $handlers - */ - public function setHandlers(array $handlers): self - { - $this->handlers = []; - foreach (array_reverse($handlers) as $handler) { - $this->pushHandler($handler); - } - - return $this; - } - - /** - * @return HandlerInterface[] - */ - public function getHandlers(): array - { - return $this->handlers; - } - - /** - * Adds a processor on to the stack. - */ - public function pushProcessor(callable $callback): self - { - array_unshift($this->processors, $callback); - - return $this; - } - - /** - * Removes the processor on top of the stack and returns it. - * - * @throws \LogicException If empty processor stack - * @return callable - */ - public function popProcessor(): callable - { - if (!$this->processors) { - throw new \LogicException('You tried to pop from an empty processor stack.'); - } - - return array_shift($this->processors); - } - - /** - * @return callable[] - */ - public function getProcessors(): array - { - return $this->processors; - } - - /** - * Control the use of microsecond resolution timestamps in the 'datetime' - * member of new records. - * - * As of PHP7.1 microseconds are always included by the engine, so - * there is no performance penalty and Monolog 2 enabled microseconds - * by default. This function lets you disable them though in case you want - * to suppress microseconds from the output. - * - * @param bool $micro True to use microtime() to create timestamps - */ - public function useMicrosecondTimestamps(bool $micro): self - { - $this->microsecondTimestamps = $micro; - - return $this; - } - - public function useLoggingLoopDetection(bool $detectCycles): self - { - $this->detectCycles = $detectCycles; - - return $this; - } - - /** - * Adds a log record. - * - * @param int $level The logging level (a Monolog or RFC 5424 level) - * @param string $message The log message - * @param mixed[] $context The log context - * @param DateTimeImmutable $datetime Optional log date to log into the past or future - * @return bool Whether the record has been processed - * - * @phpstan-param Level $level - */ - public function addRecord(int $level, string $message, array $context = [], DateTimeImmutable $datetime = null): bool - { - if (isset(self::RFC_5424_LEVELS[$level])) { - $level = self::RFC_5424_LEVELS[$level]; - } - - if ($this->detectCycles) { - if (\PHP_VERSION_ID >= 80100 && $fiber = \Fiber::getCurrent()) { - $this->fiberLogDepth[$fiber] = $this->fiberLogDepth[$fiber] ?? 0; - $logDepth = ++$this->fiberLogDepth[$fiber]; - } else { - $logDepth = ++$this->logDepth; - } - } else { - $logDepth = 0; - } - - if ($logDepth === 3) { - $this->warning('A possible infinite logging loop was detected and aborted. It appears some of your handler code is triggering logging, see the previous log record for a hint as to what may be the cause.'); - return false; - } elseif ($logDepth >= 5) { // log depth 4 is let through, so we can log the warning above - return false; - } - - try { - $record = null; - - foreach ($this->handlers as $handler) { - if (null === $record) { - // skip creating the record as long as no handler is going to handle it - if (!$handler->isHandling(['level' => $level])) { - continue; - } - - $levelName = static::getLevelName($level); - - $record = [ - 'message' => $message, - 'context' => $context, - 'level' => $level, - 'level_name' => $levelName, - 'channel' => $this->name, - 'datetime' => $datetime ?? new DateTimeImmutable($this->microsecondTimestamps, $this->timezone), - 'extra' => [], - ]; - - try { - foreach ($this->processors as $processor) { - $record = $processor($record); - } - } catch (Throwable $e) { - $this->handleException($e, $record); - - return true; - } - } - - // once the record exists, send it to all handlers as long as the bubbling chain is not interrupted - try { - if (true === $handler->handle($record)) { - break; - } - } catch (Throwable $e) { - $this->handleException($e, $record); - - return true; - } - } - } finally { - if ($this->detectCycles) { - if (isset($fiber)) { - $this->fiberLogDepth[$fiber]--; - } else { - $this->logDepth--; - } - } - } - - return null !== $record; - } - - /** - * Ends a log cycle and frees all resources used by handlers. - * - * Closing a Handler means flushing all buffers and freeing any open resources/handles. - * Handlers that have been closed should be able to accept log records again and re-open - * themselves on demand, but this may not always be possible depending on implementation. - * - * This is useful at the end of a request and will be called automatically on every handler - * when they get destructed. - */ - public function close(): void - { - foreach ($this->handlers as $handler) { - $handler->close(); - } - } - - /** - * Ends a log cycle and resets all handlers and processors to their initial state. - * - * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal - * state, and getting it back to a state in which it can receive log records again. - * - * This is useful in case you want to avoid logs leaking between two requests or jobs when you - * have a long running process like a worker or an application server serving multiple requests - * in one process. - */ - public function reset(): void - { - foreach ($this->handlers as $handler) { - if ($handler instanceof ResettableInterface) { - $handler->reset(); - } - } - - foreach ($this->processors as $processor) { - if ($processor instanceof ResettableInterface) { - $processor->reset(); - } - } - } - - /** - * Gets all supported logging levels. - * - * @return array Assoc array with human-readable level names => level codes. - * @phpstan-return array - */ - public static function getLevels(): array - { - return array_flip(static::$levels); - } - - /** - * Gets the name of the logging level. - * - * @throws \Psr\Log\InvalidArgumentException If level is not defined - * - * @phpstan-param Level $level - * @phpstan-return LevelName - */ - public static function getLevelName(int $level): string - { - if (!isset(static::$levels[$level])) { - throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', array_keys(static::$levels))); - } - - return static::$levels[$level]; - } - - /** - * Converts PSR-3 levels to Monolog ones if necessary - * - * @param string|int $level Level number (monolog) or name (PSR-3) - * @throws \Psr\Log\InvalidArgumentException If level is not defined - * - * @phpstan-param Level|LevelName|LogLevel::* $level - * @phpstan-return Level - */ - public static function toMonologLevel($level): int - { - if (is_string($level)) { - if (is_numeric($level)) { - /** @phpstan-ignore-next-line */ - return intval($level); - } - - // Contains chars of all log levels and avoids using strtoupper() which may have - // strange results depending on locale (for example, "i" will become "İ" in Turkish locale) - $upper = strtr($level, 'abcdefgilmnortuwy', 'ABCDEFGILMNORTUWY'); - if (defined(__CLASS__.'::'.$upper)) { - return constant(__CLASS__ . '::' . $upper); - } - - throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', array_keys(static::$levels) + static::$levels)); - } - - if (!is_int($level)) { - throw new InvalidArgumentException('Level "'.var_export($level, true).'" is not defined, use one of: '.implode(', ', array_keys(static::$levels) + static::$levels)); - } - - return $level; - } - - /** - * Checks whether the Logger has a handler that listens on the given level - * - * @phpstan-param Level $level - */ - public function isHandling(int $level): bool - { - $record = [ - 'level' => $level, - ]; - - foreach ($this->handlers as $handler) { - if ($handler->isHandling($record)) { - return true; - } - } - - return false; - } - - /** - * Set a custom exception handler that will be called if adding a new record fails - * - * The callable will receive an exception object and the record that failed to be logged - */ - public function setExceptionHandler(?callable $callback): self - { - $this->exceptionHandler = $callback; - - return $this; - } - - public function getExceptionHandler(): ?callable - { - return $this->exceptionHandler; - } - - /** - * Adds a log record at an arbitrary level. - * - * This method allows for compatibility with common interfaces. - * - * @param mixed $level The log level (a Monolog, PSR-3 or RFC 5424 level) - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function log($level, $message, array $context = []): void - { - if (!is_int($level) && !is_string($level)) { - throw new \InvalidArgumentException('$level is expected to be a string or int'); - } - - if (isset(self::RFC_5424_LEVELS[$level])) { - $level = self::RFC_5424_LEVELS[$level]; - } - - $level = static::toMonologLevel($level); - - $this->addRecord($level, (string) $message, $context); - } - - /** - * Adds a log record at the DEBUG level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function debug($message, array $context = []): void - { - $this->addRecord(static::DEBUG, (string) $message, $context); - } - - /** - * Adds a log record at the INFO level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function info($message, array $context = []): void - { - $this->addRecord(static::INFO, (string) $message, $context); - } - - /** - * Adds a log record at the NOTICE level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function notice($message, array $context = []): void - { - $this->addRecord(static::NOTICE, (string) $message, $context); - } - - /** - * Adds a log record at the WARNING level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function warning($message, array $context = []): void - { - $this->addRecord(static::WARNING, (string) $message, $context); - } - - /** - * Adds a log record at the ERROR level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function error($message, array $context = []): void - { - $this->addRecord(static::ERROR, (string) $message, $context); - } - - /** - * Adds a log record at the CRITICAL level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function critical($message, array $context = []): void - { - $this->addRecord(static::CRITICAL, (string) $message, $context); - } - - /** - * Adds a log record at the ALERT level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function alert($message, array $context = []): void - { - $this->addRecord(static::ALERT, (string) $message, $context); - } - - /** - * Adds a log record at the EMERGENCY level. - * - * This method allows for compatibility with common interfaces. - * - * @param string|Stringable $message The log message - * @param mixed[] $context The log context - */ - public function emergency($message, array $context = []): void - { - $this->addRecord(static::EMERGENCY, (string) $message, $context); - } - - /** - * Sets the timezone to be used for the timestamp of log records. - */ - public function setTimezone(DateTimeZone $tz): self - { - $this->timezone = $tz; - - return $this; - } - - /** - * Returns the timezone to be used for the timestamp of log records. - */ - public function getTimezone(): DateTimeZone - { - return $this->timezone; - } - - /** - * Delegates exception management to the custom exception handler, - * or throws the exception if no custom handler is set. - * - * @param array $record - * @phpstan-param Record $record - */ - protected function handleException(Throwable $e, array $record): void - { - if (!$this->exceptionHandler) { - throw $e; - } - - ($this->exceptionHandler)($e, $record); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php deleted file mode 100644 index 8166bdca..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Injects Git branch and Git commit SHA in all records - * - * @author Nick Otter - * @author Jordi Boggiano - * - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class GitProcessor implements ProcessorInterface -{ - /** @var int */ - private $level; - /** @var array{branch: string, commit: string}|array|null */ - private static $cache = null; - - /** - * @param string|int $level The minimum logging level at which this Processor will be triggered - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function __construct($level = Logger::DEBUG) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - // return if the level is not high enough - if ($record['level'] < $this->level) { - return $record; - } - - $record['extra']['git'] = self::getGitInfo(); - - return $record; - } - - /** - * @return array{branch: string, commit: string}|array - */ - private static function getGitInfo(): array - { - if (self::$cache) { - return self::$cache; - } - - $branches = `git branch -v --no-abbrev`; - if ($branches && preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { - return self::$cache = [ - 'branch' => $matches[1], - 'commit' => $matches[2], - ]; - } - - return self::$cache = []; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php deleted file mode 100644 index 91fda7d6..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/HostnameProcessor.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects value of gethostname in all records - */ -class HostnameProcessor implements ProcessorInterface -{ - /** @var string */ - private static $host; - - public function __construct() - { - self::$host = (string) gethostname(); - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - $record['extra']['hostname'] = self::$host; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php deleted file mode 100644 index a32e76b2..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php +++ /dev/null @@ -1,123 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Injects line/file:class/function where the log message came from - * - * Warning: This only works if the handler processes the logs directly. - * If you put the processor on a handler that is behind a FingersCrossedHandler - * for example, the processor will only be called once the trigger level is reached, - * and all the log records will have the same file/line/.. data from the call that - * triggered the FingersCrossedHandler. - * - * @author Jordi Boggiano - * - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class IntrospectionProcessor implements ProcessorInterface -{ - /** @var int */ - private $level; - /** @var string[] */ - private $skipClassesPartials; - /** @var int */ - private $skipStackFramesCount; - /** @var string[] */ - private $skipFunctions = [ - 'call_user_func', - 'call_user_func_array', - ]; - - /** - * @param string|int $level The minimum logging level at which this Processor will be triggered - * @param string[] $skipClassesPartials - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function __construct($level = Logger::DEBUG, array $skipClassesPartials = [], int $skipStackFramesCount = 0) - { - $this->level = Logger::toMonologLevel($level); - $this->skipClassesPartials = array_merge(['Monolog\\'], $skipClassesPartials); - $this->skipStackFramesCount = $skipStackFramesCount; - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - // return if the level is not high enough - if ($record['level'] < $this->level) { - return $record; - } - - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); - - // skip first since it's always the current method - array_shift($trace); - // the call_user_func call is also skipped - array_shift($trace); - - $i = 0; - - while ($this->isTraceClassOrSkippedFunction($trace, $i)) { - if (isset($trace[$i]['class'])) { - foreach ($this->skipClassesPartials as $part) { - if (strpos($trace[$i]['class'], $part) !== false) { - $i++; - - continue 2; - } - } - } elseif (in_array($trace[$i]['function'], $this->skipFunctions)) { - $i++; - - continue; - } - - break; - } - - $i += $this->skipStackFramesCount; - - // we should have the call source now - $record['extra'] = array_merge( - $record['extra'], - [ - 'file' => isset($trace[$i - 1]['file']) ? $trace[$i - 1]['file'] : null, - 'line' => isset($trace[$i - 1]['line']) ? $trace[$i - 1]['line'] : null, - 'class' => isset($trace[$i]['class']) ? $trace[$i]['class'] : null, - 'callType' => isset($trace[$i]['type']) ? $trace[$i]['type'] : null, - 'function' => isset($trace[$i]['function']) ? $trace[$i]['function'] : null, - ] - ); - - return $record; - } - - /** - * @param array[] $trace - */ - private function isTraceClassOrSkippedFunction(array $trace, int $index): bool - { - if (!isset($trace[$index])) { - return false; - } - - return isset($trace[$index]['class']) || in_array($trace[$index]['function'], $this->skipFunctions); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php deleted file mode 100644 index 37c756fc..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects memory_get_peak_usage in all records - * - * @see Monolog\Processor\MemoryProcessor::__construct() for options - * @author Rob Jensen - */ -class MemoryPeakUsageProcessor extends MemoryProcessor -{ - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - $usage = memory_get_peak_usage($this->realUsage); - - if ($this->useFormatting) { - $usage = $this->formatBytes($usage); - } - - $record['extra']['memory_peak_usage'] = $usage; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php deleted file mode 100644 index 227deb7c..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Some methods that are common for all memory processors - * - * @author Rob Jensen - */ -abstract class MemoryProcessor implements ProcessorInterface -{ - /** - * @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported. - */ - protected $realUsage; - - /** - * @var bool If true, then format memory size to human readable string (MB, KB, B depending on size) - */ - protected $useFormatting; - - /** - * @param bool $realUsage Set this to true to get the real size of memory allocated from system. - * @param bool $useFormatting If true, then format memory size to human readable string (MB, KB, B depending on size) - */ - public function __construct(bool $realUsage = true, bool $useFormatting = true) - { - $this->realUsage = $realUsage; - $this->useFormatting = $useFormatting; - } - - /** - * Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes as is - * - * @param int $bytes - * @return string|int Formatted string if $this->useFormatting is true, otherwise return $bytes as int - */ - protected function formatBytes(int $bytes) - { - if (!$this->useFormatting) { - return $bytes; - } - - if ($bytes > 1024 * 1024) { - return round($bytes / 1024 / 1024, 2).' MB'; - } elseif ($bytes > 1024) { - return round($bytes / 1024, 2).' KB'; - } - - return $bytes . ' B'; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php deleted file mode 100644 index e141921e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects memory_get_usage in all records - * - * @see Monolog\Processor\MemoryProcessor::__construct() for options - * @author Rob Jensen - */ -class MemoryUsageProcessor extends MemoryProcessor -{ - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - $usage = memory_get_usage($this->realUsage); - - if ($this->useFormatting) { - $usage = $this->formatBytes($usage); - } - - $record['extra']['memory_usage'] = $usage; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php deleted file mode 100644 index d4a628f5..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php +++ /dev/null @@ -1,77 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Logger; -use Psr\Log\LogLevel; - -/** - * Injects Hg branch and Hg revision number in all records - * - * @author Jonathan A. Schweder - * - * @phpstan-import-type LevelName from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - */ -class MercurialProcessor implements ProcessorInterface -{ - /** @var Level */ - private $level; - /** @var array{branch: string, revision: string}|array|null */ - private static $cache = null; - - /** - * @param int|string $level The minimum logging level at which this Processor will be triggered - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function __construct($level = Logger::DEBUG) - { - $this->level = Logger::toMonologLevel($level); - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - // return if the level is not high enough - if ($record['level'] < $this->level) { - return $record; - } - - $record['extra']['hg'] = self::getMercurialInfo(); - - return $record; - } - - /** - * @return array{branch: string, revision: string}|array - */ - private static function getMercurialInfo(): array - { - if (self::$cache) { - return self::$cache; - } - - $result = explode(' ', trim(`hg id -nb`)); - - if (count($result) >= 3) { - return self::$cache = [ - 'branch' => $result[1], - 'revision' => $result[2], - ]; - } - - return self::$cache = []; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php deleted file mode 100644 index 3b939a95..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Adds value of getmypid into records - * - * @author Andreas Hörnicke - */ -class ProcessIdProcessor implements ProcessorInterface -{ - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - $record['extra']['process_id'] = getmypid(); - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php b/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php deleted file mode 100644 index 5defb7eb..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php +++ /dev/null @@ -1,30 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * An optional interface to allow labelling Monolog processors. - * - * @author Nicolas Grekas - * - * @phpstan-import-type Record from \Monolog\Logger - */ -interface ProcessorInterface -{ - /** - * @return array The processed record - * - * @phpstan-param Record $record - * @phpstan-return Record - */ - public function __invoke(array $record); -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php deleted file mode 100644 index e7c12176..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +++ /dev/null @@ -1,88 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\Utils; - -/** - * Processes a record's message according to PSR-3 rules - * - * It replaces {foo} with the value from $context['foo'] - * - * @author Jordi Boggiano - */ -class PsrLogMessageProcessor implements ProcessorInterface -{ - public const SIMPLE_DATE = "Y-m-d\TH:i:s.uP"; - - /** @var string|null */ - private $dateFormat; - - /** @var bool */ - private $removeUsedContextFields; - - /** - * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format - * @param bool $removeUsedContextFields If set to true the fields interpolated into message gets unset - */ - public function __construct(?string $dateFormat = null, bool $removeUsedContextFields = false) - { - $this->dateFormat = $dateFormat; - $this->removeUsedContextFields = $removeUsedContextFields; - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - if (false === strpos($record['message'], '{')) { - return $record; - } - - $replacements = []; - foreach ($record['context'] as $key => $val) { - $placeholder = '{' . $key . '}'; - if (strpos($record['message'], $placeholder) === false) { - continue; - } - - if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) { - $replacements[$placeholder] = $val; - } elseif ($val instanceof \DateTimeInterface) { - if (!$this->dateFormat && $val instanceof \Monolog\DateTimeImmutable) { - // handle monolog dates using __toString if no specific dateFormat was asked for - // so that it follows the useMicroseconds flag - $replacements[$placeholder] = (string) $val; - } else { - $replacements[$placeholder] = $val->format($this->dateFormat ?: static::SIMPLE_DATE); - } - } elseif ($val instanceof \UnitEnum) { - $replacements[$placeholder] = $val instanceof \BackedEnum ? $val->value : $val->name; - } elseif (is_object($val)) { - $replacements[$placeholder] = '[object '.Utils::getClass($val).']'; - } elseif (is_array($val)) { - $replacements[$placeholder] = 'array'.Utils::jsonEncode($val, null, true); - } else { - $replacements[$placeholder] = '['.gettype($val).']'; - } - - if ($this->removeUsedContextFields) { - unset($record['context'][$key]); - } - } - - $record['message'] = strtr($record['message'], $replacements); - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php deleted file mode 100644 index 80f18747..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Adds a tags array into record - * - * @author Martijn Riemers - */ -class TagProcessor implements ProcessorInterface -{ - /** @var string[] */ - private $tags; - - /** - * @param string[] $tags - */ - public function __construct(array $tags = []) - { - $this->setTags($tags); - } - - /** - * @param string[] $tags - */ - public function addTags(array $tags = []): self - { - $this->tags = array_merge($this->tags, $tags); - - return $this; - } - - /** - * @param string[] $tags - */ - public function setTags(array $tags = []): self - { - $this->tags = $tags; - - return $this; - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - $record['extra']['tags'] = $this->tags; - - return $record; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php deleted file mode 100644 index a27b74db..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php +++ /dev/null @@ -1,59 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -use Monolog\ResettableInterface; - -/** - * Adds a unique identifier into records - * - * @author Simon Mönch - */ -class UidProcessor implements ProcessorInterface, ResettableInterface -{ - /** @var string */ - private $uid; - - public function __construct(int $length = 7) - { - if ($length > 32 || $length < 1) { - throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32'); - } - - $this->uid = $this->generateUid($length); - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - $record['extra']['uid'] = $this->uid; - - return $record; - } - - public function getUid(): string - { - return $this->uid; - } - - public function reset() - { - $this->uid = $this->generateUid(strlen($this->uid)); - } - - private function generateUid(int $length): string - { - return substr(bin2hex(random_bytes((int) ceil($length / 2))), 0, $length); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php deleted file mode 100644 index 51850e17..00000000 --- a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php +++ /dev/null @@ -1,111 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Processor; - -/** - * Injects url/method and remote IP of the current web request in all records - * - * @author Jordi Boggiano - */ -class WebProcessor implements ProcessorInterface -{ - /** - * @var array|\ArrayAccess - */ - protected $serverData; - - /** - * Default fields - * - * Array is structured as [key in record.extra => key in $serverData] - * - * @var array - */ - protected $extraFields = [ - 'url' => 'REQUEST_URI', - 'ip' => 'REMOTE_ADDR', - 'http_method' => 'REQUEST_METHOD', - 'server' => 'SERVER_NAME', - 'referrer' => 'HTTP_REFERER', - 'user_agent' => 'HTTP_USER_AGENT', - ]; - - /** - * @param array|\ArrayAccess|null $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data - * @param array|array|null $extraFields Field names and the related key inside $serverData to be added (or just a list of field names to use the default configured $serverData mapping). If not provided it defaults to: [url, ip, http_method, server, referrer] + unique_id if present in server data - */ - public function __construct($serverData = null, array $extraFields = null) - { - if (null === $serverData) { - $this->serverData = &$_SERVER; - } elseif (is_array($serverData) || $serverData instanceof \ArrayAccess) { - $this->serverData = $serverData; - } else { - throw new \UnexpectedValueException('$serverData must be an array or object implementing ArrayAccess.'); - } - - $defaultEnabled = ['url', 'ip', 'http_method', 'server', 'referrer']; - if (isset($this->serverData['UNIQUE_ID'])) { - $this->extraFields['unique_id'] = 'UNIQUE_ID'; - $defaultEnabled[] = 'unique_id'; - } - - if (null === $extraFields) { - $extraFields = $defaultEnabled; - } - if (isset($extraFields[0])) { - foreach (array_keys($this->extraFields) as $fieldName) { - if (!in_array($fieldName, $extraFields)) { - unset($this->extraFields[$fieldName]); - } - } - } else { - $this->extraFields = $extraFields; - } - } - - /** - * {@inheritDoc} - */ - public function __invoke(array $record): array - { - // skip processing if for some reason request data - // is not present (CLI or wonky SAPIs) - if (!isset($this->serverData['REQUEST_URI'])) { - return $record; - } - - $record['extra'] = $this->appendExtraFields($record['extra']); - - return $record; - } - - public function addExtraField(string $extraName, string $serverName): self - { - $this->extraFields[$extraName] = $serverName; - - return $this; - } - - /** - * @param mixed[] $extra - * @return mixed[] - */ - private function appendExtraFields(array $extra): array - { - foreach ($this->extraFields as $extraName => $serverName) { - $extra[$extraName] = $this->serverData[$serverName] ?? null; - } - - return $extra; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Registry.php b/vendor/monolog/monolog/src/Monolog/Registry.php deleted file mode 100644 index ae94ae6c..00000000 --- a/vendor/monolog/monolog/src/Monolog/Registry.php +++ /dev/null @@ -1,134 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use InvalidArgumentException; - -/** - * Monolog log registry - * - * Allows to get `Logger` instances in the global scope - * via static method calls on this class. - * - * - * $application = new Monolog\Logger('application'); - * $api = new Monolog\Logger('api'); - * - * Monolog\Registry::addLogger($application); - * Monolog\Registry::addLogger($api); - * - * function testLogger() - * { - * Monolog\Registry::api()->error('Sent to $api Logger instance'); - * Monolog\Registry::application()->error('Sent to $application Logger instance'); - * } - * - * - * @author Tomas Tatarko - */ -class Registry -{ - /** - * List of all loggers in the registry (by named indexes) - * - * @var Logger[] - */ - private static $loggers = []; - - /** - * Adds new logging channel to the registry - * - * @param Logger $logger Instance of the logging channel - * @param string|null $name Name of the logging channel ($logger->getName() by default) - * @param bool $overwrite Overwrite instance in the registry if the given name already exists? - * @throws \InvalidArgumentException If $overwrite set to false and named Logger instance already exists - * @return void - */ - public static function addLogger(Logger $logger, ?string $name = null, bool $overwrite = false) - { - $name = $name ?: $logger->getName(); - - if (isset(self::$loggers[$name]) && !$overwrite) { - throw new InvalidArgumentException('Logger with the given name already exists'); - } - - self::$loggers[$name] = $logger; - } - - /** - * Checks if such logging channel exists by name or instance - * - * @param string|Logger $logger Name or logger instance - */ - public static function hasLogger($logger): bool - { - if ($logger instanceof Logger) { - $index = array_search($logger, self::$loggers, true); - - return false !== $index; - } - - return isset(self::$loggers[$logger]); - } - - /** - * Removes instance from registry by name or instance - * - * @param string|Logger $logger Name or logger instance - */ - public static function removeLogger($logger): void - { - if ($logger instanceof Logger) { - if (false !== ($idx = array_search($logger, self::$loggers, true))) { - unset(self::$loggers[$idx]); - } - } else { - unset(self::$loggers[$logger]); - } - } - - /** - * Clears the registry - */ - public static function clear(): void - { - self::$loggers = []; - } - - /** - * Gets Logger instance from the registry - * - * @param string $name Name of the requested Logger instance - * @throws \InvalidArgumentException If named Logger instance is not in the registry - */ - public static function getInstance($name): Logger - { - if (!isset(self::$loggers[$name])) { - throw new InvalidArgumentException(sprintf('Requested "%s" logger instance is not in the registry', $name)); - } - - return self::$loggers[$name]; - } - - /** - * Gets Logger instance from the registry via static method call - * - * @param string $name Name of the requested Logger instance - * @param mixed[] $arguments Arguments passed to static method call - * @throws \InvalidArgumentException If named Logger instance is not in the registry - * @return Logger Requested instance of Logger - */ - public static function __callStatic($name, $arguments) - { - return self::getInstance($name); - } -} diff --git a/vendor/monolog/monolog/src/Monolog/ResettableInterface.php b/vendor/monolog/monolog/src/Monolog/ResettableInterface.php deleted file mode 100644 index 2c5fd785..00000000 --- a/vendor/monolog/monolog/src/Monolog/ResettableInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -/** - * Handler or Processor implementing this interface will be reset when Logger::reset() is called. - * - * Resetting ends a log cycle gets them back to their initial state. - * - * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal - * state, and getting it back to a state in which it can receive log records again. - * - * This is useful in case you want to avoid logs leaking between two requests or jobs when you - * have a long running process like a worker or an application server serving multiple requests - * in one process. - * - * @author Grégoire Pineau - */ -interface ResettableInterface -{ - /** - * @return void - */ - public function reset(); -} diff --git a/vendor/monolog/monolog/src/Monolog/SignalHandler.php b/vendor/monolog/monolog/src/Monolog/SignalHandler.php deleted file mode 100644 index d730eea3..00000000 --- a/vendor/monolog/monolog/src/Monolog/SignalHandler.php +++ /dev/null @@ -1,120 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -use Psr\Log\LoggerInterface; -use Psr\Log\LogLevel; -use ReflectionExtension; - -/** - * Monolog POSIX signal handler - * - * @author Robert Gust-Bardon - * - * @phpstan-import-type Level from \Monolog\Logger - * @phpstan-import-type LevelName from \Monolog\Logger - */ -class SignalHandler -{ - /** @var LoggerInterface */ - private $logger; - - /** @var array SIG_DFL, SIG_IGN or previous callable */ - private $previousSignalHandler = []; - /** @var array */ - private $signalLevelMap = []; - /** @var array */ - private $signalRestartSyscalls = []; - - public function __construct(LoggerInterface $logger) - { - $this->logger = $logger; - } - - /** - * @param int|string $level Level or level name - * @param bool $callPrevious - * @param bool $restartSyscalls - * @param bool|null $async - * @return $this - * - * @phpstan-param Level|LevelName|LogLevel::* $level - */ - public function registerSignalHandler(int $signo, $level = LogLevel::CRITICAL, bool $callPrevious = true, bool $restartSyscalls = true, ?bool $async = true): self - { - if (!extension_loaded('pcntl') || !function_exists('pcntl_signal')) { - return $this; - } - - $level = Logger::toMonologLevel($level); - - if ($callPrevious) { - $handler = pcntl_signal_get_handler($signo); - $this->previousSignalHandler[$signo] = $handler; - } else { - unset($this->previousSignalHandler[$signo]); - } - $this->signalLevelMap[$signo] = $level; - $this->signalRestartSyscalls[$signo] = $restartSyscalls; - - if ($async !== null) { - pcntl_async_signals($async); - } - - pcntl_signal($signo, [$this, 'handleSignal'], $restartSyscalls); - - return $this; - } - - /** - * @param mixed $siginfo - */ - public function handleSignal(int $signo, $siginfo = null): void - { - static $signals = []; - - if (!$signals && extension_loaded('pcntl')) { - $pcntl = new ReflectionExtension('pcntl'); - // HHVM 3.24.2 returns an empty array. - foreach ($pcntl->getConstants() ?: get_defined_constants(true)['Core'] as $name => $value) { - if (substr($name, 0, 3) === 'SIG' && $name[3] !== '_' && is_int($value)) { - $signals[$value] = $name; - } - } - } - - $level = $this->signalLevelMap[$signo] ?? LogLevel::CRITICAL; - $signal = $signals[$signo] ?? $signo; - $context = $siginfo ?? []; - $this->logger->log($level, sprintf('Program received signal %s', $signal), $context); - - if (!isset($this->previousSignalHandler[$signo])) { - return; - } - - if ($this->previousSignalHandler[$signo] === SIG_DFL) { - if (extension_loaded('pcntl') && function_exists('pcntl_signal') && function_exists('pcntl_sigprocmask') && function_exists('pcntl_signal_dispatch') - && extension_loaded('posix') && function_exists('posix_getpid') && function_exists('posix_kill') - ) { - $restartSyscalls = $this->signalRestartSyscalls[$signo] ?? true; - pcntl_signal($signo, SIG_DFL, $restartSyscalls); - pcntl_sigprocmask(SIG_UNBLOCK, [$signo], $oldset); - posix_kill(posix_getpid(), $signo); - pcntl_signal_dispatch(); - pcntl_sigprocmask(SIG_SETMASK, $oldset); - pcntl_signal($signo, [$this, 'handleSignal'], $restartSyscalls); - } - } elseif (is_callable($this->previousSignalHandler[$signo])) { - $this->previousSignalHandler[$signo]($signo, $siginfo); - } - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Test/TestCase.php b/vendor/monolog/monolog/src/Monolog/Test/TestCase.php deleted file mode 100644 index bc0b425e..00000000 --- a/vendor/monolog/monolog/src/Monolog/Test/TestCase.php +++ /dev/null @@ -1,85 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog\Test; - -use Monolog\Logger; -use Monolog\DateTimeImmutable; -use Monolog\Formatter\FormatterInterface; - -/** - * Lets you easily generate log records and a dummy formatter for testing purposes - * - * @author Jordi Boggiano - * - * @phpstan-import-type Record from \Monolog\Logger - * @phpstan-import-type Level from \Monolog\Logger - * - * @internal feel free to reuse this to test your own handlers, this is marked internal to avoid issues with PHPStorm https://github.com/Seldaek/monolog/issues/1677 - */ -class TestCase extends \PHPUnit\Framework\TestCase -{ - public function tearDown(): void - { - parent::tearDown(); - - if (isset($this->handler)) { - unset($this->handler); - } - } - - /** - * @param mixed[] $context - * - * @return array Record - * - * @phpstan-param Level $level - * @phpstan-return Record - */ - protected function getRecord(int $level = Logger::WARNING, string $message = 'test', array $context = []): array - { - return [ - 'message' => (string) $message, - 'context' => $context, - 'level' => $level, - 'level_name' => Logger::getLevelName($level), - 'channel' => 'test', - 'datetime' => new DateTimeImmutable(true), - 'extra' => [], - ]; - } - - /** - * @phpstan-return Record[] - */ - protected function getMultipleRecords(): array - { - return [ - $this->getRecord(Logger::DEBUG, 'debug message 1'), - $this->getRecord(Logger::DEBUG, 'debug message 2'), - $this->getRecord(Logger::INFO, 'information'), - $this->getRecord(Logger::WARNING, 'warning'), - $this->getRecord(Logger::ERROR, 'error'), - ]; - } - - protected function getIdentityFormatter(): FormatterInterface - { - $formatter = $this->createMock(FormatterInterface::class); - $formatter->expects($this->any()) - ->method('format') - ->will($this->returnCallback(function ($record) { - return $record['message']; - })); - - return $formatter; - } -} diff --git a/vendor/monolog/monolog/src/Monolog/Utils.php b/vendor/monolog/monolog/src/Monolog/Utils.php deleted file mode 100644 index 360c4219..00000000 --- a/vendor/monolog/monolog/src/Monolog/Utils.php +++ /dev/null @@ -1,284 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Monolog; - -final class Utils -{ - const DEFAULT_JSON_FLAGS = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION | JSON_INVALID_UTF8_SUBSTITUTE | JSON_PARTIAL_OUTPUT_ON_ERROR; - - public static function getClass(object $object): string - { - $class = \get_class($object); - - if (false === ($pos = \strpos($class, "@anonymous\0"))) { - return $class; - } - - if (false === ($parent = \get_parent_class($class))) { - return \substr($class, 0, $pos + 10); - } - - return $parent . '@anonymous'; - } - - public static function substr(string $string, int $start, ?int $length = null): string - { - if (extension_loaded('mbstring')) { - return mb_strcut($string, $start, $length); - } - - return substr($string, $start, (null === $length) ? strlen($string) : $length); - } - - /** - * Makes sure if a relative path is passed in it is turned into an absolute path - * - * @param string $streamUrl stream URL or path without protocol - */ - public static function canonicalizePath(string $streamUrl): string - { - $prefix = ''; - if ('file://' === substr($streamUrl, 0, 7)) { - $streamUrl = substr($streamUrl, 7); - $prefix = 'file://'; - } - - // other type of stream, not supported - if (false !== strpos($streamUrl, '://')) { - return $streamUrl; - } - - // already absolute - if (substr($streamUrl, 0, 1) === '/' || substr($streamUrl, 1, 1) === ':' || substr($streamUrl, 0, 2) === '\\\\') { - return $prefix.$streamUrl; - } - - $streamUrl = getcwd() . '/' . $streamUrl; - - return $prefix.$streamUrl; - } - - /** - * Return the JSON representation of a value - * - * @param mixed $data - * @param int $encodeFlags flags to pass to json encode, defaults to DEFAULT_JSON_FLAGS - * @param bool $ignoreErrors whether to ignore encoding errors or to throw on error, when ignored and the encoding fails, "null" is returned which is valid json for null - * @throws \RuntimeException if encoding fails and errors are not ignored - * @return string when errors are ignored and the encoding fails, "null" is returned which is valid json for null - */ - public static function jsonEncode($data, ?int $encodeFlags = null, bool $ignoreErrors = false): string - { - if (null === $encodeFlags) { - $encodeFlags = self::DEFAULT_JSON_FLAGS; - } - - if ($ignoreErrors) { - $json = @json_encode($data, $encodeFlags); - if (false === $json) { - return 'null'; - } - - return $json; - } - - $json = json_encode($data, $encodeFlags); - if (false === $json) { - $json = self::handleJsonError(json_last_error(), $data); - } - - return $json; - } - - /** - * Handle a json_encode failure. - * - * If the failure is due to invalid string encoding, try to clean the - * input and encode again. If the second encoding attempt fails, the - * initial error is not encoding related or the input can't be cleaned then - * raise a descriptive exception. - * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @param int $encodeFlags flags to pass to json encode, defaults to JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION - * @throws \RuntimeException if failure can't be corrected - * @return string JSON encoded data after error correction - */ - public static function handleJsonError(int $code, $data, ?int $encodeFlags = null): string - { - if ($code !== JSON_ERROR_UTF8) { - self::throwEncodeError($code, $data); - } - - if (is_string($data)) { - self::detectAndCleanUtf8($data); - } elseif (is_array($data)) { - array_walk_recursive($data, array('Monolog\Utils', 'detectAndCleanUtf8')); - } else { - self::throwEncodeError($code, $data); - } - - if (null === $encodeFlags) { - $encodeFlags = self::DEFAULT_JSON_FLAGS; - } - - $json = json_encode($data, $encodeFlags); - - if ($json === false) { - self::throwEncodeError(json_last_error(), $data); - } - - return $json; - } - - /** - * @internal - */ - public static function pcreLastErrorMessage(int $code): string - { - if (PHP_VERSION_ID >= 80000) { - return preg_last_error_msg(); - } - - $constants = (get_defined_constants(true))['pcre']; - $constants = array_filter($constants, function ($key) { - return substr($key, -6) == '_ERROR'; - }, ARRAY_FILTER_USE_KEY); - - $constants = array_flip($constants); - - return $constants[$code] ?? 'UNDEFINED_ERROR'; - } - - /** - * Throws an exception according to a given code with a customized message - * - * @param int $code return code of json_last_error function - * @param mixed $data data that was meant to be encoded - * @throws \RuntimeException - * - * @return never - */ - private static function throwEncodeError(int $code, $data): void - { - switch ($code) { - case JSON_ERROR_DEPTH: - $msg = 'Maximum stack depth exceeded'; - break; - case JSON_ERROR_STATE_MISMATCH: - $msg = 'Underflow or the modes mismatch'; - break; - case JSON_ERROR_CTRL_CHAR: - $msg = 'Unexpected control character found'; - break; - case JSON_ERROR_UTF8: - $msg = 'Malformed UTF-8 characters, possibly incorrectly encoded'; - break; - default: - $msg = 'Unknown error'; - } - - throw new \RuntimeException('JSON encoding failed: '.$msg.'. Encoding: '.var_export($data, true)); - } - - /** - * Detect invalid UTF-8 string characters and convert to valid UTF-8. - * - * Valid UTF-8 input will be left unmodified, but strings containing - * invalid UTF-8 codepoints will be reencoded as UTF-8 with an assumed - * original encoding of ISO-8859-15. This conversion may result in - * incorrect output if the actual encoding was not ISO-8859-15, but it - * will be clean UTF-8 output and will not rely on expensive and fragile - * detection algorithms. - * - * Function converts the input in place in the passed variable so that it - * can be used as a callback for array_walk_recursive. - * - * @param mixed $data Input to check and convert if needed, passed by ref - */ - private static function detectAndCleanUtf8(&$data): void - { - if (is_string($data) && !preg_match('//u', $data)) { - $data = preg_replace_callback( - '/[\x80-\xFF]+/', - function ($m) { - return function_exists('mb_convert_encoding') ? mb_convert_encoding($m[0], 'UTF-8', 'ISO-8859-1') : utf8_encode($m[0]); - }, - $data - ); - if (!is_string($data)) { - $pcreErrorCode = preg_last_error(); - throw new \RuntimeException('Failed to preg_replace_callback: ' . $pcreErrorCode . ' / ' . self::pcreLastErrorMessage($pcreErrorCode)); - } - $data = str_replace( - ['¤', '¦', '¨', '´', '¸', '¼', '½', '¾'], - ['€', 'Š', 'š', 'Ž', 'ž', 'Œ', 'œ', 'Ÿ'], - $data - ); - } - } - - /** - * Converts a string with a valid 'memory_limit' format, to bytes. - * - * @param string|false $val - * @return int|false Returns an integer representing bytes. Returns FALSE in case of error. - */ - public static function expandIniShorthandBytes($val) - { - if (!is_string($val)) { - return false; - } - - // support -1 - if ((int) $val < 0) { - return (int) $val; - } - - if (!preg_match('/^\s*(?\d+)(?:\.\d+)?\s*(?[gmk]?)\s*$/i', $val, $match)) { - return false; - } - - $val = (int) $match['val']; - switch (strtolower($match['unit'] ?? '')) { - case 'g': - $val *= 1024; - case 'm': - $val *= 1024; - case 'k': - $val *= 1024; - } - - return $val; - } - - /** - * @param array $record - */ - public static function getRecordMessageForException(array $record): string - { - $context = ''; - $extra = ''; - try { - if ($record['context']) { - $context = "\nContext: " . json_encode($record['context']); - } - if ($record['extra']) { - $extra = "\nExtra: " . json_encode($record['extra']); - } - } catch (\Throwable $e) { - // noop - } - - return "\nThe exception occurred while attempting to log: " . $record['message'] . $context . $extra; - } -} diff --git a/vendor/mtdowling/jmespath.php/CHANGELOG.md b/vendor/mtdowling/jmespath.php/CHANGELOG.md index d97dffb0..f1dd6d5d 100644 --- a/vendor/mtdowling/jmespath.php/CHANGELOG.md +++ b/vendor/mtdowling/jmespath.php/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## 2.7.0 - UPCOMING + +* Fixed flattening in arrays starting with null +* Drop support for HHVM and PHP earlier than 7.2.5. +* Add support for PHP 8.1, 8.2, and 8.3. + ## 2.6.0 - 2020-07-31 * Support for PHP 8.0. diff --git a/vendor/mtdowling/jmespath.php/README.rst b/vendor/mtdowling/jmespath.php/README.rst index b65ee466..bef8db48 100644 --- a/vendor/mtdowling/jmespath.php/README.rst +++ b/vendor/mtdowling/jmespath.php/README.rst @@ -4,7 +4,7 @@ jmespath.php JMESPath (pronounced "jaymz path") allows you to declaratively specify how to extract elements from a JSON document. *jmespath.php* allows you to use -JMESPath in PHP applications with PHP data structures. It requires PHP 5.4 or +JMESPath in PHP applications with PHP data structures. It requires PHP 7.2.5 or greater and can be installed through `Composer `_ using the ``mtdowling/jmespath.php`` package. diff --git a/vendor/mtdowling/jmespath.php/bin/jp.php b/vendor/mtdowling/jmespath.php/bin/jp.php new file mode 100644 index 00000000..c8433b58 --- /dev/null +++ b/vendor/mtdowling/jmespath.php/bin/jp.php @@ -0,0 +1,74 @@ +#!/usr/bin/env php +check(); +unset($xdebug); + +$dir = isset($argv[1]) ? $argv[1] : __DIR__ . '/../tests/compliance/perf'; +is_dir($dir) or die('Dir not found: ' . $dir); +// Warm up the runner +\JmesPath\Env::search('foo', []); + +$total = 0; +foreach (glob($dir . '/*.json') as $file) { + $total += runSuite($file); +} +echo "\nTotal time: {$total}\n"; + +function runSuite($file) +{ + $contents = file_get_contents($file); + $json = json_decode($contents, true); + $total = 0; + foreach ($json as $suite) { + foreach ($suite['cases'] as $case) { + $total += runCase( + $suite['given'], + $case['expression'], + $case['name'] + ); + } + } + return $total; +} + +function runCase($given, $expression, $name) +{ + $best = 99999; + $runtime = \JmesPath\Env::createRuntime(); + + for ($i = 0; $i < 100; $i++) { + $t = microtime(true); + $runtime($expression, $given); + $tryTime = (microtime(true) - $t) * 1000; + if ($tryTime < $best) { + $best = $tryTime; + } + if (!getenv('CACHE')) { + $runtime = \JmesPath\Env::createRuntime(); + // Delete compiled scripts if not caching. + if ($runtime instanceof \JmesPath\CompilerRuntime) { + array_map('unlink', glob(sys_get_temp_dir() . '/jmespath_*.php')); + } + } + } + + printf("time: %07.4fms name: %s\n", $best, $name); + + return $best; +} diff --git a/vendor/mtdowling/jmespath.php/composer.json b/vendor/mtdowling/jmespath.php/composer.json index 6b700683..b4c37c1c 100644 --- a/vendor/mtdowling/jmespath.php/composer.json +++ b/vendor/mtdowling/jmespath.php/composer.json @@ -1,39 +1,38 @@ { - "name": "mtdowling/jmespath.php", - "description": "Declaratively specify how to extract elements from a JSON document", - "keywords": ["json", "jsonpath"], - "license": "MIT", - - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - - "require": { - "php": "^5.4 || ^7.0 || ^8.0", - "symfony/polyfill-mbstring": "^1.17" - }, - - "require-dev": { - "composer/xdebug-handler": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^7.5.15" - }, - - "autoload": { - "psr-4": { - "JmesPath\\": "src/" + "name": "mtdowling/jmespath.php", + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": ["json", "jsonpath"], + "license": "MIT", + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/polyfill-mbstring": "^1.17" }, - "files": ["src/JmesPath.php"] - }, - - "bin": ["bin/jp.php"], - - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" + "require-dev": { + "composer/xdebug-handler": "^3.0.3", + "phpunit/phpunit": "^8.5.33" + }, + "autoload": { + "psr-4": { + "JmesPath\\": "src/" + }, + "files": ["src/JmesPath.php"] + }, + "bin": ["bin/jp.php"], + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } } - } } diff --git a/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php b/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php index 68683d06..b9e376e1 100644 --- a/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php +++ b/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php @@ -16,7 +16,7 @@ class SyntaxErrorException extends \InvalidArgumentException array $token, $expression ) { - $message = "Syntax error at character {$token['pos']}\n" + $message = sprintf("Syntax error at character %d\n", max($token['pos'], 0)) . $expression . "\n" . str_repeat(' ', max($token['pos'], 0)) . "^\n"; $message .= !is_array($expectedTypesOrMessage) ? $expectedTypesOrMessage diff --git a/vendor/mtdowling/jmespath.php/src/TreeCompiler.php b/vendor/mtdowling/jmespath.php/src/TreeCompiler.php index fe27f41a..b5f06589 100644 --- a/vendor/mtdowling/jmespath.php/src/TreeCompiler.php +++ b/vendor/mtdowling/jmespath.php/src/TreeCompiler.php @@ -305,7 +305,7 @@ class TreeCompiler ->write('%s = [];', $merged) ->write('foreach ($value as %s) {', $val) ->indent() - ->write('if (is_array(%s) && isset(%s[0])) {', $val, $val) + ->write('if (is_array(%s) && array_key_exists(0, %s)) {', $val, $val) ->indent() ->write('%s = array_merge(%s, %s);', $merged, $merged, $val) ->outdent() diff --git a/vendor/mtdowling/jmespath.php/src/TreeInterpreter.php b/vendor/mtdowling/jmespath.php/src/TreeInterpreter.php index 934c5060..f7eea86d 100644 --- a/vendor/mtdowling/jmespath.php/src/TreeInterpreter.php +++ b/vendor/mtdowling/jmespath.php/src/TreeInterpreter.php @@ -107,7 +107,7 @@ class TreeInterpreter $merged = []; foreach ($value as $values) { // Only merge up arrays lists and not hashes - if (is_array($values) && isset($values[0])) { + if (is_array($values) && array_key_exists(0, $values)) { $merged = array_merge($merged, $values); } elseif ($values !== $skipElement) { $merged[] = $values; diff --git a/vendor/myclabs/php-enum/README.md b/vendor/myclabs/php-enum/README.md index 1e4d1ff4..681d55ee 100644 --- a/vendor/myclabs/php-enum/README.md +++ b/vendor/myclabs/php-enum/README.md @@ -1,9 +1,9 @@ # PHP Enum implementation inspired from SplEnum -[![Build Status](https://travis-ci.org/myclabs/php-enum.png?branch=master)](https://travis-ci.org/myclabs/php-enum) +[![GitHub Actions][GA Image]][GA Link] [![Latest Stable Version](https://poser.pugx.org/myclabs/php-enum/version.png)](https://packagist.org/packages/myclabs/php-enum) [![Total Downloads](https://poser.pugx.org/myclabs/php-enum/downloads.png)](https://packagist.org/packages/myclabs/php-enum) -[![psalm](https://shepherd.dev/github/myclabs/php-enum/coverage.svg)](https://shepherd.dev/github/myclabs/php-enum) +[![Psalm Shepherd][Shepherd Image]][Shepherd Link] Maintenance for this project is [supported via Tidelift](https://tidelift.com/subscription/pkg/packagist-myclabs-php-enum?utm_source=packagist-myclabs-php-enum&utm_medium=referral&utm_campaign=readme). @@ -130,9 +130,65 @@ final class Action extends Enum } ``` +## Native enums and migration +Native enum arrived to PHP in version 8.1: https://www.php.net/enumerations +If your project is running PHP 8.1+ or your library has it as a minimum requirement you should use it instead of this library. + +When migrating from `myclabs/php-enum`, the effort should be small if the usage was in the recommended way: +- private constants +- final classes +- no method overridden + +Changes for migration: +- Class definition should be changed from +```php +/** + * @method static Action VIEW() + * @method static Action EDIT() + */ +final class Action extends Enum +{ + private const VIEW = 'view'; + private const EDIT = 'edit'; +} +``` + to +```php +enum Action: string +{ + case VIEW = 'view'; + case EDIT = 'edit'; +} +``` +All places where the class was used as a type will continue to work. + +Usages and the change needed: + +| Operation | myclabs/php-enum | native enum | +|----------------------------------------------------------------|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Obtain an instance will change from | `$enumCase = Action::VIEW()` | `$enumCase = Action::VIEW` | +| Create an enum from a backed value | `$enumCase = new Action('view')` | `$enumCase = Action::from('view')` | +| Get the backed value of the enum instance | `$enumCase->getValue()` | `$enumCase->value` | +| Compare two enum instances | `$enumCase1 == $enumCase2`
or
`$enumCase1->equals($enumCase2)` | `$enumCase1 === $enumCase2` | +| Get the key/name of the enum instance | `$enumCase->getKey()` | `$enumCase->name` | +| Get a list of all the possible instances of the enum | `Action::values()` | `Action::cases()` | +| Get a map of possible instances of the enum mapped by name | `Action::values()` | `array_combine(array_map(fn($case) => $case->name, Action::cases()), Action::cases())`
or
`(new ReflectionEnum(Action::class))->getConstants()` | +| Get a list of all possible names of the enum | `Action::keys()` | `array_map(fn($case) => $case->name, Action::cases())` | +| Get a list of all possible backed values of the enum | `Action::toArray()` | `array_map(fn($case) => $case->value, Action::cases())` | +| Get a map of possible backed values of the enum mapped by name | `Action::toArray()` | `array_combine(array_map(fn($case) => $case->name, Action::cases()), array_map(fn($case) => $case->value, Action::cases()))`
or
`array_map(fn($case) => $case->value, (new ReflectionEnum(Action::class))->getConstants()))` | + ## Related projects +- [PHP 8.1+ native enum](https://www.php.net/enumerations) - [Doctrine enum mapping](https://github.com/acelaya/doctrine-enum-type) - [Symfony ParamConverter integration](https://github.com/Ex3v/MyCLabsEnumParamConverter) - [PHPStan integration](https://github.com/timeweb/phpstan-enum) -- [Yii2 enum mapping](https://github.com/KartaviK/yii2-enum) + + +[GA Image]: https://github.com/myclabs/php-enum/workflows/CI/badge.svg + +[GA Link]: https://github.com/myclabs/php-enum/actions?query=workflow%3A%22CI%22+branch%3Amaster + +[Shepherd Image]: https://shepherd.dev/github/myclabs/php-enum/coverage.svg + +[Shepherd Link]: https://shepherd.dev/github/myclabs/php-enum diff --git a/vendor/myclabs/php-enum/composer.json b/vendor/myclabs/php-enum/composer.json index 924f924b..978cb195 100644 --- a/vendor/myclabs/php-enum/composer.json +++ b/vendor/myclabs/php-enum/composer.json @@ -14,7 +14,10 @@ "autoload": { "psr-4": { "MyCLabs\\Enum\\": "src/" - } + }, + "classmap": [ + "stubs/Stringable.php" + ] }, "autoload-dev": { "psr-4": { diff --git a/vendor/myclabs/php-enum/psalm.xml b/vendor/myclabs/php-enum/psalm.xml deleted file mode 100644 index ff06b66e..00000000 --- a/vendor/myclabs/php-enum/psalm.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/myclabs/php-enum/src/Enum.php b/vendor/myclabs/php-enum/src/Enum.php index 89064eba..4c94cf6d 100644 --- a/vendor/myclabs/php-enum/src/Enum.php +++ b/vendor/myclabs/php-enum/src/Enum.php @@ -19,7 +19,7 @@ namespace MyCLabs\Enum; * @psalm-immutable * @psalm-consistent-constructor */ -abstract class Enum implements \JsonSerializable +abstract class Enum implements \JsonSerializable, \Stringable { /** * Enum value diff --git a/vendor/myclabs/php-enum/stubs/Stringable.php b/vendor/myclabs/php-enum/stubs/Stringable.php new file mode 100644 index 00000000..4811af70 --- /dev/null +++ b/vendor/myclabs/php-enum/stubs/Stringable.php @@ -0,0 +1,11 @@ +getHttpClient()->get($url, [ 'headers' => [ - 'Authorization' => 'Bearer '.$token, + 'Authorization' => 'Bearer ' . $token, 'X-RestLi-Protocol-Version' => '2.0.0', ], ]); @@ -65,22 +65,23 @@ class Linkedin extends Base $response = $this->getHttpClient()->get($url, [ 'headers' => [ - 'Authorization' => 'Bearer '.$token, + 'Authorization' => 'Bearer ' . $token, 'X-RestLi-Protocol-Version' => '2.0.0', ], ]); - return $this->fromJsonBody($response)['elements.0.handle~'] ?? []; + return $this->fromJsonBody($response)['elements'][0]['handle~'] ?? []; } protected function mapUserToObject(array $user): Contracts\UserInterface { - $preferredLocale = ($user['firstName.preferredLocale.language'] ?? null).'_'.($user['firstName.preferredLocale.country'] ?? null); - $firstName = $user['firstName.localized.'.$preferredLocale] ?? null; - $lastName = $user['lastName.localized.'.$preferredLocale] ?? null; - $name = $firstName.' '.$lastName; + $preferredLocale = ($user['firstName']['preferredLocale']['language'] ?? null) . '_' . + ($user['firstName']['preferredLocale']['country'] ?? null); + $firstName = $user['firstName']['localized'][$preferredLocale] ?? null; + $lastName = $user['lastName']['localized'][$preferredLocale] ?? null; + $name = $firstName . ' ' . $lastName; - $images = $user['profilePicture.displayImage~.elements'] ?? []; + $images = $user['profilePicture']['displayImage~']['elements'] ?? []; $avatars = \array_filter($images, static fn ($image) => ($image['data']['com.linkedin.digitalmedia.mediaartifact.StillImage']['storageSize']['width'] ?? 0) === 100); $avatar = \array_shift($avatars); $originalAvatars = \array_filter($images, static fn ($image) => ($image['data']['com.linkedin.digitalmedia.mediaartifact.StillImage']['storageSize']['width'] ?? 0) === 800); @@ -91,8 +92,8 @@ class Linkedin extends Base Contracts\ABNF_NICKNAME => $name, Contracts\ABNF_NAME => $name, Contracts\ABNF_EMAIL => $user['emailAddress'] ?? null, - Contracts\ABNF_AVATAR => $avatar['identifiers.0.identifier'] ?? null, - 'avatar_original' => $originalAvatar['identifiers.0.identifier'] ?? null, + Contracts\ABNF_AVATAR => $avatar['identifiers']['0']['identifier'] ?? null, + 'avatar_original' => $originalAvatar['identifiers']['0']['identifier'] ?? null, ]); } } diff --git a/vendor/phpoffice/phpspreadsheet/.php-cs-fixer.dist.php b/vendor/phpoffice/phpspreadsheet/.php-cs-fixer.dist.php index 4179c677..db707271 100644 --- a/vendor/phpoffice/phpspreadsheet/.php-cs-fixer.dist.php +++ b/vendor/phpoffice/phpspreadsheet/.php-cs-fixer.dist.php @@ -2,6 +2,7 @@ $finder = PhpCsFixer\Finder::create() ->exclude('vendor') + ->notPath('src/PhpSpreadsheet/Writer/ZipStream3.php') ->in(__DIR__); $config = new PhpCsFixer\Config(); diff --git a/vendor/phpoffice/phpspreadsheet/CHANGELOG.md b/vendor/phpoffice/phpspreadsheet/CHANGELOG.md index 2f383e23..38836217 100644 --- a/vendor/phpoffice/phpspreadsheet/CHANGELOG.md +++ b/vendor/phpoffice/phpspreadsheet/CHANGELOG.md @@ -5,6 +5,67 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com) and this project adheres to [Semantic Versioning](https://semver.org). +## 1.29.0 - 2023-06-15 + +### Added + +- Wizards for defining Number Format masks for Dates and Times, including Durations/Intervals. [PR #3458](https://github.com/PHPOffice/PhpSpreadsheet/pull/3458) +- Specify data type in html tags. [Issue #3444](https://github.com/PHPOffice/PhpSpreadsheet/issues/3444) [PR #3445](https://github.com/PHPOffice/PhpSpreadsheet/pull/3445) +- Provide option to ignore hidden rows/columns in `toArray()` methods. [PR #3494](https://github.com/PHPOffice/PhpSpreadsheet/pull/3494) +- Font/Effects/Theme support for Chart Data Labels and Axis. [PR #3476](https://github.com/PHPOffice/PhpSpreadsheet/pull/3476) +- Font Themes support. [PR #3486](https://github.com/PHPOffice/PhpSpreadsheet/pull/3486) +- Ability to Ignore Cell Errors in Excel. [Issue #1141](https://github.com/PHPOffice/PhpSpreadsheet/issues/1141) [PR #3508](https://github.com/PHPOffice/PhpSpreadsheet/pull/3508) +- Unzipped Gnumeric file [PR #3591](https://github.com/PHPOffice/PhpSpreadsheet/pull/3591) + +### Changed + +- Xlsx Color schemes read in will be written out (previously Excel 2007-2010 Color scheme was always written); manipulation of those schemes before write, including restoring prior behavior, is provided [PR #3476](https://github.com/PHPOffice/PhpSpreadsheet/pull/3476) +- Memory and speed optimisations for Read Filters with Xlsx Files and Shared Formulae. [PR #3474](https://github.com/PHPOffice/PhpSpreadsheet/pull/3474) +- Allow `CellRange` and `CellAddress` objects for the `range` argument in the `rangeToArray()` method. [PR #3494](https://github.com/PHPOffice/PhpSpreadsheet/pull/3494) +- Stock charts will now read and reproduce `upDownBars` and subsidiary tags; these were previously ignored on read and hard-coded on write. [PR #3515](https://github.com/PHPOffice/PhpSpreadsheet/pull/3515) + +### Deprecated + +- Nothing + +### Removed + +- Nothing + +### Fixed + +- Updates Cell formula absolute ranges/references, and Defined Name absolute ranges/references when inserting/deleting rows/columns. [Issue #3368](https://github.com/PHPOffice/PhpSpreadsheet/issues/3368) [PR #3402](https://github.com/PHPOffice/PhpSpreadsheet/pull/3402) +- EOMONTH() and EDATE() Functions should round date value before evaluation. [Issue #3436](https://github.com/PHPOffice/PhpSpreadsheet/issues/3436) [PR #3437](https://github.com/PHPOffice/PhpSpreadsheet/pull/3437) +- NETWORKDAYS function erroneously being converted to NETWORK_xlfn.DAYS in Xlsx Writer. [Issue #3461](https://github.com/PHPOffice/PhpSpreadsheet/issues/3461) [PR #3463](https://github.com/PHPOffice/PhpSpreadsheet/pull/3463) +- Getting a style for a CellAddress instance fails if the worksheet is set in the CellAddress instance. [Issue #3439](https://github.com/PHPOffice/PhpSpreadsheet/issues/3439) [PR #3469](https://github.com/PHPOffice/PhpSpreadsheet/pull/3469) +- Shared Formulae outside the filter range when reading with a filter are not always being identified. [Issue #3473](https://github.com/PHPOffice/PhpSpreadsheet/issues/3473) [PR #3474](https://github.com/PHPOffice/PhpSpreadsheet/pull/3474) +- Xls Reader Conditional Styles. [PR #3400](https://github.com/PHPOffice/PhpSpreadsheet/pull/3400) +- Allow use of # and 0 digit placeholders in fraction masks. [PR #3401](https://github.com/PHPOffice/PhpSpreadsheet/pull/3401) +- Modify Date/Time check in the NumberFormatter for decimal/fractional times. [PR #3413](https://github.com/PHPOffice/PhpSpreadsheet/pull/3413) +- Misplaced Xml Writing Chart Label FillColor. [Issue #3397](https://github.com/PHPOffice/PhpSpreadsheet/issues/3397) [PR #3404](https://github.com/PHPOffice/PhpSpreadsheet/pull/3404) +- TEXT function ignores Time in DateTimeStamp. [Issue #3409](https://github.com/PHPOffice/PhpSpreadsheet/issues/3409) [PR #3411](https://github.com/PHPOffice/PhpSpreadsheet/pull/3411) +- Xlsx Column Autosize Approximate for CJK. [Issue #3405](https://github.com/PHPOffice/PhpSpreadsheet/issues/3405) [PR #3416](https://github.com/PHPOffice/PhpSpreadsheet/pull/3416) +- Correct Xlsx Parsing of quotePrefix="0". [Issue #3435](https://github.com/PHPOffice/PhpSpreadsheet/issues/3435) [PR #3438](https://github.com/PHPOffice/PhpSpreadsheet/pull/3438) +- More Display Options for Chart Axis and Legend. [Issue #3414](https://github.com/PHPOffice/PhpSpreadsheet/issues/3414) [PR #3434](https://github.com/PHPOffice/PhpSpreadsheet/pull/3434) +- Apply strict type checking to Complex suffix. [PR #3452](https://github.com/PHPOffice/PhpSpreadsheet/pull/3452) +- Incorrect Font Color Read Xlsx Rich Text Indexed Color Custom Palette. [Issue #3464](https://github.com/PHPOffice/PhpSpreadsheet/issues/3464) [PR #3465](https://github.com/PHPOffice/PhpSpreadsheet/pull/3465) +- Xlsx Writer Honor Alignment in Default Font. [Issue #3443](https://github.com/PHPOffice/PhpSpreadsheet/issues/3443) [PR #3459](https://github.com/PHPOffice/PhpSpreadsheet/pull/3459) +- Support Border for Charts. [PR #3462](https://github.com/PHPOffice/PhpSpreadsheet/pull/3462) +- Error in "this row" structured reference calculation (cached result from first row when using a range) [Issue #3504](https://github.com/PHPOffice/PhpSpreadsheet/issues/3504) [PR #3505](https://github.com/PHPOffice/PhpSpreadsheet/pull/3505) +- Allow colour palette index references in Number Format masks [Issue #3511](https://github.com/PHPOffice/PhpSpreadsheet/issues/3511) [PR #3512](https://github.com/PHPOffice/PhpSpreadsheet/pull/3512) +- Xlsx Reader formula with quotePrefix [Issue #3495](https://github.com/PHPOffice/PhpSpreadsheet/issues/3495) [PR #3497](https://github.com/PHPOffice/PhpSpreadsheet/pull/3497) +- Handle REF error as part of range [Issue #3453](https://github.com/PHPOffice/PhpSpreadsheet/issues/3453) [PR #3467](https://github.com/PHPOffice/PhpSpreadsheet/pull/3467) +- Handle Absolute Pathnames in Rels File [Issue #3553](https://github.com/PHPOffice/PhpSpreadsheet/issues/3553) [PR #3554](https://github.com/PHPOffice/PhpSpreadsheet/pull/3554) +- Return Page Breaks in Order [Issue #3552](https://github.com/PHPOffice/PhpSpreadsheet/issues/3552) [PR #3555](https://github.com/PHPOffice/PhpSpreadsheet/pull/3555) +- Add position attribute for MemoryDrawing in Html [Issue #3529](https://github.com/PHPOffice/PhpSpreadsheet/issues/3529 [PR #3535](https://github.com/PHPOffice/PhpSpreadsheet/pull/3535) +- Allow Index_number as Array for VLOOKUP/HLOOKUP [Issue #3561](https://github.com/PHPOffice/PhpSpreadsheet/issues/3561 [PR #3570](https://github.com/PHPOffice/PhpSpreadsheet/pull/3570) +- Add Unsupported Options in Xml Spreadsheet [Issue #3566](https://github.com/PHPOffice/PhpSpreadsheet/issues/3566 [Issue #3568](https://github.com/PHPOffice/PhpSpreadsheet/issues/3568 [Issue #3569](https://github.com/PHPOffice/PhpSpreadsheet/issues/3569 [PR #3567](https://github.com/PHPOffice/PhpSpreadsheet/pull/3567) +- Changes to NUMBERVALUE, VALUE, DATEVALUE, TIMEVALUE [Issue #3574](https://github.com/PHPOffice/PhpSpreadsheet/issues/3574 [PR #3575](https://github.com/PHPOffice/PhpSpreadsheet/pull/3575) +- Redo calculation of color tinting [Issue #3550](https://github.com/PHPOffice/PhpSpreadsheet/issues/3550) [PR #3580](https://github.com/PHPOffice/PhpSpreadsheet/pull/3580) +- Accommodate Slash with preg_quote [PR #3582](https://github.com/PHPOffice/PhpSpreadsheet/pull/3582) [PR #3583](https://github.com/PHPOffice/PhpSpreadsheet/pull/3583) [PR #3584](https://github.com/PHPOffice/PhpSpreadsheet/pull/3584) +- HyperlinkBase Property and Html Handling of Properties [Issue #3573](https://github.com/PHPOffice/PhpSpreadsheet/issues/3573) [PR #3589](https://github.com/PHPOffice/PhpSpreadsheet/pull/3589) +- Improvements for Data Validation [Issue #3592](https://github.com/PHPOffice/PhpSpreadsheet/issues/3592) [Issue #3594](https://github.com/PHPOffice/PhpSpreadsheet/issues/3594) [PR #3605](https://github.com/PHPOffice/PhpSpreadsheet/pull/3605) + ## 1.28.0 - 2023-02-25 ### Added diff --git a/vendor/phpoffice/phpspreadsheet/CONTRIBUTING.md b/vendor/phpoffice/phpspreadsheet/CONTRIBUTING.md index f5953533..09794b56 100644 --- a/vendor/phpoffice/phpspreadsheet/CONTRIBUTING.md +++ b/vendor/phpoffice/phpspreadsheet/CONTRIBUTING.md @@ -2,19 +2,44 @@ If you would like to contribute, here are some notes and guidelines: - - All new development happens on feature/fix branches, and are then merged to the `master` branch once stable; so the `master` branch is always the most up-to-date, working code - - Tagged releases are made from the `master` branch - - If you are going to be submitting a pull request, please fork from `master`, and submit your pull request back as a fix/feature branch referencing the GitHub issue number - - Code style might be automatically fixed by `composer fix` - - All code changes must be validated by `composer check` + - All new development should be on feature/fix branches, which are then merged to the `master` branch once stable and approved; so the `master` branch is always the most up-to-date, working code + - If you are going to submit a pull request, please fork from `master`, and submit your pull request back as a fix/feature branch referencing the GitHub issue number + - The code must work with all PHP versions that we support (currently PHP 7.4 to PHP 8.2). + - You can call `composer versions` to test version compatibility. + - Code style should be maintained. + - `composer style` will identify any issues with Coding Style`. + - `composer fix` will fix most issues with Coding Style. + - All code changes must be validated by `composer check`. + - Please include Unit Tests to verify that a bug exists, and that this PR fixes it. + - Please include Unit Tests to show that a new Feature works as expected. + - Please don't "bundle" several changes into a single PR; submit a PR for each discrete change/fix. + - Remember to update documentation if necessary. + - [Helpful article about forking](https://help.github.com/articles/fork-a-repo/ "Forking a GitHub repository") - [Helpful article about pull requests](https://help.github.com/articles/using-pull-requests/ "Pull Requests") +## Unit Tests + +When writing Unit Tests, please + - Always try to write Unit Tests for both the happy and unhappy paths. + - Put all assertions in the Test itself, not in an abstract class that the Test extends (even if this means code duplication between tests). + - Include any necessary `setup()` and `tearDown()` in the Test itself. + - If you change any global settings (such as system locale, or Compatibility Mode for Excel Function tests), make sure that you reset to the default in the `tearDown()`. + - Use the `ExcelError` functions in assertions for Excel Error values in Excel Function implementations. +
Not only does it reduce the risk of typos; but at some point in the future, ExcelError values will be an object rather than a string, and we won't then need to update all the tests. + - Don't over-complicate test code by testing happy and unhappy paths in the same test. + +This makes it easier to see exactly what is being tested when reviewing the PR. I want to be able to see it in the PR, not have to hunt in other unchanged classes to see what the test is doing. + ## How to release 1. Complete CHANGELOG.md and commit 2. Create an annotated tag 1. `git tag -a 1.2.3` 2. Tag subject must be the version number, eg: `1.2.3` - 3. Tag body must be a copy-paste of the changelog entries -3. Push tag with `git push --tags`, GitHub Actions will create a GitHub release automatically + 3. Tag body must be a copy-paste of the changelog entries. +3. Push the tag with `git push --tags`, GitHub Actions will create a GitHub release automatically, and the release details will automatically be sent to packagist. +4. Github seems to remove markdown headings in the Release Notes, so you should edit to restore these. + +> **Note:** Tagged releases are made from the `master` branch. Only in an emergency should a tagged release be made from the `release` branch. (i.e. cherry-picked hot-fixes.) + diff --git a/vendor/phpoffice/phpspreadsheet/README.md b/vendor/phpoffice/phpspreadsheet/README.md index d9a80732..a69c3afc 100644 --- a/vendor/phpoffice/phpspreadsheet/README.md +++ b/vendor/phpoffice/phpspreadsheet/README.md @@ -32,7 +32,7 @@ If you are building your installation on a development machine that is on a diff ```json { "require": { - "phpoffice/phpspreadsheet": "^1.23" + "phpoffice/phpspreadsheet": "^1.28" }, "config": { "platform": { @@ -74,16 +74,20 @@ or the appropriate PDF Writer wrapper for the library that you have chosen to in For Chart export, we support following packages, which you will also need to install yourself using `composer require` - [jpgraph/jpgraph](https://packagist.org/packages/jpgraph/jpgraph) (this package was abandoned at version 4.0. You can manually download the latest version that supports PHP 8 and above from [jpgraph.net](https://jpgraph.net/)) - - [mitoteam/jpgraph](https://packagist.org/packages/mitoteam/jpgraph) (fork with php 8.1 support) + - [mitoteam/jpgraph](https://packagist.org/packages/mitoteam/jpgraph) - up to date fork with modern PHP versions support and some bugs fixed. and then configure PhpSpreadsheet using: ```php -Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class); // to use jpgraph/jpgraph +// to use jpgraph/jpgraph +Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class); //or -Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\MtJpGraphRenderer::class); // to use mitoteam/jpgraph +// to use mitoteam/jpgraph +Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\MtJpGraphRenderer::class); ``` -One or the other of these libraries is necessary if you want to generate HTML or PDF files that include charts. +One or the other of these libraries is necessary if you want to generate HTML or PDF files that include charts; or to render a Chart to an Image format from within your code. +They are not necessary to define charts for writing to `Xlsx` files. +Other file formats don't support writing Charts. ## Documentation @@ -103,10 +107,15 @@ Posts already available to Patreon supporters: - Looping the Loop - Advice on Iterating through the rows and cells in a worksheet. -The next post (currently being written) will be: +And for Patrons at levels actively using PhpSpreadsheet: - Behind the Mask - A look at Number Format Masks. +The Next Article (currently Work in Progress): + - Formula for Success + - How to debug formulae that don't produce the expected result. + + My aim is to post at least one article each month, taking a detailed look at some feature of MS Excel and how to use that feature in PhpSpreadsheet, or on how to perform different activities in PhpSpreadsheet. Planned posts for the future include topics like: @@ -116,8 +125,9 @@ Planned posts for the future include topics like: - Array Formulae - Conditional Formatting - Data Validation - - Formula Debugging - Value Binders + - Images + - Charts After a period of six months exclusive to Patreon supporters, articles will be incorporated into the public documentation for the library. diff --git a/vendor/phpoffice/phpspreadsheet/composer.json b/vendor/phpoffice/phpspreadsheet/composer.json index 1e8e5f6c..4b05be33 100644 --- a/vendor/phpoffice/phpspreadsheet/composer.json +++ b/vendor/phpoffice/phpspreadsheet/composer.json @@ -42,13 +42,19 @@ ], "scripts": { "check": [ + "phpcs src/ tests/ --report=checkstyle", + "phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PHPCompatibility --runtime-set testVersion 7.4- -n", "php-cs-fixer fix --ansi --dry-run --diff", - "phpcs", "phpunit --color=always", - "phpstan analyse --ansi" + "phpstan analyse --ansi --memory-limit=2048M" + ], + "style": [ + "phpcs src/ tests/ --report=checkstyle", + "php-cs-fixer fix --ansi --dry-run --diff" ], "fix": [ - "php-cs-fixer fix --ansi" + "phpcbf src/ tests/ --report=checkstyle", + "php-cs-fixer fix" ], "versions": [ "phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PHPCompatibility --runtime-set testVersion 7.4- -n" @@ -70,7 +76,7 @@ "ext-zip": "*", "ext-zlib": "*", "ezyang/htmlpurifier": "^4.15", - "maennchen/zipstream-php": "^2.1", + "maennchen/zipstream-php": "^2.1 || ^3.0", "markbaker/complex": "^3.0", "markbaker/matrix": "^3.0", "psr/http-client": "^1.0", @@ -81,12 +87,12 @@ "dealerdirect/phpcodesniffer-composer-installer": "dev-main", "dompdf/dompdf": "^1.0 || ^2.0", "friendsofphp/php-cs-fixer": "^3.2", - "mitoteam/jpgraph": "^10.2.4", + "mitoteam/jpgraph": "^10.3", "mpdf/mpdf": "^8.1.1", "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.1", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5 || ^9.0", + "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0", "squizlabs/php_codesniffer": "^3.7", "tecnickcom/tcpdf": "^6.5" }, diff --git a/vendor/phpoffice/phpspreadsheet/phpstan.neon.dist b/vendor/phpoffice/phpspreadsheet/phpstan.neon.dist index 30bd6c2f..ef2ae14f 100644 --- a/vendor/phpoffice/phpspreadsheet/phpstan.neon.dist +++ b/vendor/phpoffice/phpspreadsheet/phpstan.neon.dist @@ -12,6 +12,10 @@ parameters: excludePaths: - src/PhpSpreadsheet/Chart/Renderer/JpGraph.php - src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php + - src/PhpSpreadsheet/Collection/Memory/SimpleCache1.php + - src/PhpSpreadsheet/Collection/Memory/SimpleCache3.php + - src/PhpSpreadsheet/Writer/ZipStream2.php + - src/PhpSpreadsheet/Writer/ZipStream3.php parallel: processTimeout: 300.0 checkMissingIterableValueType: false diff --git a/vendor/phpoffice/phpspreadsheet/phpunit10.xml.dist b/vendor/phpoffice/phpspreadsheet/phpunit10.xml.dist new file mode 100644 index 00000000..207d8ec9 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/phpunit10.xml.dist @@ -0,0 +1,15 @@ + + + + + + + + ./tests/PhpSpreadsheetTests + + + + ./src + + + diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php index 6de546fa..c88656b4 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php @@ -19,6 +19,7 @@ use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; use ReflectionClassConstant; use ReflectionMethod; use ReflectionParameter; +use Throwable; class Calculation { @@ -3556,7 +3557,7 @@ class Calculation } } - throw new Exception($e->getMessage()); + throw new Exception($e->getMessage(), $e->getCode(), $e); } if ((is_array($result)) && (self::$returnArrayAsType != self::RETURN_ARRAY_AS_ARRAY)) { @@ -4210,7 +4211,7 @@ class Calculation try { $this->branchPruner->closingBrace($d['value']); } catch (Exception $e) { - return $this->raiseFormulaError($e->getMessage()); + return $this->raiseFormulaError($e->getMessage(), $e->getCode(), $e); } $functionName = $matches[1]; // Get the function name @@ -4249,7 +4250,7 @@ class Calculation } elseif ($expectedArgumentCount != '*') { $isOperandOrFunction = preg_match('/(\d*)([-+,])(\d*)/', $expectedArgumentCount, $argMatch); self::doNothing($isOperandOrFunction); - switch ($argMatch[2]) { + switch ($argMatch[2] ?? '') { case '+': if ($argumentCount < $argMatch[1]) { $argumentCountError = true; @@ -4282,7 +4283,7 @@ class Calculation try { $this->branchPruner->argumentSeparator(); } catch (Exception $e) { - return $this->raiseFormulaError($e->getMessage()); + return $this->raiseFormulaError($e->getMessage(), $e->getCode(), $e); } while (($o2 = $stack->pop()) && $o2['value'] !== '(') { // Pop off the stack back to the last ( @@ -4364,8 +4365,12 @@ class Calculation $rangeStartCellRef = $output[count($output) - 2]['value'] ?? ''; } preg_match('/^' . self::CALCULATION_REGEXP_CELLREF . '$/miu', $rangeStartCellRef, $rangeStartMatches); - if ($rangeStartMatches[2] > '') { - $val = $rangeStartMatches[2] . '!' . $val; + if (array_key_exists(2, $rangeStartMatches)) { + if ($rangeStartMatches[2] > '') { + $val = $rangeStartMatches[2] . '!' . $val; + } + } else { + $val = Information\ExcelError::REF(); } } else { $rangeStartCellRef = $output[count($output) - 1]['value'] ?? ''; @@ -4391,7 +4396,7 @@ class Calculation try { $structuredReference = Operands\StructuredReference::fromParser($formula, $index, $matches); } catch (Exception $e) { - return $this->raiseFormulaError($e->getMessage()); + return $this->raiseFormulaError($e->getMessage(), $e->getCode(), $e); } $val = $structuredReference->value(); @@ -4434,6 +4439,8 @@ class Calculation } $val = $address; } + } elseif ($val === Information\ExcelError::REF()) { + $stackItemReference = $val; } else { $startRowColRef = $output[count($output) - 1]['value'] ?? ''; [$rangeWS1, $startRowColRef] = Worksheet::extractSheetTitle($startRowColRef, true); @@ -4731,7 +4738,7 @@ class Calculation $cellRange = $token->parse($cell); if (strpos($cellRange, ':') !== false) { $this->debugLog->writeDebugLog('Evaluating Structured Reference %s as Cell Range %s', $token->value(), $cellRange); - $rangeValue = self::getInstance($cell->getWorksheet()->getParent())->_calculateFormulaValue("={$cellRange}", $token->value(), $cell); + $rangeValue = self::getInstance($cell->getWorksheet()->getParent())->_calculateFormulaValue("={$cellRange}", $cellRange, $cell); $stack->push('Value', $rangeValue); $this->debugLog->writeDebugLog('Evaluated Structured Reference %s as value %s', $token->value(), $this->showValue($rangeValue)); } else { @@ -4745,7 +4752,7 @@ class Calculation $stack->push('Error', Information\ExcelError::REF(), null); $this->debugLog->writeDebugLog('Evaluated Structured Reference %s as error value %s', $token->value(), Information\ExcelError::REF()); } else { - return $this->raiseFormulaError($e->getMessage()); + return $this->raiseFormulaError($e->getMessage(), $e->getCode(), $e); } } } elseif (!is_numeric($token) && !is_object($token) && isset(self::BINARY_OPERATORS[$token])) { @@ -4793,7 +4800,7 @@ class Calculation } } } - if (strpos($operand1Data['reference'], '!') !== false) { + if (strpos($operand1Data['reference'] ?? '', '!') !== false) { [$sheet1, $operand1Data['reference']] = Worksheet::extractSheetTitle($operand1Data['reference'], true); } else { $sheet1 = ($pCellWorksheet !== null) ? $pCellWorksheet->getTitle() : ''; @@ -4830,10 +4837,21 @@ class Calculation $oData = array_merge(explode(':', $operand1Data['reference']), explode(':', $operand2Data['reference'])); $oCol = $oRow = []; + $breakNeeded = false; foreach ($oData as $oDatum) { - $oCR = Coordinate::coordinateFromString($oDatum); - $oCol[] = Coordinate::columnIndexFromString($oCR[0]) - 1; - $oRow[] = $oCR[1]; + try { + $oCR = Coordinate::coordinateFromString($oDatum); + $oCol[] = Coordinate::columnIndexFromString($oCR[0]) - 1; + $oRow[] = $oCR[1]; + } catch (\Exception $e) { + $stack->push('Error', Information\ExcelError::REF(), null); + $breakNeeded = true; + + break; + } + } + if ($breakNeeded) { + break; } $cellRef = Coordinate::stringFromColumnIndex(min($oCol) + 1) . min($oRow) . ':' . Coordinate::stringFromColumnIndex(max($oCol) + 1) . max($oRow); if ($pCellParent !== null && $this->spreadsheet !== null) { @@ -4842,8 +4860,10 @@ class Calculation return $this->raiseFormulaError('Unable to access Cell Reference'); } + $this->debugLog->writeDebugLog('Evaluation Result is %s', $this->showTypeDetails($cellValue)); $stack->push('Cell Reference', $cellValue, $cellRef); } else { + $this->debugLog->writeDebugLog('Evaluation Result is a #REF! Error'); $stack->push('Error', Information\ExcelError::REF(), null); } @@ -5434,13 +5454,13 @@ class Calculation * * @return false */ - protected function raiseFormulaError(string $errorMessage) + protected function raiseFormulaError(string $errorMessage, int $code = 0, ?Throwable $exception = null) { $this->formulaError = $errorMessage; $this->cyclicReferenceStack->clear(); $suppress = /** @scrutinizer ignore-deprecated */ $this->suppressFormulaErrors ?? $this->suppressFormulaErrorsNew; if (!$suppress) { - throw new Exception($errorMessage); + throw new Exception($errorMessage, $code, $exception); } return false; diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php index 9a9870d9..1d59988c 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/DateValue.php @@ -45,6 +45,11 @@ class DateValue return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $dateValue); } + // try to parse as date iff there is at least one digit + if (is_string($dateValue) && preg_match('/\\d/', $dateValue) !== 1) { + return ExcelError::VALUE(); + } + $dti = new DateTimeImmutable(); $baseYear = SharedDateHelper::getExcelCalendar(); $dateValue = trim($dateValue ?? '', '"'); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php index c72d006b..5c42eac0 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Month.php @@ -45,6 +45,7 @@ class Month } catch (Exception $e) { return $e->getMessage(); } + $dateValue = floor($dateValue); $adjustmentMonths = floor($adjustmentMonths); // Execute function @@ -88,6 +89,7 @@ class Month } catch (Exception $e) { return $e->getMessage(); } + $dateValue = floor($dateValue); $adjustmentMonths = floor($adjustmentMonths); // Execute function diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeValue.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeValue.php index bb9036f7..78d67b83 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeValue.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/TimeValue.php @@ -42,6 +42,11 @@ class TimeValue return self::evaluateSingleArgumentArray([self::class, __FUNCTION__], $timeValue); } + // try to parse as time iff there is at least one digit + if (is_string($timeValue) && preg_match('/\\d/', $timeValue) !== 1) { + return ExcelError::VALUE(); + } + $timeValue = trim($timeValue ?? '', '"'); $timeValue = str_replace(['/', '.'], '-', $timeValue); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/FormattedNumber.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/FormattedNumber.php index 3e88ece5..331fa448 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/FormattedNumber.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/FormattedNumber.php @@ -48,9 +48,9 @@ class FormattedNumber */ public static function convertToNumberIfNumeric(string &$operand): bool { - $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator()); + $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator(), '/'); $value = preg_replace(['/(\d)' . $thousandsSeparator . '(\d)/u', '/([+-])\s+(\d)/u'], ['$1$2', '$1$2'], trim($operand)); - $decimalSeparator = preg_quote(StringHelper::getDecimalSeparator()); + $decimalSeparator = preg_quote(StringHelper::getDecimalSeparator(), '/'); $value = preg_replace(['/(\d)' . $decimalSeparator . '(\d)/u', '/([+-])\s+(\d)/u'], ['$1.$2', '$1$2'], $value ?? ''); if (is_numeric($value)) { @@ -90,9 +90,9 @@ class FormattedNumber */ public static function convertToNumberIfPercent(string &$operand): bool { - $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator()); + $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator(), '/'); $value = preg_replace('/(\d)' . $thousandsSeparator . '(\d)/u', '$1$2', trim($operand)); - $decimalSeparator = preg_quote(StringHelper::getDecimalSeparator()); + $decimalSeparator = preg_quote(StringHelper::getDecimalSeparator(), '/'); $value = preg_replace(['/(\d)' . $decimalSeparator . '(\d)/u', '/([+-])\s+(\d)/u'], ['$1.$2', '$1$2'], $value ?? ''); $match = []; @@ -116,17 +116,22 @@ class FormattedNumber public static function convertToNumberIfCurrency(string &$operand): bool { $currencyRegexp = self::currencyMatcherRegexp(); - $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator()); + $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator(), '/'); $value = preg_replace('/(\d)' . $thousandsSeparator . '(\d)/u', '$1$2', $operand); $match = []; if ($value !== null && preg_match($currencyRegexp, $value, $match, PREG_UNMATCHED_AS_NULL)) { //Determine the sign $sign = ($match['PrefixedSign'] ?? $match['PrefixedSign2'] ?? $match['PostfixedSign']) ?? ''; + $decimalSeparator = StringHelper::getDecimalSeparator(); //Cast to a float - $operand = (float) ($sign . ($match['PostfixedValue'] ?? $match['PrefixedValue'])); + $intermediate = (string) ($match['PostfixedValue'] ?? $match['PrefixedValue']); + $intermediate = str_replace($decimalSeparator, '.', $intermediate); + if (is_numeric($intermediate)) { + $operand = (float) ($sign . str_replace($decimalSeparator, '.', $intermediate)); - return true; + return true; + } } return false; @@ -134,8 +139,8 @@ class FormattedNumber public static function currencyMatcherRegexp(): string { - $currencyCodes = sprintf(self::CURRENCY_CONVERSION_LIST, preg_quote(StringHelper::getCurrencyCode())); - $decimalSeparator = preg_quote(StringHelper::getDecimalSeparator()); + $currencyCodes = sprintf(self::CURRENCY_CONVERSION_LIST, preg_quote(StringHelper::getCurrencyCode(), '/')); + $decimalSeparator = preg_quote(StringHelper::getDecimalSeparator(), '/'); return '~^(?:(?: *(?[-+])? *(?[' . $currencyCodes . ']) *(?[-+])? *(?[0-9]+[' . $decimalSeparator . ']?[0-9*]*(?:E[-+]?[0-9]*)?) *)|(?: *(?[-+])? *(?[0-9]+' . $decimalSeparator . '?[0-9]*(?:E[-+]?[0-9]*)?) *(?[' . $currencyCodes . ']) *))$~ui'; } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Operands/StructuredReference.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Operands/StructuredReference.php index 266f1b2b..59cc3e3d 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Operands/StructuredReference.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engine/Operands/StructuredReference.php @@ -190,8 +190,8 @@ final class StructuredReference implements Operand { if ($columnName !== '') { $cellReference = $columnId . $cell->getRow(); - $pattern1 = '/\[' . preg_quote($columnName) . '\]/miu'; - $pattern2 = '/@' . preg_quote($columnName) . '/miu'; + $pattern1 = '/\[' . preg_quote($columnName, '/') . '\]/miu'; + $pattern2 = '/@' . preg_quote($columnName, '/') . '/miu'; if (preg_match($pattern1, $reference) === 1) { $reference = preg_replace($pattern1, $cellReference, $reference); } elseif (preg_match($pattern2, $reference) === 1) { @@ -328,7 +328,7 @@ final class StructuredReference implements Operand $cellFrom = "{$columnId}{$startRow}"; $cellTo = "{$columnId}{$endRow}"; $cellReference = ($cellFrom === $cellTo) ? $cellFrom : "{$cellFrom}:{$cellTo}"; - $pattern = '/\[' . preg_quote($columnName) . '\]/mui'; + $pattern = '/\[' . preg_quote($columnName, '/') . '\]/mui'; if (preg_match($pattern, $reference) === 1) { $columnsSelected = true; $reference = preg_replace($pattern, $cellReference, $reference); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php index e3a2bd65..fdee7503 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering.php @@ -20,28 +20,6 @@ class Engineering */ public const EULER = 2.71828182845904523536; - /** - * parseComplex. - * - * Parses a complex number into its real and imaginary parts, and an I or J suffix - * - * @deprecated 1.12.0 No longer used by internal code. Please use the \Complex\Complex class instead - * - * @param string $complexNumber The complex number - * - * @return mixed[] Indexed on "real", "imaginary" and "suffix" - */ - public static function parseComplex($complexNumber) - { - $complex = new Complex($complexNumber); - - return [ - 'real' => $complex->getReal(), - 'imaginary' => $complex->getImaginary(), - 'suffix' => $complex->getSuffix(), - ]; - } - /** * BESSELI. * diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Complex.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Complex.php index 691de8b7..f7ec02d4 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Complex.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/Complex.php @@ -49,7 +49,7 @@ class Complex return $e->getMessage(); } - if (($suffix == 'i') || ($suffix == 'j') || ($suffix == '')) { + if (($suffix === 'i') || ($suffix === 'j') || ($suffix === '')) { $complex = new ComplexObject($realNumber, $imaginary, $suffix); return (string) $complex; diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php index 4741f301..04bf3e50 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php @@ -40,7 +40,7 @@ class ConvertBinary extends ConvertBase return $e->getMessage(); } - if (strlen($value) == 10) { + if (strlen($value) == 10 && $value[0] === '1') { // Two's Complement $value = substr($value, -9); @@ -91,7 +91,7 @@ class ConvertBinary extends ConvertBase return $e->getMessage(); } - if (strlen($value) == 10) { + if (strlen($value) == 10 && $value[0] === '1') { $high2 = substr($value, 0, 2); $low8 = substr($value, 2); $xarr = ['00' => '00000000', '01' => '00000001', '10' => 'FFFFFFFE', '11' => 'FFFFFFFF']; @@ -144,7 +144,7 @@ class ConvertBinary extends ConvertBase return $e->getMessage(); } - if (strlen($value) == 10 && substr($value, 0, 1) === '1') { // Two's Complement + if (strlen($value) == 10 && $value[0] === '1') { // Two's Complement return str_repeat('7', 6) . strtoupper(decoct((int) bindec("11$value"))); } $octVal = (string) decoct((int) bindec($value)); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php index e2d27bde..bc425f87 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/HLookup.php @@ -27,7 +27,7 @@ class HLookup extends LookupBase */ public static function lookup($lookupValue, $lookupArray, $indexNumber, $notExactMatch = true) { - if (is_array($lookupValue)) { + if (is_array($lookupValue) || is_array($indexNumber)) { return self::evaluateArrayArgumentsIgnore([self::class, __FUNCTION__], 1, $lookupValue, $lookupArray, $indexNumber, $notExactMatch); } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php index edeb1aa8..badd1057 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/VLookup.php @@ -26,7 +26,7 @@ class VLookup extends LookupBase */ public static function lookup($lookupValue, $lookupArray, $indexNumber, $notExactMatch = true) { - if (is_array($lookupValue)) { + if (is_array($lookupValue) || is_array($indexNumber)) { return self::evaluateArrayArgumentsIgnore([self::class, __FUNCTION__], 1, $lookupValue, $lookupArray, $indexNumber, $notExactMatch); } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php index 1a797c8a..56b0861c 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Sum.php @@ -66,8 +66,8 @@ class Sum $returnValue += (int) $arg; } elseif (ErrorValue::isError($arg)) { return $arg; - // ignore non-numerics from cell, but fail as literals (except null) } elseif ($arg !== null && !Functions::isCellValue($k)) { + // ignore non-numerics from cell, but fail as literals (except null) return ExcelError::VALUE(); } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Extract.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Extract.php index 519607c0..24ddff2e 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Extract.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Extract.php @@ -261,7 +261,7 @@ class Extract $delimiter = Functions::flattenArray($delimiter); $quotedDelimiters = array_map( function ($delimiter) { - return preg_quote($delimiter ?? ''); + return preg_quote($delimiter ?? '', '/'); }, $delimiter ); @@ -270,7 +270,7 @@ class Extract return '(' . $delimiters . ')'; } - return '(' . preg_quote($delimiter ?? '') . ')'; + return '(' . preg_quote($delimiter ?? '', '/') . ')'; } private static function matchFlags(int $matchMode): string diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Format.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Format.php index 93e72820..57d33166 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Format.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Format.php @@ -129,7 +129,7 @@ class Format $format = Helpers::extractString($format); if (!is_numeric($value) && Date::isDateTimeFormatCode($format)) { - $value = DateTimeExcel\DateValue::fromString($value); + $value = DateTimeExcel\DateValue::fromString($value) + DateTimeExcel\TimeValue::fromString($value); } return (string) NumberFormat::toFormattedString($value, $format); @@ -140,7 +140,7 @@ class Format * * @return mixed */ - private static function convertValue($value) + private static function convertValue($value, bool $spacesMeanZero = false) { $value = $value ?? 0; if (is_bool($value)) { @@ -150,6 +150,12 @@ class Format throw new CalcExp(ExcelError::VALUE()); } } + if (is_string($value)) { + $value = trim($value); + if ($spacesMeanZero && $value === '') { + $value = 0; + } + } return $value; } @@ -181,6 +187,9 @@ class Format '', trim($value, " \t\n\r\0\x0B" . StringHelper::getCurrencyCode()) ); + if ($numberValue === '') { + return ExcelError::VALUE(); + } if (is_numeric($numberValue)) { return (float) $numberValue; } @@ -277,7 +286,7 @@ class Format } try { - $value = self::convertValue($value); + $value = self::convertValue($value, true); $decimalSeparator = self::getDecimalSeparator($decimalSeparator); $groupSeparator = self::getGroupSeparator($groupSeparator); } catch (CalcExp $e) { @@ -285,12 +294,12 @@ class Format } if (!is_numeric($value)) { - $decimalPositions = preg_match_all('/' . preg_quote($decimalSeparator) . '/', $value, $matches, PREG_OFFSET_CAPTURE); + $decimalPositions = preg_match_all('/' . preg_quote($decimalSeparator, '/') . '/', $value, $matches, PREG_OFFSET_CAPTURE); if ($decimalPositions > 1) { return ExcelError::VALUE(); } - $decimalOffset = array_pop($matches[0])[1]; // @phpstan-ignore-line - if (strpos($value, $groupSeparator, $decimalOffset) !== false) { + $decimalOffset = array_pop($matches[0])[1] ?? null; + if ($decimalOffset === null || strpos($value, $groupSeparator, $decimalOffset) !== false) { return ExcelError::VALUE(); } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Text.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Text.php index 8e6a575a..b8a73076 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Text.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Text.php @@ -193,7 +193,7 @@ class Text if (is_array($delimiter) && count($valueSet) > 1) { $quotedDelimiters = array_map( function ($delimiter) { - return preg_quote($delimiter ?? ''); + return preg_quote($delimiter ?? '', '/'); }, $valueSet ); @@ -202,7 +202,7 @@ class Text return '(' . $delimiters . ')'; } - return '(' . preg_quote(/** @scrutinizer ignore-type */ Functions::flattenSingleValue($delimiter)) . ')'; + return '(' . preg_quote(/** @scrutinizer ignore-type */ Functions::flattenSingleValue($delimiter), '/') . ')'; } private static function matchFlags(bool $matchMode): string diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php index 1bf73ba8..c0fb3877 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php @@ -51,8 +51,9 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder return $this->setImproperFraction($matches, $cell); } - $decimalSeparator = preg_quote(StringHelper::getDecimalSeparator()); - $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator()); + $decimalSeparatorNoPreg = StringHelper::getDecimalSeparator(); + $decimalSeparator = preg_quote($decimalSeparatorNoPreg, '/'); + $thousandsSeparator = preg_quote(StringHelper::getThousandsSeparator(), '/'); // Check for percentage if (preg_match('/^\-?\d*' . $decimalSeparator . '?\d*\s?\%$/', preg_replace('/(\d)' . $thousandsSeparator . '(\d)/u', '$1$2', $value))) { @@ -64,7 +65,7 @@ class AdvancedValueBinder extends DefaultValueBinder implements IValueBinder // Convert value to number $sign = ($matches['PrefixedSign'] ?? $matches['PrefixedSign2'] ?? $matches['PostfixedSign']) ?? null; $currencyCode = $matches['PrefixedCurrency'] ?? $matches['PostfixedCurrency']; - $value = (float) ($sign . trim(str_replace([$decimalSeparator, $currencyCode, ' ', '-'], ['.', '', '', ''], preg_replace('/(\d)' . $thousandsSeparator . '(\d)/u', '$1$2', $value)))); // @phpstan-ignore-line + $value = (float) ($sign . trim(str_replace([$decimalSeparatorNoPreg, $currencyCode, ' ', '-'], ['.', '', '', ''], preg_replace('/(\d)' . $thousandsSeparator . '(\d)/u', '$1$2', $value)))); // @phpstan-ignore-line return $this->setCurrency($value, $cell, $currencyCode); // @phpstan-ignore-line } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php index a53294e5..e9e41d7c 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/Cell.php @@ -71,6 +71,9 @@ class Cell */ private $formulaAttributes; + /** @var IgnoredErrors */ + private $ignoredErrors; + /** * Update the cell into the cell collection. * @@ -119,6 +122,7 @@ class Cell } elseif (self::getValueBinder()->bindValue($this, $value) === false) { throw new Exception('Value could not be bound to cell.'); } + $this->ignoredErrors = new IgnoredErrors(); } /** @@ -391,7 +395,9 @@ class Cell } throw new \PhpOffice\PhpSpreadsheet\Calculation\Exception( - $this->getWorksheet()->getTitle() . '!' . $this->getCoordinate() . ' -> ' . $ex->getMessage() + $this->getWorksheet()->getTitle() . '!' . $this->getCoordinate() . ' -> ' . $ex->getMessage(), + $ex->getCode(), + $ex ); } @@ -794,4 +800,9 @@ class Cell { return (string) $this->getValue(); } + + public function getIgnoredErrors(): IgnoredErrors + { + return $this->ignoredErrors; + } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidator.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidator.php index 0e395a7f..692f316e 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidator.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DataValidator.php @@ -20,7 +20,7 @@ class DataValidator */ public function isValid(Cell $cell) { - if (!$cell->hasDataValidation()) { + if (!$cell->hasDataValidation() || $cell->getDataValidation()->getType() === DataValidation::TYPE_NONE) { return true; } @@ -31,13 +31,55 @@ class DataValidator return false; } - // TODO: write check on all cases - switch ($dataValidation->getType()) { - case DataValidation::TYPE_LIST: - return $this->isValueInList($cell); + $returnValue = false; + $type = $dataValidation->getType(); + if ($type === DataValidation::TYPE_LIST) { + $returnValue = $this->isValueInList($cell); + } elseif ($type === DataValidation::TYPE_WHOLE) { + if (!is_numeric($cellValue) || fmod((float) $cellValue, 1) != 0) { + $returnValue = false; + } else { + $returnValue = $this->numericOperator($dataValidation, (int) $cellValue); + } + } elseif ($type === DataValidation::TYPE_DECIMAL || $type === DataValidation::TYPE_DATE || $type === DataValidation::TYPE_TIME) { + if (!is_numeric($cellValue)) { + $returnValue = false; + } else { + $returnValue = $this->numericOperator($dataValidation, (float) $cellValue); + } + } elseif ($type === DataValidation::TYPE_TEXTLENGTH) { + $returnValue = $this->numericOperator($dataValidation, mb_strlen((string) $cellValue)); } - return false; + return $returnValue; + } + + /** @param float|int $cellValue */ + private function numericOperator(DataValidation $dataValidation, $cellValue): bool + { + $operator = $dataValidation->getOperator(); + $formula1 = $dataValidation->getFormula1(); + $formula2 = $dataValidation->getFormula2(); + $returnValue = false; + if ($operator === DataValidation::OPERATOR_BETWEEN) { + $returnValue = $cellValue >= $formula1 && $cellValue <= $formula2; + } elseif ($operator === DataValidation::OPERATOR_NOTBETWEEN) { + $returnValue = $cellValue < $formula1 || $cellValue > $formula2; + } elseif ($operator === DataValidation::OPERATOR_EQUAL) { + $returnValue = $cellValue == $formula1; + } elseif ($operator === DataValidation::OPERATOR_NOTEQUAL) { + $returnValue = $cellValue != $formula1; + } elseif ($operator === DataValidation::OPERATOR_LESSTHAN) { + $returnValue = $cellValue < $formula1; + } elseif ($operator === DataValidation::OPERATOR_LESSTHANOREQUAL) { + $returnValue = $cellValue <= $formula1; + } elseif ($operator === DataValidation::OPERATOR_GREATERTHAN) { + $returnValue = $cellValue > $formula1; + } elseif ($operator === DataValidation::OPERATOR_GREATERTHANOREQUAL) { + $returnValue = $cellValue >= $formula1; + } + + return $returnValue; } /** diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/IgnoredErrors.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/IgnoredErrors.php new file mode 100644 index 00000000..ee4b5156 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/IgnoredErrors.php @@ -0,0 +1,66 @@ +numberStoredAsText = $value; + + return $this; + } + + public function getNumberStoredAsText(): bool + { + return $this->numberStoredAsText; + } + + public function setFormula(bool $value): self + { + $this->formula = $value; + + return $this; + } + + public function getFormula(): bool + { + return $this->formula; + } + + public function setTwoDigitTextYear(bool $value): self + { + $this->twoDigitTextYear = $value; + + return $this; + } + + public function getTwoDigitTextYear(): bool + { + return $this->twoDigitTextYear; + } + + public function setEvalError(bool $value): self + { + $this->evalError = $value; + + return $this; + } + + public function getEvalError(): bool + { + return $this->evalError; + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/CellReferenceHelper.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/CellReferenceHelper.php index 24694d5c..0e164543 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/CellReferenceHelper.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/CellReferenceHelper.php @@ -118,7 +118,7 @@ class CellReferenceHelper { $newColumn = Coordinate::stringFromColumnIndex(min($newColumnIndex + $this->numberOfColumns, AddressRange::MAX_COLUMN_INT)); - return $absoluteColumn . $newColumn; + return "{$absoluteColumn}{$newColumn}"; } protected function updateRowReference(int $newRowIndex, string $absoluteRow): string @@ -126,6 +126,6 @@ class CellReferenceHelper $newRow = $newRowIndex + $this->numberOfRows; $newRow = ($newRow > AddressRange::MAX_ROW) ? AddressRange::MAX_ROW : $newRow; - return $absoluteRow . (string) $newRow; + return "{$absoluteRow}{$newRow}"; } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Axis.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Axis.php index ade7b99d..3d481346 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Axis.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Axis.php @@ -52,6 +52,9 @@ class Axis extends Properties /** @var string */ private $axisType = ''; + /** @var ?AxisText */ + private $axisText; + /** * Axis Options. * @@ -88,6 +91,9 @@ class Axis extends Properties Properties::FORMAT_CODE_DATE_ISO8601, ]; + /** @var bool */ + private $noFill = false; + /** * Get Series Data Type. * @@ -183,6 +189,14 @@ class Axis extends Properties */ public function getAxisOptionsProperty($property) { + if ($property === 'textRotation') { + if ($this->axisText !== null) { + if ($this->axisText->getRotation() !== null) { + return (string) $this->axisText->getRotation(); + } + } + } + return $this->axisOptions[$property]; } @@ -295,4 +309,28 @@ class Axis extends Properties return $this; } + + public function getAxisText(): ?AxisText + { + return $this->axisText; + } + + public function setAxisText(?AxisText $axisText): self + { + $this->axisText = $axisText; + + return $this; + } + + public function setNoFill(bool $noFill): self + { + $this->noFill = $noFill; + + return $this; + } + + public function getNoFill(): bool + { + return $this->noFill; + } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/AxisText.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/AxisText.php new file mode 100644 index 00000000..cd9ba2ce --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/AxisText.php @@ -0,0 +1,56 @@ +font = new Font(); + $this->font->setSize(null, true); + } + + public function setRotation(?int $rotation): self + { + $this->rotation = $rotation; + + return $this; + } + + public function getRotation(): ?int + { + return $this->rotation; + } + + public function getFillColorObject(): ChartColor + { + $fillColor = $this->font->getChartColor(); + if ($fillColor === null) { + $fillColor = new ChartColor(); + $this->font->setChartColorFromObject($fillColor); + } + + return $fillColor; + } + + public function getFont(): Font + { + return $this->font; + } + + public function setFont(Font $font): self + { + $this->font = $font; + + return $this; + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Chart.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Chart.php index 2ff22a34..38c69a46 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Chart.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Chart.php @@ -150,6 +150,12 @@ class Chart /** @var bool */ private $roundedCorners = false; + /** @var GridLines */ + private $borderLines; + + /** @var ChartColor */ + private $fillColor; + /** * Create a new Chart. * majorGridlines and minorGridlines are deprecated, moved to Axis. @@ -176,6 +182,8 @@ class Chart if ($minorGridlines !== null) { $this->yAxis->setMinorGridlines($minorGridlines); } + $this->fillColor = new ChartColor(); + $this->borderLines = new GridLines(); } /** @@ -786,4 +794,21 @@ class Chart return $this; } + + public function getBorderLines(): GridLines + { + return $this->borderLines; + } + + public function setBorderLines(GridLines $borderLines): self + { + $this->borderLines = $borderLines; + + return $this; + } + + public function getFillColor(): ChartColor + { + return $this->fillColor; + } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Layout.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Layout.php index 0018d79d..ac36c25c 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Layout.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Layout.php @@ -2,6 +2,8 @@ namespace PhpOffice\PhpSpreadsheet\Chart; +use PhpOffice\PhpSpreadsheet\Style\Font; + class Layout { /** @@ -127,8 +129,11 @@ class Layout /** @var ?ChartColor */ private $labelBorderColor; - /** @var ?ChartColor */ - private $labelFontColor; + /** @var ?Font */ + private $labelFont; + + /** @var Properties */ + private $labelEffects; /** * Create a new Layout. @@ -172,7 +177,18 @@ class Layout $this->initBoolean($layout, 'numFmtLinked'); $this->initColor($layout, 'labelFillColor'); $this->initColor($layout, 'labelBorderColor'); - $this->initColor($layout, 'labelFontColor'); + $labelFont = $layout['labelFont'] ?? null; + if ($labelFont instanceof Font) { + $this->labelFont = $labelFont; + } + $labelFontColor = $layout['labelFontColor'] ?? null; + if ($labelFontColor instanceof ChartColor) { + $this->setLabelFontColor($labelFontColor); + } + $labelEffects = $layout['labelEffects'] ?? null; + if ($labelEffects instanceof Properties) { + $this->labelEffects = $labelEffects; + } } private function initBoolean(array $layout, string $name): void @@ -493,14 +509,32 @@ class Layout return $this; } + public function getLabelFont(): ?Font + { + return $this->labelFont; + } + + public function getLabelEffects(): ?Properties + { + return $this->labelEffects; + } + public function getLabelFontColor(): ?ChartColor { - return $this->labelFontColor; + if ($this->labelFont === null) { + return null; + } + + return $this->labelFont->getChartColor(); } public function setLabelFontColor(?ChartColor $chartColor): self { - $this->labelFontColor = $chartColor; + if ($this->labelFont === null) { + $this->labelFont = new Font(); + $this->labelFont->setSize(null, true); + } + $this->labelFont->setChartColorFromObject($chartColor); return $this; } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Legend.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Legend.php index edd87015..04040aed 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Legend.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Legend.php @@ -48,6 +48,15 @@ class Legend */ private $layout; + /** @var GridLines */ + private $borderLines; + + /** @var ChartColor */ + private $fillColor; + + /** @var ?AxisText */ + private $legendText; + /** * Create a new Legend. * @@ -60,6 +69,13 @@ class Legend $this->setPosition($position); $this->layout = $layout; $this->setOverlay($overlay); + $this->borderLines = new GridLines(); + $this->fillColor = new ChartColor(); + } + + public function getFillColor(): ChartColor + { + return $this->fillColor; } /** @@ -148,4 +164,28 @@ class Legend { return $this->layout; } + + public function getLegendText(): ?AxisText + { + return $this->legendText; + } + + public function setLegendText(?AxisText $legendText): self + { + $this->legendText = $legendText; + + return $this; + } + + public function getBorderLines(): GridLines + { + return $this->borderLines; + } + + public function setBorderLines(GridLines $borderLines): self + { + $this->borderLines = $borderLines; + + return $this; + } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/PlotArea.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/PlotArea.php index ccde4bb2..2b78d9a4 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/PlotArea.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/PlotArea.php @@ -163,4 +163,49 @@ class PlotArea { return $this->gradientFillStops; } + + /** @var ?int */ + private $gapWidth; + + /** @var bool */ + private $useUpBars = false; + + /** @var bool */ + private $useDownBars = false; + + public function getGapWidth(): ?int + { + return $this->gapWidth; + } + + public function setGapWidth(?int $gapWidth): self + { + $this->gapWidth = $gapWidth; + + return $this; + } + + public function getUseUpBars(): bool + { + return $this->useUpBars; + } + + public function setUseUpBars(bool $useUpBars): self + { + $this->useUpBars = $useUpBars; + + return $this; + } + + public function getUseDownBars(): bool + { + return $this->useDownBars; + } + + public function setUseDownBars(bool $useDownBars): self + { + $this->useDownBars = $useDownBars; + + return $this; + } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php index cb9b544b..d676f1d3 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php @@ -434,12 +434,33 @@ abstract class JpGraphRendererBase implements IRenderer // Loop through each data series in turn for ($i = 0; $i < $seriesCount; ++$i) { - $dataValuesY = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i)->getDataValues(); + $plotCategoryByIndex = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex($i); + if ($plotCategoryByIndex === false) { + $plotCategoryByIndex = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotCategoryByIndex(0); + } + $dataValuesY = $plotCategoryByIndex->getDataValues(); $dataValuesX = $this->chart->getPlotArea()->getPlotGroupByIndex($groupID)->getPlotValuesByIndex($i)->getDataValues(); - foreach ($dataValuesY as $k => $dataValueY) { - $dataValuesY[$k] = $k; + $redoDataValuesY = true; + if ($bubble) { + if (!$bubbleSize) { + $bubbleSize = '10'; + } + $redoDataValuesY = false; + foreach ($dataValuesY as $dataValueY) { + if (!is_int($dataValueY) && !is_float($dataValueY)) { + $redoDataValuesY = true; + + break; + } + } } + if ($redoDataValuesY) { + foreach ($dataValuesY as $k => $dataValueY) { + $dataValuesY[$k] = $k; + } + } + //var_dump($dataValuesY, $dataValuesX, $bubbleSize); $seriesPlot = new ScatterPlot($dataValuesX, $dataValuesY); if ($scatterStyle == 'lineMarker') { @@ -483,7 +504,7 @@ abstract class JpGraphRendererBase implements IRenderer $dataValues = []; foreach ($dataValuesY as $k => $dataValueY) { - $dataValues[$k] = implode(' ', array_reverse($dataValueY)); + $dataValues[$k] = is_array($dataValueY) ? implode(' ', array_reverse($dataValueY)) : $dataValueY; } $tmp = array_shift($dataValues); $dataValues[] = $tmp; diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/MtJpGraphRenderer.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/MtJpGraphRenderer.php index e1f0f90a..b5e70d3a 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/MtJpGraphRenderer.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/MtJpGraphRenderer.php @@ -3,12 +3,12 @@ namespace PhpOffice\PhpSpreadsheet\Chart\Renderer; /** - * Jpgraph is not oficially maintained in Composer. + * Jpgraph is not officially maintained by Composer at packagist.org. * * This renderer implementation uses package * https://packagist.org/packages/mitoteam/jpgraph * - * This package is up to date for August 2022 and has PHP 8.1 support. + * This package is up to date for June 2023 and has PHP 8.2 support. */ class MtJpGraphRenderer extends JpGraphRendererBase { @@ -29,7 +29,7 @@ class MtJpGraphRenderer extends JpGraphRendererBase 'regstat', 'scatter', 'stock', - ]); + ], true); // enable Extended mode $loaded = true; } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Properties.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Properties.php index afdeea99..302afee7 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Properties.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Document/Properties.php @@ -107,6 +107,8 @@ class Properties */ private $customProperties = []; + private string $hyperlinkBase = ''; + /** * Create a new Document Properties instance. */ @@ -434,7 +436,7 @@ class Properties * * @param mixed $propertyValue * @param string $propertyType - * 'i' : Integer + * 'i' : Integer * 'f' : Floating Point * 's' : String * 'd' : Date/Time @@ -534,4 +536,16 @@ class Properties { return self::PROPERTY_TYPE_ARRAY[$propertyType] ?? self::PROPERTY_TYPE_UNKNOWN; } + + public function getHyperlinkBase(): string + { + return $this->hyperlinkBase; + } + + public function setHyperlinkBase(string $hyperlinkBase): self + { + $this->hyperlinkBase = $hyperlinkBase; + + return $this; + } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Downloader.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Downloader.php new file mode 100644 index 00000000..e66ae425 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Downloader.php @@ -0,0 +1,89 @@ + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xls' => 'application/vnd.ms-excel', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + 'csv' => 'text/csv', + 'html' => 'text/html', + 'pdf' => 'application/pdf', + ]; + + public function __construct(string $folder, string $filename, ?string $filetype = null) + { + if ((is_dir($folder) === false) || (is_readable($folder) === false)) { + throw new Exception("Folder {$folder} is not accessable"); + } + $filepath = "{$folder}/{$filename}"; + $this->filepath = (string) realpath($filepath); + $this->filename = basename($filepath); + if ((file_exists($this->filepath) === false) || (is_readable($this->filepath) === false)) { + throw new Exception("{$this->filename} not found, or cannot be read"); + } + + $filetype ??= pathinfo($filename, PATHINFO_EXTENSION); + if (array_key_exists(strtolower($filetype), self::CONTENT_TYPES) === false) { + throw new Exception("Invalid filetype: {$filetype} cannot be downloaded"); + } + $this->filetype = strtolower($filetype); + } + + public function download(): void + { + $this->headers(); + + readfile($this->filepath); + } + + public function headers(): void + { + ob_clean(); + + $this->contentType(); + $this->contentDisposition(); + $this->cacheHeaders(); + $this->fileSize(); + + flush(); + } + + protected function contentType(): void + { + header('Content-Type: ' . self::CONTENT_TYPES[$this->filetype]); + } + + protected function contentDisposition(): void + { + header('Content-Disposition: attachment;filename="' . $this->filename . '"'); + } + + protected function cacheHeaders(): void + { + header('Cache-Control: max-age=0'); + // If you're serving to IE 9, then the following may be needed + header('Cache-Control: max-age=1'); + + // If you're serving to IE over SSL, then the following may be needed + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified + header('Cache-Control: cache, must-revalidate'); // HTTP/1.1 + header('Pragma: public'); // HTTP/1.0 + } + + protected function fileSize(): void + { + header('Content-Length: ' . filesize($this->filepath)); + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Handler.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Handler.php new file mode 100644 index 00000000..d05197ce --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Handler.php @@ -0,0 +1,46 @@ +attributes; if ($attrs !== null) { @@ -737,72 +737,72 @@ class Html } } - private function endFontTag(): void + protected function endFontTag(): void { $this->face = $this->size = $this->color = null; } - private function startBoldTag(): void + protected function startBoldTag(): void { $this->bold = true; } - private function endBoldTag(): void + protected function endBoldTag(): void { $this->bold = false; } - private function startItalicTag(): void + protected function startItalicTag(): void { $this->italic = true; } - private function endItalicTag(): void + protected function endItalicTag(): void { $this->italic = false; } - private function startUnderlineTag(): void + protected function startUnderlineTag(): void { $this->underline = true; } - private function endUnderlineTag(): void + protected function endUnderlineTag(): void { $this->underline = false; } - private function startSubscriptTag(): void + protected function startSubscriptTag(): void { $this->subscript = true; } - private function endSubscriptTag(): void + protected function endSubscriptTag(): void { $this->subscript = false; } - private function startSuperscriptTag(): void + protected function startSuperscriptTag(): void { $this->superscript = true; } - private function endSuperscriptTag(): void + protected function endSuperscriptTag(): void { $this->superscript = false; } - private function startStrikethruTag(): void + protected function startStrikethruTag(): void { $this->strikethrough = true; } - private function endStrikethruTag(): void + protected function endStrikethruTag(): void { $this->strikethrough = false; } - private function breakTag(): void + protected function breakTag(): void { $this->stringData .= "\n"; } @@ -826,8 +826,9 @@ class Html if (isset($callbacks[$callbackTag])) { $elementHandler = $callbacks[$callbackTag]; if (method_exists($this, $elementHandler)) { - /** @phpstan-ignore-next-line */ - call_user_func([$this, $elementHandler], $element); + /** @var callable */ + $callable = [$this, $elementHandler]; + call_user_func($callable, $element); } } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Sample.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Sample.php index 5ca546e0..6244375f 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Sample.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/Sample.php @@ -2,7 +2,9 @@ namespace PhpOffice\PhpSpreadsheet\Helper; +use PhpOffice\PhpSpreadsheet\Chart\Chart; use PhpOffice\PhpSpreadsheet\IOFactory; +use PhpOffice\PhpSpreadsheet\Settings; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; use PhpOffice\PhpSpreadsheet\Writer\IWriter; @@ -12,6 +14,7 @@ use RecursiveRegexIterator; use ReflectionClass; use RegexIterator; use RuntimeException; +use Throwable; /** * Helper class to be used in sample code. @@ -120,7 +123,7 @@ class Sample * @param string $filename * @param string[] $writers */ - public function write(Spreadsheet $spreadsheet, $filename, array $writers = ['Xlsx', 'Xls']): void + public function write(Spreadsheet $spreadsheet, $filename, array $writers = ['Xlsx', 'Xls'], bool $withCharts = false, ?callable $writerCallback = null): void { // Set active sheet index to the first sheet, so Excel opens this as the first sheet $spreadsheet->setActiveSheetIndex(0); @@ -129,9 +132,16 @@ class Sample foreach ($writers as $writerType) { $path = $this->getFilename($filename, mb_strtolower($writerType)); $writer = IOFactory::createWriter($spreadsheet, $writerType); + $writer->setIncludeCharts($withCharts); + if ($writerCallback !== null) { + $writerCallback($writer); + } $callStartTime = microtime(true); $writer->save($path); $this->logWrite($writer, $path, /** @scrutinizer ignore-type */ $callStartTime); + if ($this->isCli() === false) { + echo 'Download ' . basename($path) . '
'; + } } $this->logEndingNotes(); @@ -147,7 +157,7 @@ class Sample * * @return string */ - private function getTemporaryFolder() + public function getTemporaryFolder() { $tempFolder = sys_get_temp_dir() . '/phpspreadsheet'; if (!$this->isDirOrMkdir($tempFolder)) { @@ -162,10 +172,8 @@ class Sample * * @param string $filename * @param string $extension - * - * @return string */ - public function getFilename($filename, $extension = 'xlsx') + public function getFilename($filename, $extension = 'xlsx'): string { $originalExtension = pathinfo($filename, PATHINFO_EXTENSION); @@ -195,7 +203,29 @@ class Sample public function log(string $message): void { $eol = $this->isCli() ? PHP_EOL : '
'; - echo date('H:i:s ') . $message . $eol; + echo($this->isCli() ? date('H:i:s ') : '') . $message . $eol; + } + + public function renderChart(Chart $chart, string $fileName): void + { + if ($this->isCli() === true) { + return; + } + + Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\MtJpGraphRenderer::class); + + $fileName = $this->getFilename($fileName, 'png'); + + try { + $chart->render($fileName); + $this->log('Rendered image: ' . $fileName); + $imageData = file_get_contents($fileName); + if ($imageData !== false) { + echo '
'; + } + } catch (Throwable $e) { + $this->log('Error rendering chart: ' . $e->getMessage() . PHP_EOL); + } } public function titles(string $category, string $functionName, ?string $description = null): void @@ -246,7 +276,10 @@ class Sample $callTime = $callEndTime - $callStartTime; $reflection = new ReflectionClass($writer); $format = $reflection->getShortName(); - $message = "Write {$format} format to {$path} in " . sprintf('%.4f', $callTime) . ' seconds'; + + $message = ($this->isCli() === true) + ? "Write {$format} format to {$path} in " . sprintf('%.4f', $callTime) . ' seconds' + : "Write {$format} format to {$path} in " . sprintf('%.4f', $callTime) . ' seconds'; $this->log($message); } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/TextGrid.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/TextGrid.php index ed146a55..3a4a98f0 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/TextGrid.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Helper/TextGrid.php @@ -48,17 +48,17 @@ class TextGrid public function render(): string { - $this->gridDisplay = $this->isCli ? '' : ''; + $this->gridDisplay = $this->isCli ? '' : '
';
 
         $maxRow = max($this->rows);
-        $maxRowLength = strlen((string) $maxRow) + 1;
+        $maxRowLength = mb_strlen((string) $maxRow) + 1;
         $columnWidths = $this->getColumnWidths();
 
         $this->renderColumnHeader($maxRowLength, $columnWidths);
         $this->renderRows($maxRowLength, $columnWidths);
         $this->renderFooter($maxRowLength, $columnWidths);
 
-        $this->gridDisplay .= $this->isCli ? '' : '';
+        $this->gridDisplay .= $this->isCli ? '' : '
'; return $this->gridDisplay; } @@ -75,9 +75,9 @@ class TextGrid private function renderCells(array $rowData, array $columnWidths): void { foreach ($rowData as $column => $cell) { - $cell = ($this->isCli) ? (string) $cell : htmlentities((string) $cell); + $displayCell = ($this->isCli) ? (string) $cell : htmlentities((string) $cell); $this->gridDisplay .= '| '; - $this->gridDisplay .= str_pad($cell, $columnWidths[$column] + 1, ' '); + $this->gridDisplay .= $displayCell . str_repeat(' ', $columnWidths[$column] - mb_strlen($cell ?? '') + 1); } } @@ -126,12 +126,12 @@ class TextGrid foreach ($columnData as $columnValue) { if (is_string($columnValue)) { - $columnWidth = max($columnWidth, strlen($columnValue)); + $columnWidth = max($columnWidth, mb_strlen($columnValue)); } elseif (is_bool($columnValue)) { - $columnWidth = max($columnWidth, strlen($columnValue ? 'TRUE' : 'FALSE')); + $columnWidth = max($columnWidth, mb_strlen($columnValue ? 'TRUE' : 'FALSE')); } - $columnWidth = max($columnWidth, strlen((string) $columnWidth)); + $columnWidth = max($columnWidth, mb_strlen((string) $columnWidth)); } return $columnWidth; diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Gnumeric.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Gnumeric.php index 17455322..99e4d6ad 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Gnumeric.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Gnumeric.php @@ -80,17 +80,15 @@ class Gnumeric extends BaseReader */ public function canRead(string $filename): bool { - // Check if gzlib functions are available - if (File::testFileNoThrow($filename) && function_exists('gzread')) { - // Read signature data (first 3 bytes) - $fh = fopen($filename, 'rb'); - if ($fh !== false) { - $data = fread($fh, 2); - fclose($fh); + $data = null; + if (File::testFileNoThrow($filename)) { + $data = $this->gzfileGetContents($filename); + if (strpos($data, self::NAMESPACE_GNM) === false) { + $data = ''; } } - return isset($data) && $data === chr(0x1F) . chr(0x8B); + return !empty($data); } private static function matchXml(XMLReader $xml, string $expectedLocalName): bool @@ -110,9 +108,13 @@ class Gnumeric extends BaseReader public function listWorksheetNames($filename) { File::assertFile($filename); + if (!$this->canRead($filename)) { + throw new Exception($filename . ' is an invalid Gnumeric file.'); + } $xml = new XMLReader(); - $xml->xml($this->getSecurityScannerOrThrow()->scanFile('compress.zlib://' . realpath($filename)), null, Settings::getLibXmlLoaderOptions()); + $contents = $this->gzfileGetContents($filename); + $xml->xml($contents, null, Settings::getLibXmlLoaderOptions()); $xml->setParserProperty(2, true); $worksheetNames = []; @@ -139,9 +141,13 @@ class Gnumeric extends BaseReader public function listWorksheetInfo($filename) { File::assertFile($filename); + if (!$this->canRead($filename)) { + throw new Exception($filename . ' is an invalid Gnumeric file.'); + } $xml = new XMLReader(); - $xml->xml($this->getSecurityScannerOrThrow()->scanFile('compress.zlib://' . realpath($filename)), null, Settings::getLibXmlLoaderOptions()); + $contents = $this->gzfileGetContents($filename); + $xml->xml($contents, null, Settings::getLibXmlLoaderOptions()); $xml->setParserProperty(2, true); $worksheetInfo = []; @@ -185,13 +191,23 @@ class Gnumeric extends BaseReader */ private function gzfileGetContents($filename) { - $file = @gzopen($filename, 'rb'); $data = ''; - if ($file !== false) { - while (!gzeof($file)) { - $data .= gzread($file, 1024); + $contents = @file_get_contents($filename); + if ($contents !== false) { + if (substr($contents, 0, 2) === "\x1f\x8b") { + // Check if gzlib functions are available + if (function_exists('gzdecode')) { + $contents = @gzdecode($contents); + if ($contents !== false) { + $data = $contents; + } + } + } else { + $data = $contents; } - gzclose($file); + } + if ($data !== '') { + $data = $this->getSecurityScannerOrThrow()->scan($data); } return $data; @@ -245,10 +261,13 @@ class Gnumeric extends BaseReader { $this->spreadsheet = $spreadsheet; File::assertFile($filename); + if (!$this->canRead($filename)) { + throw new Exception($filename . ' is an invalid Gnumeric file.'); + } $gFileData = $this->gzfileGetContents($filename); - $xml2 = simplexml_load_string($this->getSecurityScannerOrThrow()->scan($gFileData), 'SimpleXMLElement', Settings::getLibXmlLoaderOptions()); + $xml2 = simplexml_load_string($gFileData, 'SimpleXMLElement', Settings::getLibXmlLoaderOptions()); $xml = self::testSimpleXml($xml2); $gnmXML = $xml->children(self::NAMESPACE_GNM); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Html.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Html.php index b165b6c1..bfb52401 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Html.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Html.php @@ -7,6 +7,8 @@ use DOMElement; use DOMNode; use DOMText; use PhpOffice\PhpSpreadsheet\Cell\Coordinate; +use PhpOffice\PhpSpreadsheet\Cell\DataType; +use PhpOffice\PhpSpreadsheet\Document\Properties; use PhpOffice\PhpSpreadsheet\Helper\Dimension as CssDimension; use PhpOffice\PhpSpreadsheet\Reader\Security\XmlScanner; use PhpOffice\PhpSpreadsheet\Spreadsheet; @@ -283,15 +285,35 @@ class Html extends BaseReader * @param int|string $row * @param mixed $cellContent */ - protected function flushCell(Worksheet $sheet, $column, $row, &$cellContent): void + protected function flushCell(Worksheet $sheet, $column, $row, &$cellContent, array $attributeArray): void { if (is_string($cellContent)) { // Simple String content if (trim($cellContent) > '') { // Only actually write it if there's content in the string // Write to worksheet to be done here... - // ... we return the cell so we can mess about with styles more easily - $sheet->setCellValue($column . $row, $cellContent); + // ... we return the cell, so we can mess about with styles more easily + + // Set cell value explicitly if there is data-type attribute + if (isset($attributeArray['data-type'])) { + $datatype = $attributeArray['data-type']; + if (in_array($datatype, [DataType::TYPE_STRING, DataType::TYPE_STRING2, DataType::TYPE_INLINE])) { + //Prevent to Excel treat string with beginning equal sign or convert big numbers to scientific number + if (substr($cellContent, 0, 1) === '=') { + $sheet->getCell($column . $row) + ->getStyle() + ->setQuotePrefix(true); + } + } + //catching the Exception and ignoring the invalid data types + try { + $sheet->setCellValueExplicit($column . $row, $cellContent, $attributeArray['data-type']); + } catch (\PhpOffice\PhpSpreadsheet\Exception $exception) { + $sheet->setCellValue($column . $row, $cellContent); + } + } else { + $sheet->setCellValue($column . $row, $cellContent); + } $this->dataArray[$row][$column] = $cellContent; } } else { @@ -305,7 +327,7 @@ class Html extends BaseReader private function processDomElementBody(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child): void { $attributeArray = []; - foreach (($child->attributes ?? []) as $attribute) { + foreach ($child->attributes as $attribute) { $attributeArray[$attribute->name] = $attribute->value; } @@ -355,7 +377,7 @@ class Html extends BaseReader private function processDomElementHr(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void { if ($child->nodeName === 'hr') { - $this->flushCell($sheet, $column, $row, $cellContent); + $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray); ++$row; if (isset($this->formats[$child->nodeName])) { $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); @@ -375,7 +397,7 @@ class Html extends BaseReader $sheet->getStyle($column . $row)->getAlignment()->setWrapText(true); } else { // Otherwise flush our existing content and move the row cursor on - $this->flushCell($sheet, $column, $row, $cellContent); + $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray); ++$row; } } else { @@ -421,11 +443,11 @@ class Html extends BaseReader $this->processDomElement($child, $sheet, $row, $column, $cellContent); } else { if ($cellContent > '') { - $this->flushCell($sheet, $column, $row, $cellContent); + $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray); ++$row; } $this->processDomElement($child, $sheet, $row, $column, $cellContent); - $this->flushCell($sheet, $column, $row, $cellContent); + $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray); if (isset($this->formats[$child->nodeName])) { $sheet->getStyle($column . $row)->applyFromArray($this->formats[$child->nodeName]); @@ -448,11 +470,11 @@ class Html extends BaseReader $this->processDomElement($child, $sheet, $row, $column, $cellContent); } else { if ($cellContent > '') { - $this->flushCell($sheet, $column, $row, $cellContent); + $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray); } ++$row; $this->processDomElement($child, $sheet, $row, $column, $cellContent); - $this->flushCell($sheet, $column, $row, $cellContent); + $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray); $column = 'A'; } } else { @@ -469,10 +491,13 @@ class Html extends BaseReader } } + private string $currentColumn = 'A'; + private function processDomElementTable(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void { if ($child->nodeName === 'table') { - $this->flushCell($sheet, $column, $row, $cellContent); + $this->currentColumn = 'A'; + $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray); $column = $this->setTableStartColumn($column); if ($this->tableLevel > 1 && $row > 1) { --$row; @@ -491,7 +516,10 @@ class Html extends BaseReader private function processDomElementTr(Worksheet $sheet, int &$row, string &$column, string &$cellContent, DOMElement $child, array &$attributeArray): void { - if ($child->nodeName === 'tr') { + if ($child->nodeName === 'col') { + $this->applyInlineStyle($sheet, -1, $this->currentColumn, $attributeArray); + ++$this->currentColumn; + } elseif ($child->nodeName === 'tr') { $column = $this->getTableStartColumn(); $cellContent = ''; $this->processDomElement($child, $sheet, $row, $column, $cellContent); @@ -574,7 +602,7 @@ class Html extends BaseReader // apply inline style $this->applyInlineStyle($sheet, $row, $column, $attributeArray); - $this->flushCell($sheet, $column, $row, $cellContent); + $this->flushCell($sheet, $column, $row, $cellContent, $attributeArray); $this->processDomElementBgcolor($sheet, $row, $column, $attributeArray); $this->processDomElementWidth($sheet, $column, $attributeArray); @@ -664,10 +692,94 @@ class Html extends BaseReader if ($loaded === false) { throw new Exception('Failed to load ' . $filename . ' as a DOM Document', 0, $e ?? null); } + self::loadProperties($dom, $spreadsheet); return $this->loadDocument($dom, $spreadsheet); } + private static function loadProperties(DOMDocument $dom, Spreadsheet $spreadsheet): void + { + $properties = $spreadsheet->getProperties(); + foreach ($dom->getElementsByTagName('meta') as $meta) { + $metaContent = (string) $meta->getAttribute('content'); + if ($metaContent !== '') { + $metaName = (string) $meta->getAttribute('name'); + switch ($metaName) { + case 'author': + $properties->setCreator($metaContent); + + break; + case 'category': + $properties->setCategory($metaContent); + + break; + case 'company': + $properties->setCompany($metaContent); + + break; + case 'created': + $properties->setCreated($metaContent); + + break; + case 'description': + $properties->setDescription($metaContent); + + break; + case 'keywords': + $properties->setKeywords($metaContent); + + break; + case 'lastModifiedBy': + $properties->setLastModifiedBy($metaContent); + + break; + case 'manager': + $properties->setManager($metaContent); + + break; + case 'modified': + $properties->setModified($metaContent); + + break; + case 'subject': + $properties->setSubject($metaContent); + + break; + case 'title': + $properties->setTitle($metaContent); + + break; + default: + if (preg_match('/^custom[.](bool|date|float|int|string)[.](.+)$/', $metaName, $matches) === 1) { + switch ($matches[1]) { + case 'bool': + $properties->setCustomProperty($matches[2], (bool) $metaContent, Properties::PROPERTY_TYPE_BOOLEAN); + + break; + case 'float': + $properties->setCustomProperty($matches[2], (float) $metaContent, Properties::PROPERTY_TYPE_FLOAT); + + break; + case 'int': + $properties->setCustomProperty($matches[2], (int) $metaContent, Properties::PROPERTY_TYPE_INTEGER); + + break; + case 'date': + $properties->setCustomProperty($matches[2], $metaContent, Properties::PROPERTY_TYPE_DATE); + + break; + default: // string + $properties->setCustomProperty($matches[2], $metaContent, Properties::PROPERTY_TYPE_STRING); + } + } + } + } + } + if (!empty($dom->baseURI)) { + $properties->setHyperlinkBase($dom->baseURI); + } + } + private static function replaceNonAscii(array $matches): string { return '&#' . mb_ord($matches[0], 'UTF-8') . ';'; @@ -698,8 +810,10 @@ class Html extends BaseReader if ($loaded === false) { throw new Exception('Failed to load content as a DOM Document', 0, $e ?? null); } + $spreadsheet = $spreadsheet ?? new Spreadsheet(); + self::loadProperties($dom, $spreadsheet); - return $this->loadDocument($dom, $spreadsheet ?? new Spreadsheet()); + return $this->loadDocument($dom, $spreadsheet); } /** @@ -769,7 +883,9 @@ class Html extends BaseReader return; } - if (isset($attributeArray['rowspan'], $attributeArray['colspan'])) { + if ($row <= 0 || $column === '') { + $cellStyle = new Style(); + } elseif (isset($attributeArray['rowspan'], $attributeArray['colspan'])) { $columnTo = $column; for ($i = 0; $i < (int) $attributeArray['colspan'] - 1; ++$i) { ++$columnTo; @@ -901,16 +1017,20 @@ class Html extends BaseReader break; case 'width': - $sheet->getColumnDimension($column)->setWidth( - (new CssDimension($styleValue ?? ''))->width() - ); + if ($column !== '') { + $sheet->getColumnDimension($column)->setWidth( + (new CssDimension($styleValue ?? ''))->width() + ); + } break; case 'height': - $sheet->getRowDimension($row)->setRowHeight( - (new CssDimension($styleValue ?? ''))->height() - ); + if ($row > 0) { + $sheet->getRowDimension($row)->setRowHeight( + (new CssDimension($styleValue ?? ''))->height() + ); + } break; diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods.php index 25081540..9913f332 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Ods.php @@ -8,6 +8,7 @@ use DOMElement; use DOMNode; use PhpOffice\PhpSpreadsheet\Cell\Coordinate; use PhpOffice\PhpSpreadsheet\Cell\DataType; +use PhpOffice\PhpSpreadsheet\Helper\Dimension as HelperDimension; use PhpOffice\PhpSpreadsheet\Reader\Ods\AutoFilter; use PhpOffice\PhpSpreadsheet\Reader\Ods\DefinedNames; use PhpOffice\PhpSpreadsheet\Reader\Ods\FormulaTranslator; @@ -295,11 +296,29 @@ class Ods extends BaseReader $tableNs = $dom->lookupNamespaceUri('table'); $textNs = $dom->lookupNamespaceUri('text'); $xlinkNs = $dom->lookupNamespaceUri('xlink'); + $styleNs = $dom->lookupNamespaceUri('style'); $pageSettings->readStyleCrossReferences($dom); $autoFilterReader = new AutoFilter($spreadsheet, $tableNs); $definedNameReader = new DefinedNames($spreadsheet, $tableNs); + $columnWidths = []; + $automaticStyle0 = $dom->getElementsByTagNameNS($officeNs, 'automatic-styles')->item(0); + $automaticStyles = ($automaticStyle0 === null) ? [] : $automaticStyle0->getElementsByTagNameNS($styleNs, 'style'); + foreach ($automaticStyles as $automaticStyle) { + $styleName = $automaticStyle->getAttributeNS($styleNs, 'name'); + $styleFamily = $automaticStyle->getAttributeNS($styleNs, 'family'); + if ($styleFamily === 'table-column') { + $tcprops = $automaticStyle->getElementsByTagNameNS($styleNs, 'table-column-properties'); + if ($tcprops !== null) { + $tcprop = $tcprops->item(0); + if ($tcprop !== null) { + $columnWidth = $tcprop->getAttributeNs($styleNs, 'column-width'); + $columnWidths[$styleName] = $columnWidth; + } + } + } + } // Content $item0 = $dom->getElementsByTagNameNS($officeNs, 'body')->item(0); @@ -340,6 +359,7 @@ class Ods extends BaseReader // Go through every child of table element $rowID = 1; + $tableColumnIndex = 1; foreach ($worksheetDataSet->childNodes as $childNode) { /** @var DOMElement $childNode */ @@ -366,6 +386,26 @@ class Ods extends BaseReader // $rowData = $cellData; // break; // } + break; + case 'table-column': + if ($childNode->hasAttributeNS($tableNs, 'number-columns-repeated')) { + $rowRepeats = (int) $childNode->getAttributeNS($tableNs, 'number-columns-repeated'); + } else { + $rowRepeats = 1; + } + $tableStyleName = $childNode->getAttributeNS($tableNs, 'style-name'); + if (isset($columnWidths[$tableStyleName])) { + $columnWidth = new HelperDimension($columnWidths[$tableStyleName]); + $tableColumnString = Coordinate::stringFromColumnIndex($tableColumnIndex); + for ($rowRepeats2 = $rowRepeats; $rowRepeats2 > 0; --$rowRepeats2) { + $spreadsheet->getActiveSheet() + ->getColumnDimension($tableColumnString) + ->setWidth($columnWidth->toUnit('cm'), 'cm'); + ++$tableColumnString; + } + } + $tableColumnIndex += $rowRepeats; + break; case 'table-row': if ($childNode->hasAttributeNS($tableNs, 'number-rows-repeated')) { diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Security/XmlScanner.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Security/XmlScanner.php index ad898ae4..f8eaf39d 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Security/XmlScanner.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Security/XmlScanner.php @@ -151,7 +151,7 @@ class XmlScanner throw new Reader\Exception('Detected use of ENTITY in XML, spreadsheet file load() aborted to prevent XXE/XEE attacks'); } - if ($this->callback !== null && is_callable($this->callback)) { + if ($this->callback !== null) { $xml = call_user_func($this->callback, $xml); } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php index f35e8c3b..816e7698 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xls.php @@ -430,7 +430,7 @@ class Xls extends BaseReader */ public function canRead(string $filename): bool { - if (!File::testFileNoThrow($filename)) { + if (File::testFileNoThrow($filename) === false) { return false; } @@ -440,6 +440,9 @@ class Xls extends BaseReader // get excel data $ole->read($filename); + if ($ole->wrkbook === null) { + throw new Exception('The filename ' . $filename . ' is not recognised as a Spreadsheet file'); + } return true; } catch (PhpSpreadsheetException $e) { @@ -449,7 +452,7 @@ class Xls extends BaseReader public function setCodepage(string $codepage): void { - if (!CodePage::validate($codepage)) { + if (CodePage::validate($codepage) === false) { throw new PhpSpreadsheetException('Unknown codepage: ' . $codepage); } @@ -1097,7 +1100,7 @@ class Xls extends BaseReader // treat OBJ records foreach ($this->objs as $n => $obj) { // the first shape container never has a corresponding OBJ record, hence $n + 1 - if (isset($allSpContainers[$n + 1]) && is_object($allSpContainers[$n + 1])) { + if (isset($allSpContainers[$n + 1])) { $spContainer = $allSpContainers[$n + 1]; // we skip all spContainers that are a part of a group shape since we cannot yet handle those diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php index bf890847..1c33fd68 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx.php @@ -16,6 +16,7 @@ use PhpOffice\PhpSpreadsheet\Reader\Xlsx\Hyperlinks; use PhpOffice\PhpSpreadsheet\Reader\Xlsx\Namespaces; use PhpOffice\PhpSpreadsheet\Reader\Xlsx\PageSetup; use PhpOffice\PhpSpreadsheet\Reader\Xlsx\Properties as PropertyReader; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\SharedFormula; use PhpOffice\PhpSpreadsheet\Reader\Xlsx\SheetViewOptions; use PhpOffice\PhpSpreadsheet\Reader\Xlsx\SheetViews; use PhpOffice\PhpSpreadsheet\Reader\Xlsx\Styles; @@ -61,6 +62,11 @@ class Xlsx extends BaseReader /** @var Styles */ private $styleReader; + /** + * @var array + */ + private $sharedFormulae = []; + /** * Create a new Xlsx Reader instance. */ @@ -128,7 +134,7 @@ class Xlsx extends BaseReader if ($replaceUnclosedBr) { $contents = str_replace('
', '
', $contents); } - $rels = simplexml_load_string( + $rels = @simplexml_load_string( $this->getSecurityScannerOrThrow()->scan($contents), 'SimpleXMLElement', Settings::getLibXmlLoaderOptions(), @@ -246,6 +252,7 @@ class Xlsx extends BaseReader $xmlWorkbook = $this->loadZip($relTarget, $mainNS); if ($xmlWorkbook->sheets) { $dir = dirname($relTarget); + /** @var SimpleXMLElement $eleSheet */ foreach ($xmlWorkbook->sheets->sheet as $eleSheet) { $tmpInfo = [ @@ -261,8 +268,8 @@ class Xlsx extends BaseReader $xml = new XMLReader(); $xml->xml( - $this->getSecurityScannerOrThrow()->scanFile( - 'zip://' . File::realpath($filename) . '#' . $fileWorksheetPath + $this->getSecurityScannerOrThrow()->scan( + $this->getFromZipArchive($this->zip, $fileWorksheetPath) ), null, Settings::getLibXmlLoaderOptions() @@ -324,13 +331,13 @@ class Xlsx extends BaseReader * @param mixed $value * @param mixed $calculatedValue */ - private function castToFormula(?SimpleXMLElement $c, string $r, string &$cellDataType, &$value, &$calculatedValue, array &$sharedFormulas, string $castBaseType): void + private function castToFormula(?SimpleXMLElement $c, string $r, string &$cellDataType, &$value, &$calculatedValue, string $castBaseType, bool $updateSharedCells = true): void { if ($c === null) { return; } $attr = $c->f->attributes(); - $cellDataType = 'f'; + $cellDataType = DataType::TYPE_FORMULA; $value = "={$c->f}"; $calculatedValue = self::$castBaseType($c); @@ -338,17 +345,19 @@ class Xlsx extends BaseReader if (isset($attr['t']) && strtolower((string) $attr['t']) == 'shared') { $instance = (string) $attr['si']; - if (!isset($sharedFormulas[(string) $attr['si']])) { - $sharedFormulas[$instance] = ['master' => $r, 'formula' => $value]; - } else { - $master = Coordinate::indexesFromString($sharedFormulas[$instance]['master']); + if (!isset($this->sharedFormulae[(string) $attr['si']])) { + $this->sharedFormulae[$instance] = new SharedFormula($r, $value); + } elseif ($updateSharedCells === true) { + // It's only worth the overhead of adjusting the shared formula for this cell if we're actually loading + // the cell, which may not be the case if we're using a read filter. + $master = Coordinate::indexesFromString($this->sharedFormulae[$instance]->master()); $current = Coordinate::indexesFromString($r); $difference = [0, 0]; $difference[0] = $current[0] - $master[0]; $difference[1] = $current[1] - $master[1]; - $value = $this->referenceHelper->updateFormulaReferences($sharedFormulas[$instance]['formula'], 'A1', $difference[0], $difference[1]); + $value = $this->referenceHelper->updateFormulaReferences($this->sharedFormulae[$instance]->formula(), 'A1', $difference[0], $difference[1]); } } } @@ -395,12 +404,18 @@ class Xlsx extends BaseReader // Sadly, some 3rd party xlsx generators don't use consistent case for filenaming // so we need to load case-insensitively from the zip file - // Apache POI fixes $contents = $archive->getFromName($fileName, 0, ZipArchive::FL_NOCASE); + + // Apache POI fixes if ($contents === false) { $contents = $archive->getFromName(substr($fileName, 1), 0, ZipArchive::FL_NOCASE); } + // Has the file been saved with Windoze directory separators rather than unix? + if ($contents === false) { + $contents = $archive->getFromName(str_replace('/', '\\', $fileName), 0, ZipArchive::FL_NOCASE); + } + return ($contents === false) ? '' : $contents; } @@ -447,6 +462,7 @@ class Xlsx extends BaseReader $colourScheme = self::getAttributes($xmlTheme->themeElements->clrScheme); $colourSchemeName = (string) $colourScheme['name']; + $excel->getTheme()->setThemeColorName($colourSchemeName); $colourScheme = $xmlTheme->themeElements->clrScheme->children($drawingNS); $themeColours = []; @@ -458,14 +474,46 @@ class Xlsx extends BaseReader if (isset($xmlColour->sysClr)) { $xmlColourData = self::getAttributes($xmlColour->sysClr); $themeColours[$themePos] = (string) $xmlColourData['lastClr']; + $excel->getTheme()->setThemeColor($k, (string) $xmlColourData['lastClr']); } elseif (isset($xmlColour->srgbClr)) { $xmlColourData = self::getAttributes($xmlColour->srgbClr); $themeColours[$themePos] = (string) $xmlColourData['val']; + $excel->getTheme()->setThemeColor($k, (string) $xmlColourData['val']); } } $theme = new Theme($themeName, $colourSchemeName, $themeColours); $this->styleReader->setTheme($theme); + $fontScheme = self::getAttributes($xmlTheme->themeElements->fontScheme); + $fontSchemeName = (string) $fontScheme['name']; + $excel->getTheme()->setThemeFontName($fontSchemeName); + $majorFonts = []; + $minorFonts = []; + $fontScheme = $xmlTheme->themeElements->fontScheme->children($drawingNS); + $majorLatin = self::getAttributes($fontScheme->majorFont->latin)['typeface'] ?? ''; + $majorEastAsian = self::getAttributes($fontScheme->majorFont->ea)['typeface'] ?? ''; + $majorComplexScript = self::getAttributes($fontScheme->majorFont->cs)['typeface'] ?? ''; + $minorLatin = self::getAttributes($fontScheme->minorFont->latin)['typeface'] ?? ''; + $minorEastAsian = self::getAttributes($fontScheme->minorFont->ea)['typeface'] ?? ''; + $minorComplexScript = self::getAttributes($fontScheme->minorFont->cs)['typeface'] ?? ''; + + foreach ($fontScheme->majorFont->font as $xmlFont) { + $fontAttributes = self::getAttributes($xmlFont); + $script = (string) ($fontAttributes['script'] ?? ''); + if (!empty($script)) { + $majorFonts[$script] = (string) ($fontAttributes['typeface'] ?? ''); + } + } + foreach ($fontScheme->minorFont->font as $xmlFont) { + $fontAttributes = self::getAttributes($xmlFont); + $script = (string) ($fontAttributes['script'] ?? ''); + if (!empty($script)) { + $minorFonts[$script] = (string) ($fontAttributes['typeface'] ?? ''); + } + } + $excel->getTheme()->setMajorFontValues($majorLatin, $majorEastAsian, $majorComplexScript, $majorFonts); + $excel->getTheme()->setMinorFontValues($minorLatin, $minorEastAsian, $minorComplexScript, $minorFonts); + break; } } @@ -477,6 +525,10 @@ class Xlsx extends BaseReader foreach ($rels->Relationship as $relx) { $rel = self::getAttributes($relx); $relTarget = (string) $rel['Target']; + // issue 3553 + if ($relTarget[0] === '/') { + $relTarget = substr($relTarget, 1); + } $relType = (string) $rel['Type']; $mainNS = self::REL_TO_MAIN[$relType] ?? Namespaces::MAIN; switch ($relType) { @@ -507,26 +559,6 @@ class Xlsx extends BaseReader $relsWorkbook = $this->loadZip("$dir/_rels/" . basename($relTarget) . '.rels', ''); $relsWorkbook->registerXPathNamespace('rel', Namespaces::RELATIONSHIPS); - $sharedStrings = []; - $relType = "rel:Relationship[@Type='" - //. Namespaces::SHARED_STRINGS - . "$xmlNamespaceBase/sharedStrings" - . "']"; - $xpath = self::getArrayItem($relsWorkbook->xpath($relType)); - - if ($xpath) { - $xmlStrings = $this->loadZip("$dir/$xpath[Target]", $mainNS); - if (isset($xmlStrings->si)) { - foreach ($xmlStrings->si as $val) { - if (isset($val->t)) { - $sharedStrings[] = StringHelper::controlCharacterOOXML2PHP((string) $val->t); - } elseif (isset($val->r)) { - $sharedStrings[] = $this->parseRichText($val); - } - } - } - } - $worksheets = []; $macros = $customUI = null; foreach ($relsWorkbook->Relationship as $elex) { @@ -618,7 +650,7 @@ class Xlsx extends BaseReader $numFmt = NumberFormat::builtInFormatCode((int) $xf['numFmtId']); } } - $quotePrefix = (bool) ($xf['quotePrefix'] ?? false); + $quotePrefix = (bool) (string) ($xf['quotePrefix'] ?? ''); $style = (object) [ 'numFmt' => $numFmt ?? NumberFormat::FORMAT_GENERAL, @@ -653,7 +685,7 @@ class Xlsx extends BaseReader } } - $quotePrefix = (bool) ($xf['quotePrefix'] ?? false); + $quotePrefix = (bool) (string) ($xf['quotePrefix'] ?? ''); $cellStyle = (object) [ 'numFmt' => $numFmt, @@ -682,6 +714,27 @@ class Xlsx extends BaseReader $dxfs = $this->styleReader->dxfs($this->readDataOnly); $styles = $this->styleReader->styles(); + // Read content after setting the styles + $sharedStrings = []; + $relType = "rel:Relationship[@Type='" + //. Namespaces::SHARED_STRINGS + . "$xmlNamespaceBase/sharedStrings" + . "']"; + $xpath = self::getArrayItem($relsWorkbook->xpath($relType)); + + if ($xpath) { + $xmlStrings = $this->loadZip("$dir/$xpath[Target]", $mainNS); + if (isset($xmlStrings->si)) { + foreach ($xmlStrings->si as $val) { + if (isset($val->t)) { + $sharedStrings[] = StringHelper::controlCharacterOOXML2PHP((string) $val->t); + } elseif (isset($val->r)) { + $sharedStrings[] = $this->parseRichText($val); + } + } + } + } + $xmlWorkbook = $this->loadZipNoNamespace($relTarget, $mainNS); $xmlWorkbookNS = $this->loadZip($relTarget, $mainNS); @@ -743,7 +796,8 @@ class Xlsx extends BaseReader $xmlSheet = $this->loadZipNoNamespace("$dir/$fileWorksheet", $mainNS); $xmlSheetNS = $this->loadZip("$dir/$fileWorksheet", $mainNS); - $sharedFormulas = []; + // Shared Formula table is unique to each Worksheet, so we need to reset it here + $this->sharedFormulae = []; if (isset($eleSheetAttr['state']) && (string) $eleSheetAttr['state'] != '') { $docSheet->setSheetState((string) $eleSheetAttr['state']); @@ -789,8 +843,12 @@ class Xlsx extends BaseReader $coordinates = Coordinate::coordinateFromString($r); if (!$this->getReadFilter()->readCell($coordinates[0], (int) $coordinates[1], $docSheet->getTitle())) { - if (isset($cAttr->f)) { - $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToError'); + // Normally, just testing for the f attribute should identify this cell as containing a formula + // that we need to read, even though it is outside of the filter range, in case it is a shared formula. + // But in some cases, this attribute isn't set; so we need to delve a level deeper and look at + // whether or not the cell has a child formula element that is shared. + if (isset($cAttr->f) || (isset($c->f, $c->f->attributes()['t']) && strtolower((string) $c->f->attributes()['t']) === 'shared')) { + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, 'castToError', false); } ++$rowIndex; @@ -822,7 +880,7 @@ class Xlsx extends BaseReader } } else { // Formula - $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToBoolean'); + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, 'castToBoolean'); if (isset($c->f['t'])) { $att = $c->f; $docSheet->getCell($r)->setFormulaAttributes($att); @@ -832,7 +890,7 @@ class Xlsx extends BaseReader break; case 'inlineStr': if (isset($c->f)) { - $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToError'); + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, 'castToError'); } else { $value = $this->parseRichText($c->is); } @@ -843,7 +901,7 @@ class Xlsx extends BaseReader $value = self::castToError($c); } else { // Formula - $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToError'); + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, 'castToError'); } break; @@ -852,7 +910,7 @@ class Xlsx extends BaseReader $value = self::castToString($c); } else { // Formula - $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, $sharedFormulas, 'castToString'); + $this->castToFormula($c, $r, $cellDataType, $value, $calculatedValue, 'castToString'); if (isset($c->f['t'])) { $attributes = $c->f['t']; $docSheet->getCell($r)->setFormulaAttributes(['t' => (string) $attributes]); @@ -891,6 +949,10 @@ class Xlsx extends BaseReader // no style index means 0, it seems $cell->setXfIndex(isset($styles[(int) ($cAttr['s'])]) ? (int) ($cAttr['s']) : 0); + // issue 3495 + if ($cell->getDataType() === DataType::TYPE_FORMULA) { + $cell->getStyle()->setQuotePrefix(false); + } } } ++$rowIndex; @@ -898,6 +960,12 @@ class Xlsx extends BaseReader ++$cIndex; } } + if ($xmlSheetNS && $xmlSheetNS->ignoredErrors) { + foreach ($xmlSheetNS->ignoredErrors->ignoredError as $ignoredErrorx) { + $ignoredError = self::testSimpleXml($ignoredErrorx); + $this->processIgnoredErrors($ignoredError, $docSheet); + } + } if (!$this->readDataOnly && $xmlSheetNS && $xmlSheetNS->sheetProtection) { $protAttr = $xmlSheetNS->sheetProtection->attributes() ?? []; @@ -2205,4 +2273,48 @@ class Xlsx extends BaseReader return $array; } + + private function processIgnoredErrors(SimpleXMLElement $xml, Worksheet $sheet): void + { + $attributes = self::getAttributes($xml); + $sqref = (string) ($attributes['sqref'] ?? ''); + $numberStoredAsText = (string) ($attributes['numberStoredAsText'] ?? ''); + $formula = (string) ($attributes['formula'] ?? ''); + $twoDigitTextYear = (string) ($attributes['twoDigitTextYear'] ?? ''); + $evalError = (string) ($attributes['evalError'] ?? ''); + if (!empty($sqref)) { + $explodedSqref = explode(' ', $sqref); + $pattern1 = '/^([A-Z]{1,3})([0-9]{1,7})(:([A-Z]{1,3})([0-9]{1,7}))?$/'; + foreach ($explodedSqref as $sqref1) { + if (preg_match($pattern1, $sqref1, $matches) === 1) { + $firstRow = $matches[2]; + $firstCol = $matches[1]; + if (array_key_exists(3, $matches)) { + $lastCol = $matches[4]; + $lastRow = $matches[5]; + } else { + $lastCol = $firstCol; + $lastRow = $firstRow; + } + ++$lastCol; + for ($row = $firstRow; $row <= $lastRow; ++$row) { + for ($col = $firstCol; $col !== $lastCol; ++$col) { + if ($numberStoredAsText === '1') { + $sheet->getCell("$col$row")->getIgnoredErrors()->setNumberStoredAsText(true); + } + if ($formula === '1') { + $sheet->getCell("$col$row")->getIgnoredErrors()->setFormula(true); + } + if ($twoDigitTextYear === '1') { + $sheet->getCell("$col$row")->getIgnoredErrors()->setTwoDigitTextYear(true); + } + if ($evalError === '1') { + $sheet->getCell("$col$row")->getIgnoredErrors()->setEvalError(true); + } + } + } + } + } + } + } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Chart.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Chart.php index 5230cf0d..c5a59f55 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Chart.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Chart.php @@ -4,6 +4,7 @@ namespace PhpOffice\PhpSpreadsheet\Reader\Xlsx; use PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError; use PhpOffice\PhpSpreadsheet\Chart\Axis; +use PhpOffice\PhpSpreadsheet\Chart\AxisText; use PhpOffice\PhpSpreadsheet\Chart\ChartColor; use PhpOffice\PhpSpreadsheet\Chart\DataSeries; use PhpOffice\PhpSpreadsheet\Chart\DataSeriesValues; @@ -76,16 +77,28 @@ class Chart $yAxis = new Axis(); $autoTitleDeleted = null; $chartNoFill = false; + $chartBorderLines = null; + $chartFillColor = null; $gradientArray = []; $gradientLin = null; $roundedCorners = false; + $gapWidth = null; + $useUpBars = null; + $useDownBars = null; foreach ($chartElementsC as $chartElementKey => $chartElement) { switch ($chartElementKey) { case 'spPr': - $possibleNoFill = $chartElementsC->spPr->children($this->aNamespace); - if (isset($possibleNoFill->noFill)) { + $children = $chartElementsC->spPr->children($this->aNamespace); + if (isset($children->noFill)) { $chartNoFill = true; } + if (isset($children->solidFill)) { + $chartFillColor = $this->readColor($children->solidFill); + } + if (isset($children->ln)) { + $chartBorderLines = new GridLines(); + $this->readLineStyle($chartElementsC, $chartBorderLines); + } break; case 'roundedCorners': @@ -157,6 +170,9 @@ class Chart $axisColorArray = $this->readColor($sppr->solidFill); $xAxis->setFillParameters($axisColorArray['value'], $axisColorArray['alpha'], $axisColorArray['type']); } + if (isset($chartDetail->spPr->ln->noFill)) { + $xAxis->setNoFill(true); + } } if (isset($chartDetail->majorGridlines)) { $majorGridlines = new GridLines(); @@ -227,6 +243,9 @@ class Chart $axisColorArray = $this->readColor($sppr->solidFill); $whichAxis->setFillParameters($axisColorArray['value'], $axisColorArray['alpha'], $axisColorArray['type']); } + if (isset($sppr->ln->noFill)) { + $whichAxis->setNoFill(true); + } } if ($whichAxis !== null && isset($chartDetail->majorGridlines)) { $majorGridlines = new GridLines(); @@ -316,6 +335,15 @@ class Chart break; case 'stockChart': $plotSeries[] = $this->chartDataSeries($chartDetail, $chartDetailKey); + if (isset($chartDetail->upDownBars->gapWidth)) { + $gapWidth = self::getAttribute($chartDetail->upDownBars->gapWidth, 'val', 'integer'); + } + if (isset($chartDetail->upDownBars->upBars)) { + $useUpBars = true; + } + if (isset($chartDetail->upDownBars->downBars)) { + $useDownBars = true; + } $plotAttributes = $this->readChartAttributes($chartDetail); break; @@ -332,6 +360,15 @@ class Chart if (!empty($gradientArray)) { $plotArea->setGradientFillProperties($gradientArray, $gradientLin); } + if (is_int($gapWidth)) { + $plotArea->setGapWidth($gapWidth); + } + if ($useUpBars === true) { + $plotArea->setUseUpBars(true); + } + if ($useDownBars === true) { + $plotArea->setUseDownBars(true); + } break; case 'plotVisOnly': @@ -350,6 +387,10 @@ class Chart $legendPos = 'r'; $legendLayout = null; $legendOverlay = false; + $legendBorderLines = null; + $legendFillColor = null; + $legendText = null; + $addLegendText = false; foreach ($chartDetails as $chartDetailKey => $chartDetail) { $chartDetail = Xlsx::testSimpleXml($chartDetail); switch ($chartDetailKey) { @@ -364,10 +405,45 @@ class Chart case 'layout': $legendLayout = $this->chartLayoutDetails($chartDetail); + break; + case 'spPr': + $children = $chartDetails->spPr->children($this->aNamespace); + if (isset($children->solidFill)) { + $legendFillColor = $this->readColor($children->solidFill); + } + if (isset($children->ln)) { + $legendBorderLines = new GridLines(); + $this->readLineStyle($chartDetails, $legendBorderLines); + } + + break; + case 'txPr': + $children = $chartDetails->txPr->children($this->aNamespace); + $addLegendText = false; + $legendText = new AxisText(); + if (isset($children->p->pPr->defRPr->solidFill)) { + $colorArray = $this->readColor($children->p->pPr->defRPr->solidFill); + $legendText->getFillColorObject()->setColorPropertiesArray($colorArray); + $addLegendText = true; + } + if (isset($children->p->pPr->defRPr->effectLst)) { + $this->readEffects($children->p->pPr->defRPr, $legendText, false); + $addLegendText = true; + } + break; } } $legend = new Legend("$legendPos", $legendLayout, (bool) $legendOverlay); + if ($legendFillColor !== null) { + $legend->getFillColor()->setColorPropertiesArray($legendFillColor); + } + if ($legendBorderLines !== null) { + $legend->setBorderLines($legendBorderLines); + } + if ($addLegendText) { + $legend->setLegendText($legendText); + } break; } @@ -378,6 +454,12 @@ class Chart if ($chartNoFill) { $chart->setNoFill(true); } + if ($chartFillColor !== null) { + $chart->getFillColor()->setColorPropertiesArray($chartFillColor); + } + if ($chartBorderLines !== null) { + $chart->setBorderLines($chartBorderLines); + } $chart->setRoundedCorners($roundedCorners); if (is_bool($autoTitleDeleted)) { $chart->setAutoTitleDeleted($autoTitleDeleted); @@ -1082,6 +1164,37 @@ class Chart return $value; } + private function parseFont(SimpleXMLElement $titleDetailPart): ?Font + { + if (!isset($titleDetailPart->pPr->defRPr)) { + return null; + } + $fontArray = []; + $fontArray['size'] = self::getAttribute($titleDetailPart->pPr->defRPr, 'sz', 'integer'); + $fontArray['bold'] = self::getAttribute($titleDetailPart->pPr->defRPr, 'b', 'boolean'); + $fontArray['italic'] = self::getAttribute($titleDetailPart->pPr->defRPr, 'i', 'boolean'); + $fontArray['underscore'] = self::getAttribute($titleDetailPart->pPr->defRPr, 'u', 'string'); + $fontArray['strikethrough'] = self::getAttribute($titleDetailPart->pPr->defRPr, 'strike', 'string'); + + if (isset($titleDetailPart->pPr->defRPr->latin)) { + $fontArray['latin'] = self::getAttribute($titleDetailPart->pPr->defRPr->latin, 'typeface', 'string'); + } + if (isset($titleDetailPart->pPr->defRPr->ea)) { + $fontArray['eastAsian'] = self::getAttribute($titleDetailPart->pPr->defRPr->ea, 'typeface', 'string'); + } + if (isset($titleDetailPart->pPr->defRPr->cs)) { + $fontArray['complexScript'] = self::getAttribute($titleDetailPart->pPr->defRPr->cs, 'typeface', 'string'); + } + if (isset($titleDetailPart->pPr->defRPr->solidFill)) { + $fontArray['chartColor'] = new ChartColor($this->readColor($titleDetailPart->pPr->defRPr->solidFill)); + } + $font = new Font(); + $font->setSize(null, true); + $font->applyFromArray($fontArray); + + return $font; + } + /** * @param ?SimpleXMLElement $chartDetail */ @@ -1128,8 +1241,13 @@ class Chart } if (isset($chartDetail->dLbls->txPr)) { $txpr = $chartDetail->dLbls->txPr->children($this->aNamespace); - if (isset($txpr->p->pPr->defRPr->solidFill)) { - $plotAttributes['labelFontColor'] = new ChartColor($this->readColor($txpr->p->pPr->defRPr->solidFill)); + if (isset($txpr->p)) { + $plotAttributes['labelFont'] = $this->parseFont($txpr->p); + if (isset($txpr->p->pPr->defRPr->effectLst)) { + $labelEffects = new GridLines(); + $this->readEffects($txpr->p->pPr->defRPr, $labelEffects, false); + $plotAttributes['labelEffects'] = $labelEffects; + } } } } @@ -1176,13 +1294,19 @@ class Chart } } - private function readEffects(SimpleXMLElement $chartDetail, ?ChartProperties $chartObject): void + private function readEffects(SimpleXMLElement $chartDetail, ?ChartProperties $chartObject, bool $getSppr = true): void { - if (!isset($chartObject, $chartDetail->spPr)) { + if (!isset($chartObject)) { return; } - $sppr = $chartDetail->spPr->children($this->aNamespace); - + if ($getSppr) { + if (!isset($chartDetail->spPr)) { + return; + } + $sppr = $chartDetail->spPr->children($this->aNamespace); + } else { + $sppr = $chartDetail; + } if (isset($sppr->effectLst->glow)) { $axisGlowSize = (float) self::getAttribute($sppr->effectLst->glow, 'rad', 'integer') / ChartProperties::POINTS_WIDTH_MULTIPLIER; if ($axisGlowSize != 0.0) { @@ -1412,13 +1536,30 @@ class Chart } if (isset($chartDetail->txPr)) { $children = $chartDetail->txPr->children($this->aNamespace); + $addAxisText = false; + $axisText = new AxisText(); if (isset($children->bodyPr)) { /** @var string */ $textRotation = self::getAttribute($children->bodyPr, 'rot', 'string'); if (is_numeric($textRotation)) { - $whichAxis->setAxisOption('textRotation', (string) ChartProperties::xmlToAngle($textRotation)); + $axisText->setRotation((int) ChartProperties::xmlToAngle($textRotation)); + $addAxisText = true; } } + if (isset($children->p->pPr->defRPr)) { + $font = $this->parseFont($children->p); + if ($font !== null) { + $axisText->setFont($font); + $addAxisText = true; + } + } + if (isset($children->p->pPr->defRPr->effectLst)) { + $this->readEffects($children->p->pPr->defRPr, $axisText, false); + $addAxisText = true; + } + if ($addAxisText) { + $whichAxis->setAxisText($axisText); + } } } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php index dac76230..210c322f 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/DataValidations.php @@ -22,6 +22,18 @@ class DataValidations public function load(): void { + foreach ($this->worksheetXml->dataValidations->dataValidation as $dataValidation) { + // Uppercase coordinate + $range = strtoupper((string) $dataValidation['sqref']); + $rangeSet = explode(' ', $range); + foreach ($rangeSet as $range) { + if (preg_match('/^[A-Z]{1,3}\\d{1,7}/', $range, $matches) === 1) { + // Ensure left/top row of range exists, thereby + // adjusting high row/column. + $this->worksheet->getCell($matches[0]); + } + } + } foreach ($this->worksheetXml->dataValidations->dataValidation as $dataValidation) { // Uppercase coordinate $range = strtoupper((string) $dataValidation['sqref']); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Properties.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Properties.php index 72addffd..0d4701af 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Properties.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Properties.php @@ -73,6 +73,9 @@ class Properties if (isset($xmlCore->Manager)) { $this->docProps->setManager((string) $xmlCore->Manager); } + if (isset($xmlCore->HyperlinkBase)) { + $this->docProps->setHyperlinkBase((string) $xmlCore->HyperlinkBase); + } } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SharedFormula.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SharedFormula.php new file mode 100644 index 00000000..fb7a3932 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/SharedFormula.php @@ -0,0 +1,26 @@ +master = $master; + $this->formula = $formula; + } + + public function master(): string + { + return $this->master; + } + + public function formula(): string + { + return $this->formula; + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Styles.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Styles.php index 705b319e..5a360fda 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Styles.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xlsx/Styles.php @@ -136,6 +136,10 @@ class Styles extends BaseParserClass } } } + if (isset($fontStyleXml->scheme)) { + $attr = $this->getStyleAttributes($fontStyleXml->scheme); + $fontStyle->setScheme((string) $attr['val']); + } } private function readNumberFormat(NumberFormat $numfmtStyle, SimpleXMLElement $numfmtStyleXml): void @@ -253,10 +257,14 @@ class Styles extends BaseParserClass public function readAlignmentStyle(Alignment $alignment, SimpleXMLElement $alignmentXml): void { - $horizontal = $this->getAttribute($alignmentXml, 'horizontal'); - $alignment->setHorizontal($horizontal); - $vertical = $this->getAttribute($alignmentXml, 'vertical'); - $alignment->setVertical((string) $vertical); + $horizontal = (string) $this->getAttribute($alignmentXml, 'horizontal'); + if ($horizontal !== '') { + $alignment->setHorizontal($horizontal); + } + $vertical = (string) $this->getAttribute($alignmentXml, 'vertical'); + if ($vertical !== '') { + $alignment->setVertical($vertical); + } $textRotation = (int) $this->getAttribute($alignmentXml, 'textRotation'); if ($textRotation > 90) { diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml.php index 9cce7003..6be26fc2 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml.php @@ -9,6 +9,7 @@ use PhpOffice\PhpSpreadsheet\Cell\Coordinate; use PhpOffice\PhpSpreadsheet\Cell\DataType; use PhpOffice\PhpSpreadsheet\DefinedName; use PhpOffice\PhpSpreadsheet\Reader\Security\XmlScanner; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\Namespaces; use PhpOffice\PhpSpreadsheet\Reader\Xml\PageSettings; use PhpOffice\PhpSpreadsheet\Reader\Xml\Properties; use PhpOffice\PhpSpreadsheet\Reader\Xml\Style; @@ -26,6 +27,8 @@ use SimpleXMLElement; */ class Xml extends BaseReader { + public const NAMESPACES_SS = 'urn:schemas-microsoft-com:office:spreadsheet'; + /** * Formats. * @@ -146,11 +149,9 @@ class Xml extends BaseReader throw new Exception("Problem reading {$filename}"); } - $namespaces = $xml->getNamespaces(true); - - $xml_ss = $xml->children($namespaces['ss']); + $xml_ss = $xml->children(self::NAMESPACES_SS); foreach ($xml_ss->Worksheet as $worksheet) { - $worksheet_ss = self::getAttributes($worksheet, $namespaces['ss']); + $worksheet_ss = self::getAttributes($worksheet, self::NAMESPACES_SS); $worksheetNames[] = (string) $worksheet_ss['Name']; } @@ -178,12 +179,10 @@ class Xml extends BaseReader throw new Exception("Problem reading {$filename}"); } - $namespaces = $xml->getNamespaces(true); - $worksheetID = 1; - $xml_ss = $xml->children($namespaces['ss']); + $xml_ss = $xml->children(self::NAMESPACES_SS); foreach ($xml_ss->Worksheet as $worksheet) { - $worksheet_ss = self::getAttributes($worksheet, $namespaces['ss']); + $worksheet_ss = self::getAttributes($worksheet, self::NAMESPACES_SS); $tmpInfo = []; $tmpInfo['worksheetName'] = ''; @@ -231,6 +230,19 @@ class Xml extends BaseReader return $worksheetInfo; } + /** + * Loads Spreadsheet from string. + */ + public function loadSpreadsheetFromString(string $contents): Spreadsheet + { + // Create new Spreadsheet + $spreadsheet = new Spreadsheet(); + $spreadsheet->removeSheetByIndex(0); + + // Load into this instance + return $this->loadIntoExisting($contents, $spreadsheet, true); + } + /** * Loads Spreadsheet from file. */ @@ -245,17 +257,19 @@ class Xml extends BaseReader } /** - * Loads from file into Spreadsheet instance. + * Loads from file or contents into Spreadsheet instance. * - * @param string $filename - * - * @return Spreadsheet + * @param string $filename file name if useContents is false else file contents */ - public function loadIntoExisting($filename, Spreadsheet $spreadsheet) + public function loadIntoExisting(string $filename, Spreadsheet $spreadsheet, bool $useContents = false): Spreadsheet { - File::assertFile($filename); - if (!$this->canRead($filename)) { - throw new Exception($filename . ' is an Invalid Spreadsheet file.'); + if ($useContents) { + $this->fileContents = $filename; + } else { + File::assertFile($filename); + if (!$this->canRead($filename)) { + throw new Exception($filename . ' is an Invalid Spreadsheet file.'); + } } $xml = $this->trySimpleXMLLoadString($filename); @@ -268,14 +282,17 @@ class Xml extends BaseReader (new Properties($spreadsheet))->readProperties($xml, $namespaces); $this->styles = (new Style())->parseStyles($xml, $namespaces); + if (isset($this->styles['Default'])) { + $spreadsheet->getCellXfCollection()[0]->applyFromArray($this->styles['Default']); + } $worksheetID = 0; - $xml_ss = $xml->children($namespaces['ss']); + $xml_ss = $xml->children(self::NAMESPACES_SS); /** @var null|SimpleXMLElement $worksheetx */ foreach ($xml_ss->Worksheet as $worksheetx) { $worksheet = $worksheetx ?? new SimpleXMLElement(''); - $worksheet_ss = self::getAttributes($worksheet, $namespaces['ss']); + $worksheet_ss = self::getAttributes($worksheet, self::NAMESPACES_SS); if ( isset($this->loadSheetsOnly, $worksheet_ss['Name']) && @@ -295,11 +312,15 @@ class Xml extends BaseReader // the worksheet name in line with the formula, not the reverse $spreadsheet->getActiveSheet()->setTitle($worksheetName, false, false); } + if (isset($worksheet_ss['Protected'])) { + $protection = (string) $worksheet_ss['Protected'] === '1'; + $spreadsheet->getActiveSheet()->getProtection()->setSheet($protection); + } // locally scoped defined names if (isset($worksheet->Names[0])) { foreach ($worksheet->Names[0] as $definedName) { - $definedName_ss = self::getAttributes($definedName, $namespaces['ss']); + $definedName_ss = self::getAttributes($definedName, self::NAMESPACES_SS); $name = (string) $definedName_ss['Name']; $definedValue = (string) $definedName_ss['RefersTo']; $convertedValue = AddressHelper::convertFormulaToA1($definedValue); @@ -313,15 +334,35 @@ class Xml extends BaseReader $columnID = 'A'; if (isset($worksheet->Table->Column)) { foreach ($worksheet->Table->Column as $columnData) { - $columnData_ss = self::getAttributes($columnData, $namespaces['ss']); + $columnData_ss = self::getAttributes($columnData, self::NAMESPACES_SS); + $colspan = 0; + if (isset($columnData_ss['Span'])) { + $spanAttr = (string) $columnData_ss['Span']; + if (is_numeric($spanAttr)) { + $colspan = max(0, (int) $spanAttr); + } + } if (isset($columnData_ss['Index'])) { $columnID = Coordinate::stringFromColumnIndex((int) $columnData_ss['Index']); } + $columnWidth = null; if (isset($columnData_ss['Width'])) { $columnWidth = $columnData_ss['Width']; - $spreadsheet->getActiveSheet()->getColumnDimension($columnID)->setWidth($columnWidth / 5.4); } - ++$columnID; + $columnVisible = null; + if (isset($columnData_ss['Hidden'])) { + $columnVisible = ((string) $columnData_ss['Hidden']) !== '1'; + } + while ($colspan >= 0) { + if (isset($columnWidth)) { + $spreadsheet->getActiveSheet()->getColumnDimension($columnID)->setWidth($columnWidth / 5.4); + } + if (isset($columnVisible)) { + $spreadsheet->getActiveSheet()->getColumnDimension($columnID)->setVisible($columnVisible); + } + ++$columnID; + --$colspan; + } } } @@ -330,14 +371,18 @@ class Xml extends BaseReader $additionalMergedCells = 0; foreach ($worksheet->Table->Row as $rowData) { $rowHasData = false; - $row_ss = self::getAttributes($rowData, $namespaces['ss']); + $row_ss = self::getAttributes($rowData, self::NAMESPACES_SS); if (isset($row_ss['Index'])) { $rowID = (int) $row_ss['Index']; } + if (isset($row_ss['Hidden'])) { + $rowVisible = ((string) $row_ss['Hidden']) !== '1'; + $spreadsheet->getActiveSheet()->getRowDimension($rowID)->setVisible($rowVisible); + } $columnID = 'A'; foreach ($rowData->Cell as $cell) { - $cell_ss = self::getAttributes($cell, $namespaces['ss']); + $cell_ss = self::getAttributes($cell, self::NAMESPACES_SS); if (isset($cell_ss['Index'])) { $columnID = Coordinate::stringFromColumnIndex((int) $cell_ss['Index']); } @@ -379,7 +424,7 @@ class Xml extends BaseReader $cellData = $cell->Data; $cellValue = (string) $cellData; $type = DataType::TYPE_NULL; - $cellData_ss = self::getAttributes($cellData, $namespaces['ss']); + $cellData_ss = self::getAttributes($cellData, self::NAMESPACES_SS); if (isset($cellData_ss['Type'])) { $cellDataType = $cellData_ss['Type']; switch ($cellDataType) { @@ -437,7 +482,7 @@ class Xml extends BaseReader } if (isset($cell->Comment)) { - $this->parseCellComment($cell->Comment, $namespaces, $spreadsheet, $columnID, $rowID); + $this->parseCellComment($cell->Comment, $spreadsheet, $columnID, $rowID); } if (isset($cell_ss['StyleID'])) { @@ -466,11 +511,57 @@ class Xml extends BaseReader ++$rowID; } + } - if (isset($namespaces['x'])) { - $xmlX = $worksheet->children($namespaces['x']); - if (isset($xmlX->WorksheetOptions)) { - (new PageSettings($xmlX, $namespaces))->loadPageSettings($spreadsheet); + $dataValidations = new Xml\DataValidations(); + $dataValidations->loadDataValidations($worksheet, $spreadsheet); + $xmlX = $worksheet->children(Namespaces::URN_EXCEL); + if (isset($xmlX->WorksheetOptions)) { + if (isset($xmlX->WorksheetOptions->FreezePanes)) { + $freezeRow = $freezeColumn = 1; + if (isset($xmlX->WorksheetOptions->SplitHorizontal)) { + $freezeRow = (int) $xmlX->WorksheetOptions->SplitHorizontal + 1; + } + if (isset($xmlX->WorksheetOptions->SplitVertical)) { + $freezeColumn = (int) $xmlX->WorksheetOptions->SplitVertical + 1; + } + $spreadsheet->getActiveSheet()->freezePane(Coordinate::stringFromColumnIndex($freezeColumn) . (string) $freezeRow); + } + (new PageSettings($xmlX))->loadPageSettings($spreadsheet); + if (isset($xmlX->WorksheetOptions->TopRowVisible, $xmlX->WorksheetOptions->LeftColumnVisible)) { + $leftTopRow = (string) $xmlX->WorksheetOptions->TopRowVisible; + $leftTopColumn = (string) $xmlX->WorksheetOptions->LeftColumnVisible; + if (is_numeric($leftTopRow) && is_numeric($leftTopColumn)) { + $leftTopCoordinate = Coordinate::stringFromColumnIndex((int) $leftTopColumn + 1) . (string) ($leftTopRow + 1); + $spreadsheet->getActiveSheet()->setTopLeftCell($leftTopCoordinate); + } + } + $rangeCalculated = false; + if (isset($xmlX->WorksheetOptions->Panes->Pane->RangeSelection)) { + if (1 === preg_match('/^R(\d+)C(\d+):R(\d+)C(\d+)$/', (string) $xmlX->WorksheetOptions->Panes->Pane->RangeSelection, $selectionMatches)) { + $selectedCell = Coordinate::stringFromColumnIndex((int) $selectionMatches[2]) + . $selectionMatches[1] + . ':' + . Coordinate::stringFromColumnIndex((int) $selectionMatches[4]) + . $selectionMatches[3]; + $spreadsheet->getActiveSheet()->setSelectedCells($selectedCell); + $rangeCalculated = true; + } + } + if (!$rangeCalculated) { + if (isset($xmlX->WorksheetOptions->Panes->Pane->ActiveRow)) { + $activeRow = (string) $xmlX->WorksheetOptions->Panes->Pane->ActiveRow; + } else { + $activeRow = 0; + } + if (isset($xmlX->WorksheetOptions->Panes->Pane->ActiveCol)) { + $activeColumn = (string) $xmlX->WorksheetOptions->Panes->Pane->ActiveCol; + } else { + $activeColumn = 0; + } + if (is_numeric($activeRow) && is_numeric($activeColumn)) { + $selectedCell = Coordinate::stringFromColumnIndex((int) $activeColumn + 1) . (string) ($activeRow + 1); + $spreadsheet->getActiveSheet()->setSelectedCells($selectedCell); } } } @@ -478,10 +569,14 @@ class Xml extends BaseReader } // Globally scoped defined names - $activeWorksheet = $spreadsheet->setActiveSheetIndex(0); + $activeSheetIndex = 0; + if (isset($xml->ExcelWorkbook->ActiveSheet)) { + $activeSheetIndex = (int) (string) $xml->ExcelWorkbook->ActiveSheet; + } + $activeWorksheet = $spreadsheet->setActiveSheetIndex($activeSheetIndex); if (isset($xml->Names[0])) { foreach ($xml->Names[0] as $definedName) { - $definedName_ss = self::getAttributes($definedName, $namespaces['ss']); + $definedName_ss = self::getAttributes($definedName, self::NAMESPACES_SS); $name = (string) $definedName_ss['Name']; $definedValue = (string) $definedName_ss['RefersTo']; $convertedValue = AddressHelper::convertFormulaToA1($definedValue); @@ -498,12 +593,11 @@ class Xml extends BaseReader protected function parseCellComment( SimpleXMLElement $comment, - array $namespaces, Spreadsheet $spreadsheet, string $columnID, int $rowID ): void { - $commentAttributes = $comment->attributes($namespaces['ss']); + $commentAttributes = $comment->attributes(self::NAMESPACES_SS); $author = 'unknown'; if (isset($commentAttributes->Author)) { $author = (string) $commentAttributes->Author; diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/DataValidations.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/DataValidations.php new file mode 100644 index 00000000..31748cb9 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/DataValidations.php @@ -0,0 +1,177 @@ + DataValidation::OPERATOR_BETWEEN, + 'equal' => DataValidation::OPERATOR_EQUAL, + 'greater' => DataValidation::OPERATOR_GREATERTHAN, + 'greaterorequal' => DataValidation::OPERATOR_GREATERTHANOREQUAL, + 'less' => DataValidation::OPERATOR_LESSTHAN, + 'lessorequal' => DataValidation::OPERATOR_LESSTHANOREQUAL, + 'notbetween' => DataValidation::OPERATOR_NOTBETWEEN, + 'notequal' => DataValidation::OPERATOR_NOTEQUAL, + ]; + + private const TYPE_MAPPINGS = [ + 'textlength' => DataValidation::TYPE_TEXTLENGTH, + ]; + + private int $thisRow = 0; + + private int $thisColumn = 0; + + private function replaceR1C1(array $matches): string + { + return AddressHelper::convertToA1($matches[0], $this->thisRow, $this->thisColumn, false); + } + + public function loadDataValidations(SimpleXMLElement $worksheet, Spreadsheet $spreadsheet): void + { + $xmlX = $worksheet->children(Namespaces::URN_EXCEL); + $sheet = $spreadsheet->getActiveSheet(); + /** @var callable */ + $pregCallback = [$this, 'replaceR1C1']; + foreach ($xmlX->DataValidation as $dataValidation) { + $cells = []; + $validation = new DataValidation(); + + // set defaults + $validation->setShowDropDown(true); + $validation->setShowInputMessage(true); + $validation->setShowErrorMessage(true); + $validation->setShowDropDown(true); + $this->thisRow = 1; + $this->thisColumn = 1; + + foreach ($dataValidation as $tagName => $tagValue) { + $tagValue = (string) $tagValue; + $tagValueLower = strtolower($tagValue); + switch ($tagName) { + case 'Range': + foreach (explode(',', $tagValue) as $range) { + $cell = ''; + if (preg_match('/^R(\d+)C(\d+):R(\d+)C(\d+)$/', (string) $range, $selectionMatches) === 1) { + // range + $firstCell = Coordinate::stringFromColumnIndex((int) $selectionMatches[2]) + . $selectionMatches[1]; + $cell = $firstCell + . ':' + . Coordinate::stringFromColumnIndex((int) $selectionMatches[4]) + . $selectionMatches[3]; + $this->thisRow = (int) $selectionMatches[1]; + $this->thisColumn = (int) $selectionMatches[2]; + $sheet->getCell($firstCell); + } elseif (preg_match('/^R(\d+)C(\d+)$/', (string) $range, $selectionMatches) === 1) { + // cell + $cell = Coordinate::stringFromColumnIndex((int) $selectionMatches[2]) + . $selectionMatches[1]; + $sheet->getCell($cell); + $this->thisRow = (int) $selectionMatches[1]; + $this->thisColumn = (int) $selectionMatches[2]; + } elseif (preg_match('/^C(\d+)$/', (string) $range, $selectionMatches) === 1) { + // column + $firstCell = Coordinate::stringFromColumnIndex((int) $selectionMatches[1]) + . '1'; + $cell = $firstCell + . ':' + . Coordinate::stringFromColumnIndex((int) $selectionMatches[1]) + . ((string) AddressRange::MAX_ROW); + $this->thisColumn = (int) $selectionMatches[1]; + $sheet->getCell($firstCell); + } elseif (preg_match('/^R(\d+)$/', (string) $range, $selectionMatches)) { + // row + $firstCell = 'A' + . $selectionMatches[1]; + $cell = $firstCell + . ':' + . AddressRange::MAX_COLUMN + . $selectionMatches[1]; + $this->thisRow = (int) $selectionMatches[1]; + $sheet->getCell($firstCell); + } + + $validation->setSqref($cell); + $stRange = $sheet->shrinkRangeToFit($cell); + $cells = array_merge($cells, Coordinate::extractAllCellReferencesInRange($stRange)); + } + + break; + case 'Type': + $validation->setType(self::TYPE_MAPPINGS[$tagValueLower] ?? $tagValueLower); + + break; + case 'Qualifier': + $validation->setOperator(self::OPERATOR_MAPPINGS[$tagValueLower] ?? $tagValueLower); + + break; + case 'InputTitle': + $validation->setPromptTitle($tagValue); + + break; + case 'InputMessage': + $validation->setPrompt($tagValue); + + break; + case 'InputHide': + $validation->setShowInputMessage(false); + + break; + case 'ErrorStyle': + $validation->setErrorStyle($tagValueLower); + + break; + case 'ErrorTitle': + $validation->setErrorTitle($tagValue); + + break; + case 'ErrorMessage': + $validation->setError($tagValue); + + break; + case 'ErrorHide': + $validation->setShowErrorMessage(false); + + break; + case 'ComboHide': + $validation->setShowDropDown(false); + + break; + case 'UseBlank': + $validation->setAllowBlank(true); + + break; + case 'CellRangeList': + // FIXME missing FIXME + + break; + case 'Min': + case 'Value': + $tagValue = (string) preg_replace_callback(AddressHelper::R1C1_COORDINATE_REGEX, $pregCallback, $tagValue); + $validation->setFormula1($tagValue); + + break; + case 'Max': + $tagValue = (string) preg_replace_callback(AddressHelper::R1C1_COORDINATE_REGEX, $pregCallback, $tagValue); + $validation->setFormula2($tagValue); + + break; + } + } + + foreach ($cells as $cell) { + $sheet->getCell($cell)->setDataValidation(clone $validation); + } + } + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/PageSettings.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/PageSettings.php index 39535c3e..137cabaf 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/PageSettings.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/PageSettings.php @@ -2,6 +2,7 @@ namespace PhpOffice\PhpSpreadsheet\Reader\Xml; +use PhpOffice\PhpSpreadsheet\Reader\Xlsx\Namespaces; use PhpOffice\PhpSpreadsheet\Spreadsheet; use PhpOffice\PhpSpreadsheet\Worksheet\PageSetup; use SimpleXMLElement; @@ -14,9 +15,9 @@ class PageSettings */ private $printSettings; - public function __construct(SimpleXMLElement $xmlX, array $namespaces) + public function __construct(SimpleXMLElement $xmlX) { - $printSettings = $this->pageSetup($xmlX, $namespaces, $this->getPrintDefaults()); + $printSettings = $this->pageSetup($xmlX, $this->getPrintDefaults()); $this->printSettings = $this->printSetup($xmlX, $printSettings); } @@ -56,13 +57,13 @@ class PageSettings ]; } - private function pageSetup(SimpleXMLElement $xmlX, array $namespaces, stdClass $printDefaults): stdClass + private function pageSetup(SimpleXMLElement $xmlX, stdClass $printDefaults): stdClass { if (isset($xmlX->WorksheetOptions->PageSetup)) { foreach ($xmlX->WorksheetOptions->PageSetup as $pageSetupData) { foreach ($pageSetupData as $pageSetupKey => $pageSetupValue) { /** @scrutinizer ignore-call */ - $pageSetupAttributes = $pageSetupValue->attributes($namespaces['x']); + $pageSetupAttributes = $pageSetupValue->attributes(Namespaces::URN_EXCEL); if ($pageSetupAttributes !== null) { switch ($pageSetupKey) { case 'Layout': diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Properties.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Properties.php index f0346ed0..e216c254 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Properties.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Properties.php @@ -92,6 +92,10 @@ class Properties case 'Manager': $docProps->setManager($stringValue); + break; + case 'HyperlinkBase': + $docProps->setHyperlinkBase($stringValue); + break; case 'Keywords': $docProps->setKeywords($stringValue); @@ -110,17 +114,10 @@ class Properties ?SimpleXMLElement $propertyValue, SimpleXMLElement $propertyAttributes ): void { - $propertyType = DocumentProperties::PROPERTY_TYPE_UNKNOWN; - switch ((string) $propertyAttributes) { - case 'string': - $propertyType = DocumentProperties::PROPERTY_TYPE_STRING; - $propertyValue = trim((string) $propertyValue); - - break; case 'boolean': $propertyType = DocumentProperties::PROPERTY_TYPE_BOOLEAN; - $propertyValue = (bool) $propertyValue; + $propertyValue = (bool) (string) $propertyValue; break; case 'integer': @@ -134,9 +131,15 @@ class Properties break; case 'dateTime.tz': + case 'dateTime.iso8601tz': $propertyType = DocumentProperties::PROPERTY_TYPE_DATE; $propertyValue = trim((string) $propertyValue); + break; + default: + $propertyType = DocumentProperties::PROPERTY_TYPE_STRING; + $propertyValue = trim((string) $propertyValue); + break; } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style.php index 774fffe8..698acf6a 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style.php @@ -2,6 +2,7 @@ namespace PhpOffice\PhpSpreadsheet\Reader\Xml; +use PhpOffice\PhpSpreadsheet\Style\Protection; use SimpleXMLElement; class Style @@ -30,7 +31,7 @@ class Style $styleID = (string) $style_ss['ID']; $this->styles[$styleID] = $this->styles['Default'] ?? []; - $alignment = $border = $font = $fill = $numberFormat = []; + $alignment = $border = $font = $fill = $numberFormat = $protection = []; foreach ($style as $styleType => $styleDatax) { $styleData = self::getSxml($styleDatax); @@ -64,11 +65,31 @@ class Style $numberFormat = $numberFormatStyleParser->parseStyle($styleAttributes); } + break; + case 'Protection': + $locked = $hidden = null; + $styleAttributesP = $styleData->attributes($namespaces['x']); + if (isset($styleAttributes['Protected'])) { + $locked = ((bool) (string) $styleAttributes['Protected']) ? Protection::PROTECTION_PROTECTED : Protection::PROTECTION_UNPROTECTED; + } + if (isset($styleAttributesP['HideFormula'])) { + $hidden = ((bool) (string) $styleAttributesP['HideFormula']) ? Protection::PROTECTION_PROTECTED : Protection::PROTECTION_UNPROTECTED; + } + if ($locked !== null || $hidden !== null) { + $protection['protection'] = []; + if ($locked !== null) { + $protection['protection']['locked'] = $locked; + } + if ($hidden !== null) { + $protection['protection']['hidden'] = $hidden; + } + } + break; } } - $this->styles[$styleID] = array_merge($alignment, $border, $font, $fill, $numberFormat); + $this->styles[$styleID] = array_merge($alignment, $border, $font, $fill, $numberFormat, $protection); } return $this->styles; diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style/Font.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style/Font.php index 16ab44d8..5f824889 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style/Font.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Xml/Style/Font.php @@ -56,11 +56,11 @@ class Font extends StyleBase break; case 'Bold': - $style['font']['bold'] = true; + $style['font']['bold'] = $styleAttributeValue === '1'; break; case 'Italic': - $style['font']['italic'] = true; + $style['font']['italic'] = $styleAttributeValue === '1'; break; case 'Underline': diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/ReferenceHelper.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/ReferenceHelper.php index b4d4d52a..90eee534 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/ReferenceHelper.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/ReferenceHelper.php @@ -75,14 +75,11 @@ class ReferenceHelper * * @return int */ - public static function columnReverseSort($a, $b) + public static function columnReverseSort(string $a, string $b) { return -strcasecmp(strlen($a) . $a, strlen($b) . $b); } - /** @var int */ - private static $scrutinizer0 = 0; - /** * Compare two cell addresses * Intended for use as a Callback function for sorting cell addresses by column and row. @@ -92,16 +89,16 @@ class ReferenceHelper * * @return int */ - public static function cellSort($a, $b) + public static function cellSort(string $a, string $b) { - $ac = $bc = ''; - $ar = self::$scrutinizer0; - $br = 0; + /** @scrutinizer be-damned */ sscanf($a, '%[A-Z]%d', $ac, $ar); + /** @var int $ar */ + /** @var string $ac */ + /** @scrutinizer be-damned */ sscanf($b, '%[A-Z]%d', $bc, $br); - - $ac = (string) $ac; - $bc = (string) $bc; + /** @var int $br */ + /** @var string $bc */ if ($ar === $br) { return strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc); } @@ -118,16 +115,16 @@ class ReferenceHelper * * @return int */ - public static function cellReverseSort($a, $b) + public static function cellReverseSort(string $a, string $b) { - $ac = $bc = ''; - $ar = self::$scrutinizer0; - $br = 0; + /** @scrutinizer be-damned */ sscanf($a, '%[A-Z]%d', $ac, $ar); + /** @var int $ar */ + /** @var string $ac */ + /** @scrutinizer be-damned */ sscanf($b, '%[A-Z]%d', $bc, $br); - - $ac = (string) $ac; - $bc = (string) $bc; + /** @var int $br */ + /** @var string $bc */ if ($ar === $br) { return -strcasecmp(strlen($ac) . $ac, strlen($bc) . $bc); } @@ -142,7 +139,7 @@ class ReferenceHelper * @param int $numberOfColumns Number of columns to insert/delete (negative values indicate deletion) * @param int $numberOfRows Number of rows to insert/delete (negative values indicate deletion) */ - protected function adjustPageBreaks(Worksheet $worksheet, $numberOfColumns, $numberOfRows): void + protected function adjustPageBreaks(Worksheet $worksheet, int $numberOfColumns, int $numberOfRows): void { $aBreaks = $worksheet->getBreaks(); ($numberOfColumns > 0 || $numberOfRows > 0) @@ -171,7 +168,7 @@ class ReferenceHelper * * @param Worksheet $worksheet The worksheet that we're editing */ - protected function adjustComments($worksheet): void + protected function adjustComments(Worksheet $worksheet): void { $aComments = $worksheet->getComments(); $aNewComments = []; // the new array of all comments @@ -195,7 +192,7 @@ class ReferenceHelper * @param int $numberOfColumns Number of columns to insert/delete (negative values indicate deletion) * @param int $numberOfRows Number of rows to insert/delete (negative values indicate deletion) */ - protected function adjustHyperlinks($worksheet, $numberOfColumns, $numberOfRows): void + protected function adjustHyperlinks(Worksheet $worksheet, int $numberOfColumns, int $numberOfRows): void { $aHyperlinkCollection = $worksheet->getHyperlinkCollection(); ($numberOfColumns > 0 || $numberOfRows > 0) @@ -220,7 +217,7 @@ class ReferenceHelper * @param int $numberOfColumns Number of columns to insert/delete (negative values indicate deletion) * @param int $numberOfRows Number of rows to insert/delete (negative values indicate deletion) */ - protected function adjustConditionalFormatting($worksheet, $numberOfColumns, $numberOfRows): void + protected function adjustConditionalFormatting(Worksheet $worksheet, int $numberOfColumns, int $numberOfRows): void { $aStyles = $worksheet->getConditionalStylesCollection(); ($numberOfColumns > 0 || $numberOfRows > 0) @@ -259,7 +256,7 @@ class ReferenceHelper * @param int $numberOfColumns Number of columns to insert/delete (negative values indicate deletion) * @param int $numberOfRows Number of rows to insert/delete (negative values indicate deletion) */ - protected function adjustDataValidations(Worksheet $worksheet, $numberOfColumns, $numberOfRows): void + protected function adjustDataValidations(Worksheet $worksheet, int $numberOfColumns, int $numberOfRows): void { $aDataValidationCollection = $worksheet->getDataValidationCollection(); ($numberOfColumns > 0 || $numberOfRows > 0) @@ -299,7 +296,7 @@ class ReferenceHelper * @param int $numberOfColumns Number of columns to insert/delete (negative values indicate deletion) * @param int $numberOfRows Number of rows to insert/delete (negative values indicate deletion) */ - protected function adjustProtectedCells(Worksheet $worksheet, $numberOfColumns, $numberOfRows): void + protected function adjustProtectedCells(Worksheet $worksheet, int $numberOfColumns, int $numberOfRows): void { $aProtectedCells = $worksheet->getProtectedCells(); ($numberOfColumns > 0 || $numberOfRows > 0) @@ -412,7 +409,7 @@ class ReferenceHelper $cellCollection = $worksheet->getCellCollection(); $missingCoordinates = array_filter( array_map(function ($row) use ($highestColumn) { - return $highestColumn . $row; + return "{$highestColumn}{$row}"; }, range(1, $highestRow)), function ($coordinate) use ($cellCollection) { return $cellCollection->has($coordinate) === false; @@ -453,9 +450,9 @@ class ReferenceHelper if ($cell->getDataType() === DataType::TYPE_FORMULA) { // Formula should be adjusted $worksheet->getCell($newCoordinate) - ->setValue($this->updateFormulaReferences($cell->getValue(), $beforeCellAddress, $numberOfColumns, $numberOfRows, $worksheet->getTitle())); + ->setValue($this->updateFormulaReferences($cell->getValue(), $beforeCellAddress, $numberOfColumns, $numberOfRows, $worksheet->getTitle(), true)); } else { - // Formula should not be adjusted + // Cell value should not be adjusted $worksheet->getCell($newCoordinate)->setValueExplicit($cell->getValue(), $cell->getDataType()); } @@ -463,10 +460,10 @@ class ReferenceHelper $worksheet->getCellCollection()->delete($coordinate); } else { /* We don't need to update styles for rows/columns before our insertion position, - but we do still need to adjust any formulae in those cells */ + but we do still need to adjust any formulae in those cells */ if ($cell->getDataType() === DataType::TYPE_FORMULA) { // Formula should be adjusted - $cell->setValue($this->updateFormulaReferences($cell->getValue(), $beforeCellAddress, $numberOfColumns, $numberOfRows, $worksheet->getTitle())); + $cell->setValue($this->updateFormulaReferences($cell->getValue(), $beforeCellAddress, $numberOfColumns, $numberOfRows, $worksheet->getTitle(), true)); } } } @@ -609,7 +606,7 @@ class ReferenceHelper // Max worksheet size is 1,048,576 rows by 16,384 columns in Excel 2007, so our adjustments need to be at least one digit more $column = 100000; $row = 10000000 + (int) trim($match[3], '$'); - $cellIndex = $column . $row; + $cellIndex = "{$column}{$row}"; $newCellTokens[$cellIndex] = preg_quote($toString, '/'); $cellTokens[$cellIndex] = '/(?getValue(); $asFormula = ($cellAddress[0] === '='); if ($definedName->getWorksheet() !== null && $definedName->getWorksheet()->getHashCode() === $worksheet->getHashCode()) { + /** + * If we delete the entire range that is referenced by a Named Range, MS Excel sets the value to #REF! + * PhpSpreadsheet still only does a basic adjustment, so the Named Range will still reference Cells. + * Note that this applies only when deleting columns/rows; subsequent insertion won't fix the #REF! + * TODO Can we work out a method to identify Named Ranges that cease to be valid, so that we can replace + * them with a #REF! + */ if ($asFormula === true) { - $formula = $this->updateFormulaReferences($cellAddress, $beforeCellAddress, $numberOfColumns, $numberOfRows, $worksheet->getTitle()); + $formula = $this->updateFormulaReferences($cellAddress, $beforeCellAddress, $numberOfColumns, $numberOfRows, $worksheet->getTitle(), true); $definedName->setValue($formula); } else { - $definedName->setValue($this->updateCellReference(ltrim($cellAddress, '='))); + $definedName->setValue($this->updateCellReference(ltrim($cellAddress, '='), true)); } } } @@ -929,8 +933,15 @@ class ReferenceHelper private function updateNamedFormula(DefinedName $definedName, Worksheet $worksheet, string $beforeCellAddress, int $numberOfColumns, int $numberOfRows): void { if ($definedName->getWorksheet() !== null && $definedName->getWorksheet()->getHashCode() === $worksheet->getHashCode()) { + /** + * If we delete the entire range that is referenced by a Named Formula, MS Excel sets the value to #REF! + * PhpSpreadsheet still only does a basic adjustment, so the Named Formula will still reference Cells. + * Note that this applies only when deleting columns/rows; subsequent insertion won't fix the #REF! + * TODO Can we work out a method to identify Named Ranges that cease to be valid, so that we can replace + * them with a #REF! + */ $formula = $definedName->getValue(); - $formula = $this->updateFormulaReferences($formula, $beforeCellAddress, $numberOfColumns, $numberOfRows, $worksheet->getTitle()); + $formula = $this->updateFormulaReferences($formula, $beforeCellAddress, $numberOfColumns, $numberOfRows, $worksheet->getTitle(), true); $definedName->setValue($formula); } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/TextElement.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/TextElement.php index 23733436..ee693a2b 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/TextElement.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/RichText/TextElement.php @@ -47,7 +47,7 @@ class TextElement implements ITextElement } /** - * Get font. + * Get font. For this class, the return value is always null. * * @return null|\PhpOffice\PhpSpreadsheet\Style\Font */ diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Settings.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Settings.php index 0baf4463..d8007fd0 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Settings.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Settings.php @@ -155,7 +155,7 @@ class Settings /** * Sets the implementation of cache that should be used for cell collection. */ - public static function setCache(CacheInterface $cache): void + public static function setCache(?CacheInterface $cache): void { self::$cache = $cache; } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php index 26dde93f..4f196731 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Date.php @@ -184,7 +184,7 @@ class Date throw new Exception("Invalid string $value supplied for datatype Date"); } - if (preg_match('/^\\d\\d:\\d\\d:\\d\\d/', $value) == 1) { + if (preg_match('/^\\s*\\d?\\d:\\d\\d(:\\d\\d([.]\\d+)?)?\\s*(am|pm)?\\s*$/i', $value) == 1) { $newValue = fmod($newValue, 1.0); } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/File.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/File.php index f2fe8caa..737a6eb5 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/File.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/File.php @@ -156,7 +156,11 @@ class File if ($zipMember !== '') { $zipfile = "zip://$filename#$zipMember"; if (!self::fileExists($zipfile)) { - throw new ReaderException("Could not find zip member $zipfile"); + // Has the file been saved with Windoze directory separators rather than unix? + $zipfile = "zip://$filename#" . str_replace('/', '\\', $zipMember); + if (!self::fileExists($zipfile)) { + throw new ReaderException("Could not find zip member $zipfile"); + } } } } @@ -180,6 +184,14 @@ class File return self::validateZipFirst4($filename); } - return self::fileExists("zip://$filename#$zipMember"); + $zipfile = "zip://$filename#$zipMember"; + if (self::fileExists($zipfile)) { + return true; + } + + // Has the file been saved with Windoze directory separators rather than unix? + $zipfile = "zip://$filename#" . str_replace('/', '\\', $zipMember); + + return self::fileExists($zipfile); } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Font.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Font.php index aa3512ae..90c1992a 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Font.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Font.php @@ -380,15 +380,15 @@ class Font $approximate = self::$autoSizeMethod === self::AUTOSIZE_METHOD_APPROX; $columnWidth = 0; if (!$approximate) { - $columnWidthAdjust = ceil( - self::getTextWidthPixelsExact( - str_repeat('n', 1 * (($filterAdjustment ? 3 : 1) + ($indentAdjustment * 2))), - $font, - 0 - ) * 1.07 - ); - try { + $columnWidthAdjust = ceil( + self::getTextWidthPixelsExact( + str_repeat('n', 1 * (($filterAdjustment ? 3 : 1) + ($indentAdjustment * 2))), + $font, + 0 + ) * 1.07 + ); + // Width of text in pixels excl. padding // and addition because Excel adds some padding, just use approx width of 'n' glyph $columnWidth = self::getTextWidthPixelsExact($cellText, $font, $rotation) + $columnWidthAdjust; @@ -453,29 +453,26 @@ class Font $fontName = $font->getName(); $fontSize = $font->getSize(); - // Calculate column width in pixels. We assume fixed glyph width. Result varies with font name and size. + // Calculate column width in pixels. + // We assume fixed glyph width, but count double for "fullwidth" characters. + // Result varies with font name and size. switch ($fontName) { - case 'Calibri': - // value 8.26 was found via interpolation by inspecting real Excel files with Calibri 11 font. - $columnWidth = (int) (8.26 * StringHelper::countCharacters($columnText)); - $columnWidth = $columnWidth * $fontSize / 11; // extrapolate from font size - - break; case 'Arial': // value 8 was set because of experience in different exports at Arial 10 font. - $columnWidth = (int) (8 * StringHelper::countCharacters($columnText)); + $columnWidth = (int) (8 * StringHelper::countCharactersDbcs($columnText)); $columnWidth = $columnWidth * $fontSize / 10; // extrapolate from font size break; case 'Verdana': // value 8 was found via interpolation by inspecting real Excel files with Verdana 10 font. - $columnWidth = (int) (8 * StringHelper::countCharacters($columnText)); + $columnWidth = (int) (8 * StringHelper::countCharactersDbcs($columnText)); $columnWidth = $columnWidth * $fontSize / 10; // extrapolate from font size break; default: // just assume Calibri - $columnWidth = (int) (8.26 * StringHelper::countCharacters($columnText)); + // value 8.26 was found via interpolation by inspecting real Excel files with Calibri 11 font. + $columnWidth = (int) (8.26 * StringHelper::countCharactersDbcs($columnText)); $columnWidth = $columnWidth * $fontSize / 11; // extrapolate from font size break; @@ -564,10 +561,13 @@ class Font if (mb_strlen(self::$trueTypeFontPath) > 1 && mb_substr(self::$trueTypeFontPath, -1) !== '/' && mb_substr(self::$trueTypeFontPath, -1) !== '\\') { $separator = DIRECTORY_SEPARATOR; } - $fontFile = self::$trueTypeFontPath . $separator . $fontFile; + $fontFileAbsolute = preg_match('~^([A-Za-z]:)?[/\\\\]~', $fontFile) === 1; + if (!$fontFileAbsolute) { + $fontFile = self::$trueTypeFontPath . $separator . $fontFile; + } // Check if file actually exists - if ($checkPath && !file_exists($fontFile)) { + if ($checkPath && !file_exists($fontFile) && !$fontFileAbsolute) { $alternateName = $name; if ($index !== 'x' && $fontArray[$name][$index] !== $fontArray[$name]['x']) { // Bold but no italic: diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php index c61ee259..5d5babc3 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLE/ChainedBlockStream.php @@ -6,6 +6,9 @@ use PhpOffice\PhpSpreadsheet\Shared\OLE; class ChainedBlockStream { + /** @var mixed */ + public $context; + /** * The OLE container of the file that is being read. * @@ -160,7 +163,7 @@ class ChainedBlockStream $this->pos = $offset; } elseif ($whence == SEEK_CUR && -$offset <= $this->pos) { $this->pos += $offset; - // @phpstan-ignore-next-line + // @phpstan-ignore-next-line } elseif ($whence == SEEK_END && -$offset <= count(/** @scrutinizer ignore-type */ $this->data)) { $this->pos = strlen($this->data) + $offset; } else { diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLERead.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLERead.php index 3d952a9c..fcc96395 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLERead.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/OLERead.php @@ -134,7 +134,7 @@ class OLERead $bbdBlocks = $this->numBigBlockDepotBlocks; - if ($this->numExtensionBlocks != 0) { + if ($this->numExtensionBlocks !== 0) { $bbdBlocks = (self::BIG_BLOCK_SIZE - self::BIG_BLOCK_DEPOT_BLOCKS_POS) / 4; } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/StringHelper.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/StringHelper.php index 30bd8c5f..c6c198e2 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/StringHelper.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/StringHelper.php @@ -451,6 +451,18 @@ class StringHelper return mb_strlen($textValue, $encoding); } + /** + * Get character count using mb_strwidth rather than mb_strlen. + * + * @param string $encoding Encoding + * + * @return int Character count + */ + public static function countCharactersDbcs(string $textValue, string $encoding = 'UTF-8'): int + { + return mb_strwidth($textValue, $encoding); + } + /** * Get a substring of a UTF-8 encoded string. * diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/Trend.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/Trend.php index b94609af..117848c7 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/Trend.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/Trend.php @@ -105,7 +105,6 @@ class Trend $className = '\PhpOffice\PhpSpreadsheet\Shared\Trend\\' . $trendType . 'BestFit'; //* @phpstan-ignore-next-line $bestFit[$trendMethod] = new $className($yValues, $xValues, $const); - //* @phpstan-ignore-next-line $bestFitValue[$trendMethod] = $bestFit[$trendMethod]->getGoodnessOfFit(); } if ($trendType != self::TREND_BEST_FIT_NO_POLY) { diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Spreadsheet.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Spreadsheet.php index f0744cd2..11090855 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Spreadsheet.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Spreadsheet.php @@ -203,6 +203,14 @@ class Spreadsheet implements JsonSerializable */ private $tabRatio = 600; + /** @var Theme */ + private $theme; + + public function getTheme(): Theme + { + return $this->theme; + } + /** * The workbook has macros ? * @@ -476,6 +484,7 @@ class Spreadsheet implements JsonSerializable { $this->uniqueID = uniqid('', true); $this->calculationEngine = new Calculation($this); + $this->theme = new Theme(); // Initialise worksheet collection and add one worksheet $this->workSheetCollection = []; @@ -1654,4 +1663,26 @@ class Spreadsheet implements JsonSerializable { throw new Exception('Spreadsheet objects cannot be json encoded'); } + + public function resetThemeFonts(): void + { + $majorFontLatin = $this->theme->getMajorFontLatin(); + $minorFontLatin = $this->theme->getMinorFontLatin(); + foreach ($this->cellXfCollection as $cellStyleXf) { + $scheme = $cellStyleXf->getFont()->getScheme(); + if ($scheme === 'major') { + $cellStyleXf->getFont()->setName($majorFontLatin)->setScheme($scheme); + } elseif ($scheme === 'minor') { + $cellStyleXf->getFont()->setName($minorFontLatin)->setScheme($scheme); + } + } + foreach ($this->cellStyleXfCollection as $cellStyleXf) { + $scheme = $cellStyleXf->getFont()->getScheme(); + if ($scheme === 'major') { + $cellStyleXf->getFont()->setName($majorFontLatin)->setScheme($scheme); + } elseif ($scheme === 'minor') { + $cellStyleXf->getFont()->setName($minorFontLatin)->setScheme($scheme); + } + } + } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Color.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Color.php index 3c002b27..282defc0 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Color.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Color.php @@ -362,23 +362,8 @@ class Color extends Supervisor $green = self::getGreen($hexColourValue, false); /** @var int $blue */ $blue = self::getBlue($hexColourValue, false); - if ($adjustPercentage > 0) { - $red += (255 - $red) * $adjustPercentage; - $green += (255 - $green) * $adjustPercentage; - $blue += (255 - $blue) * $adjustPercentage; - } else { - $red += $red * $adjustPercentage; - $green += $green * $adjustPercentage; - $blue += $blue * $adjustPercentage; - } - $rgb = strtoupper( - str_pad(dechex((int) $red), 2, '0', 0) . - str_pad(dechex((int) $green), 2, '0', 0) . - str_pad(dechex((int) $blue), 2, '0', 0) - ); - - return (($rgba) ? 'FF' : '') . $rgb; + return (($rgba) ? 'FF' : '') . RgbTint::rgbAndTintToRgb($red, $green, $blue, $adjustPercentage); } /** diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Conditional.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Conditional.php index de565d34..36069b00 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Conditional.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Conditional.php @@ -248,7 +248,7 @@ class Conditional implements IComparable /** * Set Conditions. * - * @param bool|float|int|string|(bool|float|int|string)[] $conditions Condition + * @param (bool|float|int|string)[]|bool|float|int|string $conditions Condition * * @return $this */ diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Font.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Font.php index 3d7bc1bc..a8eeaa98 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Font.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Font.php @@ -107,6 +107,9 @@ class Font extends Supervisor */ public $colorIndex; + /** @var string */ + protected $scheme = ''; + /** * Create a new Font. * @@ -231,6 +234,12 @@ class Font extends Supervisor if (isset($styleArray['size'])) { $this->setSize($styleArray['size']); } + if (isset($styleArray['chartColor'])) { + $this->chartColor = $styleArray['chartColor']; + } + if (isset($styleArray['scheme'])) { + $this->setScheme($styleArray['scheme']); + } } return $this; @@ -278,13 +287,11 @@ class Font extends Supervisor } /** - * Set Name. + * Set Name and turn off Scheme. * * @param string $fontname - * - * @return $this */ - public function setName($fontname) + public function setName($fontname): self { if ($fontname == '') { $fontname = 'Calibri'; @@ -296,7 +303,7 @@ class Font extends Supervisor $this->name = $fontname; } - return $this; + return $this->setScheme(''); } public function setLatin(string $fontname): self @@ -634,6 +641,13 @@ class Font extends Supervisor return $this; } + public function setChartColorFromObject(?ChartColor $chartColor): self + { + $this->chartColor = $chartColor; + + return $this; + } + /** * Get Underline. * @@ -774,6 +788,7 @@ class Font extends Supervisor $this->underline . ($this->strikethrough ? 't' : 'f') . $this->color->getHashCode() . + $this->scheme . implode( '*', [ @@ -802,6 +817,7 @@ class Font extends Supervisor $this->exportArray2($exportedArray, 'italic', $this->getItalic()); $this->exportArray2($exportedArray, 'latin', $this->getLatin()); $this->exportArray2($exportedArray, 'name', $this->getName()); + $this->exportArray2($exportedArray, 'scheme', $this->getScheme()); $this->exportArray2($exportedArray, 'size', $this->getSize()); $this->exportArray2($exportedArray, 'strikethrough', $this->getStrikethrough()); $this->exportArray2($exportedArray, 'strikeType', $this->getStrikeType()); @@ -812,4 +828,27 @@ class Font extends Supervisor return $exportedArray; } + + public function getScheme(): string + { + if ($this->isSupervisor) { + return $this->getSharedComponent()->getScheme(); + } + + return $this->scheme; + } + + public function setScheme(string $scheme): self + { + if ($scheme === '' || $scheme === 'major' || $scheme === 'minor') { + if ($this->isSupervisor) { + $styleArray = $this->getStyleArray(['scheme' => $scheme]); + $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($styleArray); + } else { + $this->scheme = $scheme; + } + } + + return $this; + } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Formatter.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Formatter.php index de3666ae..41a17151 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Formatter.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Formatter.php @@ -3,6 +3,7 @@ namespace PhpOffice\PhpSpreadsheet\Style\NumberFormat; use PhpOffice\PhpSpreadsheet\Calculation\Calculation; +use PhpOffice\PhpSpreadsheet\Reader\Xls\Color\BIFF8; use PhpOffice\PhpSpreadsheet\RichText\RichText; use PhpOffice\PhpSpreadsheet\Style\Color; use PhpOffice\PhpSpreadsheet\Style\NumberFormat; @@ -67,14 +68,19 @@ class Formatter // 3 sections: [POSITIVE/TEXT] [NEGATIVE] [ZERO] // 4 sections: [POSITIVE] [NEGATIVE] [ZERO] [TEXT] $sectionCount = count($sections); - $color_regex = '/\\[(' . implode('|', Color::NAMED_COLORS) . ')\\]/mui'; + // Colour could be a named colour, or a numeric index entry in the colour-palette + $color_regex = '/\\[(' . implode('|', Color::NAMED_COLORS) . '|color\\s*(\\d+))\\]/mui'; $cond_regex = '/\\[(>|>=|<|<=|=|<>)([+-]?\\d+([.]\\d+)?)\\]/'; $colors = ['', '', '', '', '']; $conditionOperations = ['', '', '', '', '']; $conditionComparisonValues = [0, 0, 0, 0, 0]; for ($idx = 0; $idx < $sectionCount; ++$idx) { if (preg_match($color_regex, $sections[$idx], $matches)) { - $colors[$idx] = $matches[0]; + if (isset($matches[2])) { + $colors[$idx] = '#' . BIFF8::lookup((int) $matches[2] + 7)['rgb']; + } else { + $colors[$idx] = $matches[0]; + } $sections[$idx] = (string) preg_replace($color_regex, '', $sections[$idx]); } if (preg_match($cond_regex, $sections[$idx], $matches)) { @@ -170,10 +176,11 @@ class Formatter $format = (string) preg_replace('/_.?/ui', ' ', $format); // Let's begin inspecting the format and converting the value to a formatted string - // Check for date/time characters (not inside quotes) if ( - (preg_match('/(\[\$[A-Z]*-[0-9A-F]*\])*[hmsdy](?=(?:[^"]|"[^"]*")*$)/miu', $format)) && - (preg_match('/0(?![^\[]*\])/miu', $format) === 0) + // Check for date/time characters (not inside quotes) + (preg_match('/(\[\$[A-Z]*-[0-9A-F]*\])*[hmsdy](?=(?:[^"]|"[^"]*")*$)/miu', $format)) + // A date/time with a decimal time shouldn't have a digit placeholder before the decimal point + && (preg_match('/[0\?#]\.(?![^\[]*\])/miu', $format) === 0) ) { // datetime format $value = DateFormatter::format($value, $format); @@ -194,8 +201,6 @@ class Formatter $value = $writerInstance->$function($value, $colors); } - $value = str_replace(chr(0x00), '.', $value); - - return $value; + return str_replace(chr(0x00), '.', $value); } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Accounting.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Accounting.php index a138ab7f..c3002860 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Accounting.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Accounting.php @@ -89,13 +89,13 @@ class Accounting extends Currency ( $this->currencySymbolPosition === self::LEADING_SYMBOL && $this->currencySymbolSpacing === self::SYMBOL_WITH_SPACING - ) ? ' ' : '', + ) ? "\u{a0}" : '', $this->thousandsSeparator ? '#,##' : null, $this->decimals > 0 ? '.' . str_repeat('0', $this->decimals) : null, ( $this->currencySymbolPosition === self::TRAILING_SYMBOL && $this->currencySymbolSpacing === self::SYMBOL_WITH_SPACING - ) ? ' ' : '', + ) ? "\u{a0}" : '', $this->currencySymbolPosition === self::TRAILING_SYMBOL ? $this->formatCurrencyCode() : null ); } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Date.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Date.php new file mode 100644 index 00000000..61ac117b --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Date.php @@ -0,0 +1,125 @@ +separators = $this->padSeparatorArray( + is_array($separators) ? $separators : [$separators], + count($formatBlocks) - 1 + ); + $this->formatBlocks = array_map([$this, 'mapFormatBlocks'], $formatBlocks); + } + + private function mapFormatBlocks(string $value): string + { + // Any date masking codes are returned as lower case values + if (in_array(mb_strtolower($value), self::DATE_BLOCKS, true)) { + return mb_strtolower($value); + } + + // Wrap any string literals in quotes, so that they're clearly defined as string literals + return $this->wrapLiteral($value); + } + + public function format(): string + { + return implode('', array_map([$this, 'intersperse'], $this->formatBlocks, $this->separators)); + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/DateTime.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/DateTime.php new file mode 100644 index 00000000..292c1efc --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/DateTime.php @@ -0,0 +1,50 @@ + + */ + protected array $formatBlocks; + + /** + * @param null|string|string[] $separators + * If you want to use only a single format block, then pass a null as the separator argument + * @param DateTimeWizard|string ...$formatBlocks + */ + public function __construct($separators, ...$formatBlocks) + { + $this->separators = $this->padSeparatorArray( + is_array($separators) ? $separators : [$separators], + count($formatBlocks) - 1 + ); + $this->formatBlocks = array_map([$this, 'mapFormatBlocks'], $formatBlocks); + } + + /** + * @param DateTimeWizard|string $value + */ + private function mapFormatBlocks($value): string + { + // Any date masking codes are returned as lower case values + if (is_object($value)) { + // We can't explicitly test for Stringable until PHP >= 8.0 + return $value; + } + + // Wrap any string literals in quotes, so that they're clearly defined as string literals + return $this->wrapLiteral($value); + } + + public function format(): string + { + return implode('', array_map([$this, 'intersperse'], $this->formatBlocks, $this->separators)); + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/DateTimeWizard.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/DateTimeWizard.php new file mode 100644 index 00000000..b14a6190 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/DateTimeWizard.php @@ -0,0 +1,44 @@ += "; + + protected function padSeparatorArray(array $separators, int $count): array + { + $lastSeparator = array_pop($separators); + + return $separators + array_fill(0, $count, $lastSeparator); + } + + protected function escapeSingleCharacter(string $value): string + { + if (strpos(self::NO_ESCAPING_NEEDED, $value) !== false) { + return $value; + } + + return "\\{$value}"; + } + + protected function wrapLiteral(string $value): string + { + if (mb_strlen($value, 'UTF-8') === 1) { + return $this->escapeSingleCharacter($value); + } + + // Wrap any other string literals in quotes, so that they're clearly defined as string literals + return '"' . str_replace('"', '""', $value) . '"'; + } + + protected function intersperse(string $formatBlock, ?string $separator): string + { + return "{$formatBlock}{$separator}"; + } + + public function __toString(): string + { + return $this->format(); + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Duration.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Duration.php new file mode 100644 index 00000000..b81f77ac --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Duration.php @@ -0,0 +1,153 @@ + self::DAYS_DURATION, + self::HOURS_DURATION => self::HOURS_SHORT, + self::MINUTES_DURATION => self::MINUTES_LONG, + self::SECONDS_DURATION => self::SECONDS_LONG, + ]; + + protected const DURATION_DEFAULTS = [ + self::HOURS_LONG => self::HOURS_DURATION, + self::HOURS_SHORT => self::HOURS_DURATION, + self::MINUTES_LONG => self::MINUTES_DURATION, + self::MINUTES_SHORT => self::MINUTES_DURATION, + self::SECONDS_LONG => self::SECONDS_DURATION, + self::SECONDS_SHORT => self::SECONDS_DURATION, + ]; + + public const SEPARATOR_COLON = ':'; + public const SEPARATOR_SPACE_NONBREAKING = "\u{a0}"; + public const SEPARATOR_SPACE = ' '; + + public const DURATION_DEFAULT = [ + self::HOURS_DURATION, + self::MINUTES_LONG, + self::SECONDS_LONG, + ]; + + /** + * @var string[] + */ + protected array $separators; + + /** + * @var string[] + */ + protected array $formatBlocks; + + protected bool $durationIsSet = false; + + /** + * @param null|string|string[] $separators + * If you want to use the same separator for all format blocks, then it can be passed as a string literal; + * if you wish to use different separators, then they should be passed as an array. + * If you want to use only a single format block, then pass a null as the separator argument + */ + public function __construct($separators = self::SEPARATOR_COLON, string ...$formatBlocks) + { + $separators ??= self::SEPARATOR_COLON; + $formatBlocks = (count($formatBlocks) === 0) ? self::DURATION_DEFAULT : $formatBlocks; + + $this->separators = $this->padSeparatorArray( + is_array($separators) ? $separators : [$separators], + count($formatBlocks) - 1 + ); + $this->formatBlocks = array_map([$this, 'mapFormatBlocks'], $formatBlocks); + + if ($this->durationIsSet === false) { + // We need at least one duration mask, so if none has been set we change the first mask element + // to a duration. + $this->formatBlocks[0] = self::DURATION_DEFAULTS[mb_strtolower($this->formatBlocks[0])]; + } + } + + private function mapFormatBlocks(string $value): string + { + // Any duration masking codes are returned as lower case values + if (in_array(mb_strtolower($value), self::DURATION_BLOCKS, true)) { + if (array_key_exists(mb_strtolower($value), self::DURATION_MASKS)) { + if ($this->durationIsSet) { + // We should only have a single duration mask, the first defined in the mask set, + // so convert any additional duration masks to standard time masks. + $value = self::DURATION_MASKS[mb_strtolower($value)]; + } + $this->durationIsSet = true; + } + + return mb_strtolower($value); + } + + // Wrap any string literals in quotes, so that they're clearly defined as string literals + return $this->wrapLiteral($value); + } + + public function format(): string + { + return implode('', array_map([$this, 'intersperse'], $this->formatBlocks, $this->separators)); + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Time.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Time.php new file mode 100644 index 00000000..64b9104a --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Time.php @@ -0,0 +1,105 @@ +separators = $this->padSeparatorArray( + is_array($separators) ? $separators : [$separators], + count($formatBlocks) - 1 + ); + $this->formatBlocks = array_map([$this, 'mapFormatBlocks'], $formatBlocks); + } + + private function mapFormatBlocks(string $value): string + { + // Any date masking codes are returned as lower case values + // except for AM/PM, which is set to uppercase + if (in_array(mb_strtolower($value), self::TIME_BLOCKS, true)) { + return mb_strtolower($value); + } elseif (mb_strtoupper($value) === self::MORNING_AFTERNOON) { + return mb_strtoupper($value); + } + + // Wrap any string literals in quotes, so that they're clearly defined as string literals + return $this->wrapLiteral($value); + } + + public function format(): string + { + return implode('', array_map([$this, 'intersperse'], $this->formatBlocks, $this->separators)); + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/RgbTint.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/RgbTint.php new file mode 100644 index 00000000..582ae483 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/RgbTint.php @@ -0,0 +1,175 @@ += 0.0) ? $hue : (1.0 + $hue); + } + + /** + * Convert red/green/blue to HLSMAX-based hue/luminance/saturation. + * + * @return int[] + */ + private static function rgbToMsHls(int $red, int $green, int $blue): array + { + $red01 = $red / self::RGBMAX; + $green01 = $green / self::RGBMAX; + $blue01 = $blue / self::RGBMAX; + [$hue, $luminance, $saturation] = self::rgbToHls($red01, $green01, $blue01); + + return [ + (int) round($hue * self::HLSMAX), + (int) round($luminance * self::HLSMAX), + (int) round($saturation * self::HLSMAX), + ]; + } + + /** + * Converts HLSMAX based HLS values to rgb values in the range (0,1). + * + * @return float[] + */ + private static function msHlsToRgb(int $hue, int $lightness, int $saturation): array + { + return self::hlsToRgb($hue / self::HLSMAX, $lightness / self::HLSMAX, $saturation / self::HLSMAX); + } + + /** + * Tints HLSMAX based luminance. + * + * @see http://ciintelligence.blogspot.co.uk/2012/02/converting-excel-theme-color-and-tint.html + */ + private static function tintLuminance(float $tint, float $luminance): int + { + if ($tint < 0) { + return (int) round($luminance * (1.0 + $tint)); + } + + return (int) round($luminance * (1.0 - $tint) + (self::HLSMAX - self::HLSMAX * (1.0 - $tint))); + } + + /** + * Return result of tinting supplied rgb as 6 hex digits. + */ + public static function rgbAndTintToRgb(int $red, int $green, int $blue, float $tint): string + { + [$hue, $luminance, $saturation] = self::rgbToMsHls($red, $green, $blue); + [$red, $green, $blue] = self::msHlsToRgb($hue, self::tintLuminance($tint, $luminance), $saturation); + + return sprintf( + '%02X%02X%02X', + (int) round($red * self::RGBMAX), + (int) round($green * self::RGBMAX), + (int) round($blue * self::RGBMAX) + ); + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Style.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Style.php index be70639e..9309830b 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Style.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Style.php @@ -2,7 +2,10 @@ namespace PhpOffice\PhpSpreadsheet\Style; +use PhpOffice\PhpSpreadsheet\Calculation\Functions; use PhpOffice\PhpSpreadsheet\Cell\Coordinate; +use PhpOffice\PhpSpreadsheet\Exception; +use PhpOffice\PhpSpreadsheet\Shared\StringHelper; use PhpOffice\PhpSpreadsheet\Spreadsheet; class Style extends Supervisor @@ -122,7 +125,7 @@ class Style extends Supervisor public function getSharedComponent(): self { $activeSheet = $this->getActiveSheet(); - $selectedCell = $this->getActiveCell(); // e.g. 'A1' + $selectedCell = Functions::trimSheetFromCellReference($this->getActiveCell()); // e.g. 'A1' if ($activeSheet->cellExists($selectedCell)) { $xfIndex = $activeSheet->getCell($selectedCell)->getXfIndex(); @@ -203,8 +206,15 @@ class Style extends Supervisor if ($this->isSupervisor) { $pRange = $this->getSelectedCells(); - // Uppercase coordinate + // Uppercase coordinate and strip any Worksheet reference from the selected range $pRange = strtoupper($pRange); + if (strpos($pRange, '!') !== false) { + $pRangeWorksheet = StringHelper::strToUpper(trim(substr($pRange, 0, (int) strrpos($pRange, '!')), "'")); + if ($pRangeWorksheet !== '' && StringHelper::strToUpper($this->getActiveSheet()->getTitle()) !== $pRangeWorksheet) { + throw new Exception('Invalid Worksheet for specified Range'); + } + $pRange = strtoupper(Functions::trimSheetFromCellReference($pRange)); + } // Is it a cell range or a single cell? if (strpos($pRange, ':') === false) { diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Theme.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Theme.php new file mode 100644 index 00000000..ab101f01 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Theme.php @@ -0,0 +1,269 @@ + '000000', + 'lt1' => 'FFFFFF', + 'dk2' => '44546A', + 'lt2' => 'E7E6E6', + 'accent1' => '4472C4', + 'accent2' => 'ED7D31', + 'accent3' => 'A5A5A5', + 'accent4' => 'FFC000', + 'accent5' => '5B9BD5', + 'accent6' => '70AD47', + 'hlink' => '0563C1', + 'folHlink' => '954F72', + ]; + + public const COLOR_SCHEME_2007_2010_NAME = 'Office 2007-2010'; + public const COLOR_SCHEME_2007_2010 = [ + 'dk1' => '000000', + 'lt1' => 'FFFFFF', + 'dk2' => '1F497D', + 'lt2' => 'EEECE1', + 'accent1' => '4F81BD', + 'accent2' => 'C0504D', + 'accent3' => '9BBB59', + 'accent4' => '8064A2', + 'accent5' => '4BACC6', + 'accent6' => 'F79646', + 'hlink' => '0000FF', + 'folHlink' => '800080', + ]; + + /** @var string[] */ + private $themeColors = self::COLOR_SCHEME_2007_2010; + + /** @var string */ + private $majorFontLatin = 'Cambria'; + + /** @var string */ + private $majorFontEastAsian = ''; + + /** @var string */ + private $majorFontComplexScript = ''; + + /** @var string */ + private $minorFontLatin = 'Calibri'; + + /** @var string */ + private $minorFontEastAsian = ''; + + /** @var string */ + private $minorFontComplexScript = ''; + + /** + * Map of Major (header) fonts to write. + * + * @var string[] + */ + private $majorFontSubstitutions = self::FONTS_TIMES_SUBSTITUTIONS; + + /** + * Map of Minor (body) fonts to write. + * + * @var string[] + */ + private $minorFontSubstitutions = self::FONTS_ARIAL_SUBSTITUTIONS; + + public const FONTS_TIMES_SUBSTITUTIONS = [ + 'Jpan' => 'MS Pゴシック', + 'Hang' => '맑은 고딕', + 'Hans' => '宋体', + 'Hant' => '新細明體', + 'Arab' => 'Times New Roman', + 'Hebr' => 'Times New Roman', + 'Thai' => 'Tahoma', + 'Ethi' => 'Nyala', + 'Beng' => 'Vrinda', + 'Gujr' => 'Shruti', + 'Khmr' => 'MoolBoran', + 'Knda' => 'Tunga', + 'Guru' => 'Raavi', + 'Cans' => 'Euphemia', + 'Cher' => 'Plantagenet Cherokee', + 'Yiii' => 'Microsoft Yi Baiti', + 'Tibt' => 'Microsoft Himalaya', + 'Thaa' => 'MV Boli', + 'Deva' => 'Mangal', + 'Telu' => 'Gautami', + 'Taml' => 'Latha', + 'Syrc' => 'Estrangelo Edessa', + 'Orya' => 'Kalinga', + 'Mlym' => 'Kartika', + 'Laoo' => 'DokChampa', + 'Sinh' => 'Iskoola Pota', + 'Mong' => 'Mongolian Baiti', + 'Viet' => 'Times New Roman', + 'Uigh' => 'Microsoft Uighur', + 'Geor' => 'Sylfaen', + ]; + + public const FONTS_ARIAL_SUBSTITUTIONS = [ + 'Jpan' => 'MS Pゴシック', + 'Hang' => '맑은 고딕', + 'Hans' => '宋体', + 'Hant' => '新細明體', + 'Arab' => 'Arial', + 'Hebr' => 'Arial', + 'Thai' => 'Tahoma', + 'Ethi' => 'Nyala', + 'Beng' => 'Vrinda', + 'Gujr' => 'Shruti', + 'Khmr' => 'DaunPenh', + 'Knda' => 'Tunga', + 'Guru' => 'Raavi', + 'Cans' => 'Euphemia', + 'Cher' => 'Plantagenet Cherokee', + 'Yiii' => 'Microsoft Yi Baiti', + 'Tibt' => 'Microsoft Himalaya', + 'Thaa' => 'MV Boli', + 'Deva' => 'Mangal', + 'Telu' => 'Gautami', + 'Taml' => 'Latha', + 'Syrc' => 'Estrangelo Edessa', + 'Orya' => 'Kalinga', + 'Mlym' => 'Kartika', + 'Laoo' => 'DokChampa', + 'Sinh' => 'Iskoola Pota', + 'Mong' => 'Mongolian Baiti', + 'Viet' => 'Arial', + 'Uigh' => 'Microsoft Uighur', + 'Geor' => 'Sylfaen', + ]; + + public function getThemeColors(): array + { + return $this->themeColors; + } + + public function setThemeColor(string $key, string $value): self + { + $this->themeColors[$key] = $value; + + return $this; + } + + public function getThemeColorName(): string + { + return $this->themeColorName; + } + + public function setThemeColorName(string $name, ?array $themeColors = null): self + { + $this->themeColorName = $name; + if ($name === self::COLOR_SCHEME_2007_2010_NAME) { + $themeColors = $themeColors ?? self::COLOR_SCHEME_2007_2010; + } elseif ($name === self::COLOR_SCHEME_2013_PLUS_NAME) { + $themeColors = $themeColors ?? self::COLOR_SCHEME_2013_PLUS; + } + if ($themeColors !== null) { + $this->themeColors = $themeColors; + } + + return $this; + } + + public function getMajorFontLatin(): string + { + return $this->majorFontLatin; + } + + public function getMajorFontEastAsian(): string + { + return $this->majorFontEastAsian; + } + + public function getMajorFontComplexScript(): string + { + return $this->majorFontComplexScript; + } + + public function getMajorFontSubstitutions(): array + { + return $this->majorFontSubstitutions; + } + + /** @param null|array $substitutions */ + public function setMajorFontValues(?string $latin, ?string $eastAsian, ?string $complexScript, $substitutions): self + { + if (!empty($latin)) { + $this->majorFontLatin = $latin; + } + if ($eastAsian !== null) { + $this->majorFontEastAsian = $eastAsian; + } + if ($complexScript !== null) { + $this->majorFontComplexScript = $complexScript; + } + if ($substitutions !== null) { + $this->majorFontSubstitutions = $substitutions; + } + + return $this; + } + + public function getMinorFontLatin(): string + { + return $this->minorFontLatin; + } + + public function getMinorFontEastAsian(): string + { + return $this->minorFontEastAsian; + } + + public function getMinorFontComplexScript(): string + { + return $this->minorFontComplexScript; + } + + public function getMinorFontSubstitutions(): array + { + return $this->minorFontSubstitutions; + } + + /** @param null|array $substitutions */ + public function setMinorFontValues(?string $latin, ?string $eastAsian, ?string $complexScript, $substitutions): self + { + if (!empty($latin)) { + $this->minorFontLatin = $latin; + } + if ($eastAsian !== null) { + $this->minorFontEastAsian = $eastAsian; + } + if ($complexScript !== null) { + $this->minorFontComplexScript = $complexScript; + } + if ($substitutions !== null) { + $this->minorFontSubstitutions = $substitutions; + } + + return $this; + } + + public function getThemeFontName(): string + { + return $this->themeFontName; + } + + public function setThemeFontName(?string $name): self + { + if (!empty($name)) { + $this->themeFontName = $name; + } + + return $this; + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter.php index d6041985..cbc4ff65 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/AutoFilter.php @@ -321,7 +321,7 @@ class AutoFilter * * @return bool */ - private static function filterTestInSimpleDataSet($cellValue, $dataSet) + protected static function filterTestInSimpleDataSet($cellValue, $dataSet) { $dataSetValues = $dataSet['filterValues']; $blanks = $dataSet['blanks']; @@ -340,7 +340,7 @@ class AutoFilter * * @return bool */ - private static function filterTestInDateGroupSet($cellValue, $dataSet) + protected static function filterTestInDateGroupSet($cellValue, $dataSet) { $dateSet = $dataSet['filterValues']; $blanks = $dataSet['blanks']; @@ -384,7 +384,7 @@ class AutoFilter * * @return bool */ - private static function filterTestInCustomDataSet($cellValue, $ruleSet) + protected static function filterTestInCustomDataSet($cellValue, $ruleSet) { /** @var array[] */ $dataSet = $ruleSet['filterRules']; @@ -509,7 +509,7 @@ class AutoFilter * * @return bool */ - private static function filterTestInPeriodDateSet($cellValue, $monthSet) + protected static function filterTestInPeriodDateSet($cellValue, $monthSet) { // Blank cells are always ignored, so return a FALSE if (($cellValue == '') || ($cellValue === null)) { diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageMargins.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageMargins.php index 34e1145e..d51023fc 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageMargins.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageMargins.php @@ -197,21 +197,6 @@ class PageMargins return $this; } - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } - public static function fromCentimeters(float $value): float { return $value / 2.54; diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageSetup.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageSetup.php index 22c99ff3..72c8958c 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageSetup.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/PageSetup.php @@ -885,19 +885,4 @@ class PageSetup return $this; } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/SheetView.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/SheetView.php index 13464c99..697f11c2 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/SheetView.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/SheetView.php @@ -175,19 +175,4 @@ class SheetView return $this; } - - /** - * Implement PHP __clone to create a deep clone, not just a shallow copy. - */ - public function __clone() - { - $vars = get_object_vars($this); - foreach ($vars as $key => $value) { - if (is_object($value)) { - $this->$key = clone $value; - } else { - $this->$key = $value; - } - } - } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Table.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Table.php index dc2a4f8a..1bc8dff4 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Table.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Table.php @@ -180,7 +180,7 @@ class Table private function updateStructuredReferencesInCells(Worksheet $worksheet, string $newName): void { - $pattern = '/' . preg_quote($this->name) . '\[/mui'; + $pattern = '/' . preg_quote($this->name, '/') . '\[/mui'; foreach ($worksheet->getCoordinates(false) as $coordinate) { $cell = $worksheet->getCell($coordinate); @@ -196,7 +196,7 @@ class Table private function updateStructuredReferencesInNamedFormulae(Spreadsheet $spreadsheet, string $newName): void { - $pattern = '/' . preg_quote($this->name) . '\[/mui'; + $pattern = '/' . preg_quote($this->name, '/') . '\[/mui'; foreach ($spreadsheet->getNamedFormulae() as $namedFormula) { $formula = $namedFormula->getValue(); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Table/Column.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Table/Column.php index 30630c0d..32dd4c4f 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Table/Column.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Table/Column.php @@ -225,7 +225,7 @@ class Column private static function updateStructuredReferencesInCells(Worksheet $worksheet, string $oldTitle, string $newTitle): void { - $pattern = '/\[(@?)' . preg_quote($oldTitle) . '\]/mui'; + $pattern = '/\[(@?)' . preg_quote($oldTitle, '/') . '\]/mui'; foreach ($worksheet->getCoordinates(false) as $coordinate) { $cell = $worksheet->getCell($coordinate); @@ -241,7 +241,7 @@ class Column private static function updateStructuredReferencesInNamedFormulae(Spreadsheet $spreadsheet, string $oldTitle, string $newTitle): void { - $pattern = '/\[(@?)' . preg_quote($oldTitle) . '\]/mui'; + $pattern = '/\[(@?)' . preg_quote($oldTitle, '/') . '\]/mui'; foreach ($spreadsheet->getNamedFormulae() as $namedFormula) { $formula = $namedFormula->getValue(); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Validations.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Validations.php index aab3aae4..42ba566c 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Validations.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Validations.php @@ -53,6 +53,9 @@ class Validations return self::validateCellRange($cellRange); } + private const SETMAXROW = '${1}1:${2}' . AddressRange::MAX_ROW; + private const SETMAXCOL = 'A${1}:' . AddressRange::MAX_COLUMN . '${2}'; + /** * Validate a cell range. * @@ -69,7 +72,7 @@ class Validations // or Row ranges like '1:3' to 'A1:XFD3' $addressRange = (string) preg_replace( ['/^([A-Z]+):([A-Z]+)$/i', '/^(\\d+):(\\d+)$/'], - ['${1}1:${2}1048576', 'A${1}:XFD${2}'], + [self::SETMAXROW, self::SETMAXCOL], $addressRange ); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php index cc0e05b6..29221e99 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Worksheet.php @@ -543,9 +543,18 @@ class Worksheet implements IComparable */ public function getColumnDimensions() { + /** @var callable */ + $callable = [self::class, 'columnDimensionCompare']; + uasort($this->columnDimensions, $callable); + return $this->columnDimensions; } + private static function columnDimensionCompare(ColumnDimension $a, ColumnDimension $b): int + { + return $a->getColumnNumeric() - $b->getColumnNumeric(); + } + /** * Get default column dimension. * @@ -1806,9 +1815,15 @@ class Worksheet implements IComparable public function getBreaks() { $breaks = []; + /** @var callable */ + $compareFunction = [self::class, 'compareRowBreaks']; + uksort($this->rowBreaks, $compareFunction); foreach ($this->rowBreaks as $break) { $breaks[$break->getCoordinate()] = self::BREAK_ROW; } + /** @var callable */ + $compareFunction = [self::class, 'compareColumnBreaks']; + uksort($this->columnBreaks, $compareFunction); foreach ($this->columnBreaks as $break) { $breaks[$break->getCoordinate()] = self::BREAK_COLUMN; } @@ -1823,16 +1838,40 @@ class Worksheet implements IComparable */ public function getRowBreaks() { + /** @var callable */ + $compareFunction = [self::class, 'compareRowBreaks']; + uksort($this->rowBreaks, $compareFunction); + return $this->rowBreaks; } + protected static function compareRowBreaks(string $coordinate1, string $coordinate2): int + { + $row1 = Coordinate::indexesFromString($coordinate1)[1]; + $row2 = Coordinate::indexesFromString($coordinate2)[1]; + + return $row1 - $row2; + } + + protected static function compareColumnBreaks(string $coordinate1, string $coordinate2): int + { + $column1 = Coordinate::indexesFromString($coordinate1)[0]; + $column2 = Coordinate::indexesFromString($coordinate2)[0]; + + return $column1 - $column2; + } + /** - * Get row breaks. + * Get column breaks. * * @return PageBreak[] */ public function getColumnBreaks() { + /** @var callable */ + $compareFunction = [self::class, 'compareColumnBreaks']; + uksort($this->columnBreaks, $compareFunction); + return $this->columnBreaks; } @@ -2448,12 +2487,12 @@ class Worksheet implements IComparable /** * Insert a new row, updating all possible related data. * - * @param int $before Insert before this one - * @param int $numberOfRows Number of rows to insert + * @param int $before Insert before this row number + * @param int $numberOfRows Number of new rows to insert * * @return $this */ - public function insertNewRowBefore($before, $numberOfRows = 1) + public function insertNewRowBefore(int $before, int $numberOfRows = 1) { if ($before >= 1) { $objReferenceHelper = ReferenceHelper::getInstance(); @@ -2468,12 +2507,12 @@ class Worksheet implements IComparable /** * Insert a new column, updating all possible related data. * - * @param string $before Insert before this one, eg: 'A' - * @param int $numberOfColumns Number of columns to insert + * @param string $before Insert before this column Name, eg: 'A' + * @param int $numberOfColumns Number of new columns to insert * * @return $this */ - public function insertNewColumnBefore($before, $numberOfColumns = 1) + public function insertNewColumnBefore(string $before, int $numberOfColumns = 1) { if (!is_numeric($before)) { $objReferenceHelper = ReferenceHelper::getInstance(); @@ -2488,12 +2527,12 @@ class Worksheet implements IComparable /** * Insert a new column, updating all possible related data. * - * @param int $beforeColumnIndex Insert before this one (numeric column coordinate of the cell) - * @param int $numberOfColumns Number of columns to insert + * @param int $beforeColumnIndex Insert before this column ID (numeric column coordinate of the cell) + * @param int $numberOfColumns Number of new columns to insert * * @return $this */ - public function insertNewColumnBeforeByIndex($beforeColumnIndex, $numberOfColumns = 1) + public function insertNewColumnBeforeByIndex(int $beforeColumnIndex, int $numberOfColumns = 1) { if ($beforeColumnIndex >= 1) { return $this->insertNewColumnBefore(Coordinate::stringFromColumnIndex($beforeColumnIndex), $numberOfColumns); @@ -2505,12 +2544,12 @@ class Worksheet implements IComparable /** * Delete a row, updating all possible related data. * - * @param int $row Remove starting with this one + * @param int $row Remove rows, starting with this row number * @param int $numberOfRows Number of rows to remove * * @return $this */ - public function removeRow($row, $numberOfRows = 1) + public function removeRow(int $row, int $numberOfRows = 1) { if ($row < 1) { throw new Exception('Rows to be deleted should at least start from row 1.'); @@ -2561,12 +2600,12 @@ class Worksheet implements IComparable /** * Remove a column, updating all possible related data. * - * @param string $column Remove starting with this one, eg: 'A' + * @param string $column Remove columns starting with this column name, eg: 'A' * @param int $numberOfColumns Number of columns to remove * * @return $this */ - public function removeColumn($column, $numberOfColumns = 1) + public function removeColumn(string $column, int $numberOfColumns = 1) { if (is_numeric($column)) { throw new Exception('Column references should not be numeric.'); @@ -2623,12 +2662,12 @@ class Worksheet implements IComparable /** * Remove a column, updating all possible related data. * - * @param int $columnIndex Remove starting with this one (numeric column coordinate of the cell) + * @param int $columnIndex Remove starting with this column Index (numeric column coordinate) * @param int $numColumns Number of columns to remove * * @return $this */ - public function removeColumnByIndex($columnIndex, $numColumns = 1) + public function removeColumnByIndex(int $columnIndex, int $numColumns = 1) { if ($columnIndex >= 1) { return $this->removeColumn(Coordinate::stringFromColumnIndex($columnIndex), $numColumns); @@ -2988,21 +3027,58 @@ class Worksheet implements IComparable return $this; } + /** + * @param mixed $nullValue + * + * @throws Exception + * @throws \PhpOffice\PhpSpreadsheet\Calculation\Exception + * + * @return mixed + */ + protected function cellToArray(Cell $cell, bool $calculateFormulas, bool $formatData, $nullValue) + { + $returnValue = $nullValue; + + if ($cell->getValue() !== null) { + if ($cell->getValue() instanceof RichText) { + $returnValue = $cell->getValue()->getPlainText(); + } else { + $returnValue = ($calculateFormulas) ? $cell->getCalculatedValue() : $cell->getValue(); + } + + if ($formatData) { + $style = $this->getParentOrThrow()->getCellXfByIndex($cell->getXfIndex()); + $returnValue = NumberFormat::toFormattedString( + $returnValue, + $style->getNumberFormat()->getFormatCode() ?? NumberFormat::FORMAT_GENERAL + ); + } + } + + return $returnValue; + } + /** * Create array from a range of cells. * - * @param string $range Range of cells (i.e. "A1:B10"), or just one cell (i.e. "A1") * @param mixed $nullValue Value returned in the array entry if a cell doesn't exist * @param bool $calculateFormulas Should formulas be calculated? * @param bool $formatData Should formatting be applied to cell values? * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero - * True - Return rows and columns indexed by their actual row and column IDs - * - * @return array + * True - Return rows and columns indexed by their actual row and column IDs + * @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden. + * True - Don't return values for rows/columns that are defined as hidden. */ - public function rangeToArray($range, $nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) - { - // Returnvalue + public function rangeToArray( + string $range, + $nullValue = null, + bool $calculateFormulas = true, + bool $formatData = true, + bool $returnCellRef = false, + bool $ignoreHidden = false + ): array { + $range = Validations::validateCellOrCellRange($range); + $returnValue = []; // Identify the range that we need to extract from the worksheet [$rangeStart, $rangeEnd] = Coordinate::rangeBoundaries($range); @@ -3015,42 +3091,23 @@ class Worksheet implements IComparable // Loop through rows $r = -1; for ($row = $minRow; $row <= $maxRow; ++$row) { - $rRef = $returnCellRef ? $row : ++$r; + if (($ignoreHidden === true) && ($this->getRowDimension($row)->getVisible() === false)) { + continue; + } + $rowRef = $returnCellRef ? $row : ++$r; $c = -1; // Loop through columns in the current row - for ($col = $minCol; $col != $maxCol; ++$col) { - $cRef = $returnCellRef ? $col : ++$c; + for ($col = $minCol; $col !== $maxCol; ++$col) { + if (($ignoreHidden === true) && ($this->getColumnDimension($col)->getVisible() === false)) { + continue; + } + $columnRef = $returnCellRef ? $col : ++$c; // Using getCell() will create a new cell if it doesn't already exist. We don't want that to happen // so we test and retrieve directly against cellCollection - $cell = $this->cellCollection->get($col . $row); - //if ($this->cellCollection->has($col . $row)) { + $cell = $this->cellCollection->get("{$col}{$row}"); + $returnValue[$rowRef][$columnRef] = $nullValue; if ($cell !== null) { - // Cell exists - if ($cell->getValue() !== null) { - if ($cell->getValue() instanceof RichText) { - $returnValue[$rRef][$cRef] = $cell->getValue()->getPlainText(); - } else { - if ($calculateFormulas) { - $returnValue[$rRef][$cRef] = $cell->getCalculatedValue(); - } else { - $returnValue[$rRef][$cRef] = $cell->getValue(); - } - } - - if ($formatData) { - $style = $this->getParentOrThrow()->getCellXfByIndex($cell->getXfIndex()); - $returnValue[$rRef][$cRef] = NumberFormat::toFormattedString( - $returnValue[$rRef][$cRef], - $style->getNumberFormat()->getFormatCode() ?? NumberFormat::FORMAT_GENERAL - ); - } - } else { - // Cell holds a NULL - $returnValue[$rRef][$cRef] = $nullValue; - } - } else { - // Cell doesn't exist - $returnValue[$rRef][$cRef] = $nullValue; + $returnValue[$rowRef][$columnRef] = $this->cellToArray($cell, $calculateFormulas, $formatData, $nullValue); } } } @@ -3102,12 +3159,18 @@ class Worksheet implements IComparable * @param bool $calculateFormulas Should formulas be calculated? * @param bool $formatData Should formatting be applied to cell values? * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero - * True - Return rows and columns indexed by their actual row and column IDs - * - * @return array + * True - Return rows and columns indexed by their actual row and column IDs + * @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden. + * True - Don't return values for rows/columns that are defined as hidden. */ - public function namedRangeToArray(string $definedName, $nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) - { + public function namedRangeToArray( + string $definedName, + $nullValue = null, + bool $calculateFormulas = true, + bool $formatData = true, + bool $returnCellRef = false, + bool $ignoreHidden = false + ): array { $retVal = []; $namedRange = $this->validateNamedRange($definedName); if ($namedRange !== null) { @@ -3115,7 +3178,7 @@ class Worksheet implements IComparable $cellRange = str_replace('$', '', $cellRange); $workSheet = $namedRange->getWorksheet(); if ($workSheet !== null) { - $retVal = $workSheet->rangeToArray($cellRange, $nullValue, $calculateFormulas, $formatData, $returnCellRef); + $retVal = $workSheet->rangeToArray($cellRange, $nullValue, $calculateFormulas, $formatData, $returnCellRef, $ignoreHidden); } } @@ -3129,12 +3192,17 @@ class Worksheet implements IComparable * @param bool $calculateFormulas Should formulas be calculated? * @param bool $formatData Should formatting be applied to cell values? * @param bool $returnCellRef False - Return a simple array of rows and columns indexed by number counting from zero - * True - Return rows and columns indexed by their actual row and column IDs - * - * @return array + * True - Return rows and columns indexed by their actual row and column IDs + * @param bool $ignoreHidden False - Return values for rows/columns even if they are defined as hidden. + * True - Don't return values for rows/columns that are defined as hidden. */ - public function toArray($nullValue = null, $calculateFormulas = true, $formatData = true, $returnCellRef = false) - { + public function toArray( + $nullValue = null, + bool $calculateFormulas = true, + bool $formatData = true, + bool $returnCellRef = false, + bool $ignoreHidden = false + ): array { // Garbage collect... $this->garbageCollect(); @@ -3143,7 +3211,7 @@ class Worksheet implements IComparable $maxRow = $this->getHighestRow(); // Return - return $this->rangeToArray('A1:' . $maxCol . $maxRow, $nullValue, $calculateFormulas, $formatData, $returnCellRef); + return $this->rangeToArray("A1:{$maxCol}{$maxRow}", $nullValue, $calculateFormulas, $formatData, $returnCellRef, $ignoreHidden); } /** diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Html.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Html.php index c30bb30a..842998f9 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Html.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Html.php @@ -7,9 +7,11 @@ use PhpOffice\PhpSpreadsheet\Calculation\Calculation; use PhpOffice\PhpSpreadsheet\Cell\Cell; use PhpOffice\PhpSpreadsheet\Cell\Coordinate; use PhpOffice\PhpSpreadsheet\Chart\Chart; +use PhpOffice\PhpSpreadsheet\Document\Properties; use PhpOffice\PhpSpreadsheet\RichText\RichText; use PhpOffice\PhpSpreadsheet\RichText\Run; use PhpOffice\PhpSpreadsheet\Settings; +use PhpOffice\PhpSpreadsheet\Shared\Date; use PhpOffice\PhpSpreadsheet\Shared\Drawing as SharedDrawing; use PhpOffice\PhpSpreadsheet\Shared\File; use PhpOffice\PhpSpreadsheet\Shared\Font as SharedFont; @@ -342,13 +344,21 @@ class Html extends BaseWriter private static function generateMeta(?string $val, string $desc): string { - return $val + return ($val || $val === '0') ? (' ' . PHP_EOL) : ''; } public const BODY_LINE = ' ' . PHP_EOL; + private const CUSTOM_TO_META = [ + Properties::PROPERTY_TYPE_BOOLEAN => 'bool', + Properties::PROPERTY_TYPE_DATE => 'date', + Properties::PROPERTY_TYPE_FLOAT => 'float', + Properties::PROPERTY_TYPE_INTEGER => 'int', + Properties::PROPERTY_TYPE_STRING => 'string', + ]; + /** * Generate HTML header. * @@ -374,6 +384,36 @@ class Html extends BaseWriter $html .= self::generateMeta($properties->getCategory(), 'category'); $html .= self::generateMeta($properties->getCompany(), 'company'); $html .= self::generateMeta($properties->getManager(), 'manager'); + $html .= self::generateMeta($properties->getLastModifiedBy(), 'lastModifiedBy'); + $date = Date::dateTimeFromTimestamp((string) $properties->getCreated()); + $date->setTimeZone(Date::getDefaultOrLocalTimeZone()); + $html .= self::generateMeta($date->format(DATE_W3C), 'created'); + $date = Date::dateTimeFromTimestamp((string) $properties->getModified()); + $date->setTimeZone(Date::getDefaultOrLocalTimeZone()); + $html .= self::generateMeta($date->format(DATE_W3C), 'modified'); + + $customProperties = $properties->getCustomProperties(); + foreach ($customProperties as $customProperty) { + $propertyValue = $properties->getCustomPropertyValue($customProperty); + $propertyType = $properties->getCustomPropertyType($customProperty); + $propertyQualifier = self::CUSTOM_TO_META[$propertyType] ?? null; + if ($propertyQualifier !== null) { + if ($propertyType === Properties::PROPERTY_TYPE_BOOLEAN) { + $propertyValue = $propertyValue ? '1' : '0'; + } elseif ($propertyType === Properties::PROPERTY_TYPE_DATE) { + $date = Date::dateTimeFromTimestamp((string) $propertyValue); + $date->setTimeZone(Date::getDefaultOrLocalTimeZone()); + $propertyValue = $date->format(DATE_W3C); + } else { + $propertyValue = (string) $propertyValue; + } + $html .= self::generateMeta($propertyValue, "custom.$propertyQualifier.$customProperty"); + } + } + + if (!empty($properties->getHyperlinkBase())) { + $html .= ' ' . PHP_EOL; + } $html .= $includeStyles ? $this->generateStyles(true) : $this->generatePageDeclarations(true); @@ -693,7 +733,8 @@ class Html extends BaseWriter // max-width: 100% ensures that image doesnt overflow containing cell // width: X sets width of supplied image. // As a result, images bigger than cell will be contained and images smaller will not get stretched - $html .= '' . $filedesc . ''; + $html .= '' . $filedesc . ''; } } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods.php index 872be52d..c9e0ba83 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods.php @@ -12,7 +12,6 @@ use PhpOffice\PhpSpreadsheet\Writer\Ods\Settings; use PhpOffice\PhpSpreadsheet\Writer\Ods\Styles; use PhpOffice\PhpSpreadsheet\Writer\Ods\Thumbnails; use ZipStream\Exception\OverflowException; -use ZipStream\Option\Archive; use ZipStream\ZipStream; class Ods extends BaseWriter @@ -158,11 +157,7 @@ class Ods extends BaseWriter } // Create new ZIP stream - $options = new Archive(); - $options->setEnableZip64(false); - $options->setOutputStream($this->fileHandle); - - return new ZipStream(null, $options); + return ZipStream0::newZipStream($this->fileHandle); } /** diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Content.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Content.php index e931421a..e0a729ab 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Content.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Content.php @@ -126,7 +126,16 @@ class Content extends WriterPart $objWriter->writeAttribute('table:name', $spreadsheet->getSheet($sheetIndex)->getTitle()); $objWriter->writeAttribute('table:style-name', Style::TABLE_STYLE_PREFIX . (string) ($sheetIndex + 1)); $objWriter->writeElement('office:forms'); + $lastColumn = 0; foreach ($spreadsheet->getSheet($sheetIndex)->getColumnDimensions() as $columnDimension) { + $thisColumn = $columnDimension->getColumnNumeric(); + $emptyColumns = $thisColumn - $lastColumn - 1; + if ($emptyColumns > 0) { + $objWriter->startElement('table:table-column'); + $objWriter->writeAttribute('table:number-columns-repeated', (string) $emptyColumns); + $objWriter->endElement(); + } + $lastColumn = $thisColumn; $objWriter->startElement('table:table-column'); $objWriter->writeAttribute( 'table:style-name', diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php index 33a404d4..983414fc 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls.php @@ -751,11 +751,12 @@ class Xls extends BaseWriter $dataSection_Content .= $dataProp['data']['data']; $dataSection_Content_Offset += 4 + 4 + strlen($dataProp['data']['data']); - // Condition below can never be true - //} elseif ($dataProp['type']['data'] == 0x40) { // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) - // $dataSection_Content .= $dataProp['data']['data']; + /* Condition below can never be true + } elseif ($dataProp['type']['data'] == 0x40) { // Filetime (64-bit value representing the number of 100-nanosecond intervals since January 1, 1601) + $dataSection_Content .= $dataProp['data']['data']; - // $dataSection_Content_Offset += 4 + 8; + $dataSection_Content_Offset += 4 + 8; + */ } else { $dataSection_Content .= $dataProp['data']['data']; diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php index 6b98395f..f195ac78 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php @@ -643,7 +643,6 @@ class Parser // TODO: use real error codes throw new WriterException('Unknown range separator'); } - // Convert the cell references [$row1, $col1] = $this->cellToPackedRowcol($cell1); [$row2, $col2] = $this->cellToPackedRowcol($cell2); @@ -1109,8 +1108,8 @@ class Parser if (is_numeric($token) && (!is_numeric($token . $this->lookAhead) || ($this->lookAhead == '')) && ($this->lookAhead !== '!') && ($this->lookAhead !== ':')) { return $token; } - // If it's a string (of maximum 255 characters) if (preg_match('/"([^"]|""){0,255}"/', $token) && $this->lookAhead !== '"' && (substr_count($token, '"') % 2 == 0)) { + // If it's a string (of maximum 255 characters) return $token; } // If it's an error code @@ -1219,21 +1218,18 @@ class Parser $this->advance(); return $result; - // If it's an error code - } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $this->currentToken) || $this->currentToken == '#N/A') { + } elseif (preg_match('/^#[A-Z0\\/]{3,5}[!?]{1}$/', $this->currentToken) || $this->currentToken == '#N/A') { // error code $result = $this->createTree($this->currentToken, 'ptgErr', ''); $this->advance(); return $result; - // If it's a negative value - } elseif ($this->currentToken == '-') { + } elseif ($this->currentToken == '-') { // negative value // catch "-" Term $this->advance(); $result2 = $this->expression(); return $this->createTree('ptgUminus', $result2, ''); - // If it's a positive value - } elseif ($this->currentToken == '+') { + } elseif ($this->currentToken == '+') { // positive value // catch "+" Term $this->advance(); $result2 = $this->expression(); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php index 6e9b265d..3c68847a 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Workbook.php @@ -643,9 +643,8 @@ class Workbook extends BIFFwriter // store the DEFINEDNAME record $chunk .= $this->writeData($this->writeDefinedNameBiff8(pack('C', 0x07), $formulaData, $i + 1, true)); - - // (exclusive) either repeatColumns or repeatRows } elseif ($sheetSetup->isColumnsToRepeatAtLeftSet() || $sheetSetup->isRowsToRepeatAtTopSet()) { + // (exclusive) either repeatColumns or repeatRows. // Columns to repeat if ($sheetSetup->isColumnsToRepeatAtLeftSet()) { $repeat = $sheetSetup->getColumnsToRepeatAtLeft(); @@ -1102,16 +1101,15 @@ class Workbook extends BIFFwriter // 2. space remaining is greater than or equal to minimum space needed // here we write as much as we can in the current block, then move to next record data block - // 1. space remaining is less than minimum space needed if ($space_remaining < $min_space_needed) { + // 1. space remaining is less than minimum space needed. // we close the block, store the block data $recordDatas[] = $recordData; // and start new record data block where we start writing the string $recordData = ''; - - // 2. space remaining is greater than or equal to minimum space needed } else { + // 2. space remaining is greater than or equal to minimum space needed. // initialize effective remaining space, for Unicode strings this may need to be reduced by 1, see below $effective_space_remaining = $space_remaining; diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php index 9f23bd36..aeedd08e 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Worksheet.php @@ -503,6 +503,8 @@ class Worksheet extends BIFFwriter $this->writeMergedCells(); // Hyperlinks + $phpParent = $phpSheet->getParent(); + $hyperlinkbase = ($phpParent === null) ? '' : $phpParent->getProperties()->getHyperlinkBase(); foreach ($phpSheet->getHyperLinkCollection() as $coordinate => $hyperlink) { [$column, $row] = Coordinate::indexesFromString($coordinate); @@ -513,6 +515,11 @@ class Worksheet extends BIFFwriter $url = str_replace('sheet://', 'internal:', $url); } elseif (preg_match('/^(http:|https:|ftp:|mailto:)/', $url)) { // URL + } elseif (!empty($hyperlinkbase) && preg_match('~^([A-Za-z]:)?[/\\\\]~', $url) !== 1) { + $url = "$hyperlinkbase$url"; + if (preg_match('/^(http:|https:|ftp:|mailto:)/', $url) !== 1) { + $url = 'external:' . $url; + } } else { // external (local file) $url = 'external:' . $url; diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php index 07b79044..6ed12d4a 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php @@ -31,7 +31,6 @@ use PhpOffice\PhpSpreadsheet\Writer\Xlsx\Workbook; use PhpOffice\PhpSpreadsheet\Writer\Xlsx\Worksheet; use ZipArchive; use ZipStream\Exception\OverflowException; -use ZipStream\Option\Archive; use ZipStream\ZipStream; class Xlsx extends BaseWriter @@ -377,7 +376,7 @@ class Xlsx extends BaseWriter } // Add theme to ZIP file - $zipContent['xl/theme/theme1.xml'] = $this->getWriterPartTheme()->writeTheme(); + $zipContent['xl/theme/theme1.xml'] = $this->getWriterPartTheme()->writeTheme($this->spreadSheet); // Add string table to ZIP file $zipContent['xl/sharedStrings.xml'] = $this->getWriterPartStringTable()->writeStringTable($this->stringTable); @@ -546,11 +545,7 @@ class Xlsx extends BaseWriter $this->openFileHandle($filename); - $options = new Archive(); - $options->setEnableZip64(false); - $options->setOutputStream($this->fileHandle); - - $this->zip = new ZipStream(null, $options); + $this->zip = ZipStream0::newZipStream($this->fileHandle); $this->addZipFiles($zipContent); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php index 6465904e..6d302aac 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Chart.php @@ -14,6 +14,7 @@ use PhpOffice\PhpSpreadsheet\Chart\Title; use PhpOffice\PhpSpreadsheet\Chart\TrendLine; use PhpOffice\PhpSpreadsheet\Reader\Xlsx\Namespaces; use PhpOffice\PhpSpreadsheet\Shared\XMLWriter; +use PhpOffice\PhpSpreadsheet\Style\Font; use PhpOffice\PhpSpreadsheet\Writer\Exception as WriterException; class Chart extends WriterPart @@ -109,12 +110,20 @@ class Chart extends WriterPart $objWriter->endElement(); $objWriter->endElement(); // c:chart + + $objWriter->startElement('c:spPr'); if ($chart->getNoFill()) { - $objWriter->startElement('c:spPr'); $objWriter->startElement('a:noFill'); $objWriter->endElement(); // a:noFill - $objWriter->endElement(); // c:spPr } + $fillColor = $chart->getFillColor(); + if ($fillColor->isUsable()) { + $this->writeColor($objWriter, $fillColor); + } + $borderLines = $chart->getBorderLines(); + $this->writeLineStyles($objWriter, $borderLines); + $this->writeEffects($objWriter, $borderLines); + $objWriter->endElement(); // c:spPr $this->writePrintSettings($objWriter); @@ -201,6 +210,17 @@ class Chart extends WriterPart $objWriter->writeAttribute('val', ($legend->getOverlay()) ? '1' : '0'); $objWriter->endElement(); + $objWriter->startElement('c:spPr'); + $fillColor = $legend->getFillColor(); + if ($fillColor->isUsable()) { + $this->writeColor($objWriter, $fillColor); + } + $borderLines = $legend->getBorderLines(); + $this->writeLineStyles($objWriter, $borderLines); + $this->writeEffects($objWriter, $borderLines); + $objWriter->endElement(); // c:spPr + + $legendText = $legend->getLegendText(); $objWriter->startElement('c:txPr'); $objWriter->startElement('a:bodyPr'); $objWriter->endElement(); @@ -213,17 +233,21 @@ class Chart extends WriterPart $objWriter->writeAttribute('rtl', '0'); $objWriter->startElement('a:defRPr'); - $objWriter->endElement(); - $objWriter->endElement(); + if ($legendText !== null) { + $this->writeColor($objWriter, $legendText->getFillColorObject()); + $this->writeEffects($objWriter, $legendText); + } + $objWriter->endElement(); // a:defRpr + $objWriter->endElement(); // a:pPr $objWriter->startElement('a:endParaRPr'); $objWriter->writeAttribute('lang', 'en-US'); - $objWriter->endElement(); + $objWriter->endElement(); // a:endParaRPr - $objWriter->endElement(); - $objWriter->endElement(); + $objWriter->endElement(); // a:p + $objWriter->endElement(); // c:txPr - $objWriter->endElement(); + $objWriter->endElement(); // c:legend } /** @@ -307,19 +331,26 @@ class Chart extends WriterPart $objWriter->startElement('c:hiLowLines'); $objWriter->endElement(); - $objWriter->startElement('c:upDownBars'); - - $objWriter->startElement('c:gapWidth'); - $objWriter->writeAttribute('val', '300'); - $objWriter->endElement(); - - $objWriter->startElement('c:upBars'); - $objWriter->endElement(); - - $objWriter->startElement('c:downBars'); - $objWriter->endElement(); - - $objWriter->endElement(); + $gapWidth = $plotArea->getGapWidth(); + $upBars = $plotArea->getUseUpBars(); + $downBars = $plotArea->getUseDownBars(); + if ($gapWidth !== null || $upBars || $downBars) { + $objWriter->startElement('c:upDownBars'); + if ($gapWidth !== null) { + $objWriter->startElement('c:gapWidth'); + $objWriter->writeAttribute('val', "$gapWidth"); + $objWriter->endElement(); + } + if ($upBars) { + $objWriter->startElement('c:upBars'); + $objWriter->endElement(); + } + if ($downBars) { + $objWriter->startElement('c:downBars'); + $objWriter->endElement(); + } + $objWriter->endElement(); // c:upDownBars + } } // Generate 3 unique numbers to use for axId values @@ -428,8 +459,8 @@ class Chart extends WriterPart } $objWriter->endElement(); // c:spPr } - $fontColor = $chartLayout->getLabelFontColor(); - if ($fontColor && $fontColor->isUsable()) { + $labelFont = $chartLayout->getLabelFont(); + if ($labelFont !== null) { $objWriter->startElement('c:txPr'); $objWriter->startElement('a:bodyPr'); @@ -445,14 +476,7 @@ class Chart extends WriterPart $objWriter->startElement('a:lstStyle'); $objWriter->endElement(); // a:lstStyle - - $objWriter->startElement('a:p'); - $objWriter->startElement('a:pPr'); - $objWriter->startElement('a:defRPr'); - $this->writeColor($objWriter, $fontColor); - $objWriter->endElement(); // a:defRPr - $objWriter->endElement(); // a:pPr - $objWriter->endElement(); // a:p + $this->writeLabelFont($objWriter, $labelFont, $chartLayout->getLabelEffects()); $objWriter->endElement(); // c:txPr } @@ -608,25 +632,24 @@ class Chart extends WriterPart } $textRotation = $yAxis->getAxisOptionsProperty('textRotation'); - if (is_numeric($textRotation)) { + $axisText = $yAxis->getAxisText(); + + if ($axisText !== null || is_numeric($textRotation)) { $objWriter->startElement('c:txPr'); $objWriter->startElement('a:bodyPr'); - $objWriter->writeAttribute('rot', Properties::angleToXml((float) $textRotation)); + if (is_numeric($textRotation)) { + $objWriter->writeAttribute('rot', Properties::angleToXml((float) $textRotation)); + } $objWriter->endElement(); // a:bodyPr $objWriter->startElement('a:lstStyle'); $objWriter->endElement(); // a:lstStyle - $objWriter->startElement('a:p'); - $objWriter->startElement('a:pPr'); - $objWriter->startElement('a:defRPr'); - $objWriter->endElement(); // a:defRPr - $objWriter->endElement(); // a:pPr - $objWriter->endElement(); // a:p + $this->writeLabelFont($objWriter, ($axisText === null) ? null : $axisText->getFont(), $axisText); $objWriter->endElement(); // c:txPr } $objWriter->startElement('c:spPr'); $this->writeColor($objWriter, $yAxis->getFillColorObject()); - $this->writeLineStyles($objWriter, $yAxis); + $this->writeLineStyles($objWriter, $yAxis, $yAxis->getNoFill()); $this->writeEffects($objWriter, $yAxis); $objWriter->endElement(); // spPr @@ -826,25 +849,26 @@ class Chart extends WriterPart } $textRotation = $xAxis->getAxisOptionsProperty('textRotation'); - if (is_numeric($textRotation)) { + $axisText = $xAxis->getAxisText(); + + if ($axisText !== null || is_numeric($textRotation)) { $objWriter->startElement('c:txPr'); $objWriter->startElement('a:bodyPr'); - $objWriter->writeAttribute('rot', Properties::angleToXml((float) $textRotation)); + if (is_numeric($textRotation)) { + $objWriter->writeAttribute('rot', Properties::angleToXml((float) $textRotation)); + } $objWriter->endElement(); // a:bodyPr $objWriter->startElement('a:lstStyle'); $objWriter->endElement(); // a:lstStyle - $objWriter->startElement('a:p'); - $objWriter->startElement('a:pPr'); - $objWriter->startElement('a:defRPr'); - $objWriter->endElement(); // a:defRPr - $objWriter->endElement(); // a:pPr - $objWriter->endElement(); // a:p + + $this->writeLabelFont($objWriter, ($axisText === null) ? null : $axisText->getFont(), $axisText); + $objWriter->endElement(); // c:txPr } $objWriter->startElement('c:spPr'); $this->writeColor($objWriter, $xAxis->getFillColorObject()); - $this->writeLineStyles($objWriter, $xAxis); + $this->writeLineStyles($objWriter, $xAxis, $xAxis->getNoFill()); $this->writeEffects($objWriter, $xAxis); $objWriter->endElement(); //end spPr @@ -1055,14 +1079,6 @@ class Chart extends WriterPart $labelFill = $plotLabel->getFillColorObject(); $labelFill = ($labelFill instanceof ChartColor) ? $labelFill : null; } - if ($plotLabel && $groupType !== DataSeries::TYPE_LINECHART) { - $fillColor = $plotLabel->getFillColorObject(); - if ($fillColor !== null && !is_array($fillColor) && $fillColor->isUsable()) { - $objWriter->startElement('c:spPr'); - $this->writeColor($objWriter, $fillColor); - $objWriter->endElement(); // c:spPr - } - } // Values $plotSeriesValues = $plotGroup->getPlotValuesByIndex($plotSeriesIdx); @@ -1094,6 +1110,12 @@ class Chart extends WriterPart $plotSeriesValues !== false ) { $objWriter->startElement('c:spPr'); + if ($plotLabel && $groupType !== DataSeries::TYPE_LINECHART) { + $fillColor = $plotLabel->getFillColorObject(); + if ($fillColor !== null && !is_array($fillColor) && $fillColor->isUsable()) { + $this->writeColor($objWriter, $fillColor); + } + } $fillObject = $labelFill ?? $plotSeriesValues->getFillColorObject(); $callLineStyles = true; if ($fillObject instanceof ChartColor && $fillObject->isUsable()) { @@ -1398,7 +1420,7 @@ class Chart extends WriterPart $count = $plotSeriesValues->getPointCount(); $source = $plotSeriesValues->getDataSource(); $values = $plotSeriesValues->getDataValues(); - if ($count > 1 || ($count === 1 && "=$source" !== (string) $values[0])) { + if ($count > 1 || ($count === 1 && array_key_exists(0, $values) && "=$source" !== (string) $values[0])) { $objWriter->startElement('c:' . $dataType . 'Cache'); if (($groupType != DataSeries::TYPE_PIECHART) && ($groupType != DataSeries::TYPE_PIECHART_3D) && ($groupType != DataSeries::TYPE_DONUTCHART)) { @@ -1770,4 +1792,51 @@ class Chart extends WriterPart } } } + + private function writeLabelFont(XMLWriter $objWriter, ?Font $labelFont, ?Properties $axisText): void + { + $objWriter->startElement('a:p'); + $objWriter->startElement('a:pPr'); + $objWriter->startElement('a:defRPr'); + if ($labelFont !== null) { + $fontSize = $labelFont->getSize(); + if (is_numeric($fontSize)) { + $fontSize *= (($fontSize < 100) ? 100 : 1); + $objWriter->writeAttribute('sz', (string) $fontSize); + } + if ($labelFont->getBold() === true) { + $objWriter->writeAttribute('b', '1'); + } + if ($labelFont->getItalic() === true) { + $objWriter->writeAttribute('i', '1'); + } + $fontColor = $labelFont->getChartColor(); + if ($fontColor !== null) { + $this->writeColor($objWriter, $fontColor); + } + } + if ($axisText !== null) { + $this->writeEffects($objWriter, $axisText); + } + if ($labelFont !== null) { + if (!empty($labelFont->getLatin())) { + $objWriter->startElement('a:latin'); + $objWriter->writeAttribute('typeface', $labelFont->getLatin()); + $objWriter->endElement(); + } + if (!empty($labelFont->getEastAsian())) { + $objWriter->startElement('a:eastAsian'); + $objWriter->writeAttribute('typeface', $labelFont->getEastAsian()); + $objWriter->endElement(); + } + if (!empty($labelFont->getComplexScript())) { + $objWriter->startElement('a:complexScript'); + $objWriter->writeAttribute('typeface', $labelFont->getComplexScript()); + $objWriter->endElement(); + } + } + $objWriter->endElement(); // a:defRPr + $objWriter->endElement(); // a:pPr + $objWriter->endElement(); // a:p + } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php index 8902826a..8c33f593 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/DocProps.php @@ -93,6 +93,9 @@ class DocProps extends WriterPart // SharedDoc $objWriter->writeElement('SharedDoc', 'false'); + // HyperlinkBase + $objWriter->writeElement('HyperlinkBase', $spreadsheet->getProperties()->getHyperlinkBase()); + // HyperlinksChanged $objWriter->writeElement('HyperlinksChanged', 'false'); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/FunctionPrefix.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/FunctionPrefix.php index ecc247d8..cf4f9069 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/FunctionPrefix.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/FunctionPrefix.php @@ -4,7 +4,7 @@ namespace PhpOffice\PhpSpreadsheet\Writer\Xlsx; class FunctionPrefix { - const XLFNREGEXP = '/(?:_xlfn\.)?((?:_xlws\.)?(' + const XLFNREGEXP = '/(?:_xlfn\.)?((?:_xlws\.)?\b(' // functions added with Excel 2010 . 'beta[.]dist' . '|beta[.]inv' diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php index 7f623933..29e95eb2 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php @@ -64,7 +64,7 @@ class StringTable extends WriterPart /** * Write string table to XML format. * - * @param (string|RichText)[] $stringTable + * @param (RichText|string)[] $stringTable * * @return string XML Output */ @@ -226,9 +226,10 @@ class StringTable extends WriterPart if ($element->getFont() !== null) { // rPr $objWriter->startElement($prefix . 'rPr'); - $size = $element->getFont()->getSize(); - if (is_numeric($size)) { - $objWriter->writeAttribute('sz', (string) (int) ($size * 100)); + $fontSize = $element->getFont()->getSize(); + if (is_numeric($fontSize)) { + $fontSize *= (($fontSize < 100) ? 100 : 1); + $objWriter->writeAttribute('sz', (string) $fontSize); } // Bold diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php index 0261f22e..baafdc33 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php @@ -112,8 +112,13 @@ class Style extends WriterPart $objWriter->writeAttribute('count', (string) count($spreadsheet->getCellXfCollection())); // xf + $alignment = new Alignment(); + $defaultAlignHash = $alignment->getHashCode(); + if ($defaultAlignHash !== $spreadsheet->getDefaultStyle()->getAlignment()->getHashCode()) { + $defaultAlignHash = ''; + } foreach ($spreadsheet->getCellXfCollection() as $cellXf) { - $this->writeCellStyleXf($objWriter, $cellXf, $spreadsheet); + $this->writeCellStyleXf($objWriter, $cellXf, $spreadsheet, $defaultAlignHash); } $objWriter->endElement(); @@ -354,6 +359,13 @@ class Style extends WriterPart $objWriter->endElement(); } + if (!empty($font->getScheme())) { + $this->startFont($objWriter, $fontStarted); + $objWriter->startElement('scheme'); + $objWriter->writeAttribute('val', $font->getScheme()); + $objWriter->endElement(); + } + if ($fontStarted) { $objWriter->endElement(); } @@ -400,7 +412,7 @@ class Style extends WriterPart /** * Write Cell Style Xf. */ - private function writeCellStyleXf(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Style\Style $style, Spreadsheet $spreadsheet): void + private function writeCellStyleXf(XMLWriter $objWriter, \PhpOffice\PhpSpreadsheet\Style\Style $style, Spreadsheet $spreadsheet, string $defaultAlignHash): void { // xf $objWriter->startElement('xf'); @@ -424,7 +436,11 @@ class Style extends WriterPart $objWriter->writeAttribute('applyNumberFormat', ($spreadsheet->getDefaultStyle()->getNumberFormat()->getHashCode() != $style->getNumberFormat()->getHashCode()) ? '1' : '0'); $objWriter->writeAttribute('applyFill', ($spreadsheet->getDefaultStyle()->getFill()->getHashCode() != $style->getFill()->getHashCode()) ? '1' : '0'); $objWriter->writeAttribute('applyBorder', ($spreadsheet->getDefaultStyle()->getBorders()->getHashCode() != $style->getBorders()->getHashCode()) ? '1' : '0'); - $applyAlignment = ($spreadsheet->getDefaultStyle()->getAlignment()->getHashCode() != $style->getAlignment()->getHashCode()) ? '1' : '0'; + if ($defaultAlignHash !== '' && $defaultAlignHash === $style->getAlignment()->getHashCode()) { + $applyAlignment = '0'; + } else { + $applyAlignment = '1'; + } $objWriter->writeAttribute('applyAlignment', $applyAlignment); if ($style->getProtection()->getLocked() != Protection::PROTECTION_INHERIT || $style->getProtection()->getHidden() != Protection::PROTECTION_INHERIT) { $objWriter->writeAttribute('applyProtection', 'true'); diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Theme.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Theme.php index 9ff29d45..1e8ef5b4 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Theme.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Theme.php @@ -4,109 +4,17 @@ namespace PhpOffice\PhpSpreadsheet\Writer\Xlsx; use PhpOffice\PhpSpreadsheet\Reader\Xlsx\Namespaces; use PhpOffice\PhpSpreadsheet\Shared\XMLWriter; +use PhpOffice\PhpSpreadsheet\Spreadsheet; +use PhpOffice\PhpSpreadsheet\Theme as SpreadsheetTheme; class Theme extends WriterPart { - /** - * Map of Major fonts to write. - * - * @var string[] - */ - private static $majorFonts = [ - 'Jpan' => 'MS Pゴシック', - 'Hang' => '맑은 고딕', - 'Hans' => '宋体', - 'Hant' => '新細明體', - 'Arab' => 'Times New Roman', - 'Hebr' => 'Times New Roman', - 'Thai' => 'Tahoma', - 'Ethi' => 'Nyala', - 'Beng' => 'Vrinda', - 'Gujr' => 'Shruti', - 'Khmr' => 'MoolBoran', - 'Knda' => 'Tunga', - 'Guru' => 'Raavi', - 'Cans' => 'Euphemia', - 'Cher' => 'Plantagenet Cherokee', - 'Yiii' => 'Microsoft Yi Baiti', - 'Tibt' => 'Microsoft Himalaya', - 'Thaa' => 'MV Boli', - 'Deva' => 'Mangal', - 'Telu' => 'Gautami', - 'Taml' => 'Latha', - 'Syrc' => 'Estrangelo Edessa', - 'Orya' => 'Kalinga', - 'Mlym' => 'Kartika', - 'Laoo' => 'DokChampa', - 'Sinh' => 'Iskoola Pota', - 'Mong' => 'Mongolian Baiti', - 'Viet' => 'Times New Roman', - 'Uigh' => 'Microsoft Uighur', - 'Geor' => 'Sylfaen', - ]; - - /** - * Map of Minor fonts to write. - * - * @var string[] - */ - private static $minorFonts = [ - 'Jpan' => 'MS Pゴシック', - 'Hang' => '맑은 고딕', - 'Hans' => '宋体', - 'Hant' => '新細明體', - 'Arab' => 'Arial', - 'Hebr' => 'Arial', - 'Thai' => 'Tahoma', - 'Ethi' => 'Nyala', - 'Beng' => 'Vrinda', - 'Gujr' => 'Shruti', - 'Khmr' => 'DaunPenh', - 'Knda' => 'Tunga', - 'Guru' => 'Raavi', - 'Cans' => 'Euphemia', - 'Cher' => 'Plantagenet Cherokee', - 'Yiii' => 'Microsoft Yi Baiti', - 'Tibt' => 'Microsoft Himalaya', - 'Thaa' => 'MV Boli', - 'Deva' => 'Mangal', - 'Telu' => 'Gautami', - 'Taml' => 'Latha', - 'Syrc' => 'Estrangelo Edessa', - 'Orya' => 'Kalinga', - 'Mlym' => 'Kartika', - 'Laoo' => 'DokChampa', - 'Sinh' => 'Iskoola Pota', - 'Mong' => 'Mongolian Baiti', - 'Viet' => 'Arial', - 'Uigh' => 'Microsoft Uighur', - 'Geor' => 'Sylfaen', - ]; - - /** - * Map of core colours. - * - * @var string[] - */ - private static $colourScheme = [ - 'dk2' => '1F497D', - 'lt2' => 'EEECE1', - 'accent1' => '4F81BD', - 'accent2' => 'C0504D', - 'accent3' => '9BBB59', - 'accent4' => '8064A2', - 'accent5' => '4BACC6', - 'accent6' => 'F79646', - 'hlink' => '0000FF', - 'folHlink' => '800080', - ]; - /** * Write theme to XML format. * * @return string XML Output */ - public function writeTheme() + public function writeTheme(Spreadsheet $spreadsheet) { // Create XML writer $objWriter = null; @@ -115,6 +23,7 @@ class Theme extends WriterPart } else { $objWriter = new XMLWriter(XMLWriter::STORAGE_MEMORY); } + $theme = $spreadsheet->getTheme(); // XML header $objWriter->startDocument('1.0', 'UTF-8', 'yes'); @@ -129,50 +38,39 @@ class Theme extends WriterPart // a:clrScheme $objWriter->startElement('a:clrScheme'); - $objWriter->writeAttribute('name', 'Office'); + $objWriter->writeAttribute('name', $theme->getThemeColorName()); - // a:dk1 - $objWriter->startElement('a:dk1'); - - // a:sysClr - $objWriter->startElement('a:sysClr'); - $objWriter->writeAttribute('val', 'windowText'); - $objWriter->writeAttribute('lastClr', '000000'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:lt1 - $objWriter->startElement('a:lt1'); - - // a:sysClr - $objWriter->startElement('a:sysClr'); - $objWriter->writeAttribute('val', 'window'); - $objWriter->writeAttribute('lastClr', 'FFFFFF'); - $objWriter->endElement(); - - $objWriter->endElement(); - - // a:dk2 - $this->writeColourScheme($objWriter); + $this->writeColourScheme($objWriter, $theme); $objWriter->endElement(); // a:fontScheme $objWriter->startElement('a:fontScheme'); - $objWriter->writeAttribute('name', 'Office'); + $objWriter->writeAttribute('name', $theme->getThemeFontName()); // a:majorFont $objWriter->startElement('a:majorFont'); - $this->writeFonts($objWriter, 'Cambria', self::$majorFonts); - $objWriter->endElement(); + $this->writeFonts( + $objWriter, + $theme->getMajorFontLatin(), + $theme->getMajorFontEastAsian(), + $theme->getMajorFontComplexScript(), + $theme->getMajorFontSubstitutions() + ); + $objWriter->endElement(); // a:majorFont // a:minorFont $objWriter->startElement('a:minorFont'); - $this->writeFonts($objWriter, 'Calibri', self::$minorFonts); - $objWriter->endElement(); + $this->writeFonts( + $objWriter, + $theme->getMinorFontLatin(), + $theme->getMinorFontEastAsian(), + $theme->getMinorFontComplexScript(), + $theme->getMinorFontSubstitutions() + ); + $objWriter->endElement(); // a:minorFont - $objWriter->endElement(); + $objWriter->endElement(); // a:fontScheme // a:fmtScheme $objWriter->startElement('a:fmtScheme'); @@ -786,7 +684,7 @@ class Theme extends WriterPart * * @param string[] $fontSet */ - private function writeFonts(XMLWriter $objWriter, string $latinFont, array $fontSet): void + private function writeFonts(XMLWriter $objWriter, string $latinFont, string $eastAsianFont, string $complexScriptFont, array $fontSet): void { // a:latin $objWriter->startElement('a:latin'); @@ -795,12 +693,12 @@ class Theme extends WriterPart // a:ea $objWriter->startElement('a:ea'); - $objWriter->writeAttribute('typeface', ''); + $objWriter->writeAttribute('typeface', $eastAsianFont); $objWriter->endElement(); // a:cs $objWriter->startElement('a:cs'); - $objWriter->writeAttribute('typeface', ''); + $objWriter->writeAttribute('typeface', $complexScriptFont); $objWriter->endElement(); foreach ($fontSet as $fontScript => $typeface) { @@ -814,16 +712,33 @@ class Theme extends WriterPart /** * Write colour scheme to XML format. */ - private function writeColourScheme(XMLWriter $objWriter): void + private function writeColourScheme(XMLWriter $objWriter, SpreadsheetTheme $theme): void { - foreach (self::$colourScheme as $colourName => $colourValue) { - $objWriter->startElement('a:' . $colourName); + $themeArray = $theme->getThemeColors(); + // a:dk1 + $objWriter->startElement('a:dk1'); + $objWriter->startElement('a:sysClr'); + $objWriter->writeAttribute('val', 'windowText'); + $objWriter->writeAttribute('lastClr', $themeArray['dk1'] ?? '000000'); + $objWriter->endElement(); // a:sysClr + $objWriter->endElement(); // a:dk1 - $objWriter->startElement('a:srgbClr'); - $objWriter->writeAttribute('val', $colourValue); - $objWriter->endElement(); + // a:lt1 + $objWriter->startElement('a:lt1'); + $objWriter->startElement('a:sysClr'); + $objWriter->writeAttribute('val', 'window'); + $objWriter->writeAttribute('lastClr', $themeArray['lt1'] ?? 'FFFFFF'); + $objWriter->endElement(); // a:sysClr + $objWriter->endElement(); // a:lt1 - $objWriter->endElement(); + foreach ($themeArray as $colourName => $colourValue) { + if ($colourName !== 'dk1' && $colourName !== 'lt1') { + $objWriter->startElement('a:' . $colourName); + $objWriter->startElement('a:srgbClr'); + $objWriter->writeAttribute('val', $colourValue); + $objWriter->endElement(); // a:srgbClr + $objWriter->endElement(); // a:$colourName + } } } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php index 53c45124..5e453b3d 100644 --- a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php @@ -18,6 +18,18 @@ use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet as PhpspreadsheetWorksheet; class Worksheet extends WriterPart { + /** @var string */ + private $numberStoredAsText = ''; + + /** @var string */ + private $formula = ''; + + /** @var string */ + private $twoDigitTextYear = ''; + + /** @var string */ + private $evalError = ''; + /** * Write worksheet to XML format. * @@ -28,6 +40,10 @@ class Worksheet extends WriterPart */ public function writeWorksheet(PhpspreadsheetWorksheet $worksheet, $stringTable = [], $includeCharts = false) { + $this->numberStoredAsText = ''; + $this->formula = ''; + $this->twoDigitTextYear = ''; + $this->evalError = ''; // Create XML writer $objWriter = null; if ($this->getParentWriter()->getUseDiskCaching()) { @@ -118,6 +134,9 @@ class Worksheet extends WriterPart // AlternateContent $this->writeAlternateContent($objWriter, $worksheet); + // IgnoredErrors + $this->writeIgnoredErrors($objWriter); + // Table $this->writeTable($objWriter, $worksheet); @@ -131,6 +150,32 @@ class Worksheet extends WriterPart return $objWriter->getData(); } + private function writeIgnoredError(XMLWriter $objWriter, bool &$started, string $attr, string $cells): void + { + if ($cells !== '') { + if (!$started) { + $objWriter->startElement('ignoredErrors'); + $started = true; + } + $objWriter->startElement('ignoredError'); + $objWriter->writeAttribute('sqref', substr($cells, 1)); + $objWriter->writeAttribute($attr, '1'); + $objWriter->endElement(); + } + } + + private function writeIgnoredErrors(XMLWriter $objWriter): void + { + $started = false; + $this->writeIgnoredError($objWriter, $started, 'numberStoredAsText', $this->numberStoredAsText); + $this->writeIgnoredError($objWriter, $started, 'formula', $this->formula); + $this->writeIgnoredError($objWriter, $started, 'twoDigitTextYear', $this->twoDigitTextYear); + $this->writeIgnoredError($objWriter, $started, 'evalError', $this->evalError); + if ($started) { + $objWriter->endElement(); + } + } + /** * Write SheetPr. */ @@ -1134,7 +1179,20 @@ class Worksheet extends WriterPart array_pop($columnsInRow); foreach ($columnsInRow as $column) { // Write cell - $this->writeCell($objWriter, $worksheet, "{$column}{$currentRow}", $aFlippedStringTable); + $coord = "$column$currentRow"; + if ($worksheet->getCell($coord)->getIgnoredErrors()->getNumberStoredAsText()) { + $this->numberStoredAsText .= " $coord"; + } + if ($worksheet->getCell($coord)->getIgnoredErrors()->getFormula()) { + $this->formula .= " $coord"; + } + if ($worksheet->getCell($coord)->getIgnoredErrors()->getTwoDigitTextYear()) { + $this->twoDigitTextYear .= " $coord"; + } + if ($worksheet->getCell($coord)->getIgnoredErrors()->getEvalError()) { + $this->evalError .= " $coord"; + } + $this->writeCell($objWriter, $worksheet, $coord, $aFlippedStringTable); } } diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/ZipStream0.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/ZipStream0.php new file mode 100644 index 00000000..886731ca --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/ZipStream0.php @@ -0,0 +1,17 @@ +setEnableZip64(false); + $options->setOutputStream($fileHandle); + + return new ZipStream(null, $options); + } +} diff --git a/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/ZipStream3.php b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/ZipStream3.php new file mode 100644 index 00000000..d9c8d0b1 --- /dev/null +++ b/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/ZipStream3.php @@ -0,0 +1,22 @@ + $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片搜索接口 https://cloud.tencent.com/document/product/460/63901 diff --git a/vendor/qcloud/cos-sdk-v5/sample/ImageSearchAdd.php b/vendor/qcloud/cos-sdk-v5/sample/ImageSearchAdd.php index f7ef7e7d..0f27c1d2 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/ImageSearchAdd.php +++ b/vendor/qcloud/cos-sdk-v5/sample/ImageSearchAdd.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 添加图库图片 https://cloud.tencent.com/document/product/460/63900 diff --git a/vendor/qcloud/cos-sdk-v5/sample/ImageSearchDelete.php b/vendor/qcloud/cos-sdk-v5/sample/ImageSearchDelete.php index 296b70f3..afd1e981 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/ImageSearchDelete.php +++ b/vendor/qcloud/cos-sdk-v5/sample/ImageSearchDelete.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 删除图库图片 https://cloud.tencent.com/document/product/460/63902 diff --git a/vendor/qcloud/cos-sdk-v5/sample/ImageSearchOpen.php b/vendor/qcloud/cos-sdk-v5/sample/ImageSearchOpen.php index e8eeb4be..08086da6 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/ImageSearchOpen.php +++ b/vendor/qcloud/cos-sdk-v5/sample/ImageSearchOpen.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 开通以图搜图 https://cloud.tencent.com/document/product/460/63899 diff --git a/vendor/qcloud/cos-sdk-v5/sample/abortMultipartUpload.php b/vendor/qcloud/cos-sdk-v5/sample/abortMultipartUpload.php index b19063db..cd89d96a 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/abortMultipartUpload.php +++ b/vendor/qcloud/cos-sdk-v5/sample/abortMultipartUpload.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->abortMultipartUpload(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/blindWatermark.php b/vendor/qcloud/cos-sdk-v5/sample/blindWatermark.php index b0ad9c4f..0ed54195 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/blindWatermark.php +++ b/vendor/qcloud/cos-sdk-v5/sample/blindWatermark.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $blindWatermarkTemplate = new Qcloud\Cos\ImageParamTemplate\BlindWatermarkTemplate(); diff --git a/vendor/qcloud/cos-sdk-v5/sample/cancelInventoryTriggerJob.php b/vendor/qcloud/cos-sdk-v5/sample/cancelInventoryTriggerJob.php index 5be4543e..2bf71049 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/cancelInventoryTriggerJob.php +++ b/vendor/qcloud/cos-sdk-v5/sample/cancelInventoryTriggerJob.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/71515 取消存量任务 diff --git a/vendor/qcloud/cos-sdk-v5/sample/cancelLiveVideoAuditing.php b/vendor/qcloud/cos-sdk-v5/sample/cancelLiveVideoAuditing.php index 81c04f7b..e417c8dd 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/cancelLiveVideoAuditing.php +++ b/vendor/qcloud/cos-sdk-v5/sample/cancelLiveVideoAuditing.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->cancelLiveVideoAuditing(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/catchException.php b/vendor/qcloud/cos-sdk-v5/sample/catchException.php index 817fa480..ea05fcc2 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/catchException.php +++ b/vendor/qcloud/cos-sdk-v5/sample/catchException.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getBucketAcl(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/ciTransformation.php b/vendor/qcloud/cos-sdk-v5/sample/ciTransformation.php index 870c0097..6b85a695 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/ciTransformation.php +++ b/vendor/qcloud/cos-sdk-v5/sample/ciTransformation.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $imageMogrTemplate = new Qcloud\Cos\ImageParamTemplate\ImageMogrTemplate(); diff --git a/vendor/qcloud/cos-sdk-v5/sample/closeImageSlim.php b/vendor/qcloud/cos-sdk-v5/sample/closeImageSlim.php new file mode 100644 index 00000000..5b2e3975 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/closeImageSlim.php @@ -0,0 +1,23 @@ + $region, + 'schema' => 'https', //协议头部,默认为http + 'credentials' => array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + $result = $cosClient->closeImageSlim(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + )); + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/completeMultipartUpload.php b/vendor/qcloud/cos-sdk-v5/sample/completeMultipartUpload.php index ae99d209..7495bca8 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/completeMultipartUpload.php +++ b/vendor/qcloud/cos-sdk-v5/sample/completeMultipartUpload.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->completeMultipartUpload(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/copy.php b/vendor/qcloud/cos-sdk-v5/sample/copy.php index ce9a8da7..5300bcbf 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/copy.php +++ b/vendor/qcloud/cos-sdk-v5/sample/copy.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); $local_path = "/data/exampleobject"; try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/copyObject.php b/vendor/qcloud/cos-sdk-v5/sample/copyObject.php index 48d8b0fd..3e4d85a5 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/copyObject.php +++ b/vendor/qcloud/cos-sdk-v5/sample/copyObject.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->copyObject(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/cosClient.php b/vendor/qcloud/cos-sdk-v5/sample/cosClient.php index 6fd386e1..e5d93663 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/cosClient.php +++ b/vendor/qcloud/cos-sdk-v5/sample/cosClient.php @@ -21,10 +21,12 @@ $cosClient = new Qcloud\Cos\Client( 'userAgent' => '', //UA 'allow_redirects' => false, //是否follow302 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey, 'token' => $token, 'anonymous' => true, //匿名模式 - ) + ), + 'timezone' => 'PRC', //时区 + 'locationWithSchema' => true //Location中是否包含schema ) ); diff --git a/vendor/qcloud/cos-sdk-v5/sample/createAiTranslationJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createAiTranslationJobs.php new file mode 100644 index 00000000..0937d57f --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/createAiTranslationJobs.php @@ -0,0 +1,54 @@ + $region, + 'schema' => 'https', // 万象接口必须使用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 提交一个翻译任务 https://cloud.tencent.com/document/product/460/84799 + $result = $cosClient->createAiTranslationJobs(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'Translation', + 'Input' => array( + 'Object' => 'test.docx', + 'Lang' => 'zh', + 'Type' => 'docx', +// 'BasicType' => '', + ), + 'Operation' => array( +// 'UserData' => 'xxx', +// 'JobLevel' => '', +// 'NoNeedOutput' => 'true', + 'Translation' => array( + 'Lang' => 'en', + 'Type' => 'docx', + ), + 'Output' => array( + 'Region' => $region, + 'Bucket' => 'examplebucket-125000000', + 'Object' => 'xxx.txt', + ), + ), +// 'CallBack' => '', +// 'CallBackFormat' => '', +// 'CallBackType' => '', +// 'CallBackMqConfig' => array( +// 'MqRegion' => '', +// 'MqMode' => '', +// 'MqName' => '', +// ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/createAiWordsGeneralizeJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createAiWordsGeneralizeJobs.php new file mode 100644 index 00000000..c94fb290 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/createAiWordsGeneralizeJobs.php @@ -0,0 +1,45 @@ + $region, + 'schema' => 'https', // 万象接口必须使用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 提交一个分词任务 https://cloud.tencent.com/document/product/460/84800 + $result = $cosClient->createAiWordsGeneralizeJobs(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'WordsGeneralize', + 'Input' => array( + 'Object' => 'test.txt', + ), + 'Operation' => array( +// 'UserData' => '', +// 'JobLevel' => '', + 'WordsGeneralize' => array( + 'NerMethod' => 'DL', + 'SegMethod' => 'MIX', + ), + ), +// 'CallBack' => '', +// 'CallBackFormat' => '', +// 'CallBackType' => '', +// 'CallBackMqConfig' => array( +// 'MqRegion' => '', +// 'MqMode' => '', +// 'MqName' => '', +// ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/createBucket.php b/vendor/qcloud/cos-sdk-v5/sample/createBucket.php index b90b0710..542290cf 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createBucket.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createBucket.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->createBucket(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/createDocProcessJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createDocProcessJobs.php index f85f27ce..ec441fa6 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createDocProcessJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createDocProcessJobs.php @@ -10,13 +10,12 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->createDocProcessJobs(array( 'Bucket' => 'examplebucket-1250000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'DocProcess', //任务的 Tag:DocProcess 固定值 - 'QueueId' => 'pd8e422a2ea134165a92f2012ea43****', //任务所在的队列 ID 'Input' => array( 'Object' => 'Append功能测试.pdf' //待操作的文件对象 ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createFileCompressJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createFileCompressJobs.php index 4892e324..afbca6e5 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createFileCompressJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createFileCompressJobs.php @@ -10,14 +10,13 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/83112 提交多文件打包压缩任务-异步 $result = $cosClient->createFileCompressJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'FileCompress', -// 'QueueId' => 'pcc3ae89sa9d807fs89dg789sdg', 'Operation' => array( 'UserData' => 'xxx', 'FileCompressConfig' => array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/createFileHashCodeJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createFileHashCodeJobs.php index 4c9fb3db..f7e4dd6a 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createFileHashCodeJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createFileHashCodeJobs.php @@ -10,14 +10,13 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/83108 提交哈希值计算任务-异步 $result = $cosClient->createFileHashCodeJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'FileHashCode', -// 'QueueId' => 'pcc3ae89sa9d807fs89dg789sdg', 'Input' => array( 'Object' => 'test.mp4', ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createFileUncompressJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createFileUncompressJobs.php index f3b741a1..3a920d79 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createFileUncompressJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createFileUncompressJobs.php @@ -10,14 +10,13 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/83110 提交文件解压任务-异步 $result = $cosClient->createFileUncompressJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'FileUncompress', -// 'QueueId' => 'pcc3ae89sa9d807fs89dg789sdg', 'Input' => array( 'Object' => 'test.zip', ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createFolder.php b/vendor/qcloud/cos-sdk-v5/sample/createFolder.php index f008f60f..caf645e9 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createFolder.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createFolder.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->putObject(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/createInventoryTriggerJob.php b/vendor/qcloud/cos-sdk-v5/sample/createInventoryTriggerJob.php index 5ef3e2b7..5ce099f5 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createInventoryTriggerJob.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createInventoryTriggerJob.php @@ -8,15 +8,17 @@ $region = "ap-beijing"; //替换为用户的 region,已创建桶归属的regio $cosClient = new Qcloud\Cos\Client( array( 'region' => $region, - 'schema' => 'https', //协议头部,默认为http + 'schema' => 'https', // 万象接口必须使用https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/71516 触发批量存量任务 + // 1. 触发任务(工作流)https://cloud.tencent.com/document/product/460/76887 $result = $cosClient->createInventoryTriggerJob(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Name' => '存量触发任务名称', + 'Type' => 'Workflow', 'Input' => array( // 'Manifest' => '', // 'UrlFile' => '', @@ -28,6 +30,76 @@ try { // 'TimeInterval' => array( // 'Start' => '', // 'End' => '', +// ), + ), + )); + // 请求成功 + print_r($result); + + // 2. 触发任务(独立节点)https://cloud.tencent.com/document/product/460/80155 + $result = $cosClient->createInventoryTriggerJob(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Name' => '存量触发任务名称', + 'Type' => 'Job', + 'Input' => array( +// 'Manifest' => '', +// 'UrlFile' => '', +// 'Prefix' => '', + 'Object' => 'test01.png', + ), + 'Operation' => array( + 'Tag' => '', + 'QueueId' => '', + 'QueueType' => '', + 'TimeInterval' => array( + 'Start' => '', + 'End' => '', + ), + 'Output' => array( + 'Region' => '', + 'Bucket' => '', + 'Object' => '', + 'AuObject' => '', + 'SpriteObject' => '', + 'StreamExtract' => array( + 'Index' => '', + 'Object' => '', + ), + ), + 'JobParam' => array( + // 根据Tag输入相应参数,参数详情参考 https://cloud.tencent.com/document/product/460/80155 + 'TemplateId' => '', + 'TranscodeTemplateId' => '', + 'WatermarkTemplateId' => '', +// 'Animation' => ..., +// 'Transcode' => ..., +// 'SmartCover' => ..., +// 'DigitalWatermark' => ..., +// 'Watermark' => ..., +// 'RemoveWatermark' => ..., +// 'Snapshot' => ..., +// 'SpeechRecognition' => ..., +// 'ConcatTemplate' => ..., +// 'VoiceSeparate' => ..., +// 'VideoMontage' => ..., +// 'SDRtoHDR' => ..., +// 'VideoProcess' => ..., +// 'SuperResolution' => ..., +// 'Segment' => ..., +// 'ExtractDigitalWatermark' => ..., +// 'VideoTag' => ..., +// 'TtsTpl' => ..., +// 'NoiseReduction' => ..., + ), +// 'UserData' => '', +// 'JobLevel' => '', +// 'CallBackFormat' => '', +// 'CallBackType' => '', +// 'CallBack' => '', +// 'CallBackMqConfig' => array( +// 'MqRegion' => '', +// 'MqMode' => '', +// 'MqName' => '', // ), ), )); diff --git a/vendor/qcloud/cos-sdk-v5/sample/createM3U8PlayListJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createM3U8PlayListJobs.php new file mode 100644 index 00000000..0f041e8d --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/createM3U8PlayListJobs.php @@ -0,0 +1,45 @@ + $region, + 'schema' => 'https', //协议头部,默认为http + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + $result = $cosClient->createM3U8PlayListJobs(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'StartTime' => 1679386006, + 'EndTime' => 1679386006, + 'Operation' => array( + 'M3U8List' => array( + array( + 'BucketId' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Index' => '0', + 'ObjectPath' => 'test1.m3u8', + ), + array( + 'BucketId' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Index' => '0', + 'ObjectPath' => 'test2.m3u8', + ), + ), + 'Output' => array( + 'Region' => $region, + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Object' => 'xxx.m3u8', + ), + ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaAnimationJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaAnimationJobs.php index b1bd6491..cd63d355 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaAnimationJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaAnimationJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交动图任务 https://cloud.tencent.com/document/product/436/54001 @@ -18,7 +18,6 @@ try { $result = $cosClient->createMediaAnimationJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'Animation', - 'QueueId' => 'p81e648af2aee49688xxxxxxxxxxxxxxxx', 'Input' => array( 'Object' => 'video01.mp4' ), @@ -42,7 +41,6 @@ try { $result = $cosClient->createMediaAnimationJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'Animation', - 'QueueId' => 'p81e648af2aee49688xxxxxxxxxxxxxxxx', 'Input' => array( 'Object' => 'video01.mp4' ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaAnimationTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaAnimationTemplate.php index de0f9af2..6154a587 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaAnimationTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaAnimationTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->createMediaAnimationTemplate(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaConcatJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaConcatJobs.php index 1a12df20..ea8da091 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaConcatJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaConcatJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交拼接任务 https://cloud.tencent.com/document/product/436/54013 @@ -18,7 +18,6 @@ try { $result = $cosClient->createMediaConcatJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'Concat', - 'QueueId' => 'asdadadfafsdkjhfjghdfjg', 'CallBack' => 'https://example.com/callback', 'Input' => array( 'Object' => 'video01.mp4' @@ -42,7 +41,6 @@ try { $result = $cosClient->createMediaConcatJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'Concat', - 'QueueId' => 'asdadadfafsdkjhfjghdfjg', 'CallBack' => 'https://example.com/callback', 'Input' => array( 'Object' => 'video01.mp4' @@ -88,6 +86,34 @@ try { 'Height' => '', 'Fps' => '30', ), + 'AudioMixArray' => array( + array( + 'AudioSource' => '', + 'MixMode' => '', + 'Replace' => '', + 'EffectConfig' => array( + 'EnableStartFadein' => '', + 'StartFadeinTime' => '', + 'EnableEndFadeout' => '', + 'EndFadeoutTime' => '', + 'EnableBgmFade' => '', + 'BgmFadeTime' => '', + ), + ), + array( + 'AudioSource' => '', + 'MixMode' => '', + 'Replace' => '', + 'EffectConfig' => array( + 'EnableStartFadein' => '', + 'StartFadeinTime' => '', + 'EnableEndFadeout' => '', + 'EndFadeoutTime' => '', + 'EnableBgmFade' => '', + 'BgmFadeTime' => '', + ), + ), + ), ), ), )); diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaConcatTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaConcatTemplate.php index bee8a541..4075a2d4 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaConcatTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaConcatTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/54041 新增拼接模板 @@ -46,6 +46,34 @@ try { 'Container' => array( 'Format' => 'mp4', ), + 'AudioMixArray' => array( + array( + 'AudioSource' => '', + 'MixMode' => '', + 'Replace' => '', + 'EffectConfig' => array( + 'EnableStartFadein' => '', + 'StartFadeinTime' => '', + 'EnableEndFadeout' => '', + 'EndFadeoutTime' => '', + 'EnableBgmFade' => '', + 'BgmFadeTime' => '', + ), + ), + array( + 'AudioSource' => '', + 'MixMode' => '', + 'Replace' => '', + 'EffectConfig' => array( + 'EnableStartFadein' => '', + 'StartFadeinTime' => '', + 'EnableEndFadeout' => '', + 'EndFadeoutTime' => '', + 'EnableBgmFade' => '', + 'BgmFadeTime' => '', + ), + ), + ), ), )); // 请求成功 diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaDigitalWatermarkJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaDigitalWatermarkJobs.php index 51660ce4..0208ad3c 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaDigitalWatermarkJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaDigitalWatermarkJobs.php @@ -10,14 +10,13 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 嵌入数字水印任务 https://cloud.tencent.com/document/product/436/65999 $result = $cosClient->createMediaDigitalWatermarkJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'DigitalWatermark', - 'QueueId' => 'p81e648af2aee496885707caxxxxxxxxxxxx', 'Input' => array( 'Object' => 'video01.mp4' ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaExtractDigitalWatermarkJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaExtractDigitalWatermarkJobs.php index c8e9ac21..fb005a08 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaExtractDigitalWatermarkJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaExtractDigitalWatermarkJobs.php @@ -10,14 +10,13 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提取数字水印任务 https://cloud.tencent.com/document/product/436/66007 $result = $cosClient->createMediaExtractDigitalWatermarkJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'ExtractDigitalWatermark', - 'QueueId' => 'p81e648af2aee496885707caxxxxxxxxx', 'Input' => array( 'Object' => 'DigitalWatermark.mp4' ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaHighSpeedHdTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaHighSpeedHdTemplate.php index 127fac86..dfff76df 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaHighSpeedHdTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaHighSpeedHdTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/58307 新增极速高清转码模板 diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaJobs.php index 56dd9548..9895cefe 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaJobs.php @@ -10,14 +10,13 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 多任务接口 https://cloud.tencent.com/document/product/436/58335 $result = $cosClient->CreateMediaJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'Transcode', // 可选,单一任务时,优先以Operation.Tag为准,当Operation无Tag参数时,该参数生效 - 'QueueId' => 'paaf4fce5521a40888a303xxxxxxxxxxxxxx', 'CallBack' => '', 'Input' => array( 'Object' => 'example.mp4' diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaNoiseReductionJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaNoiseReductionJobs.php index 65d83830..6e52fc7b 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaNoiseReductionJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaNoiseReductionJobs.php @@ -10,18 +10,22 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { + // 提交一个音频降噪任务 https://cloud.tencent.com/document/product/460/84796 $result = $cosClient->createMediaNoiseReductionJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'NoiseReduction', - 'QueueId' => 'p81e648af2aee4968857xxxxxxxxxxxxxxxx', - 'CallBack' => '', 'Input' => array( 'Object' => 'sound01.mp3', ), 'Operation' => array( + 'TemplateId' => '', +// 'NoiseReduction' => array( +// 'Format' => '', +// 'SampleRate' => '', +// ), 'Output' => array( 'Region' => $region, 'Bucket' => 'examplebucket-125000000', @@ -30,6 +34,14 @@ try { // 'UserData' => 'xxx', // 透传用户信息 // 'JobLevel' => '0', // 任务优先级,级别限制:0 、1 、2。级别越大任务优先级越高,默认为0 ), +// 'CallBack' => '', +// 'CallBackFormat' => '', +// 'CallBackType' => '', +// 'CallBackMqConfig' => array( +// 'MqRegion' => '', +// 'MqMode' => '', +// 'MqName' => '', +// ), )); // 请求成功 print_r($result); diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaPicProcessJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaPicProcessJobs.php index b3760e59..79a411b5 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaPicProcessJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaPicProcessJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交图片处理任务 https://cloud.tencent.com/document/product/436/67194 @@ -18,7 +18,6 @@ try { $result = $cosClient->createMediaPicProcessJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'PicProcess', - 'QueueId' => 'pcf4d6d9e5e734asd0as8d09as8d09a8d0', 'Input' => array( 'Object' => 'test01.png' ), @@ -43,7 +42,6 @@ try { $result = $cosClient->createMediaPicProcessJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'PicProcess', - 'QueueId' => 'pcf4d6d9e5e734asd0as8d09as8d09a8d0', 'Input' => array( 'Object' => 'test01.png' ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaPicProcessTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaPicProcessTemplate.php index fc6c5588..a042f1cf 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaPicProcessTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaPicProcessTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/67225 新增图片处理模板 diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaQualityEstimateJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaQualityEstimateJobs.php index 184670a0..e1c6f087 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaQualityEstimateJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaQualityEstimateJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交视频质量评分任务 https://cloud.tencent.com/document/product/460/76906 diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaSDRtoHDRJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaSDRtoHDRJobs.php index 96b9b8a0..6dc4bda9 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaSDRtoHDRJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaSDRtoHDRJobs.php @@ -10,14 +10,13 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交 SDR to HDR 任务 https://cloud.tencent.com/document/product/436/60754 $result = $cosClient->createMediaSDRtoHDRJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'SDRtoHDR', - 'QueueId' => 'p81e648af2aee496885a8d09a8s09d8a0sd6', 'Input' => array( 'Object' => 'video01.mp4' ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaSegmentJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaSegmentJobs.php index 76ac5790..00ec3aa9 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaSegmentJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaSegmentJobs.php @@ -10,14 +10,13 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交转封装任务 https://cloud.tencent.com/document/product/436/67186 $result = $cosClient->createMediaSegmentJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'Segment', - 'QueueId' => 'p81e648af2aee496885707ca0xxxxxxxxx', 'Input' => array( 'Object' => 'video01.mp4' ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaSmartCoverJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaSmartCoverJobs.php index b7f448c1..574e16fc 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaSmartCoverJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaSmartCoverJobs.php @@ -10,14 +10,13 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交智能封面任务 https://cloud.tencent.com/document/product/436/54017 $result = $cosClient->createMediaSmartCoverJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'SmartCover', - 'QueueId' => 'p81e648afxxxxxxxxxxxxxxxxx', 'Input' => array( 'Object' => 'video01.mp4' ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaSmartCoverTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaSmartCoverTemplate.php new file mode 100644 index 00000000..53f97911 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaSmartCoverTemplate.php @@ -0,0 +1,34 @@ + $region, + 'schema' => 'https', // 万象接口必须使用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 创建智能封面模板 https://cloud.tencent.com/document/product/460/84734 + $result = $cosClient->createMediaSmartCoverTemplate(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'SmartCover', + 'Name' => 'media-smartcover-name', + 'SmartCover' => array( + 'Format' => 'jpg', + 'Width' => '1280', + 'Height' => '960', + 'Count' => '3', + 'DeleteDuplicates' => 'true', + ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaSnapshotJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaSnapshotJobs.php index 9e3ce752..669a43e5 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaSnapshotJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaSnapshotJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交截图任务 https://cloud.tencent.com/document/product/436/76933 @@ -18,7 +18,6 @@ try { $result = $cosClient->createMediaSnapshotJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'Snapshot', - 'QueueId' => 'asdadadfafsdkjhfjghdfjg', 'CallBack' => 'https://example.com/callback', 'Input' => array( 'Object' => 'video01.mp4' @@ -49,7 +48,6 @@ try { $result = $cosClient->createMediaSnapshotJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'Snapshot', - 'QueueId' => 'asdadadfafsdkjhfjghdfjg', 'CallBack' => 'https://example.com/callback', 'Input' => array( 'Object' => 'video01.mp4' diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaSnapshotTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaSnapshotTemplate.php index 07dc1b8a..0af1c5cc 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaSnapshotTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaSnapshotTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/54029 新增截图模板 diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaStreamExtractJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaStreamExtractJobs.php index 71028f9b..ec44ca65 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaStreamExtractJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaStreamExtractJobs.php @@ -10,14 +10,13 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { - // 提交一个音视频流分离任务 https://cloud.tencent.com/document/product/460/76911 + // 提交一个音视频流分离任务 https://cloud.tencent.com/document/product/460/84787 $result = $cosClient->createMediaStreamExtractJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'StreamExtract', - 'QueueId' => 'p81e648af2aee4968857xxxxxxxxxxxxxxxx', 'Input' => array( 'Object' => 'test.mp4', ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaSuperResolutionJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaSuperResolutionJobs.php index 764976f3..c5668854 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaSuperResolutionJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaSuperResolutionJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交超分辨率任务 https://cloud.tencent.com/document/product/436/67210 @@ -18,7 +18,6 @@ try { $result = $cosClient->createMediaSuperResolutionJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'SuperResolution', - 'QueueId' => 'p81e648af2aee49688570xxxxxxxxxxx', 'Input' => array( 'Object' => 'video01.mp4' ), @@ -50,7 +49,6 @@ try { $result = $cosClient->createMediaSuperResolutionJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'SuperResolution', - 'QueueId' => 'p81e648af2aee49688570xxxxxxxxxxx', 'Input' => array( 'Object' => 'video01.mp4' ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaSuperResolutionTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaSuperResolutionTemplate.php index 6c9fa6d4..c77313f5 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaSuperResolutionTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaSuperResolutionTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->createMediaSuperResolutionTemplate(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaTranscodeJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaTranscodeJobs.php index 576ab79b..98453148 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaTranscodeJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaTranscodeJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交转码任务 https://cloud.tencent.com/document/product/436/54009 @@ -18,7 +18,6 @@ try { $result = $cosClient->createMediaTranscodeJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'Transcode', - 'QueueId' => 'paaf4fce5521a40888a3034a5de80f6ca', 'Input' => array( 'Object' => 'example.mp4' ), @@ -26,6 +25,7 @@ try { 'TemplateId' => 't04e1ab86554984f1aa17c062fbf6c007c', // 'UserData' => 'xxx', // 透传用户信息 // 'JobLevel' => '0', // 任务优先级,级别限制:0 、1 、2。级别越大任务优先级越高,默认为0 + 'FreeTranscode' => 'true', // 闲时转码 'Output' => array( 'Region' => $region, 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket @@ -72,7 +72,6 @@ try { $result = $cosClient->createMediaTranscodeJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'Transcode', - 'QueueId' => 'asdadadfafsdkjhfjghdfjg', 'CallBack' => 'https://example.com/callback', 'Input' => array( 'Object' => 'video01.mp4' @@ -80,6 +79,7 @@ try { 'Operation' => array( // 'UserData' => 'xxx', // 透传用户信息 // 'JobLevel' => '0', // 任务优先级,级别限制:0 、1 、2。级别越大任务优先级越高,默认为0 + 'FreeTranscode' => 'true', // 闲时转码 'Output' => array( 'Region' => $region, 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket @@ -112,6 +112,34 @@ try { 'Start' => '0', 'Duration' => '60', ), + 'AudioMixArray' => array( + array( + 'AudioSource' => '', + 'MixMode' => '', + 'Replace' => '', + 'EffectConfig' => array( + 'EnableStartFadein' => '', + 'StartFadeinTime' => '', + 'EnableEndFadeout' => '', + 'EndFadeoutTime' => '', + 'EnableBgmFade' => '', + 'BgmFadeTime' => '', + ), + ), + array( + 'AudioSource' => '', + 'MixMode' => '', + 'Replace' => '', + 'EffectConfig' => array( + 'EnableStartFadein' => '', + 'StartFadeinTime' => '', + 'EnableEndFadeout' => '', + 'EndFadeoutTime' => '', + 'EnableBgmFade' => '', + 'BgmFadeTime' => '', + ), + ), + ), ), ), )); diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaTranscodeProTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaTranscodeProTemplate.php new file mode 100644 index 00000000..24d8f1e8 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaTranscodeProTemplate.php @@ -0,0 +1,61 @@ + $region, + 'schema' => 'https', // 万象接口必须使用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 创建音视频转码 pro 模板 https://cloud.tencent.com/document/product/460/84732 + $result = $cosClient->createMediaTranscodeProTemplate(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'TranscodePro', + 'Name' => 'media-transcode-pro-name', + 'Container' => array( + 'Format' => 'mxf', + ), + 'Video' => array( + 'Codec' => 'xavc', + 'Profile' => 'XAVC-HD_intra_420_10bit_class50', + 'Width' => '1440', + 'Height' => '1080', + 'Interlaced' => 'true', + 'Fps' => '30000/1001', + 'Bitrate' => '', + 'Rotate' => '', + ), + 'TimeInterval' => array( + 'Start' => '', + 'Duration' => '', + ), + 'Audio' => array( + 'Codec' => '', + 'Remove' => '', + ), + 'TransConfig' => array( + 'AdjDarMethod' => '', + 'IsCheckReso' => '', + 'ResoAdjMethod' => '', + 'IsCheckVideoBitrate' => '', + 'VideoBitrateAdjMethod' => '', + 'IsCheckAudioBitrate' => '', + 'AudioBitrateAdjMethod' => '', + 'IsCheckVideoFps' => '', + 'VideoFpsAdjMethod' => '', + 'DeleteMetadata' => '', + 'IsHdr2Sdr' => '', + ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaTranscodeTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaTranscodeTemplate.php index 9942dd52..ab9d9829 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaTranscodeTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaTranscodeTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/54037 新增转码模板 @@ -70,6 +70,34 @@ try { 'UriKey' => '', ), ), + 'AudioMixArray' => array( + array( + 'AudioSource' => '', + 'MixMode' => '', + 'Replace' => '', + 'EffectConfig' => array( + 'EnableStartFadein' => '', + 'StartFadeinTime' => '', + 'EnableEndFadeout' => '', + 'EndFadeoutTime' => '', + 'EnableBgmFade' => '', + 'BgmFadeTime' => '', + ), + ), + array( + 'AudioSource' => '', + 'MixMode' => '', + 'Replace' => '', + 'EffectConfig' => array( + 'EnableStartFadein' => '', + 'StartFadeinTime' => '', + 'EnableEndFadeout' => '', + 'EndFadeoutTime' => '', + 'EnableBgmFade' => '', + 'BgmFadeTime' => '', + ), + ), + ), )); // 请求成功 print_r($result); diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoEnhanceJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoEnhanceJobs.php new file mode 100644 index 00000000..d90fd136 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoEnhanceJobs.php @@ -0,0 +1,201 @@ + $region, + 'schema' => 'https', //协议头部,默认为http + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 提交画质增强任务 https://cloud.tencent.com/document/product/460/84775 + // start --------------- 使用模版 ----------------- // + $result = $cosClient->createMediaVideoEnhanceJobs(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'VideoEnhance', + 'Input' => array( + 'Object' => 'test.mp4', + ), + 'Operation' => array( + 'TemplateId' => '', // 画质增强模板 ID + 'Output' => array( + 'Region' => $region, + 'Bucket' => 'examplebucket-125000000', + 'Object' => 'tmp/output.mp4', + ), +// 'UserData' => 'xxx', +// 'JobLevel' => '0', +// 'WatermarkTemplateId' => array( +// 'WatermarkTemplateId-1', +// 'WatermarkTemplateId-2', +// ), +// 'Watermark' => array( +// array( +// 'Type' => '', +// 'Pos' => '', +// 'LocMode' => '', +// 'Dx' => '', +// 'Dy' => '', +// 'StartTime' => '', +// 'EndTime' => '', +// 'Image' => array( +// 'Url' => '', +// 'Mode' => '', +// 'Width' => '', +// 'Height' => '', +// 'Transparency' => '', +// 'Background' => '', +// ), +// 'Text' => array( +// 'FontSize' => '', +// 'FontType' => '', +// 'FontColor' => '', +// 'Transparency' => '', +// 'Text' => '', +// ), +// 'SlideConfig' => array( +// 'SlideMode' => '', +// 'XSlideSpeed' => '', +// 'YSlideSpeed' => '', +// ), +// ), +// ), +// 'DigitalWatermark' => array( +// 'Message' => '', +// 'Type' => '', +// 'Version' => '', +// 'IgnoreError' => '', +// 'State' => '', +// ), + ), +// 'CallBack' => '', +// 'CallBackFormat' => '', +// 'CallBackType' => '', +// 'CallBackMqConfig' => array( +// 'MqRegion' => '', +// 'MqMode' => '', +// 'MqName' => '', +// ), + )); + // 请求成功 + print_r($result); + // end --------------- 使用模版 ----------------- // + + // start --------------- 自定义参数 ----------------- // + $result = $cosClient->createMediaVideoEnhanceJobs(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'VideoEnhance', + 'Input' => array( + 'Object' => 'test.mp4', + ), + 'Operation' => array( + // 画质增强参数 + 'VideoEnhance' => array( + 'Transcode' => array( + 'Container' => array( + 'Format' => 'mp4', + ), + 'Video' => array( + 'Codec' => 'H.264', + 'Width' => '1280', + 'Height' => '920', + 'Fps' => '30', + ), + 'Audio' => array( + 'Codec' => 'aac', + 'Samplerate' => '44100', + 'Bitrate' => '128', + 'Channels' => '4', + ), + ), + 'SuperResolution' => array( + 'Resolution' => 'sdtohd', + 'EnableScaleUp' => 'true', + 'Version' => 'Enhance', + ), + 'SDRtoHDR' => array( + 'HdrMode' => 'HDR10', + ), + 'ColorEnhance' => array( + 'Contrast' => '50', + 'Correction' => '100', + 'Saturation' => '100', + ), + 'MsSharpen' => array( + 'SharpenLevel' => '5', + ), + 'FrameEnhance' => array( + 'FrameDoubling' => 'true', + ), + ), + 'Output' => array( + 'Region' => $region, + 'Bucket' => 'examplebucket-125000000', + 'Object' => 'tmp/output.mp4', + ), +// 'UserData' => 'xxx', +// 'JobLevel' => '0', +// 'WatermarkTemplateId' => array( +// 'WatermarkTemplateId-1', +// 'WatermarkTemplateId-2', +// ), +// 'Watermark' => array( +// array( +// 'Type' => '', +// 'Pos' => '', +// 'LocMode' => '', +// 'Dx' => '', +// 'Dy' => '', +// 'StartTime' => '', +// 'EndTime' => '', +// 'Image' => array( +// 'Url' => '', +// 'Mode' => '', +// 'Width' => '', +// 'Height' => '', +// 'Transparency' => '', +// 'Background' => '', +// ), +// 'Text' => array( +// 'FontSize' => '', +// 'FontType' => '', +// 'FontColor' => '', +// 'Transparency' => '', +// 'Text' => '', +// ), +// 'SlideConfig' => array( +// 'SlideMode' => '', +// 'XSlideSpeed' => '', +// 'YSlideSpeed' => '', +// ), +// ), +// ), +// 'DigitalWatermark' => array( +// 'Message' => '', +// 'Type' => '', +// 'Version' => '', +// 'IgnoreError' => '', +// 'State' => '', +// ), + ), +// 'CallBack' => '', +// 'CallBackFormat' => '', +// 'CallBackType' => '', +// 'CallBackMqConfig' => array( +// 'MqRegion' => '', +// 'MqMode' => '', +// 'MqName' => '', +// ), + )); + // 请求成功 + print_r($result); + // end --------------- 自定义参数 ----------------- // +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoEnhanceTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoEnhanceTemplate.php new file mode 100644 index 00000000..d18de858 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoEnhanceTemplate.php @@ -0,0 +1,65 @@ + $region, + 'schema' => 'https', //协议头部,默认为http + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // https://cloud.tencent.com/document/product/460/84722 创建画质增强模板 + $result = $cosClient->createMediaVideoEnhanceTemplate(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'VideoEnhance', + 'Name' => 'TemplateName', + 'VideoEnhance' => array( + 'Transcode' => array( + 'Container' => array( + 'Format' => 'mp4', + ), + 'Video' => array( + 'Codec' => 'H.264', + 'Width' => '1280', + 'Height' => '920', + 'Fps' => '30', + ), + 'Audio' => array( + 'Codec' => 'aac', + 'Samplerate' => '44100', + 'Bitrate' => '128', + 'Channels' => '4', + ), + ), + 'SuperResolution' => array( + 'Resolution' => 'sdtohd', + 'EnableScaleUp' => 'true', + 'Version' => 'Enhance', + ), + 'SDRtoHDR' => array( + 'HdrMode' => 'HDR10', + ), + 'ColorEnhance' => array( + 'Contrast' => '50', + 'Correction' => '100', + 'Saturation' => '100', + ), + 'MsSharpen' => array( + 'SharpenLevel' => '5', + ), + 'FrameEnhance' => array( + 'FrameDoubling' => 'true', + ), + ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoMontageJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoMontageJobs.php index 9dcf9b56..7af63ae7 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoMontageJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoMontageJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交精彩集锦任务 https://cloud.tencent.com/document/product/436/58337 @@ -18,7 +18,6 @@ try { $result = $cosClient->createMediaVideoMontageJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'VideoMontage', - 'QueueId' => 'p81e648af2aeexxxxxxxxxxxxxxxxxxx', 'Input' => array( 'Object' => 'video01.mp4' ), @@ -42,13 +41,13 @@ try { $result = $cosClient->createMediaVideoMontageJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'VideoMontage', - 'QueueId' => 'p81e648af2aeexxxxxxxxxxxxxxxxxxx', 'Input' => array( 'Object' => 'video01.mp4' ), 'Operation' => array( 'VideoMontage' => array( 'Duration' => '', + 'Scene' => '', 'Container' => array( 'Format' => '', ), @@ -67,6 +66,21 @@ try { 'Channels' => '', 'Remove' => '', ), + 'AudioMixArray' => array( + array( + 'AudioSource' => 'https://examplebucket-125000000.cos.ap-guangzhou.myqcloud.com/test01.mp3', + 'MixMode' => 'Once', + 'Replace' => 'true', + 'EffectConfig' => array( + 'EnableStartFadein' => 'true', + 'StartFadeinTime' => '3', + 'EnableEndFadeout' => 'false', + 'EndFadeoutTime' => '0', + 'EnableBgmFade' => 'true', + 'BgmFadeTime' => '1.7', + ), + ), + ), ), 'Output' => array( 'Region' => $region, diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoMontageTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoMontageTemplate.php index 7d7bb4f0..64028923 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoMontageTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoMontageTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/58314 新增精彩集锦模板 @@ -19,6 +19,7 @@ try { 'Tag' => 'VideoMontage', 'Name' => 'VideoMontage-Template-Name', 'Duration' => '', + 'Scene' => '', 'Container' => array( 'Format' => 'mp4', ), @@ -37,10 +38,20 @@ try { 'Channels' => '', 'Remove' => '', ), - 'AudioMix' => array( - 'AudioSource' => 'https://examplebucket-125000000.cos.ap-guangzhou.myqcloud.com/test01.mp3', - 'MixMode' => 'Once', - 'Replace' => 'true', + 'AudioMixArray' => array( + array( + 'AudioSource' => 'https://examplebucket-125000000.cos.ap-guangzhou.myqcloud.com/test01.mp3', + 'MixMode' => 'Once', + 'Replace' => 'true', + 'EffectConfig' => array( + 'EnableStartFadein' => 'true', + 'StartFadeinTime' => '3', + 'EnableEndFadeout' => 'false', + 'EndFadeoutTime' => '0', + 'EnableBgmFade' => 'true', + 'BgmFadeTime' => '1.7', + ), + ), ), )); // 请求成功 diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoProcessJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoProcessJobs.php index b9f7d44b..8826102b 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoProcessJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoProcessJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交视频增强任务 https://cloud.tencent.com/document/product/436/60750 @@ -18,7 +18,6 @@ try { $result = $cosClient->createMediaVideoProcessJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'VideoProcess', - 'QueueId' => 'p81e648afxxxxxxxxxxxxxxxxx', 'Input' => array( 'Object' => 'video01.mp4' ), @@ -44,7 +43,6 @@ try { $result = $cosClient->createMediaVideoProcessJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'VideoProcess', - 'QueueId' => 'p81e648afxxxxxxxxxxxxxxxxx', 'Input' => array( 'Object' => 'video01.mp4' ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoProcessTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoProcessTemplate.php index 8f1e5727..1afae6fa 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoProcessTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoProcessTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/60745 新增视频增强模板 diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoTagJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoTagJobs.php index 64f84de1..19e414ff 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoTagJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaVideoTagJobs.php @@ -10,14 +10,13 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交视频标签任务 https://cloud.tencent.com/document/product/436/67202 $result = $cosClient->createMediaVideoTagJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'VideoTag', - 'QueueId' => 'p81e648af2aee496885707ca0xxxxxxxxx', 'Input' => array( 'Object' => 'video01.mp4' ), diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaVoiceSeparateJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaVoiceSeparateJobs.php index b76784ec..651fdf3a 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaVoiceSeparateJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaVoiceSeparateJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 提交人声分离任务 https://cloud.tencent.com/document/product/436/58341 @@ -18,7 +18,6 @@ try { $result = $cosClient->createMediaVoiceSeparateJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'VoiceSeparate', - 'QueueId' => '', 'CallBack' => '', 'Input' => array( 'Object' => 'test.mp3' @@ -43,7 +42,6 @@ try { $result = $cosClient->createMediaVoiceSeparateJobs(array( 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Tag' => 'VoiceSeparate', - 'QueueId' => '', 'CallBack' => '', 'Input' => array( 'Object' => 'test.mp3' diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaVoiceSeparateTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaVoiceSeparateTemplate.php index 21905720..c57053f9 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaVoiceSeparateTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaVoiceSeparateTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/58315 新增人声分离模板 diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMediaWatermarkTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createMediaWatermarkTemplate.php index 820e6304..79aa1fc4 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMediaWatermarkTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMediaWatermarkTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/54033 新增水印模板 diff --git a/vendor/qcloud/cos-sdk-v5/sample/createMultipartUpload.php b/vendor/qcloud/cos-sdk-v5/sample/createMultipartUpload.php index 2bf57208..72cff133 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/createMultipartUpload.php +++ b/vendor/qcloud/cos-sdk-v5/sample/createMultipartUpload.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->createMultipartUpload(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/createVoiceSpeechRecognitionJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createVoiceSpeechRecognitionJobs.php new file mode 100644 index 00000000..5cdd56da --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/createVoiceSpeechRecognitionJobs.php @@ -0,0 +1,95 @@ + $region, + 'schema' => 'https', // 万象接口必须使用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 提交一个语音识别任务 https://cloud.tencent.com/document/product/460/84798 + // 1. 使用模版 + $result = $cosClient->createVoiceSpeechRecognitionJobs(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'SpeechRecognition', + 'Input' => array( + 'Object' => 'test.mp3', +// 'Url' => '', + ), + 'Operation' => array( + 'TemplateId' => '', +// 'UserData' => '', +// 'JobLevel' => '', + 'Output' => array( + 'Region' => $region, + 'Bucket' => 'examplebucket-125000000', + 'Object' => 'xxx.txt', + ), + ), +// 'CallBack' => '', +// 'CallBackFormat' => '', +// 'CallBackType' => '', +// 'CallBackMqConfig' => array( +// 'MqRegion' => '', +// 'MqMode' => '', +// 'MqName' => '', +// ), + )); + // 请求成功 + print_r($result); + + // 2. 自定义参数 + $result = $cosClient->createVoiceSpeechRecognitionJobs(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'SpeechRecognition', + 'Input' => array( + 'Object' => 'test.mp3', +// 'Url' => '', + ), + 'Operation' => array( +// 'UserData' => '', +// 'JobLevel' => '', + 'SpeechRecognition' => array( + 'EngineModelType' => '16k_zh', + 'ChannelNum' => 1, + 'ResTextFormat' => 1, + 'FilterDirty' => 0, + 'FilterModal' => 1, + 'ConvertNumMode' => 0, + 'SpeakerDiarization' => 1, + 'SpeakerNumber' => 0, + 'FilterPunc' => 0, +// 'OutputFileType' => 'txt', +// 'FlashAsr' => 'true', +// 'Format' => 'mp3', +// 'FirstChannelOnly' => 1, +// 'WordInfo' => 1, +// 'SentenceMaxLength' => 6, + ), + 'Output' => array( + 'Region' => $region, + 'Bucket' => 'examplebucket-125000000', + 'Object' => 'xxx.txt', + ), + ), +// 'CallBack' => '', +// 'CallBackFormat' => '', +// 'CallBackType' => '', +// 'CallBackMqConfig' => array( +// 'MqRegion' => '', +// 'MqMode' => '', +// 'MqName' => '', +// ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/createVoiceSpeechRecognitionTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createVoiceSpeechRecognitionTemplate.php new file mode 100644 index 00000000..9524b883 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/createVoiceSpeechRecognitionTemplate.php @@ -0,0 +1,44 @@ + $region, + 'schema' => 'https', // 万象接口必须使用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 创建语音识别模板 https://cloud.tencent.com/document/product/460/84498 + $result = $cosClient->createVoiceSpeechRecognitionTemplate(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'SpeechRecognition', + 'Name' => 'voice-speechrecognition-name', + 'SpeechRecognition' => array( + 'EngineModelType' => '16k_zh', + 'ChannelNum' => 1, + 'ResTextFormat' => 1, + 'FilterDirty' => 0, + 'FilterModal' => 1, + 'ConvertNumMode' => 0, + 'SpeakerDiarization' => 1, + 'SpeakerNumber' => 0, + 'FilterPunc' => 0, + 'OutputFileType' => 'txt', +// 'FlashAsr' => 'true', +// 'Format' => 'mp3', +// 'FirstChannelOnly' => 1, +// 'WordInfo' => 1, +// 'SentenceMaxLength' => 6, + ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/createVoiceTtsJobs.php b/vendor/qcloud/cos-sdk-v5/sample/createVoiceTtsJobs.php new file mode 100644 index 00000000..b611fe21 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/createVoiceTtsJobs.php @@ -0,0 +1,86 @@ + $region, + 'schema' => 'https', // 万象接口必须使用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 提交一个语音合成任务 https://cloud.tencent.com/document/product/460/84797 + // 1. 使用模版 + $result = $cosClient->createVoiceTtsJobs(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'Tts', // 固定为 Tts + 'Operation' => array( + 'TemplateId' => 't1460606b9752148c4ab182f55163ba7cd', + 'TtsConfig' => array( + 'InputType' => 'Text', + 'Input' => '床前明月光,疑是地上霜', + ), + 'Output' => array( + 'Region' => $region, + 'Bucket' => 'examplebucket-125000000', + 'Object' => 'demo.mp3', + ), +// 'UserData' => 'xxx', +// 'JobLevel' => '0', + ), +// 'CallBack' => '', +// 'CallBackFormat' => '', +// 'CallBackType' => '', +// 'CallBackMqConfig' => array( +// 'MqRegion' => '', +// 'MqMode' => '', +// 'MqName' => '', +// ), + )); + // 请求成功 + print_r($result); + + // 2. 自定义参数 + $result = $cosClient->createVoiceTtsJobs(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'Tts', // 固定为 Tts + 'Operation' => array( + 'TtsConfig' => array( + 'InputType' => 'Text', + 'Input' => '床前明月光,疑是地上霜', + ), + 'TtsTpl' => array( + 'Mode' => 'Sync', + 'Codec' => 'pcm', + 'VoiceType' => 'aixiaoxing', + 'Volume' => '2', + 'Speed' => '200', + 'Emotion' => 'arousal', + ), + 'Output' => array( + 'Region' => $region, + 'Bucket' => 'examplebucket-125000000', + 'Object' => 'demo.mp3', + ), +// 'UserData' => 'xxx', +// 'JobLevel' => '0', + ), +// 'CallBack' => '', +// 'CallBackFormat' => '', +// 'CallBackType' => '', +// 'CallBackMqConfig' => array( +// 'MqRegion' => '', +// 'MqMode' => '', +// 'MqName' => '', +// ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/createVoiceTtsTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/createVoiceTtsTemplate.php new file mode 100644 index 00000000..bf3cc671 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/createVoiceTtsTemplate.php @@ -0,0 +1,33 @@ + $region, + 'schema' => 'https', // 万象接口必须使用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 创建语音合成模板 https://cloud.tencent.com/document/product/460/84499 + $result = $cosClient->createVoiceTtsTemplate(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Tag' => 'Tts', + 'Name' => 'TemplateName', + 'Mode' => 'Sync', + 'Codec' => 'pcm', + 'VoiceType' => 'aixiaoxing', + 'Volume' => '2', + 'Speed' => '200', + 'Emotion' => 'arousal', + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteBucket.php b/vendor/qcloud/cos-sdk-v5/sample/deleteBucket.php index efbbebac..5c67985f 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteBucket.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteBucket.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->deleteBucket(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketCors.php b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketCors.php index a67061e8..dbd8827c 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketCors.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketCors.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->deleteBucketCors(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketDomain.php b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketDomain.php index abb462f0..8821069f 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketDomain.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketDomain.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->deleteBucketDomain(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketGuetzli.php b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketGuetzli.php index 9b565d61..15b99895 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketGuetzli.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketGuetzli.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->DeleteBucketGuetzli(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketImageStyle.php b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketImageStyle.php index f23cd912..744e9885 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketImageStyle.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketImageStyle.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->DeleteBucketImageStyle(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketLifecycle.php b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketLifecycle.php index d83f46bf..117ef9cd 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketLifecycle.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketLifecycle.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->deleteBucketLifecycle(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketTagging.php b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketTagging.php index d9653688..110f0d9b 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketTagging.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketTagging.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->deleteBucketTagging(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketWebsite.php b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketWebsite.php index a8dd3d82..2e90caaf 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteBucketWebsite.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteBucketWebsite.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->deleteBucketWebsite(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteBuckets.php b/vendor/qcloud/cos-sdk-v5/sample/deleteBuckets.php index f2c61918..928d085c 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteBuckets.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteBuckets.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { //列出所有buckets diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteFolder.php b/vendor/qcloud/cos-sdk-v5/sample/deleteFolder.php index 9d0fa4bb..ecd44ccd 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteFolder.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteFolder.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); $cos_path = "cos/folder"; diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteObject.php b/vendor/qcloud/cos-sdk-v5/sample/deleteObject.php index 43cda7c4..940b5230 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteObject.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteObject.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->deleteObject(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteObjectTagging.php b/vendor/qcloud/cos-sdk-v5/sample/deleteObjectTagging.php index 3a1d528f..5ac8cd58 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteObjectTagging.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteObjectTagging.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->deleteObjectTagging(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/deleteWorkflow.php b/vendor/qcloud/cos-sdk-v5/sample/deleteWorkflow.php index 43ecea49..4bd28002 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/deleteWorkflow.php +++ b/vendor/qcloud/cos-sdk-v5/sample/deleteWorkflow.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/53990 删除工作流 diff --git a/vendor/qcloud/cos-sdk-v5/sample/describeInventoryTriggerJob.php b/vendor/qcloud/cos-sdk-v5/sample/describeInventoryTriggerJob.php index 0bbfa9e3..2ce252b4 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/describeInventoryTriggerJob.php +++ b/vendor/qcloud/cos-sdk-v5/sample/describeInventoryTriggerJob.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/71517 查询存量任务 diff --git a/vendor/qcloud/cos-sdk-v5/sample/describeInventoryTriggerJobs.php b/vendor/qcloud/cos-sdk-v5/sample/describeInventoryTriggerJobs.php index 1a50f501..fca96817 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/describeInventoryTriggerJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/describeInventoryTriggerJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/71518 批量拉取存量任务 diff --git a/vendor/qcloud/cos-sdk-v5/sample/describeMediaJob.php b/vendor/qcloud/cos-sdk-v5/sample/describeMediaJob.php index db7bfb4e..7f082863 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/describeMediaJob.php +++ b/vendor/qcloud/cos-sdk-v5/sample/describeMediaJob.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 查询指定的任务 diff --git a/vendor/qcloud/cos-sdk-v5/sample/describeMediaJobs.php b/vendor/qcloud/cos-sdk-v5/sample/describeMediaJobs.php index b9084a61..888ab691 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/describeMediaJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/describeMediaJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { /* diff --git a/vendor/qcloud/cos-sdk-v5/sample/describeMediaTemplates.php b/vendor/qcloud/cos-sdk-v5/sample/describeMediaTemplates.php index 535368a0..2aece082 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/describeMediaTemplates.php +++ b/vendor/qcloud/cos-sdk-v5/sample/describeMediaTemplates.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 查询模版列表 diff --git a/vendor/qcloud/cos-sdk-v5/sample/describeWorkflow.php b/vendor/qcloud/cos-sdk-v5/sample/describeWorkflow.php index b4576fcb..528f2b4a 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/describeWorkflow.php +++ b/vendor/qcloud/cos-sdk-v5/sample/describeWorkflow.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/53991 搜索工作流 diff --git a/vendor/qcloud/cos-sdk-v5/sample/detectAudio.php b/vendor/qcloud/cos-sdk-v5/sample/detectAudio.php index c46f1950..65256902 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/detectAudio.php +++ b/vendor/qcloud/cos-sdk-v5/sample/detectAudio.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // start --------------- 桶文件审核 ----------------- // @@ -38,6 +38,12 @@ try { // 'DetectType' => 'Porn,Terrorism,Politics,Ads', // 可选 若不传此参数,BizType为空时走默认策略,BizType不为空走定制化策略 // 'Callback' => '', // 可选 回调URL // 'CallbackVersion' => '', // 可选 回调内容的结构,有效值:Simple(回调内容包含基本信息)、Detail(回调内容包含详细信息)。默认为 Simple。 +// 'Freeze' => array( +// 'PornScore' => 90, +// 'AdsScore' => 90, +// 'PoliticsScore' => 90, +// 'TerrorismScore' => 90, +// ), // 可选 可通过该字段,设置根据审核结果给出的不同分值,对音频文件进行自动冻结,仅当`input`中审核的音频为`object`时有效 // ), // 可选 走默认策略及默认审核场景。 )); // 请求成功 diff --git a/vendor/qcloud/cos-sdk-v5/sample/detectDocument.php b/vendor/qcloud/cos-sdk-v5/sample/detectDocument.php index 6e1ec0c5..92d27790 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/detectDocument.php +++ b/vendor/qcloud/cos-sdk-v5/sample/detectDocument.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 存储桶文档审核 @@ -38,8 +38,16 @@ try { // 'BizType' => '', // 'DetectType' => 'Porn,Terrorism,Politics,Ads', // 选填,在只有BizType时走设定策略的审核场景 // 'Callback' => '', // 回调URL 选填 +// 'Freeze' => array( +// 'PornScore' => 90, +// 'AdsScore' => 90, +// 'PoliticsScore' => 90, +// 'TerrorismScore' => 90, +// ), // 选填 可通过该字段,设置根据审核结果给出的不同分值,对文档进行自动冻结。仅当`input`中审核的文档为`object`时有效。 // ), // 选填 在DetectType/BizType都不传的情况下,走默认策略及默认审核场景。 )); + // 请求成功 + print_r($result); // 文档URL审核 $result = $cosClient->detectDocument(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/detectImage.php b/vendor/qcloud/cos-sdk-v5/sample/detectImage.php index 054dca52..672e8d68 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/detectImage.php +++ b/vendor/qcloud/cos-sdk-v5/sample/detectImage.php @@ -19,7 +19,6 @@ try { 'Key' => 'test.png', // 桶文件 'ci-process' => 'sensitive-content-recognition', // 'BizType' => '', // 可选 定制化策略,不传走默认策略 -// 'DetectType' => 'porn,ads', // 可选 不填走默认策略 或 定制化策略,四种参数:porn,ads等,可使用多种规则,注意规则间不要加空格 // 'Interval' => 5, // 可选 审核 GIF 时使用 截帧的间隔 // 'MaxFrames' => 5, // 可选 针对 GIF 动图审核的最大截帧数量,需大于0。 // 'LargeImageDetect' => '', @@ -39,7 +38,6 @@ try { 'ci-process' => 'sensitive-content-recognition', 'DetectUrl' => $imgUrl, // 'BizType' => '', // 可选 定制化策略,不传走默认策略 -// 'DetectType' => 'porn,ads', // 可选 不填走默认策略 或 定制化策略,四种参数:porn,ads等,可使用多种规则,注意规则间不要加空格 // 'Interval' => 5, // 可选 审核 GIF 时使用 截帧的间隔 // 'MaxFrames' => 5, // 可选 针对 GIF 动图审核的最大截帧数量,需大于0。 // 'LargeImageDetect' => '', diff --git a/vendor/qcloud/cos-sdk-v5/sample/detectImages.php b/vendor/qcloud/cos-sdk-v5/sample/detectImages.php index b2c564e3..42ddc4c7 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/detectImages.php +++ b/vendor/qcloud/cos-sdk-v5/sample/detectImages.php @@ -27,26 +27,73 @@ try { // 'Interval' => '', // 可选 审核 GIF 时使用 截帧的间隔 // 'MaxFrames' => '', // 可选 针对 GIF 动图审核的最大截帧数量,需大于0。 // 'DataId' => 'aaa', // 可选 图片标识,该字段在结果中返回原始内容,长度限制为512字节 +// 'LargeImageDetect' => 1, // 对于超过大小限制的图片是否进行压缩后再审核,取值为: 0(不压缩),1(压缩)。默认为0。注:压缩最大支持32M的图片,且会收取压缩费用 +// 'UserInfo' => array( +// 'TokenId' => '', +// 'Nickname' => '', +// 'DeviceId' => '', +// 'AppId' => '', +// 'Room' => '', +// 'IP' => '', +// 'Type' => '', +// 'ReceiveTokenId' => '', +// 'Gender' => '', +// 'Level' => '', +// 'Role' => '', +// ), // 可选 用户业务字段 +// 'Encryption' => array( +// 'Algorithm' => '', +// 'Key' => '', +// 'IV' => '', +// 'KeyId' => '', +// 'KeyType' => 0, +// ), // 可选 文件加密信息。如果图片未做加密则不需要使用该字段,如果设置了该字段,则会按设置的信息解密后再做审核。 ), array( 'Url' => 'http://example.com/test.png', // 图片URL // 'Interval' => 5, // 可选 审核 GIF 时使用 截帧的间隔 // 'MaxFrames' => 5, // 可选 针对 GIF 动图审核的最大截帧数量,需大于0。 // 'DataId' => 'bbb', // 可选 图片标识,该字段在结果中返回原始内容,长度限制为512字节 +// 'LargeImageDetect' => 1, // 对于超过大小限制的图片是否进行压缩后再审核,取值为: 0(不压缩),1(压缩)。默认为0。注:压缩最大支持32M的图片,且会收取压缩费用 +// 'UserInfo' => array( +// 'TokenId' => '', +// 'Nickname' => '', +// 'DeviceId' => '', +// 'AppId' => '', +// 'Room' => '', +// 'IP' => '', +// 'Type' => '', +// 'ReceiveTokenId' => '', +// 'Gender' => '', +// 'Level' => '', +// 'Role' => '', +// ), // 可选 用户业务字段 +// 'Encryption' => array( +// 'Algorithm' => '', +// 'Key' => '', +// 'IV' => '', +// 'KeyId' => '', +// 'KeyType' => 0, +// ), // 可选 文件加密信息。如果图片未做加密则不需要使用该字段,如果设置了该字段,则会按设置的信息解密后再做审核。 ), // array( -// 'Content' => $imgBase64Content, // 图片文件的内容,需要先经过 base64 编码。 +// 'Content' => $imgBase64Content, // 图片文件的内容,需要先经过 base64 编码。注:Content方式提交图片不支持文件加密方式 //// 'Interval' => 5, // 可选 审核 GIF 时使用 截帧的间隔 //// 'MaxFrames' => 5, // 可选 针对 GIF 动图审核的最大截帧数量,需大于0。 -//// 'DataId' => 'bbb', // 可选 图片标识,该字段在结果中返回原始内容,长度限制为512字节 +//// 'DataId' => 'ccc', // 可选 图片标识,该字段在结果中返回原始内容,长度限制为512字节 // ), ), // 'Conf' => array( // 'BizType' => '', // 可选 定制化策略,不传走默认策略 -// 'DetectType' => 'Porn,Ads', // 可选 不填走默认策略 或 定制化策略,四种参数:Porn,Ads等,可使用多种规则,注意规则间不要加空格 // 'Async' => 0, // 可选 是否异步进行审核,0:同步返回结果,1:异步进行审核。默认值为 0。 // 'Callback' => '', // 可选 审核结果(Detail版本)以回调形式发送至您的回调地址 -// ) // 可选 在DetectType/BizType都不传的情况下,走默认策略及默认审核场景。 +// 'Freeze' => array( +// 'PornScore' => 90, +// 'AdsScore' => 90, +// 'PoliticsScore' => 90, +// 'TerrorismScore' => 90, +// ), // 可选 可通过该字段,设置根据审核结果给出的不同分值,对图片进行自动冻结,仅当`input`中审核的图片为`object`时有效。 +// ) // 可选 BizType 不传的情况下,走默认策略及默认审核场景。 )); // 请求成功 print_r($result); diff --git a/vendor/qcloud/cos-sdk-v5/sample/detectLable.php b/vendor/qcloud/cos-sdk-v5/sample/detectLable.php index 993bd962..55aa6fbd 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/detectLable.php +++ b/vendor/qcloud/cos-sdk-v5/sample/detectLable.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->DetectLabel(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/detectLiveVideo.php b/vendor/qcloud/cos-sdk-v5/sample/detectLiveVideo.php index 5694eda2..2f6c35cc 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/detectLiveVideo.php +++ b/vendor/qcloud/cos-sdk-v5/sample/detectLiveVideo.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->detectLiveVideo(array( @@ -34,6 +34,9 @@ try { // 'CallbackType' => 1, 'BizType' => '07d41bbb5a3a93dca4xxxxxxxxxxx', // 直播流审核 BizType 必填,可联系工作人员生成后使用 ), + 'StorageConf' => array( + 'Path' => 'xxx', + ), )); // 请求成功 print_r($result); diff --git a/vendor/qcloud/cos-sdk-v5/sample/detectText.php b/vendor/qcloud/cos-sdk-v5/sample/detectText.php index a348da74..d62b91dd 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/detectText.php +++ b/vendor/qcloud/cos-sdk-v5/sample/detectText.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // start --------------- 文本内容审核 ----------------- // @@ -42,6 +42,14 @@ try { // 'DetectType' => 'Porn,Terrorism,Politics,Ads', // 选填,在只有BizType时走设定策略的审核场景 // 'Callback' => '', // 回调URL 选填 // 'CallbackVersion' => 'Detail', // 选填 Detail、Simple 默认为 Simple +// 'Freeze' => array( +// 'PornScore' => 90, +// 'AdsScore' => 90, +// 'IllegalScore' => 90, +// 'AbuseScore' => 90, +// 'PoliticsScore' => 90, +// 'TerrorismScore' => 90, +// ), // ), // 非必选,在DetectType/BizType都不传的情况下,走默认策略及默认审核场景。 )); // 请求成功 diff --git a/vendor/qcloud/cos-sdk-v5/sample/detectVideo.php b/vendor/qcloud/cos-sdk-v5/sample/detectVideo.php index 6dc2c2f1..973788af 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/detectVideo.php +++ b/vendor/qcloud/cos-sdk-v5/sample/detectVideo.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { //存储桶视频审核 @@ -31,6 +31,13 @@ try { // 'Gender' => '', // 'Level' => '', // 'Role' => '', +// ), +// 'Encryption' => array( +// 'Algorithm' => '', +// 'Key' => '', +// 'IV' => '', +// 'KeyId' => '', +// 'KeyType' => 0, // ), ), 'Conf' => array( @@ -44,8 +51,16 @@ try { // 'TimeInterval' => 50, // 可选 视频截帧频率 'Count' => '3', // 视频截帧数量 ), +// 'Freeze' => array( +// 'PornScore' => 90, +// 'AdsScore' => 90, +// 'PoliticsScore' => 90, +// 'TerrorismScore' => 90, +// ), // 可选 自动冻结配置项,可配置指定审核分数的结果进行自动冻结 ), )); + // 请求成功 + print_r($result); //视频url审核 $videoUrl = 'http://example.com/test.mp4'; @@ -68,7 +83,6 @@ try { ), ), )); - // 请求成功 print_r($result); } catch (\Exception $e) { diff --git a/vendor/qcloud/cos-sdk-v5/sample/detectVirus.php b/vendor/qcloud/cos-sdk-v5/sample/detectVirus.php index a6984398..5f54523b 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/detectVirus.php +++ b/vendor/qcloud/cos-sdk-v5/sample/detectVirus.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 存储桶文件查毒 diff --git a/vendor/qcloud/cos-sdk-v5/sample/detectWebpage.php b/vendor/qcloud/cos-sdk-v5/sample/detectWebpage.php index 1095decc..3bed692b 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/detectWebpage.php +++ b/vendor/qcloud/cos-sdk-v5/sample/detectWebpage.php @@ -17,13 +17,28 @@ try { 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket 'Input' => array( 'Url' => 'https://www.xxx.com/', -// 'DataId' => '' // 可选 该字段在审核结果中会返回原始内容,长度限制为512字节。您可以使用该字段对待审核的数据进行唯一业务标识。 +// 'DataId' => 'xxx', // 可选 该字段在审核结果中会返回原始内容,长度限制为512字节。您可以使用该字段对待审核的数据进行唯一业务标识。 +// 'UserInfo' => array( +// 'TokenId' => '', +// 'Nickname' => '', +// 'DeviceId' => '', +// 'AppId' => '', +// 'Room' => '', +// 'IP' => '', +// 'Type' => '', +// 'ReceiveTokenId' => '', +// 'Gender' => '', +// 'Level' => '', +// 'Role' => '', +// ), // 可选 用户业务字段 ), // 'Conf' => array( -//// 'DetectType' => 'Porn,Ads', // 可选 不填走默认策略 -//// 'ReturnHighlightHtml' => 'true', // 可选 'true' 或者 'false' -//// 'Callback' => '', // 可选 -// ), // 可选 在DetectType/BizType都不传的情况下,走默认策略及默认审核场景。 +// 'BizType' => 'd7a51676a0xxxxxxxxxxxxxxxxxxxxxx', // 可选 审核策略 +//// 'DetectType' => 'Porn', // 可选 审核的场景类型 注:该参数后续不再维护,请使用BizType参数 +// 'Callback' => 'http://xxx.com/xxx', // 可选 回调地址,以http://或者https://开头的地址。 +// 'ReturnHighlightHtml' => 'true', // 可选 true 或者 false 指定是否需要高亮展示网页内的违规文本,查询及回调结果时会根据此参数决定是否返回高亮展示的 html 内容 +// 'CallbackType' => 1, // 可选 回调片段类型,有效值:1(回调全部图片和文本片段)、2(回调违规图片和文本片段)。默认为 1。 +// ), // 审核规则配置 )); // 请求成功 print_r($result); diff --git a/vendor/qcloud/cos-sdk-v5/sample/document2dstType.php b/vendor/qcloud/cos-sdk-v5/sample/document2dstType.php index 8deedea6..14d53327 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/document2dstType.php +++ b/vendor/qcloud/cos-sdk-v5/sample/document2dstType.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 1. 文档转码 https://cloud.tencent.com/document/product/460/47074 diff --git a/vendor/qcloud/cos-sdk-v5/sample/doesBucketExist.php b/vendor/qcloud/cos-sdk-v5/sample/doesBucketExist.php index 481b8962..ef0a6149 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/doesBucketExist.php +++ b/vendor/qcloud/cos-sdk-v5/sample/doesBucketExist.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->doesBucketExist( diff --git a/vendor/qcloud/cos-sdk-v5/sample/doesObjectExist.php b/vendor/qcloud/cos-sdk-v5/sample/doesObjectExist.php index bfcd85b6..3c3971bc 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/doesObjectExist.php +++ b/vendor/qcloud/cos-sdk-v5/sample/doesObjectExist.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->doesObjectExist( diff --git a/vendor/qcloud/cos-sdk-v5/sample/download.php b/vendor/qcloud/cos-sdk-v5/sample/download.php index f36097b3..64b37be9 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/download.php +++ b/vendor/qcloud/cos-sdk-v5/sample/download.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); $local_path = "/data/exampleobject"; diff --git a/vendor/qcloud/cos-sdk-v5/sample/downloadFolder.php b/vendor/qcloud/cos-sdk-v5/sample/downloadFolder.php index 8977fb86..6944adf3 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/downloadFolder.php +++ b/vendor/qcloud/cos-sdk-v5/sample/downloadFolder.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey ) ) diff --git a/vendor/qcloud/cos-sdk-v5/sample/fileJobs4Hash.php b/vendor/qcloud/cos-sdk-v5/sample/fileJobs4Hash.php index a32d90c7..655fe84c 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/fileJobs4Hash.php +++ b/vendor/qcloud/cos-sdk-v5/sample/fileJobs4Hash.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/83107 哈希值计算同步请求 diff --git a/vendor/qcloud/cos-sdk-v5/sample/getAiBucketList.php b/vendor/qcloud/cos-sdk-v5/sample/getAiBucketList.php new file mode 100644 index 00000000..e063a658 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/getAiBucketList.php @@ -0,0 +1,30 @@ + $region, + 'schema' => 'https', // 万象接口必须用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); + +try { + // 查询 AI 内容识别服务状态 https://cloud.tencent.com/document/product/460/79594 + $result = $cosClient->getAiBucketList(array( +// 'Regions' => '', // 可选 地域信息,例如 ap-shanghai、ap-beijing,若查询多个地域以“,”分隔字符串 +// 'BucketNames' => '', // 可选 存储桶名称,以“,”分隔,支持多个存储桶,精确搜索 +// 'BucketName' => '', // 可选 存储桶名称前缀,前缀搜索 +// 'PageNumber' => 1, // 可选 第几页 +// 'PageSize' => 20, // 可选 每页个数 + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/getAiQueueList.php b/vendor/qcloud/cos-sdk-v5/sample/getAiQueueList.php new file mode 100644 index 00000000..6e41522e --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/getAiQueueList.php @@ -0,0 +1,28 @@ + $region, + 'schema' => 'https', // 万象接口必须为https + 'credentials' => array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 搜索 AI 内容识别队列 https://cloud.tencent.com/document/product/460/79394 + $result = $cosClient->getAiQueueList(array( + 'Bucket' => 'examplebucket-1250000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket +// 'QueueIds' => 'xxx', // 队列 ID,以“,”符号分割字符串 +// 'State' => 'Active', // Active 表示队列内的作业会被媒体处理服务调度执行, Paused 表示队列暂停,作业不再会被媒体处理调度执行,队列内的所有作业状态维持在暂停状态,已经执行中的任务不受影响 +// 'PageNumber' => '1', // 第几页 +// 'PageSize' => '10', // 每页个数 + )); + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/getBlindWatermark.php b/vendor/qcloud/cos-sdk-v5/sample/getBlindWatermark.php index 366b1c52..bac73d8d 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getBlindWatermark.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getBlindWatermark.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); $local_path = "/data/exampleobject"; try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/getBucketAccelerate.php b/vendor/qcloud/cos-sdk-v5/sample/getBucketAccelerate.php index a6130f4b..3023b829 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getBucketAccelerate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getBucketAccelerate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getBucketAccelerate(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getBucketAcl.php b/vendor/qcloud/cos-sdk-v5/sample/getBucketAcl.php index 2da9ce1a..9e9d8c63 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getBucketAcl.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getBucketAcl.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getBucketAcl(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getBucketCors.php b/vendor/qcloud/cos-sdk-v5/sample/getBucketCors.php index a4beb61c..20aa61b0 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getBucketCors.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getBucketCors.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getBucketCors(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getBucketDomain.php b/vendor/qcloud/cos-sdk-v5/sample/getBucketDomain.php index 8b1002d6..c4127ce4 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getBucketDomain.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getBucketDomain.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getBucketDomain(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getBucketGuetzli.php b/vendor/qcloud/cos-sdk-v5/sample/getBucketGuetzli.php index e3ccc77d..01a0f5ca 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getBucketGuetzli.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getBucketGuetzli.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->GetBucketGuetzli(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getBucketImageStyle.php b/vendor/qcloud/cos-sdk-v5/sample/getBucketImageStyle.php index 5536c64e..d41b3f2a 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getBucketImageStyle.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getBucketImageStyle.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->GetBucketImageStyle(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getBucketInventory.php b/vendor/qcloud/cos-sdk-v5/sample/getBucketInventory.php index 882c76c6..7a6a066b 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getBucketInventory.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getBucketInventory.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getBucketInvnetory(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getBucketLifecycle.php b/vendor/qcloud/cos-sdk-v5/sample/getBucketLifecycle.php index 9bfc05ef..38fc5b98 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getBucketLifecycle.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getBucketLifecycle.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getBucketLifecycle(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getBucketLogging.php b/vendor/qcloud/cos-sdk-v5/sample/getBucketLogging.php index ee6bf312..ab1f35c4 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getBucketLogging.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getBucketLogging.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getBucketLogging(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getBucketTagging.php b/vendor/qcloud/cos-sdk-v5/sample/getBucketTagging.php index 39e1c2ca..d6be227d 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getBucketTagging.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getBucketTagging.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getBucketTagging(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getBucketWebsite.php b/vendor/qcloud/cos-sdk-v5/sample/getBucketWebsite.php index ea466857..64ae21f5 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getBucketWebsite.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getBucketWebsite.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getBucketWebsite(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessBuckets.php b/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessBuckets.php index 3cd99a42..6bb001bc 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessBuckets.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessBuckets.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessJob.php b/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessJob.php index 17ddcfc6..37f0280c 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessJob.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessJob.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->describeDocProcessJob(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessJobs.php b/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessJobs.php index 1cbddc8b..54aa18d2 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessJobs.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessJobs.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getDescribeDocProcessJobs(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessQueues.php b/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessQueues.php index 8f840b07..06a1b052 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessQueues.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDescribeDocProcessQueues.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->describeDocProcessQueues(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDescribeMediaBuckets.php b/vendor/qcloud/cos-sdk-v5/sample/getDescribeMediaBuckets.php index fbc0a19e..c33c4eb0 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDescribeMediaBuckets.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDescribeMediaBuckets.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDescribeMediaQueues.php b/vendor/qcloud/cos-sdk-v5/sample/getDescribeMediaQueues.php index 9c446d6c..2aeb8678 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDescribeMediaQueues.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDescribeMediaQueues.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDescribeMediaVoiceSeparateJob.php b/vendor/qcloud/cos-sdk-v5/sample/getDescribeMediaVoiceSeparateJob.php index db0c916d..82ab9d6e 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDescribeMediaVoiceSeparateJob.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDescribeMediaVoiceSeparateJob.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->describeMediaVoiceSeparateJob(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDetectAudioResult.php b/vendor/qcloud/cos-sdk-v5/sample/getDetectAudioResult.php index 717def13..ab9a242a 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDetectAudioResult.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDetectAudioResult.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getDetectAudioResult(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDetectDocumentResult.php b/vendor/qcloud/cos-sdk-v5/sample/getDetectDocumentResult.php index 7fdfcd1c..0a2145e0 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDetectDocumentResult.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDetectDocumentResult.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getDetectDocumentResult(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDetectImageResult.php b/vendor/qcloud/cos-sdk-v5/sample/getDetectImageResult.php index 129b89e9..399a75e8 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDetectImageResult.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDetectImageResult.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getDetectImageResult(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDetectTextResult.php b/vendor/qcloud/cos-sdk-v5/sample/getDetectTextResult.php index e8bb960c..fef90249 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDetectTextResult.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDetectTextResult.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getDetectTextResult(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDetectVideoResult.php b/vendor/qcloud/cos-sdk-v5/sample/getDetectVideoResult.php index 2bd35b79..3963493f 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDetectVideoResult.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDetectVideoResult.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getDetectVideoResult(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDetectVirusResult.php b/vendor/qcloud/cos-sdk-v5/sample/getDetectVirusResult.php index b0f30ce7..acd8a1ef 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDetectVirusResult.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDetectVirusResult.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getDetectVirusResult(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getDetectWebpageResult.php b/vendor/qcloud/cos-sdk-v5/sample/getDetectWebpageResult.php index fa91d2bc..6c938f41 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getDetectWebpageResult.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getDetectWebpageResult.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', // 审核时必须为https 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getDetectWebpageResult(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getFileCompressResult.php b/vendor/qcloud/cos-sdk-v5/sample/getFileCompressResult.php index 2c0e64c1..d7a40af5 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getFileCompressResult.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getFileCompressResult.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/83113 查询多文件打包压缩结果 diff --git a/vendor/qcloud/cos-sdk-v5/sample/getFileHashCodeResult.php b/vendor/qcloud/cos-sdk-v5/sample/getFileHashCodeResult.php index d31d49d7..0c8012b0 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getFileHashCodeResult.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getFileHashCodeResult.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/83109 查询哈希值计算结果 diff --git a/vendor/qcloud/cos-sdk-v5/sample/getFileProcessQueueList.php b/vendor/qcloud/cos-sdk-v5/sample/getFileProcessQueueList.php index 83b5a5ee..a2af4c46 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getFileProcessQueueList.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getFileProcessQueueList.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 搜索文件处理队列 diff --git a/vendor/qcloud/cos-sdk-v5/sample/getFileUncompressResult.php b/vendor/qcloud/cos-sdk-v5/sample/getFileUncompressResult.php index f6fc7be3..dc29785a 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getFileUncompressResult.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getFileUncompressResult.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/83111 查询文件解压结果 diff --git a/vendor/qcloud/cos-sdk-v5/sample/getImageSlim.php b/vendor/qcloud/cos-sdk-v5/sample/getImageSlim.php new file mode 100644 index 00000000..ad40ba8c --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/getImageSlim.php @@ -0,0 +1,23 @@ + $region, + 'schema' => 'https', //协议头部,默认为http + 'credentials' => array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + $result = $cosClient->getImageSlim(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + )); + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/getMediaInfo.php b/vendor/qcloud/cos-sdk-v5/sample/getMediaInfo.php index 8f842b0f..a42c6abf 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getMediaInfo.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getMediaInfo.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/getObject.php b/vendor/qcloud/cos-sdk-v5/sample/getObject.php index 07dc0da7..89a0098f 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getObject.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getObject.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->getObject(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getPicBucketList.php b/vendor/qcloud/cos-sdk-v5/sample/getPicBucketList.php new file mode 100644 index 00000000..f24aa01e --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/getPicBucketList.php @@ -0,0 +1,30 @@ + $region, + 'schema' => 'https', // 万象接口必须用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); + +try { + // 查询图片处理服务状态 + $result = $cosClient->getPicBucketList(array( +// 'Regions' => '', // 可选 地域信息,例如 ap-shanghai、ap-beijing,若查询多个地域以“,”分隔字符串 +// 'BucketNames' => '', // 可选 存储桶名称,以“,”分隔,支持多个存储桶,精确搜索 +// 'BucketName' => '', // 可选 存储桶名称前缀,前缀搜索 +// 'PageNumber' => 1, // 可选 第几页 +// 'PageSize' => 20, // 可选 每页个数 + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/getPicQueueList.php b/vendor/qcloud/cos-sdk-v5/sample/getPicQueueList.php new file mode 100644 index 00000000..64d237e3 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/getPicQueueList.php @@ -0,0 +1,28 @@ + $region, + 'schema' => 'https', // 万象接口必须为https + 'credentials' => array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 搜索图片处理队列 https://cloud.tencent.com/document/product/460/79395 + $result = $cosClient->getPicQueueList(array( + 'Bucket' => 'examplebucket-1250000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket +// 'QueueIds' => 'xxx', // 队列 ID,以“,”符号分割字符串 +// 'State' => 'Active', // Active 表示队列内的作业会被媒体处理服务调度执行, Paused 表示队列暂停,作业不再会被媒体处理调度执行,队列内的所有作业状态维持在暂停状态,已经执行中的任务不受影响 +// 'PageNumber' => '1', // 第几页 +// 'PageSize' => '10', // 每页个数 + )); + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/getPresignedUrl.php b/vendor/qcloud/cos-sdk-v5/sample/getPresignedUrl.php index 28753c53..46d406e5 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getPresignedUrl.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getPresignedUrl.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $signedUrl = $cosClient->getPresignedUrl( diff --git a/vendor/qcloud/cos-sdk-v5/sample/getPrivateM3U8.php b/vendor/qcloud/cos-sdk-v5/sample/getPrivateM3U8.php index d8148164..8c0aa664 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getPrivateM3U8.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getPrivateM3U8.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/getSnapshot.php b/vendor/qcloud/cos-sdk-v5/sample/getSnapshot.php index 7071eeec..aa2f035f 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/getSnapshot.php +++ b/vendor/qcloud/cos-sdk-v5/sample/getSnapshot.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); $time = 3.14; $local_path = "/data/exampleobject/test.jpg"; diff --git a/vendor/qcloud/cos-sdk-v5/sample/headBucket.php b/vendor/qcloud/cos-sdk-v5/sample/headBucket.php index d07f4483..636325e4 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/headBucket.php +++ b/vendor/qcloud/cos-sdk-v5/sample/headBucket.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->headBucket(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/headObject.php b/vendor/qcloud/cos-sdk-v5/sample/headObject.php index b2738cab..2e60251c 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/headObject.php +++ b/vendor/qcloud/cos-sdk-v5/sample/headObject.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->headObject(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageAssessQualityProcess.php b/vendor/qcloud/cos-sdk-v5/sample/imageAssessQualityProcess.php index d1758fcd..04044620 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageAssessQualityProcess.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageAssessQualityProcess.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片质量评估 - https://cloud.tencent.com/document/product/460/63228 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageAve.php b/vendor/qcloud/cos-sdk-v5/sample/imageAve.php index 5f8b4a9f..3738fc13 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageAve.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageAve.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->ImageAve(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageDetectCarProcess.php b/vendor/qcloud/cos-sdk-v5/sample/imageDetectCarProcess.php index 4c9aff56..6d30a46a 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageDetectCarProcess.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageDetectCarProcess.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 车辆车牌检测 - https://cloud.tencent.com/document/product/460/63225 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageExif.php b/vendor/qcloud/cos-sdk-v5/sample/imageExif.php index 01065426..8fa0f2b6 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageExif.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageExif.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->ImageExif(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageInfo.php b/vendor/qcloud/cos-sdk-v5/sample/imageInfo.php index 271c2a61..18ca78ad 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageInfo.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageInfo.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->ImageInfo(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageMogr.php b/vendor/qcloud/cos-sdk-v5/sample/imageMogr.php index a622803e..f415d1c3 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageMogr.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageMogr.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $imageMogrTemplate = new Qcloud\Cos\ImageParamTemplate\ImageMogrTemplate(); diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcess.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcess.php index 15da864c..ae9127d3 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcess.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcess.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $imageMogrTemplate = new Qcloud\Cos\ImageParamTemplate\ImageMogrTemplate(); diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcessCrop.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcessCrop.php index 75c6c900..ede0c204 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcessCrop.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcessCrop.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片处理-裁剪 https://cloud.tencent.com/document/product/460/36541 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormat.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormat.php index e2936458..dcae577b 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormat.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormat.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片处理-格式转换 https://cloud.tencent.com/document/product/460/36543 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatAvif.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatAvif.php index 7029b1fe..84dba8ee 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatAvif.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatAvif.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片处理-AVIF 压缩 https://cloud.tencent.com/document/product/460/60527 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatHeif.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatHeif.php index 05f7e404..30e8b1c6 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatHeif.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatHeif.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片处理-HEIF 压缩 https://cloud.tencent.com/document/product/460/60525 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatSvgc.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatSvgc.php index dcaaa91b..d09e9200 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatSvgc.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatSvgc.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片处理-SVG 压缩 https://cloud.tencent.com/document/product/460/78141 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatTpg.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatTpg.php index 9bdc9b9c..68dd49cc 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatTpg.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatTpg.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片处理-TPG 压缩 https://cloud.tencent.com/document/product/460/60526 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatWebp.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatWebp.php index 7fcf02a0..6f74ec9d 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatWebp.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcessFormatWebp.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片处理-WebP 压缩 https://cloud.tencent.com/document/product/460/60524 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcessGaussianBlur.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcessGaussianBlur.php index 8f093813..2fe76a22 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcessGaussianBlur.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcessGaussianBlur.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片处理-高斯模糊 https://cloud.tencent.com/document/product/460/36545 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcessQuality.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcessQuality.php index 48082d81..f6d3d220 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcessQuality.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcessQuality.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片处理-质量变换 https://cloud.tencent.com/document/product/460/36544 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcessRotate.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcessRotate.php index dd15fb11..050a2e40 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcessRotate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcessRotate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片处理-旋转 https://cloud.tencent.com/document/product/460/36542 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcessThumbnail.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcessThumbnail.php index 675ba86a..fb8a27c7 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcessThumbnail.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcessThumbnail.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 图片处理-缩放 https://cloud.tencent.com/document/product/460/36540 diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageProcessWatermarkText.php b/vendor/qcloud/cos-sdk-v5/sample/imageProcessWatermarkText.php index 7b7f2d0e..fd28656f 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageProcessWatermarkText.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageProcessWatermarkText.php @@ -27,6 +27,8 @@ try { $textWatermarkRule->setBatch(1); // 平铺水印功能,可将文字水印平铺至整张图片。值为1时,表示开启平铺水印功能 $textWatermarkRule->setDegree(10); // 当 batch 值为1时生效。文字水印的旋转角度设置,取值范围为0 - 360,默认0 $textWatermarkRule->setShadow(10); // 文字阴影效果,有效值为[0,100],默认为0,表示无阴影 + $textWatermarkRule->setScatype(1); // 根据原图的大小,缩放调整文字水印的大小 + $textWatermarkRule->setSpcent(500); // 与 scatype 搭配使用 $picOperations = new Qcloud\Cos\ImageParamTemplate\PicOperationsTransformation(); $picOperations->setIsPicInfo(1); // is_pic_info diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageRepairProcess.php b/vendor/qcloud/cos-sdk-v5/sample/imageRepairProcess.php index 6d0d9107..dc65b8fd 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageRepairProcess.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageRepairProcess.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // --------------------- 1. 保存效果图到本地 ------------------------------ // diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageView.php b/vendor/qcloud/cos-sdk-v5/sample/imageView.php index f5192248..b8f50070 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageView.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageView.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $imageViewTemplate = new Qcloud\Cos\ImageParamTemplate\ImageViewTemplate(); diff --git a/vendor/qcloud/cos-sdk-v5/sample/imageWatermark.php b/vendor/qcloud/cos-sdk-v5/sample/imageWatermark.php index 71323d2a..93bd167f 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/imageWatermark.php +++ b/vendor/qcloud/cos-sdk-v5/sample/imageWatermark.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $imageWatermarkTemplate = new Qcloud\Cos\ImageParamTemplate\ImageWatermarkTemplate(); diff --git a/vendor/qcloud/cos-sdk-v5/sample/listBuckets.php b/vendor/qcloud/cos-sdk-v5/sample/listBuckets.php index 6667dc73..73efd6c8 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/listBuckets.php +++ b/vendor/qcloud/cos-sdk-v5/sample/listBuckets.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/listMultipartUploads.php b/vendor/qcloud/cos-sdk-v5/sample/listMultipartUploads.php index 6d6578d0..b9fb7359 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/listMultipartUploads.php +++ b/vendor/qcloud/cos-sdk-v5/sample/listMultipartUploads.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->listMultipartUploads(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/listObjects.php b/vendor/qcloud/cos-sdk-v5/sample/listObjects.php index 7d533cbd..12544751 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/listObjects.php +++ b/vendor/qcloud/cos-sdk-v5/sample/listObjects.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->listObjects(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/listParts.php b/vendor/qcloud/cos-sdk-v5/sample/listParts.php index c0e8384d..3384e0d3 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/listParts.php +++ b/vendor/qcloud/cos-sdk-v5/sample/listParts.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->listParts(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/openAiService.php b/vendor/qcloud/cos-sdk-v5/sample/openAiService.php new file mode 100644 index 00000000..08fd22bc --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/openAiService.php @@ -0,0 +1,24 @@ + $region, + 'schema' => 'https', // 万象接口必须用https + 'credentials' => array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 开通 AI 内容识别 https://cloud.tencent.com/document/product/460/79593 + $result = $cosClient->openAiService(array( + 'Bucket' => 'examplebucket-1250000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + )); + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/openFileProcessService.php b/vendor/qcloud/cos-sdk-v5/sample/openFileProcessService.php index f46da1f0..b862bb3b 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/openFileProcessService.php +++ b/vendor/qcloud/cos-sdk-v5/sample/openFileProcessService.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 开通文件处理服务 diff --git a/vendor/qcloud/cos-sdk-v5/sample/openImageSlim.php b/vendor/qcloud/cos-sdk-v5/sample/openImageSlim.php new file mode 100644 index 00000000..6e7334c4 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/openImageSlim.php @@ -0,0 +1,30 @@ + $region, + 'schema' => 'https', //协议头部,默认为http + 'credentials' => array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + $result = $cosClient->openImageSlim(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'SlimMode' => 'API', + 'Suffixs' => array( + 'Suffix' => array( + 'jpg', + 'png', + ), + ), + )); + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/opticalOcrRecognition.php b/vendor/qcloud/cos-sdk-v5/sample/opticalOcrRecognition.php index e85780c3..373deeef 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/opticalOcrRecognition.php +++ b/vendor/qcloud/cos-sdk-v5/sample/opticalOcrRecognition.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/64324 通用文字识别 diff --git a/vendor/qcloud/cos-sdk-v5/sample/picOperations.php b/vendor/qcloud/cos-sdk-v5/sample/picOperations.php index 2f1bc720..0e9ea134 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/picOperations.php +++ b/vendor/qcloud/cos-sdk-v5/sample/picOperations.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); $local_path = "/data/exampleobject"; try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/putBlindWatermark.php b/vendor/qcloud/cos-sdk-v5/sample/putBlindWatermark.php index 8735786e..2c8932aa 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putBlindWatermark.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putBlindWatermark.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); $local_path = "/data/exampleobject"; try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/putBucketAccelerate.php b/vendor/qcloud/cos-sdk-v5/sample/putBucketAccelerate.php index dca62f34..0bebe05d 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putBucketAccelerate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putBucketAccelerate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->putBucketAccelerate(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/putBucketAcl.php b/vendor/qcloud/cos-sdk-v5/sample/putBucketAcl.php index f0225b8d..3adcbf67 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putBucketAcl.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putBucketAcl.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->putBucketAcl(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/putBucketCors.php b/vendor/qcloud/cos-sdk-v5/sample/putBucketCors.php index 846d87a6..762e56bb 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putBucketCors.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putBucketCors.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->putBucketCors(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/putBucketDomain.php b/vendor/qcloud/cos-sdk-v5/sample/putBucketDomain.php index 5d8f6ecd..3a3ea15f 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putBucketDomain.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putBucketDomain.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->putBucketDomain(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/putBucketGuetzli.php b/vendor/qcloud/cos-sdk-v5/sample/putBucketGuetzli.php index 11e896aa..465915ac 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putBucketGuetzli.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putBucketGuetzli.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->PutBucketGuetzli(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/putBucketImageStyle.php b/vendor/qcloud/cos-sdk-v5/sample/putBucketImageStyle.php index f50d6b39..4b75eda8 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putBucketImageStyle.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putBucketImageStyle.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->PutBucketImageStyle(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/putBucketInventory.php b/vendor/qcloud/cos-sdk-v5/sample/putBucketInventory.php index 5ad80708..ee56658b 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putBucketInventory.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putBucketInventory.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->putBucketInventory(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/putBucketLifecycle.php b/vendor/qcloud/cos-sdk-v5/sample/putBucketLifecycle.php index 95b3b204..58d9da38 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putBucketLifecycle.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putBucketLifecycle.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->putBucketLifecycle(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/putBucketLogging.php b/vendor/qcloud/cos-sdk-v5/sample/putBucketLogging.php index 0f1fcf06..c9bf8304 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putBucketLogging.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putBucketLogging.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->putBucketLogging(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/putBucketTagging.php b/vendor/qcloud/cos-sdk-v5/sample/putBucketTagging.php index 63fd9908..65d96661 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putBucketTagging.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putBucketTagging.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->putBucketTagging(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/putBucketWebsite.php b/vendor/qcloud/cos-sdk-v5/sample/putBucketWebsite.php index 52bcae3f..f1b91f68 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putBucketWebsite.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putBucketWebsite.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/putImageStyle.php b/vendor/qcloud/cos-sdk-v5/sample/putImageStyle.php index e3ad43c2..250730ae 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putImageStyle.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putImageStyle.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); $local_path = "/data/exampleobject"; try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/putObject.php b/vendor/qcloud/cos-sdk-v5/sample/putObject.php index 15417701..8a66c4c2 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putObject.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putObject.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); $local_path = "/data/exampleobject"; //添加tagging diff --git a/vendor/qcloud/cos-sdk-v5/sample/putObjectTagging.php b/vendor/qcloud/cos-sdk-v5/sample/putObjectTagging.php index 7a53ff3c..dc05fb44 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putObjectTagging.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putObjectTagging.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->putObjectTagging(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/putQrcode.php b/vendor/qcloud/cos-sdk-v5/sample/putQrcode.php index e7a7d1a8..dafc4fd8 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/putQrcode.php +++ b/vendor/qcloud/cos-sdk-v5/sample/putQrcode.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); $local_path = "/data/exampleobject"; try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/qrcode.php b/vendor/qcloud/cos-sdk-v5/sample/qrcode.php index 1cf27d96..32d35e7d 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/qrcode.php +++ b/vendor/qcloud/cos-sdk-v5/sample/qrcode.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 二维码下载时识别 diff --git a/vendor/qcloud/cos-sdk-v5/sample/qrcodeGenerate.php b/vendor/qcloud/cos-sdk-v5/sample/qrcodeGenerate.php index b686a55a..078dcf3b 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/qrcodeGenerate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/qrcodeGenerate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 二维码生成 diff --git a/vendor/qcloud/cos-sdk-v5/sample/restoreObject.php b/vendor/qcloud/cos-sdk-v5/sample/restoreObject.php index 9e8577f8..cfa21ccc 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/restoreObject.php +++ b/vendor/qcloud/cos-sdk-v5/sample/restoreObject.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->restoreObject(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/selectObjectContent.php b/vendor/qcloud/cos-sdk-v5/sample/selectObjectContent.php index 8c80a22b..3c6f5a06 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/selectObjectContent.php +++ b/vendor/qcloud/cos-sdk-v5/sample/selectObjectContent.php @@ -9,7 +9,7 @@ $cosClient = new Qcloud\Cos\Client(array( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey ) )); diff --git a/vendor/qcloud/cos-sdk-v5/sample/textWatermark.php b/vendor/qcloud/cos-sdk-v5/sample/textWatermark.php index 13ace3e5..9e0e0a69 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/textWatermark.php +++ b/vendor/qcloud/cos-sdk-v5/sample/textWatermark.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $textWatermarkTemplate = new Qcloud\Cos\ImageParamTemplate\TextWatermarkTemplate(); diff --git a/vendor/qcloud/cos-sdk-v5/sample/trafficLimit.php b/vendor/qcloud/cos-sdk-v5/sample/trafficLimit.php index 20d6bca6..08c60956 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/trafficLimit.php +++ b/vendor/qcloud/cos-sdk-v5/sample/trafficLimit.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); $local_path = '/data/exampleobject'; diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateAiQueue.php b/vendor/qcloud/cos-sdk-v5/sample/updateAiQueue.php new file mode 100644 index 00000000..6757d57e --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/updateAiQueue.php @@ -0,0 +1,38 @@ + $region, + 'schema' => 'https', // 万象接口必须为https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 更新 AI 内容识别队列 https://cloud.tencent.com/document/product/460/79397 + $result = $cosClient->updateAiQueue(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Key' => '', // queueId + 'Name' => 'queue-ai-process', + 'State' => 'Active', + 'NotifyConfig' => array( + 'State' => 'Off', +// 'Event' => '', +// 'ResultFormat' => '', +// 'Type' => '', +// 'Url' => '', +// 'MqMode' => '', +// 'MqRegion' => '', +// 'MqName' => '', + ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateDocProcessQueue.php b/vendor/qcloud/cos-sdk-v5/sample/updateDocProcessQueue.php index e38e0296..a7f7e1ed 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateDocProcessQueue.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateDocProcessQueue.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 更新文档转码队列 https://cloud.tencent.com/document/product/460/46947 diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateFileProcessQueue.php b/vendor/qcloud/cos-sdk-v5/sample/updateFileProcessQueue.php index e0cbc4ba..3e803af2 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateFileProcessQueue.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateFileProcessQueue.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // 更新文件处理的队列 diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaAnimationTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaAnimationTemplate.php index 3403d9c1..b7de25cf 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateMediaAnimationTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaAnimationTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/54028 更新动图模板 diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaConcatTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaConcatTemplate.php index ed325b79..df031879 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateMediaConcatTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaConcatTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/54044 更新拼接模板 @@ -47,6 +47,34 @@ try { 'Container' => array( 'Format' => 'mp4', ), + 'AudioMixArray' => array( + array( + 'AudioSource' => '', + 'MixMode' => '', + 'Replace' => '', + 'EffectConfig' => array( + 'EnableStartFadein' => '', + 'StartFadeinTime' => '', + 'EnableEndFadeout' => '', + 'EndFadeoutTime' => '', + 'EnableBgmFade' => '', + 'BgmFadeTime' => '', + ), + ), + array( + 'AudioSource' => '', + 'MixMode' => '', + 'Replace' => '', + 'EffectConfig' => array( + 'EnableStartFadein' => '', + 'StartFadeinTime' => '', + 'EnableEndFadeout' => '', + 'EndFadeoutTime' => '', + 'EnableBgmFade' => '', + 'BgmFadeTime' => '', + ), + ), + ), ), )); // 请求成功 diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaHighSpeedHdTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaHighSpeedHdTemplate.php index 4d8ce457..d4d52f28 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateMediaHighSpeedHdTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaHighSpeedHdTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/58310 更新极速高清转码模板 diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaPicProcessTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaPicProcessTemplate.php index c6834370..00b884d9 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateMediaPicProcessTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaPicProcessTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/67228 更新图片处理模板 diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaQueue.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaQueue.php index 288ad2f7..eff1f62f 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateMediaQueue.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaQueue.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaSmartCoverTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaSmartCoverTemplate.php new file mode 100644 index 00000000..d76490d9 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaSmartCoverTemplate.php @@ -0,0 +1,35 @@ + $region, + 'schema' => 'https', // 万象接口必须使用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 更新智能封面模板 https://cloud.tencent.com/document/product/460/84755 + $result = $cosClient->updateMediaSmartCoverTemplate(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Key' => '', // TemplateId + 'Tag' => 'SmartCover', + 'Name' => 'media-smartcover-name', + 'SmartCover' => array( + 'Format' => 'jpg', + 'Width' => '1280', + 'Height' => '960', + 'Count' => '3', + 'DeleteDuplicates' => 'true', + ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaSnapshotTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaSnapshotTemplate.php index 1e4c94d5..19989791 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateMediaSnapshotTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaSnapshotTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/54032 更新截图模板 diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaSuperResolutionTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaSuperResolutionTemplate.php index 7358f67f..a6cbad3c 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateMediaSuperResolutionTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaSuperResolutionTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->updateMediaSuperResolutionTemplate(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaTranscodeProTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaTranscodeProTemplate.php new file mode 100644 index 00000000..be2119a3 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaTranscodeProTemplate.php @@ -0,0 +1,62 @@ + $region, + 'schema' => 'https', // 万象接口必须使用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 更新音视频转码 pro 模板 https://cloud.tencent.com/document/product/460/84753 + $result = $cosClient->updateMediaTranscodeProTemplate(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Key' => '', // TemplateId + 'Tag' => 'TranscodePro', + 'Name' => 'media-transcode-pro-name', + 'Container' => array( + 'Format' => 'mxf', + ), + 'Video' => array( + 'Codec' => 'xavc', + 'Profile' => 'XAVC-HD_intra_420_10bit_class50', + 'Width' => '1440', + 'Height' => '1080', + 'Interlaced' => 'true', + 'Fps' => '30000/1001', + 'Bitrate' => '', + 'Rotate' => '', + ), + 'TimeInterval' => array( + 'Start' => '', + 'Duration' => '', + ), + 'Audio' => array( + 'Codec' => '', + 'Remove' => '', + ), + 'TransConfig' => array( + 'AdjDarMethod' => '', + 'IsCheckReso' => '', + 'ResoAdjMethod' => '', + 'IsCheckVideoBitrate' => '', + 'VideoBitrateAdjMethod' => '', + 'IsCheckAudioBitrate' => '', + 'AudioBitrateAdjMethod' => '', + 'IsCheckVideoFps' => '', + 'VideoFpsAdjMethod' => '', + 'DeleteMetadata' => '', + 'IsHdr2Sdr' => '', + ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaTranscodeTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaTranscodeTemplate.php index 68d4bd27..c011b9d2 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateMediaTranscodeTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaTranscodeTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/54040 更新转码模板 @@ -71,6 +71,34 @@ try { 'UriKey' => '', ), ), + 'AudioMixArray' => array( + array( + 'AudioSource' => '', + 'MixMode' => '', + 'Replace' => '', + 'EffectConfig' => array( + 'EnableStartFadein' => '', + 'StartFadeinTime' => '', + 'EnableEndFadeout' => '', + 'EndFadeoutTime' => '', + 'EnableBgmFade' => '', + 'BgmFadeTime' => '', + ), + ), + array( + 'AudioSource' => '', + 'MixMode' => '', + 'Replace' => '', + 'EffectConfig' => array( + 'EnableStartFadein' => '', + 'StartFadeinTime' => '', + 'EnableEndFadeout' => '', + 'EndFadeoutTime' => '', + 'EnableBgmFade' => '', + 'BgmFadeTime' => '', + ), + ), + ), )); // 请求成功 print_r($result); diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaVideoEnhanceTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaVideoEnhanceTemplate.php new file mode 100644 index 00000000..1af06d43 --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaVideoEnhanceTemplate.php @@ -0,0 +1,66 @@ + $region, + 'schema' => 'https', //协议头部,默认为http + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // https://cloud.tencent.com/document/product/460/84745 更新画质增强模板 + $result = $cosClient->updateMediaVideoEnhanceTemplate(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Key' => '', // TemplateId + 'Tag' => 'VideoEnhance', + 'Name' => 'TemplateName', + 'VideoEnhance' => array( + 'Transcode' => array( + 'Container' => array( + 'Format' => 'mp4', + ), + 'Video' => array( + 'Codec' => 'H.264', + 'Width' => '1280', + 'Height' => '920', + 'Fps' => '30', + ), + 'Audio' => array( + 'Codec' => 'aac', + 'Samplerate' => '44100', + 'Bitrate' => '128', + 'Channels' => '4', + ), + ), + 'SuperResolution' => array( + 'Resolution' => 'sdtohd', + 'EnableScaleUp' => 'true', + 'Version' => 'Enhance', + ), + 'SDRtoHDR' => array( + 'HdrMode' => 'HDR10', + ), + 'ColorEnhance' => array( + 'Contrast' => '50', + 'Correction' => '100', + 'Saturation' => '100', + ), + 'MsSharpen' => array( + 'SharpenLevel' => '5', + ), + 'FrameEnhance' => array( + 'FrameDoubling' => 'true', + ), + ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaVideoMontageTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaVideoMontageTemplate.php index 61391228..647088e3 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateMediaVideoMontageTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaVideoMontageTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/58311 更新精彩集锦模板 @@ -20,6 +20,7 @@ try { 'Tag' => 'VideoMontage', 'Name' => 'VideoMontage-Template-Name', 'Duration' => '', + 'Scene' => '', 'Container' => array( 'Format' => 'mp4', ), @@ -38,10 +39,20 @@ try { 'Channels' => '', 'Remove' => '', ), - 'AudioMix' => array( - 'AudioSource' => 'https://examplebucket-125000000.cos.ap-guangzhou.myqcloud.com/test01.mp3', - 'MixMode' => 'Once', - 'Replace' => 'true', + 'AudioMixArray' => array( + array( + 'AudioSource' => 'https://examplebucket-125000000.cos.ap-guangzhou.myqcloud.com/test01.mp3', + 'MixMode' => 'Once', + 'Replace' => 'true', + 'EffectConfig' => array( + 'EnableStartFadein' => 'true', + 'StartFadeinTime' => '3', + 'EnableEndFadeout' => 'false', + 'EndFadeoutTime' => '0', + 'EnableBgmFade' => 'true', + 'BgmFadeTime' => '1.7', + ), + ), ), )); // 请求成功 diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaVideoProcessTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaVideoProcessTemplate.php index 8087f943..02a6caa8 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateMediaVideoProcessTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaVideoProcessTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->updateMediaVideoProcessTemplate(array( diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaVoiceSeparateTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaVoiceSeparateTemplate.php index 1bf20f54..b754d6af 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateMediaVoiceSeparateTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaVoiceSeparateTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/58318 更新人声分离模板 diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateMediaWatermarkTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateMediaWatermarkTemplate.php index d58e238a..cdfe584a 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/updateMediaWatermarkTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/sample/updateMediaWatermarkTemplate.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { // https://cloud.tencent.com/document/product/436/54036 更新水印模板 diff --git a/vendor/qcloud/cos-sdk-v5/sample/updatePicQueue.php b/vendor/qcloud/cos-sdk-v5/sample/updatePicQueue.php new file mode 100644 index 00000000..52555dae --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/updatePicQueue.php @@ -0,0 +1,38 @@ + $region, + 'schema' => 'https', // 万象接口必须为https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 更新图片处理队列 https://cloud.tencent.com/document/product/460/79396 + $result = $cosClient->updatePicQueue(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Key' => '', // queueId + 'Name' => 'queue-pic-process', + 'State' => 'Active', + 'NotifyConfig' => array( + 'State' => 'Off', +// 'Event' => '', +// 'ResultFormat' => '', +// 'Type' => '', +// 'Url' => '', +// 'MqMode' => '', +// 'MqRegion' => '', +// 'MqName' => '', + ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateVoiceSpeechRecognitionTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateVoiceSpeechRecognitionTemplate.php new file mode 100644 index 00000000..b54d7d2a --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/updateVoiceSpeechRecognitionTemplate.php @@ -0,0 +1,45 @@ + $region, + 'schema' => 'https', // 万象接口必须使用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 更新语音识别模板 https://cloud.tencent.com/document/product/460/84759 + $result = $cosClient->updateVoiceSpeechRecognitionTemplate(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Key' => '', // TemplateId + 'Tag' => 'SpeechRecognition', + 'Name' => 'voice-speechrecognition-name', + 'SpeechRecognition' => array( + 'EngineModelType' => '16k_zh', + 'ChannelNum' => 1, + 'ResTextFormat' => 1, + 'FilterDirty' => 0, + 'FilterModal' => 1, + 'ConvertNumMode' => 0, + 'SpeakerDiarization' => 1, + 'SpeakerNumber' => 0, + 'FilterPunc' => 0, + 'OutputFileType' => 'txt', +// 'FlashAsr' => 'true', +// 'Format' => 'mp3', +// 'FirstChannelOnly' => 1, +// 'WordInfo' => 1, +// 'SentenceMaxLength' => 6, + ), + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/updateVoiceTtsTemplate.php b/vendor/qcloud/cos-sdk-v5/sample/updateVoiceTtsTemplate.php new file mode 100644 index 00000000..9c3f846d --- /dev/null +++ b/vendor/qcloud/cos-sdk-v5/sample/updateVoiceTtsTemplate.php @@ -0,0 +1,34 @@ + $region, + 'schema' => 'https', // 万象接口必须使用https + 'credentials'=> array( + 'secretId' => $secretId, + 'secretKey' => $secretKey))); +try { + // 更新语音合成模板 https://cloud.tencent.com/document/product/460/84758 + $result = $cosClient->updateVoiceTtsTemplate(array( + 'Bucket' => 'examplebucket-125000000', //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.cloud.tencent.com/cos5/bucket + 'Key' => '', // TemplateId + 'Tag' => 'Tts', + 'Name' => 'TemplateName', + 'Mode' => 'Sync', + 'Codec' => 'pcm', + 'VoiceType' => 'aixiaoxing', + 'Volume' => '2', + 'Speed' => '200', + 'Emotion' => 'arousal', + )); + // 请求成功 + print_r($result); +} catch (\Exception $e) { + // 请求失败 + echo($e); +} diff --git a/vendor/qcloud/cos-sdk-v5/sample/upload.php b/vendor/qcloud/cos-sdk-v5/sample/upload.php index f6edd855..19dc921a 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/upload.php +++ b/vendor/qcloud/cos-sdk-v5/sample/upload.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); $local_path = "/data/exampleobject"; diff --git a/vendor/qcloud/cos-sdk-v5/sample/uploadFolder.php b/vendor/qcloud/cos-sdk-v5/sample/uploadFolder.php index 25e6a5ba..65186cd4 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/uploadFolder.php +++ b/vendor/qcloud/cos-sdk-v5/sample/uploadFolder.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey ) ) diff --git a/vendor/qcloud/cos-sdk-v5/sample/uploadPart.php b/vendor/qcloud/cos-sdk-v5/sample/uploadPart.php index 855fd665..34d055e7 100644 --- a/vendor/qcloud/cos-sdk-v5/sample/uploadPart.php +++ b/vendor/qcloud/cos-sdk-v5/sample/uploadPart.php @@ -10,7 +10,7 @@ $cosClient = new Qcloud\Cos\Client( 'region' => $region, 'schema' => 'https', //协议头部,默认为http 'credentials'=> array( - 'secretId' => $secretId , + 'secretId' => $secretId, 'secretKey' => $secretKey))); try { $result = $cosClient->uploadPart(array( diff --git a/vendor/qcloud/cos-sdk-v5/src/Client.php b/vendor/qcloud/cos-sdk-v5/src/Client.php index f8f4efe0..10a30a38 100644 --- a/vendor/qcloud/cos-sdk-v5/src/Client.php +++ b/vendor/qcloud/cos-sdk-v5/src/Client.php @@ -207,10 +207,36 @@ use GuzzleHttp\Psr7; * @method object GetFileUncompressResult(array $args) 查询文件解压结果 * @method object CreateFileCompressJobs(array $args) 提交多文件打包压缩任务 * @method object GetFileCompressResult(array $args) 查询多文件打包压缩结果 + * @method object CreateM3U8PlayListJobs(array $args) 获取指定hls/m3u8文件指定时间区间内的ts资源 + * @method object GetPicQueueList(array $args) 搜索图片处理队列 + * @method object UpdatePicQueue(array $args) 更新图片处理队列 + * @method object GetPicBucketList(array $args) 查询图片处理服务状态 + * @method object GetAiBucketList(array $args) 查询 AI 内容识别服务状态 + * @method object OpenAiService(array $args) 开通 AI 内容识别 + * @method object GetAiQueueList(array $args) 搜索 AI 内容识别队列 + * @method object UpdateAiQueue(array $args) 更新 AI 内容识别队列 + * @method object CreateMediaTranscodeProTemplate(array $args) 创建音视频转码 pro 模板 + * @method object UpdateMediaTranscodeProTemplate(array $args) 更新音视频转码 pro 模板 + * @method object CreateVoiceTtsTemplate(array $args) 创建语音合成模板 + * @method object UpdateVoiceTtsTemplate(array $args) 更新语音合成模板 + * @method object CreateMediaSmartCoverTemplate(array $args) 创建智能封面模板 + * @method object UpdateMediaSmartCoverTemplate(array $args) 更新智能封面模板 + * @method object CreateVoiceSpeechRecognitionTemplate(array $args) 创建语音识别模板 + * @method object UpdateVoiceSpeechRecognitionTemplate(array $args) 更新语音识别模板 + * @method object CreateVoiceTtsJobs(array $args) 提交一个语音合成任务 + * @method object CreateAiTranslationJobs(array $args) 提交一个翻译任务 + * @method object CreateVoiceSpeechRecognitionJobs(array $args) 提交一个语音识别任务 + * @method object CreateAiWordsGeneralizeJobs(array $args) 提交一个分词任务 + * @method object CreateMediaVideoEnhanceJobs(array $args) 提交画质增强任务 + * @method object CreateMediaVideoEnhanceTemplate(array $args) 创建画质增强模板 + * @method object UpdateMediaVideoEnhanceTemplate(array $args) 更新画质增强模板 + * @method object OpenImageSlim(array $args) 开通图片瘦身 + * @method object CloseImageSlim(array $args) 关闭图片瘦身 + * @method object GetImageSlim(array $args) 查询图片瘦身状态 * @see \Qcloud\Cos\Service::getService() */ class Client extends GuzzleClient { - const VERSION = '2.6.2'; + const VERSION = '2.6.6'; public $httpClient; @@ -245,6 +271,7 @@ class Client extends GuzzleClient { $this->cosConfig['allow_redirects'] = isset($cosConfig['allow_redirects']) ? $cosConfig['allow_redirects'] : false; $this->cosConfig['allow_accelerate'] = isset($cosConfig['allow_accelerate']) ? $cosConfig['allow_accelerate'] : false; $this->cosConfig['timezone'] = isset($cosConfig['timezone']) ? $cosConfig['timezone'] : 'PRC'; + $this->cosConfig['locationWithSchema'] = isset($cosConfig['locationWithSchema']) ? $cosConfig['locationWithSchema'] : false; // check config $this->inputCheck(); @@ -260,6 +287,7 @@ class Client extends GuzzleClient { } if ($this->cosConfig['token'] != null) { $handler->push(Middleware::mapRequest(function (RequestInterface $request) { + $request = $request->withHeader('x-ci-security-token', $this->cosConfig['token']); return $request->withHeader('x-cos-security-token', $this->cosConfig['token']); })); } @@ -389,8 +417,22 @@ class Client extends GuzzleClient { return $this->api; } - private function getCosConfig() { - return $this->cosConfig; + /** + * Get the config of the cos client. + * + * @param array|string $option + * @return mixed + */ + public function getCosConfig($option = null) + { + return $option === null + ? $this->cosConfig + : (isset($this->cosConfig[$option]) ? $this->cosConfig[$option] : array()); + } + + public function setCosConfig($option, $value) + { + $this->cosConfig[$option] = $value; } private function createPresignedUrl(RequestInterface $request, $expires) { @@ -403,7 +445,6 @@ class Client extends GuzzleClient { return $this->createPresignedUrl($request, $expires); } - public function getObjectUrl($bucket, $key, $expires = "+30 minutes", array $args = array()) { $command = $this->getCommand('GetObject', $args + array('Bucket' => $bucket, 'Key' => $key)); $request = $this->commandToRequestTransformer($command); @@ -413,7 +454,7 @@ class Client extends GuzzleClient { public function getObjectUrlWithoutSign($bucket, $key, array $args = array()) { $command = $this->getCommand('GetObject', $args + array('Bucket' => $bucket, 'Key' => $key)); $request = $this->commandToRequestTransformer($command); - return $request->getUri()-> __toString(); + return $request->getUri()->__toString(); } public function upload($bucket, $key, $body, $options = array()) { @@ -440,7 +481,6 @@ class Client extends GuzzleClient { public function download($bucket, $key, $saveAs, $options = array()) { $options['PartSize'] = isset($options['PartSize']) ? $options['PartSize'] : RangeDownload::DEFAULT_PART_SIZE; - $contentLength = 0; $versionId = isset($options['VersionId']) ? $options['VersionId'] : ''; $rt = $this->headObject(array( @@ -563,7 +603,6 @@ class Client extends GuzzleClient { return $final_key; } - public static function handleSignature($secretId, $secretKey, $options) { return function (callable $handler) use ($secretId, $secretKey, $options) { return new SignatureMiddleware($handler, $secretId, $secretKey, $options); diff --git a/vendor/qcloud/cos-sdk-v5/src/CommandToRequestTransformer.php b/vendor/qcloud/cos-sdk-v5/src/CommandToRequestTransformer.php index b76e8d1e..d01c0be7 100644 --- a/vendor/qcloud/cos-sdk-v5/src/CommandToRequestTransformer.php +++ b/vendor/qcloud/cos-sdk-v5/src/CommandToRequestTransformer.php @@ -2,6 +2,7 @@ namespace Qcloud\Cos; +use http\Exception\BadUrlException; use Psr\Http\Message\RequestInterface; use GuzzleHttp\Command\CommandInterface; use GuzzleHttp\Psr7\Uri; @@ -70,7 +71,8 @@ class CommandToRequestTransformer { || $action == 'PutBucketGuetzli' || $action == 'GetBucketGuetzli' || $action == 'DeleteBucketGuetzli' || $action == 'BindCiService' || $action == 'GetCiService' || $action == 'UnBindCiService' || $action == 'GetHotLink' || $action == 'AddHotLink' - || $action == 'OpenOriginProtect' || $action == 'GetOriginProtect' || $action == 'CloseOriginProtect') { + || $action == 'OpenOriginProtect' || $action == 'GetOriginProtect' || $action == 'CloseOriginProtect' + || $action == 'OpenImageSlim' || $action == 'GetImageSlim' || $action == 'CloseImageSlim' ) { $domain_type = '.pic.'; } @@ -120,10 +122,9 @@ class CommandToRequestTransformer { if ( null !== $body ) { return $request; } else { - throw new InvalidArgumentException( - "You must specify a non-null value for the {$bodyParameter} or {$sourceParameter} parameters." ); - } + throw new InvalidArgumentException("You must specify a non-null value for the {$bodyParameter} or {$sourceParameter} parameters."); } + } // update md5 @@ -239,17 +240,25 @@ class CommandToRequestTransformer { $action = $command->getName(); if(key_exists($action, array( 'DescribeMediaBuckets' => 1, - 'DescribeDocProcessBuckets' =>1, + 'DescribeDocProcessBuckets' => 1, + 'GetPicBucketList' => 1, + 'GetAiBucketList' => 1, ))) { $origin_host = "ci.{$this->config['region']}.myqcloud.com"; $host = $origin_host; if ($this->config['ip'] != null) { $host = $this->config['ip']; if ($this->config['port'] != null) { - $host = $this->config['ip'] . ":" . $this->config['port']; + $host = $this->config['ip'] . ':' . $this->config['port']; } } + // 万象接口需要https,http方式报错 + if ($this->config['schema'] !== 'https') { + $e = new Exception\CosException('CI request schema must be "https", instead of "http"'); + $e->setExceptionCode('Invalid Argument'); + throw $e; + } $path = $this->config['schema'].'://'. $host . $request->getUri()->getPath(); $uri = new Uri( $path ); $query = $request->getUri()->getQuery(); @@ -346,8 +355,36 @@ class CommandToRequestTransformer { 'GetFileUncompressResult' => 1, 'CreateFileCompressJobs' => 1, 'GetFileCompressResult' => 1, + 'CreateM3U8PlayListJobs' => 1, + 'GetPicQueueList' => 1, + 'UpdatePicQueue' => 1, + 'OpenAiService' => 1, + 'GetAiQueueList' => 1, + 'UpdateAiQueue' => 1, + 'CreateMediaTranscodeProTemplate' => 1, + 'UpdateMediaTranscodeProTemplate' => 1, + 'CreateVoiceTtsTemplate' => 1, + 'UpdateVoiceTtsTemplate' => 1, + 'CreateMediaSmartCoverTemplate' => 1, + 'UpdateMediaSmartCoverTemplate' => 1, + 'CreateVoiceSpeechRecognitionTemplate' => 1, + 'UpdateVoiceSpeechRecognitionTemplate' => 1, + 'CreateVoiceTtsJobs' => 1, + 'CreateAiTranslationJobs' => 1, + 'CreateVoiceSpeechRecognitionJobs' => 1, + 'CreateAiWordsGeneralizeJobs' => 1, + 'CreateMediaVideoEnhanceJobs' => 1, + 'CreateMediaVideoEnhanceTemplate' => 1, + 'UpdateMediaVideoEnhanceTemplate' => 1, ); if (key_exists($action, $ciActions)) { + // 万象接口需要https,http方式报错 + if ($this->config['schema'] !== 'https') { + $e = new Exception\CosException('CI request schema must be "https", instead of "http"'); + $e->setExceptionCode('Invalid Argument'); + throw $e; + } + $bucketname = $command['Bucket']; $appId = $this->config['appId']; if ( $appId != null && endWith( $bucketname, '-'.$appId ) == false ) { diff --git a/vendor/qcloud/cos-sdk-v5/src/Descriptions.php b/vendor/qcloud/cos-sdk-v5/src/Descriptions.php index bcfc5882..60079606 100644 --- a/vendor/qcloud/cos-sdk-v5/src/Descriptions.php +++ b/vendor/qcloud/cos-sdk-v5/src/Descriptions.php @@ -27,21 +27,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => false, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -49,6 +47,7 @@ class Descriptions { 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'FreeTranscode' => array( 'type' => 'string', 'location' => 'xml', ), 'WatermarkTemplateId' => array( 'type' => 'array', 'location' => 'xml', @@ -71,6 +70,13 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'ClipConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), ), ), 'Video' => array( @@ -139,6 +145,56 @@ class Descriptions { ), ), ), + 'AudioMix' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMixArray' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'name' => 'AudioMixArray', + 'sentAs' => 'AudioMixArray', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), ), ), 'Watermark' => array( @@ -212,6 +268,7 @@ class Descriptions { 'Type' => array( 'type' => 'string', 'location' => 'xml', ), 'Version' => array( 'type' => 'string', 'location' => 'xml', ), 'IgnoreError' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), ), ), ), @@ -273,19 +330,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => false, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'CallBack' => array( 'required' => false, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'array', 'location' => 'xml', 'data' => array( @@ -298,6 +355,8 @@ class Descriptions { 'properties' => array( 'Tag' => array('location' => 'xml', 'type' => 'string', ), 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), 'TranscodeTemplateId' => array( 'type' => 'string', 'location' => 'xml', ), 'VideoProcess' => array( 'type' => 'object', @@ -610,6 +669,15 @@ class Descriptions { ), ), ), + 'CallBackMqConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), ), ); } @@ -709,13 +777,11 @@ class Descriptions { 'location' => 'uri', ), 'Tag' => array( - 'required' => true, 'type' => 'string', 'location' => 'query', 'sentAs' => 'tag', ), 'QueueId' => array( - 'required' => true, 'type' => 'string', 'location' => 'query', 'sentAs' => 'queueId', @@ -750,6 +816,9 @@ class Descriptions { 'location' => 'query', 'sentAs' => 'endCreationTime', ), + 'WorkflowId' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'workflowId', ), + 'InventoryTriggerJobId' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'inventoryTriggerJobId', ), + 'InputObject' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'inputObject', ), ), ); } @@ -797,27 +866,24 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'CallBack' => array( 'required' => false, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), 'Output' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -900,21 +966,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' =>false, 'type' => 'string', 'location' => 'xml', ), // 拼接任务Input可以为空,完全用数组内的元素拼接 + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), // 拼接任务Input可以为空,完全用数组内的元素拼接 ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -922,13 +986,12 @@ class Descriptions { 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), 'Output' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Region' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), - 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'ConcatTemplate' => array( @@ -984,6 +1047,56 @@ class Descriptions { 'Format' => array( 'type' => 'string', 'location' => 'xml', ), ), ), + 'AudioMix' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMixArray' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'name' => 'AudioMixArray', + 'sentAs' => 'AudioMixArray', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), ), ), ), @@ -1108,6 +1221,16 @@ class Descriptions { 'type' => 'integer', 'location' => 'xml', ), + 'Freeze' => array( + 'location' => 'xml', + 'type' => 'object', + 'properties' => array( + 'PornScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'AdsScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PoliticsScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'TerrorismScore' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), ), ), ), @@ -1261,6 +1384,7 @@ class Descriptions { 'Url' => array( 'type' => 'string', 'location' => 'xml', ), 'Text' => array( 'type' => 'string', 'location' => 'xml', ), 'Label' => array( 'type' => 'string', 'location' => 'xml', ), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml', ), 'OffsetTime' => array( 'type' => 'integer', 'location' => 'xml', ), 'Duration' => array( 'type' => 'integer', 'location' => 'xml', ), 'Result' => array( 'type' => 'integer', 'location' => 'xml', ), @@ -1685,6 +1809,7 @@ class Descriptions { 'Label' => array( 'type' => 'string', 'location' => 'xml', ), 'SubLabel' => array( 'type' => 'string', 'location' => 'xml', ), 'Result' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ForbidState' => array( 'type' => 'integer', 'location' => 'xml', ), 'PornInfo' => array( 'type' => 'object', 'location' => 'xml', @@ -1991,6 +2116,17 @@ class Descriptions { 'Role' => array( 'type' => 'string', 'location' => 'xml', ), ), ), + 'Encryption' => array( + 'location' => 'xml', + 'type' => 'object', + 'properties' => array( + 'Algorithm' => array( 'type' => 'string', 'location' => 'xml', ), + 'Key' => array( 'type' => 'string', 'location' => 'xml', ), + 'IV' => array( 'type' => 'string', 'location' => 'xml', ), + 'KeyId' => array( 'type' => 'string', 'location' => 'xml', ), + 'KeyType' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), ), ), 'Conf' => array( @@ -2012,6 +2148,16 @@ class Descriptions { 'TimeInterval' => array( 'type' => 'numeric', 'location' => 'xml', ), ), ), + 'Freeze' => array( + 'location' => 'xml', + 'type' => 'object', + 'properties' => array( + 'PornScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'AdsScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PoliticsScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'TerrorismScore' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), ), ), ), @@ -2096,6 +2242,7 @@ class Descriptions { 'SnapshotCount' => array('type' => 'string', 'location' => 'xml',), 'Label' => array('type' => 'string', 'location' => 'xml',), 'Result' => array('type' => 'integer', 'location' => 'xml',), + 'ForbidState' => array('type' => 'integer', 'location' => 'xml',), 'PornInfo' => array( 'type' => 'object', 'location' => 'xml', @@ -2146,6 +2293,7 @@ class Descriptions { 'SnapshotTime' => array('type' => 'integer', 'location' => 'xml',), 'Text' => array('type' => 'string', 'location' => 'xml',), 'Label' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Result' => array('type' => 'integer', 'location' => 'xml',), 'PornInfo' => array( 'type' => 'object', @@ -2164,6 +2312,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array('type' => 'integer', 'location' => 'xml',), + 'SubLabel' => array('type' => 'integer', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -2191,6 +2340,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -2236,6 +2386,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array('type' => 'integer', 'location' => 'xml',), + 'SubLabel' => array('type' => 'integer', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -2263,6 +2414,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -2308,6 +2460,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array('type' => 'integer', 'location' => 'xml',), + 'SubLabel' => array('type' => 'integer', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -2335,6 +2488,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -2380,6 +2534,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array('type' => 'integer', 'location' => 'xml',), + 'SubLabel' => array('type' => 'integer', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -2407,6 +2562,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -2452,6 +2608,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array('type' => 'integer', 'location' => 'xml',), + 'SubLabel' => array('type' => 'integer', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -2479,6 +2636,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -2521,6 +2679,7 @@ class Descriptions { 'OffsetTime' => array('type' => 'integer', 'location' => 'xml',), 'Duration' => array('type' => 'integer', 'location' => 'xml',), 'Label' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Result' => array('type' => 'integer', 'location' => 'xml',), 'PornInfo' => array( 'type' => 'object', @@ -2529,6 +2688,7 @@ class Descriptions { 'HitFlag' => array('type' => 'string', 'location' => 'xml',), 'Score' => array('type' => 'string', 'location' => 'xml',), 'Category' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -2560,6 +2720,7 @@ class Descriptions { 'HitFlag' => array('type' => 'string', 'location' => 'xml',), 'Score' => array('type' => 'string', 'location' => 'xml',), 'Category' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -2591,6 +2752,7 @@ class Descriptions { 'HitFlag' => array('type' => 'string', 'location' => 'xml',), 'Score' => array('type' => 'string', 'location' => 'xml',), 'Category' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -2622,6 +2784,7 @@ class Descriptions { 'HitFlag' => array('type' => 'string', 'location' => 'xml',), 'Score' => array('type' => 'string', 'location' => 'xml',), 'Category' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -2653,6 +2816,7 @@ class Descriptions { 'HitFlag' => array('type' => 'string', 'location' => 'xml',), 'Score' => array('type' => 'string', 'location' => 'xml',), 'Category' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -2776,6 +2940,16 @@ class Descriptions { 'Callback' => array( 'type' => 'string', 'location' => 'xml', ), 'BizType' => array( 'type' => 'string', 'location' => 'xml', ), 'CallbackType' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Freeze' => array( + 'location' => 'xml', + 'type' => 'object', + 'properties' => array( + 'PornScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'AdsScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PoliticsScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'TerrorismScore' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), ), ), ), @@ -2860,6 +3034,7 @@ class Descriptions { 'Object' => array('type' => 'string', 'location' => 'xml',), 'Url' => array('type' => 'string', 'location' => 'xml',), 'PageCount' => array('type' => 'integer', 'location' => 'xml',), + 'ForbidState' => array('type' => 'integer', 'location' => 'xml',), 'Labels' => array( 'type' => 'object', 'location' => 'xml', @@ -2931,6 +3106,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -2958,6 +3134,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -3002,6 +3179,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -3029,6 +3207,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -3073,6 +3252,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -3100,6 +3280,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -3144,6 +3325,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -3171,6 +3353,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array('type' => 'string', 'location' => 'xml',), + 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -3264,46 +3447,40 @@ class Descriptions { 'location' => 'uri', ), 'Tag' => array( - 'required' => true, 'type' => 'string', 'location' => 'xml', ), 'QueueId' => array( - 'required' => true, 'type' => 'string', 'location' => 'xml', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( 'Output' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( 'Region' => array( - 'type' => 'string','required' => true,'location' => 'xml', + 'type' => 'string','location' => 'xml', ), 'Bucket' => array( - 'type' => 'string','required' => true,'location' => 'xml', + 'type' => 'string','location' => 'xml', ), 'Object' => array( - 'type' => 'string','required' => true,'location' => 'xml', + 'type' => 'string','location' => 'xml', ), ), ), 'DocProcess' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -3544,11 +3721,6 @@ class Descriptions { 'type' => 'object', 'additionalProperties' => true, 'properties' => array( - 'Body' => array( - 'type' => 'string', - 'instanceOf' => 'GuzzleHttp\\Psr7\\Stream', - 'location' => 'body', - ), 'RequestId' => array( 'type' => 'string', 'location' => 'header', @@ -3603,55 +3775,56 @@ class Descriptions { ), ), 'Operation' => array( - 'type' => 'array', + 'type' => 'object', 'location' => 'xml', - 'items' => array( - 'type' => 'object', - 'properties' => array( - 'DocProcess' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'SrcType' => array( - 'type' => 'string', - ), - 'TgtType' => array( - 'type' => 'string', - ), - 'SheetId' => array( - 'type' => 'integer', - ), - 'StartPage' => array( - 'type' => 'integer', - ), - 'EndPage' => array( - 'type' => 'integer', - ), - 'ImageParams' => array( - 'type' => 'string', - ), - 'DocPassword' => array( - 'type' => 'string', - ), - 'Comments' => array( - 'type' => 'integer', - ), - 'PaperDirection' => array( - 'type' => 'integer', - ), - 'Quality' => array( - 'type' => 'integer', - ), - 'Zoom' => array( - 'type' => 'integer', - ), + 'properties' => array( + 'DocProcess' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'SrcType' => array( + 'type' => 'string', + ), + 'TgtType' => array( + 'type' => 'string', + ), + 'SheetId' => array( + 'type' => 'integer', + ), + 'StartPage' => array( + 'type' => 'integer', + ), + 'EndPage' => array( + 'type' => 'integer', + ), + 'ImageParams' => array( + 'type' => 'string', + ), + 'DocPassword' => array( + 'type' => 'string', + ), + 'Comments' => array( + 'type' => 'integer', + ), + 'PaperDirection' => array( + 'type' => 'integer', + ), + 'Quality' => array( + 'type' => 'integer', + ), + 'Zoom' => array( + 'type' => 'integer', ), ), - 'DocProcessResult' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'PageInfo' => array( + ), + 'DocProcessResult' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'PageInfo' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -3672,39 +3845,39 @@ class Descriptions { ), ), ), - 'SuccPageCount' => array( - 'type' => 'integer', - ), - 'FailPageCount' => array( - 'type' => 'integer', - ), - 'TaskId' => array( - 'type' => 'string', - ), - 'TgtType' => array( - 'type' => 'string', - ), - 'TotalPageCount' => array( - 'type' => 'integer', - ), - 'TotalSheetCount' => array( - 'type' => 'integer', - ), + ), + 'SuccPageCount' => array( + 'type' => 'integer', + ), + 'FailPageCount' => array( + 'type' => 'integer', + ), + 'TaskId' => array( + 'type' => 'string', + ), + 'TgtType' => array( + 'type' => 'string', + ), + 'TotalPageCount' => array( + 'type' => 'integer', + ), + 'TotalSheetCount' => array( + 'type' => 'integer', ), ), - 'Output' => array( - 'type' => 'object', - 'location' => 'xml', - 'properties' => array( - 'Bucket' => array( - 'type' => 'string', - ), - 'Object' => array( - 'type' => 'string', - ), - 'Region' => array( - 'type' => 'string', - ), + ), + 'Output' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Bucket' => array( + 'type' => 'string', + ), + 'Object' => array( + 'type' => 'string', + ), + 'Region' => array( + 'type' => 'string', ), ), ), @@ -3730,13 +3903,11 @@ class Descriptions { 'location' => 'uri', ), 'Tag' => array( - 'required' => true, 'type' => 'string', 'location' => 'query', 'sentAs' => 'tag', ), 'QueueId' => array( - 'required' => true, 'type' => 'string', 'location' => 'query', 'sentAs' => 'queueId', @@ -3987,6 +4158,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -4014,6 +4186,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -4061,6 +4234,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -4088,6 +4262,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -4135,6 +4310,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -4162,6 +4338,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -4209,6 +4386,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -4236,6 +4414,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -4283,6 +4462,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -4310,6 +4490,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -4357,6 +4538,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -4384,6 +4566,83 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), + 'Location' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'X' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Y' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Width' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Height' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Rotate' => array( 'type' => 'numeric', 'location' => 'xml',), + ), + ), + ), + ), + ), + 'LibResults' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'ImageId' => array( 'type' => 'string', 'location' => 'xml',), + 'Score' => array( 'type' => 'integer', 'location' => 'xml',), + ), + ), + ), + ), + ), + 'QualityInfo' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Code' => array( 'type' => 'integer', 'location' => 'xml',), + 'Msg' => array( 'type' => 'string', 'location' => 'xml',), + 'HitFlag' => array( 'type' => 'integer', 'location' => 'xml',), + 'Score' => array( 'type' => 'integer', 'location' => 'xml',), + 'Label' => array( 'type' => 'string', 'location' => 'xml',), + 'Category' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), + 'OcrResults' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), + 'Keywords' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( 'type' => 'string', 'location' => 'xml',), + ), + 'Location' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'X' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Y' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Width' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Height' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Rotate' => array( 'type' => 'numeric', 'location' => 'xml',), + ), + ), + ), + ), + ), + 'ObjectResults' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -4470,6 +4729,17 @@ class Descriptions { 'Role' => array( 'type' => 'string', 'location' => 'xml', ), ), ), + 'Encryption' => array( + 'location' => 'xml', + 'type' => 'object', + 'properties' => array( + 'Algorithm' => array( 'type' => 'string', 'location' => 'xml', ), + 'Key' => array( 'type' => 'string', 'location' => 'xml', ), + 'IV' => array( 'type' => 'string', 'location' => 'xml', ), + 'KeyId' => array( 'type' => 'string', 'location' => 'xml', ), + 'KeyType' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), ), ), ), @@ -4481,6 +4751,16 @@ class Descriptions { 'BizType' => array( 'type' => 'string', 'location' => 'xml', ), 'Async' => array( 'type' => 'integer', 'location' => 'xml', ), 'Callback' => array( 'type' => 'string', 'location' => 'xml', ), + 'Freeze' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'PornScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'AdsScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PoliticsScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'TerrorismScore' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), ), ), ), @@ -4510,6 +4790,7 @@ class Descriptions { 'Label' => array( 'type' => 'string', 'location' => 'xml',), 'Result' => array( 'type' => 'integer', 'location' => 'xml',), 'Score' => array( 'type' => 'integer', 'location' => 'xml',), + 'ForbidState' => array( 'type' => 'integer', 'location' => 'xml',), 'Category' => array( 'type' => 'string', 'location' => 'xml',), 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Text' => array( 'type' => 'string', 'location' => 'xml',), @@ -4534,6 +4815,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -4561,6 +4843,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -4608,6 +4891,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -4635,6 +4919,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -4682,6 +4967,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -4709,6 +4995,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -4756,6 +5043,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -4783,6 +5071,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -4830,6 +5119,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -4857,6 +5147,83 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), + 'Location' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'X' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Y' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Width' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Height' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Rotate' => array( 'type' => 'numeric', 'location' => 'xml',), + ), + ), + ), + ), + ), + 'LibResults' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'ImageId' => array( 'type' => 'string', 'location' => 'xml',), + 'Score' => array( 'type' => 'integer', 'location' => 'xml',), + ), + ), + ), + ), + ), + 'QualityInfo' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Code' => array( 'type' => 'integer', 'location' => 'xml',), + 'Msg' => array( 'type' => 'string', 'location' => 'xml',), + 'HitFlag' => array( 'type' => 'integer', 'location' => 'xml',), + 'Score' => array( 'type' => 'integer', 'location' => 'xml',), + 'Label' => array( 'type' => 'string', 'location' => 'xml',), + 'Category' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), + 'OcrResults' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), + 'Keywords' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( 'type' => 'string', 'location' => 'xml',), + ), + 'Location' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'X' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Y' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Width' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Height' => array( 'type' => 'numeric', 'location' => 'xml',), + 'Rotate' => array( 'type' => 'numeric', 'location' => 'xml',), + ), + ), + ), + ), + ), + 'ObjectResults' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -5128,6 +5495,7 @@ class Descriptions { 'SubLabel' => array('type' => 'string', 'location' => 'xml',), 'Result' => array('type' => 'integer', 'location' => 'xml',), 'Score' => array('type' => 'integer', 'location' => 'xml',), + 'ForbidState' => array('type' => 'integer', 'location' => 'xml',), 'PornInfo' => array( 'type' => 'object', 'location' => 'xml', @@ -5145,6 +5513,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -5172,6 +5541,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -5217,6 +5587,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -5244,6 +5615,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -5289,6 +5661,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -5316,6 +5689,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -5361,6 +5735,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -5388,6 +5763,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -5433,6 +5809,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -5460,6 +5837,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -5544,21 +5922,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -5735,6 +6111,7 @@ class Descriptions { 'location' => 'xml', 'type' => 'object', 'properties' => array( + 'BizType' => array( 'type' => 'string', 'location' => 'xml', ), 'DetectType' => array( 'type' => 'string', 'location' => 'xml', ), 'Callback' => array( 'type' => 'string', 'location' => 'xml', ), 'ReturnHighlightHtml' => array( 'type' => 'string', 'location' => 'xml', ), @@ -5892,6 +6269,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -5919,6 +6297,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -5963,6 +6342,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -5990,6 +6370,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -6034,6 +6415,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -6061,6 +6443,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -6105,6 +6488,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Text' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Keywords' => array( 'type' => 'array', 'location' => 'xml', @@ -6132,6 +6516,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'SubLabel' => array( 'type' => 'string', 'location' => 'xml',), 'Location' => array( 'type' => 'object', 'location' => 'xml', @@ -6597,21 +6982,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'CallBack' => array( 'required' => false, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -6630,13 +7013,12 @@ class Descriptions { ), ), 'Output' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Region' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), - 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), ), @@ -6697,21 +7079,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'CallBack' => array( 'required' => false, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -6869,6 +7249,7 @@ class Descriptions { 'Type' => array( 'type' => 'string', 'location' => 'xml', ), 'Version' => array( 'type' => 'string', 'location' => 'xml', ), 'IgnoreError' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Output' => array( @@ -6938,21 +7319,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -6964,6 +7343,7 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + 'Scene' => array( 'type' => 'string', 'location' => 'xml', ), 'Container' => array( 'type' => 'object', 'location' => 'xml', @@ -6996,11 +7376,36 @@ class Descriptions { ), ), 'AudioMix' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMixArray' => array( 'type' => 'array', 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), 'items' => array( 'type' => 'object', - 'location' => 'xml', + 'name' => 'AudioMixArray', + 'sentAs' => 'AudioMixArray', 'properties' => array( 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), @@ -7089,21 +7494,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'CallBack' => array( 'required' => false, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -7212,21 +7615,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -7308,17 +7709,16 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( @@ -7410,32 +7810,29 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), 'VideoTag' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Scenario' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Scenario' => array( 'type' => 'string', 'location' => 'xml', ), ), ), ), @@ -7496,21 +7893,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -7652,6 +8047,7 @@ class Descriptions { 'Type' => array( 'type' => 'string', 'location' => 'xml', ), 'Version' => array( 'type' => 'string', 'location' => 'xml', ), 'IgnoreError' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Output' => array( @@ -7721,21 +8117,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -7934,21 +8328,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -7961,6 +8353,8 @@ class Descriptions { 'Message' => array( 'type' => 'string', 'location' => 'xml', ), 'Type' => array( 'type' => 'string', 'location' => 'xml', ), 'Version' => array( 'type' => 'string', 'location' => 'xml', ), + 'IgnoreError' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Output' => array( @@ -8030,21 +8424,19 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -8155,6 +8547,13 @@ class Descriptions { 'CallbackType' => array( 'type' => 'integer', 'location' => 'xml', ), ), ), + 'StorageConf' => array( + 'location' => 'xml', + 'type' => 'object', + 'properties' => array( + 'Path' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), ), ); } @@ -8426,10 +8825,9 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'Name' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), 'Snapshot' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( @@ -8586,8 +8984,8 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'Name' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), 'Container' => array( 'type' => 'object', 'location' => 'xml', @@ -8668,6 +9066,56 @@ class Descriptions { ), ), ), + 'AudioMix' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMixArray' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'name' => 'AudioMixArray', + 'sentAs' => 'AudioMixArray', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), ), ); } @@ -8798,6 +9246,56 @@ class Descriptions { ), ), ), + 'AudioMix' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMixArray' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'name' => 'AudioMixArray', + 'sentAs' => 'AudioMixArray', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), ), ); } @@ -8845,8 +9343,8 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'Name' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), 'Container' => array( 'type' => 'object', 'location' => 'xml', @@ -9050,8 +9548,8 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'Name' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), 'Container' => array( 'type' => 'object', 'location' => 'xml', @@ -9207,12 +9705,13 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'Name' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), 'ConcatTemplate' => array( 'type' => 'object', 'location' => 'xml', 'properties' => array( + 'DirectConcat' => array( 'type' => 'string', 'location' => 'xml', ), 'ConcatFragments' => array( 'type' => 'array', 'location' => 'xml', @@ -9258,6 +9757,64 @@ class Descriptions { 'Format' => array( 'type' => 'string', 'location' => 'xml', ), ), ), + 'AudioMix' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMixArray' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'name' => 'AudioMixArray', + 'sentAs' => 'AudioMixArray', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + 'SceneChangeInfo' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Time' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), ), ), ), @@ -9314,6 +9871,7 @@ class Descriptions { 'type' => 'object', 'location' => 'xml', 'properties' => array( + 'DirectConcat' => array( 'type' => 'string', 'location' => 'xml', ), 'ConcatFragments' => array( 'type' => 'array', 'location' => 'xml', @@ -9359,6 +9917,64 @@ class Descriptions { 'Format' => array( 'type' => 'string', 'location' => 'xml', ), ), ), + 'AudioMix' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMixArray' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'name' => 'AudioMixArray', + 'sentAs' => 'AudioMixArray', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + 'SceneChangeInfo' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Time' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), ), ), ), @@ -9408,8 +10024,8 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'Name' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), 'ColorEnhance' => array( 'type' => 'object', 'location' => 'xml', @@ -9543,9 +10159,10 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'Name' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), 'Duration' => array( 'location' => 'xml', 'type' => 'string', ), + 'Scene' => array( 'location' => 'xml', 'type' => 'string', ), 'Container' => array( 'type' => 'object', 'location' => 'xml', @@ -9583,6 +10200,47 @@ class Descriptions { 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMixArray' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'name' => 'AudioMixArray', + 'sentAs' => 'AudioMixArray', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), ), ), ), @@ -9636,6 +10294,7 @@ class Descriptions { 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), 'Name' => array( 'location' => 'xml', 'type' => 'string', ), 'Duration' => array( 'location' => 'xml', 'type' => 'string', ), + 'Scene' => array( 'location' => 'xml', 'type' => 'string', ), 'Container' => array( 'type' => 'object', 'location' => 'xml', @@ -9673,6 +10332,47 @@ class Descriptions { 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMixArray' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'name' => 'AudioMixArray', + 'sentAs' => 'AudioMixArray', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), ), ), ), @@ -9722,9 +10422,9 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'Name' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'AudioMode' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), + 'AudioMode' => array( 'location' => 'xml', 'type' => 'string', ), 'AudioConfig' => array( 'type' => 'object', 'location' => 'xml', @@ -9843,8 +10543,8 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'Name' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), 'Resolution' => array( 'location' => 'xml', 'type' => 'string', ), 'EnableScaleUp' => array( 'location' => 'xml', 'type' => 'string', ), 'Version' => array( 'location' => 'xml', 'type' => 'string', ), @@ -9948,8 +10648,8 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'Name' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), 'PicProcess' => array( 'type' => 'object', 'location' => 'xml', @@ -10063,8 +10763,8 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'Name' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), 'Watermark' => array( 'type' => 'object', 'location' => 'xml', @@ -10387,7 +11087,8 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Name' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), + 'Type' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( 'type' => 'object', 'location' => 'xml', @@ -10403,6 +11104,14 @@ class Descriptions { 'location' => 'xml', 'properties' => array( 'WorkflowIds' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'QueueId' => array( 'type' => 'string', 'location' => 'xml', ), + 'QueueType' => array( 'type' => 'string', 'location' => 'xml', ), + 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'CallBackFormat' => array( 'type' => 'string', 'location' => 'xml', ), + 'CallBackType' => array( 'type' => 'string', 'location' => 'xml', ), + 'CallBack' => array( 'type' => 'string', 'location' => 'xml', ), 'TimeInterval' => array( 'type' => 'object', 'location' => 'xml', @@ -10411,6 +11120,617 @@ class Descriptions { 'End' => array( 'type' => 'string', 'location' => 'xml', ), ), ), + 'Output' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + 'AuObject' => array( 'type' => 'string', 'location' => 'xml', ), + 'SpriteObject' => array( 'type' => 'string', 'location' => 'xml', ), + 'StreamExtract' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Index' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'JobParam' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'TranscodeTemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'WatermarkTemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Animation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + 'AnimateOnlyKeepKeyFrame' => array( 'type' => 'string', 'location' => 'xml', ), + 'AnimateTimeIntervalOfFrame' => array( 'type' => 'string', 'location' => 'xml', ), + 'AnimateFramesPerSecond' => array( 'type' => 'string', 'location' => 'xml', ), + 'Quality' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TimeInterval' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Start' => array( 'type' => 'string', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'Transcode' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + 'Remove' => array( 'type' => 'string', 'location' => 'xml', ), + 'Profile' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Crf' => array( 'type' => 'string', 'location' => 'xml', ), + 'Gop' => array( 'type' => 'string', 'location' => 'xml', ), + 'Preset' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bufsize' => array( 'type' => 'string', 'location' => 'xml', ), + 'Maxrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'HlsTsTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'Pixfmt' => array( 'type' => 'string', 'location' => 'xml', ), + 'LongShortMode' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TimeInterval' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Start' => array( 'type' => 'string', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Samplerate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Channels' => array( 'type' => 'string', 'location' => 'xml', ), + 'Remove' => array( 'type' => 'string', 'location' => 'xml', ), + 'KeepTwoTracks' => array( 'type' => 'string', 'location' => 'xml', ), + 'SwitchTrack' => array( 'type' => 'string', 'location' => 'xml', ), + 'SampleFormat' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TransConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AdjDarMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckReso' => array( 'type' => 'string', 'location' => 'xml', ), + 'ResoAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckVideoBitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoBitrateAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckAudioBitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'AudioBitrateAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'DeleteMetadata' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsHdr2Sdr' => array( 'type' => 'string', 'location' => 'xml', ), + 'HlsEncrypt' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'IsHlsEncrypt' => array( 'type' => 'string', 'location' => 'xml', ), + 'UriKey' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMix' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMixArray' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'name' => 'AudioMixArray', + 'sentAs' => 'AudioMixArray', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ), + ), + 'SmartCover' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Count' => array( 'type' => 'string', 'location' => 'xml', ), + 'DeleteDuplicates' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'DigitalWatermark' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Message' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Version' => array( 'type' => 'string', 'location' => 'xml', ), + 'IgnoreError' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Watermark' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'name' => 'Watermark', + 'type' => 'object', + 'sentAs' => 'Watermark', + 'properties' => array( + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Pos' => array( 'type' => 'string', 'location' => 'xml', ), + 'LocMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Dx' => array( 'type' => 'string', 'location' => 'xml', ), + 'Dy' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'Image' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Url' => array( 'type' => 'string', 'location' => 'xml', ), + 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Transparency' => array( 'type' => 'string', 'location' => 'xml', ), + 'Background' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Text' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'FontSize' => array( 'type' => 'string', 'location' => 'xml', ), + 'FontType' => array( 'type' => 'string', 'location' => 'xml', ), + 'FontColor' => array( 'type' => 'string', 'location' => 'xml', ), + 'Transparency' => array( 'type' => 'string', 'location' => 'xml', ), + 'Text' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ) + ), + 'RemoveWatermark' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Dx' => array( 'type' => 'string', 'location' => 'xml', ), + 'Dy' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Snapshot' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Start' => array( 'type' => 'string', 'location' => 'xml', ), + 'TimeInterval' => array( 'type' => 'string', 'location' => 'xml', ), + 'Count' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'SpeechRecognition' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EngineModelType' => array( 'type' => 'string', 'location' => 'xml', ), + 'ChannelNum' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ResTextFormat' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterDirty' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterModal' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ConvertNumMode' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerDiarization' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerNumber' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterPunc' => array( 'type' => 'integer', 'location' => 'xml', ), + 'OutputFileType' => array( 'type' => 'string', 'location' => 'xml', ), + 'FlashAsr' => array( 'type' => 'string', 'location' => 'xml', ), + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'FirstChannelOnly' => array( 'type' => 'integer', 'location' => 'xml', ), + 'WordInfo' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SentenceMaxLength' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), + 'ConcatTemplate' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Samplerate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Channels' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Index' => array( 'type' => 'string', 'location' => 'xml', ), + 'DirectConcat' => array( 'type' => 'string', 'location' => 'xml', ), + 'ConcatFragments' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'name' => 'ConcatFragment', + 'type' => 'object', + 'sentAs' => 'ConcatFragment', + 'properties' => array( + 'Url' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndTime' => array( 'type' => 'string', 'location' => 'xml', ), + // 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), 拼接接口不需要Mode参数 + ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Remove' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'AudioMix' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMixArray' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'name' => 'AudioMixArray', + 'sentAs' => 'AudioMixArray', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ), + ), + 'VoiceSeparate' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AudioMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'AudioConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Samplerate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Channels' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'VideoMontage' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + 'Scene' => array( 'type' => 'string', 'location' => 'xml', ), + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Crf' => array( 'type' => 'string', 'location' => 'xml', ), + 'Rotate' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Samplerate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Channels' => array( 'type' => 'string', 'location' => 'xml', ), + 'Remove' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'AudioMix' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'AudioMixArray' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'type' => 'object', + 'name' => 'AudioMixArray', + 'sentAs' => 'AudioMixArray', + 'properties' => array( + 'AudioSource' => array( 'type' => 'string', 'location' => 'xml', ), + 'MixMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Replace' => array( 'type' => 'string', 'location' => 'xml', ), + 'EffectConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EnableStartFadein' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartFadeinTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableEndFadeout' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndFadeoutTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableBgmFade' => array( 'type' => 'string', 'location' => 'xml', ), + 'BgmFadeTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ), + ), + 'SDRtoHDR' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'HdrMode' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'VideoProcess' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'ColorEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Enable' => array( 'type' => 'string', 'location' => 'xml', ), + 'Contrast' => array( 'type' => 'string', 'location' => 'xml', ), + 'Correction' => array( 'type' => 'string', 'location' => 'xml', ), + 'Saturation' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'MsSharpen' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Enable' => array( 'type' => 'string', 'location' => 'xml', ), + 'SharpenLevel' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'SuperResolution' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Resolution' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableScaleUp' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Segment' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + 'HlsEncrypt' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'IsHlsEncrypt' => array( 'type' => 'string', 'location' => 'xml', ), + 'UriKey' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'ExtractDigitalWatermark' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Version' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'VideoTag' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Scenario' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TtsTpl' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'VoiceType' => array( 'type' => 'string', 'location' => 'xml', ), + 'Volume' => array( 'type' => 'string', 'location' => 'xml', ), + 'Speed' => array( 'type' => 'string', 'location' => 'xml', ), + 'Emotion' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'NoiseReduction' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'SampleRate' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'CallBackMqConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), ), ), ), @@ -10612,25 +11932,33 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( 'type' => 'object', 'location' => 'xml', 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'NoiseReduction' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'SampleRate' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), 'Output' => array( 'type' => 'object', 'location' => 'xml', @@ -11694,7 +13022,7 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Key' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Key' => array( 'type' => 'string', 'location' => 'uri', ), 'Name' => array( 'type' => 'string', 'location' => 'xml', ), 'QueueID' => array( 'type' => 'string', 'location' => 'xml', ), 'State' => array( 'type' => 'string', 'location' => 'xml', ), @@ -11760,7 +13088,7 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), @@ -11844,17 +13172,16 @@ class Descriptions { ), 'parameters' => array( 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), - 'Tag' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), - 'QueueId' => array( 'required' => true, 'location' => 'xml', 'type' => 'string', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), 'Input' => array( - 'required' => true, 'type' => 'object', 'location' => 'xml', 'properties' => array( - 'Object' => array( 'required' => true, 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), ), ), 'Operation' => array( @@ -12889,4 +14216,3168 @@ class Descriptions { ); } + public static function CreateM3U8PlayListJobs() { + return array( + 'httpMethod' => 'POST', + 'uri' => '/{Bucket}m3u8_playlist', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'CreateM3U8PlayListJobsOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'StartTime' => array( 'location' => 'query', 'type' => 'integer', 'sentAs' => 'startTime'), + 'EndTime' => array( 'location' => 'query', 'type' => 'integer', 'sentAs' => 'endTime'), + 'Operation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'M3U8List' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array('xmlFlattened' => true), + 'items' => array( + 'name' => 'M3U8List', + 'type' => 'object', + 'sentAs' => 'M3U8List', + 'properties' => array( + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Index' => array( 'type' => 'string', 'location' => 'xml', ), + 'ObjectPath' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + 'Output' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ); + } + public static function CreateM3U8PlayListJobsOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-ci-request-id', + ), + 'ContentType' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'Content-Type', + ), + 'ContentLength' => array( + 'type' => 'numeric', + 'minimum'=> 0, + 'location' => 'header', + 'sentAs' => 'Content-Length', + ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'Operation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'M3U8List' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Index' => array( 'type' => 'string', 'location' => 'xml', ), + 'ObjectPath' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + 'Output' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'ResultInfo' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'OutputUrl' => array( 'type' => 'string', 'location' => 'xml', ), + 'ErrorInfo' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'ObjectPath' => array( 'type' => 'string', 'location' => 'xml', ), + 'Message' => array( 'type' => 'string', 'location' => 'xml', ), + 'Code' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ), + ); + } + + public static function GetPicQueueList() { + return array( + 'httpMethod' => 'GET', + 'uri' => '/{Bucket}picqueue', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'GetPicQueueListOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'QueueIds' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'queueIds' ), + 'State' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'state' ), + 'PageNumber' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'pageNumber' ), + 'PageSize' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'pageSize' ), + ), + ); + } + public static function GetPicQueueListOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'TotalCount' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PageNumber' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PageSize' => array( 'type' => 'integer', 'location' => 'xml', ), + 'QueueList' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'QueueId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'MaxSize' => array( 'type' => 'integer', 'location' => 'xml', ), + 'MaxConcurrent' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'NotifyConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Url' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Event' => array( 'type' => 'string', 'location' => 'xml', ), + 'ResultFormat' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + 'NonExistPIDs' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ); + } + + public static function UpdatePicQueue() { + return array( + 'httpMethod' => 'PUT', + 'uri' => '/{Bucket}picqueue/{/Key*}', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'UpdatePicQueueOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Key' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), + 'State' => array( 'location' => 'xml', 'type' => 'string', ), + 'NotifyConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'Event' => array( 'type' => 'string', 'location' => 'xml', ), + 'ResultFormat' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Url' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function UpdatePicQueueOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-ci-request-id', + ), + 'ContentType' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'Content-Type', + ), + 'ContentLength' => array( + 'type' => 'numeric', + 'minimum'=> 0, + 'location' => 'header', + 'sentAs' => 'Content-Length', + ), + 'Queue' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'QueueId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'MaxSize' => array( 'type' => 'integer', 'location' => 'xml', ), + 'MaxConcurrent' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'NotifyConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'Event' => array( 'type' => 'string', 'location' => 'xml', ), + 'ResultFormat' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Url' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ); + } + + public static function GetPicBucketList() { + return array( + 'httpMethod' => 'GET', + 'uri' => '/picbucket', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'GetPicBucketListOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Regions' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'regions' ), + 'BucketNames' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'bucketNames' ), + 'BucketName' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'bucketName' ), + 'PageNumber' => array( 'type' => 'integer', 'location' => 'query', 'sentAs' => 'pageNumber' ), + 'PageSize' => array( 'type' => 'integer', 'location' => 'query', 'sentAs' => 'pageSize' ), + ), + ); + } + public static function GetPicBucketListOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'TotalCount' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PageNumber' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PageSize' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PicBucketList' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'BucketId' => array( 'type' => 'string', 'location' => 'xml',), + 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'Region' => array( 'type' => 'string', 'location' => 'xml',), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml',), + ), + ), + ), + ), + ); + } + + public static function GetAiBucketList() { + return array( + 'httpMethod' => 'GET', + 'uri' => '/ai_bucket', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'GetAiBucketListOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Regions' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'regions' ), + 'BucketNames' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'bucketNames' ), + 'BucketName' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'bucketName' ), + 'PageNumber' => array( 'type' => 'integer', 'location' => 'query', 'sentAs' => 'pageNumber' ), + 'PageSize' => array( 'type' => 'integer', 'location' => 'query', 'sentAs' => 'pageSize' ), + ), + ); + } + public static function GetAiBucketListOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'TotalCount' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PageNumber' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PageSize' => array( 'type' => 'integer', 'location' => 'xml', ), + 'AiBucketList' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'BucketId' => array( 'type' => 'string', 'location' => 'xml',), + 'Name' => array( 'type' => 'string', 'location' => 'xml',), + 'Region' => array( 'type' => 'string', 'location' => 'xml',), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml',), + ), + ), + ), + ), + ); + } + + public static function OpenAiService() { + return array( + 'httpMethod' => 'POST', + 'uri' => '/{Bucket}ai_bucket', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'OpenAiServiceOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + ), + ); + } + public static function OpenAiServiceOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'AiBucket' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ); + } + + public static function GetAiQueueList() { + return array( + 'httpMethod' => 'GET', + 'uri' => '/{Bucket}ai_queue', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'GetAiQueueListOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'QueueIds' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'queueIds' ), + 'State' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'state' ), + 'PageNumber' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'pageNumber' ), + 'PageSize' => array( 'type' => 'string', 'location' => 'query', 'sentAs' => 'pageSize' ), + ), + ); + } + public static function GetAiQueueListOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'TotalCount' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PageNumber' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PageSize' => array( 'type' => 'integer', 'location' => 'xml', ), + 'QueueList' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'QueueId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'MaxSize' => array( 'type' => 'integer', 'location' => 'xml', ), + 'MaxConcurrent' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'NotifyConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Url' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Event' => array( 'type' => 'string', 'location' => 'xml', ), + 'ResultFormat' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + 'NonExistPIDs' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ); + } + + public static function UpdateAiQueue() { + return array( + 'httpMethod' => 'PUT', + 'uri' => '/{Bucket}ai_queue/{/Key*}', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'UpdateAiQueueOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Key' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), + 'State' => array( 'location' => 'xml', 'type' => 'string', ), + 'NotifyConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'Event' => array( 'type' => 'string', 'location' => 'xml', ), + 'ResultFormat' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Url' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function UpdateAiQueueOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-ci-request-id', + ), + 'ContentType' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'Content-Type', + ), + 'ContentLength' => array( + 'type' => 'numeric', + 'minimum'=> 0, + 'location' => 'header', + 'sentAs' => 'Content-Length', + ), + 'Queue' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'QueueId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'MaxSize' => array( 'type' => 'integer', 'location' => 'xml', ), + 'MaxConcurrent' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'NotifyConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'Event' => array( 'type' => 'string', 'location' => 'xml', ), + 'ResultFormat' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Url' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ); + } + + public static function CreateMediaTranscodeProTemplate() { + return array( + 'httpMethod' => 'POST', + 'uri' => '/{Bucket}template', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'CreateMediaTranscodeProTemplateOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Profile' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Interlaced' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Rotate' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TimeInterval' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Start' => array( 'type' => 'string', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Remove' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TransConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AdjDarMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckReso' => array( 'type' => 'string', 'location' => 'xml', ), + 'ResoAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckVideoBitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoBitrateAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckAudioBitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'AudioBitrateAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckVideoFps' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoFpsAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'DeleteMetadata' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsHdr2Sdr' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function CreateMediaTranscodeProTemplateOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'Template' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'TransProTpl' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Profile' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Interlaced' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Rotate' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TimeInterval' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Start' => array( 'type' => 'string', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Remove' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TransConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AdjDarMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckReso' => array( 'type' => 'string', 'location' => 'xml', ), + 'ResoAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckVideoBitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoBitrateAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckAudioBitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'AudioBitrateAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckVideoFps' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoFpsAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'DeleteMetadata' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsHdr2Sdr' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ), + ), + ); + } + + public static function UpdateMediaTranscodeProTemplate() { + return array( + 'httpMethod' => 'PUT', + 'uri' => '/{Bucket}template/{/Key*}', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'UpdateMediaTranscodeProTemplateOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Key' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Profile' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Interlaced' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Rotate' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TimeInterval' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Start' => array( 'type' => 'string', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Remove' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TransConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AdjDarMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckReso' => array( 'type' => 'string', 'location' => 'xml', ), + 'ResoAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckVideoBitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoBitrateAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckAudioBitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'AudioBitrateAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckVideoFps' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoFpsAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'DeleteMetadata' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsHdr2Sdr' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function UpdateMediaTranscodeProTemplateOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'Template' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'TransProTpl' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Profile' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Interlaced' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Rotate' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TimeInterval' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Start' => array( 'type' => 'string', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Remove' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TransConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AdjDarMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckReso' => array( 'type' => 'string', 'location' => 'xml', ), + 'ResoAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckVideoBitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoBitrateAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckAudioBitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'AudioBitrateAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsCheckVideoFps' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoFpsAdjMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'DeleteMetadata' => array( 'type' => 'string', 'location' => 'xml', ), + 'IsHdr2Sdr' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ), + ), + ); + } + + public static function CreateVoiceTtsTemplate() { + return array( + 'httpMethod' => 'POST', + 'uri' => '/{Bucket}template', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'CreateVoiceTtsTemplateOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'VoiceType' => array( 'type' => 'string', 'location' => 'xml', ), + 'Volume' => array( 'type' => 'string', 'location' => 'xml', ), + 'Speed' => array( 'type' => 'string', 'location' => 'xml', ), + 'Emotion' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ); + } + public static function CreateVoiceTtsTemplateOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'Template' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'TtsTpl' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'VoiceType' => array( 'type' => 'string', 'location' => 'xml', ), + 'Volume' => array( 'type' => 'string', 'location' => 'xml', ), + 'Speed' => array( 'type' => 'string', 'location' => 'xml', ), + 'Emotion' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ); + } + + public static function UpdateVoiceTtsTemplate() { + return array( + 'httpMethod' => 'PUT', + 'uri' => '/{Bucket}template/{/Key*}', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'UpdateVoiceTtsTemplateOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Key' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'VoiceType' => array( 'type' => 'string', 'location' => 'xml', ), + 'Volume' => array( 'type' => 'string', 'location' => 'xml', ), + 'Speed' => array( 'type' => 'string', 'location' => 'xml', ), + 'Emotion' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ); + } + public static function UpdateVoiceTtsTemplateOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'Template' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'TtsTpl' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'VoiceType' => array( 'type' => 'string', 'location' => 'xml', ), + 'Volume' => array( 'type' => 'string', 'location' => 'xml', ), + 'Speed' => array( 'type' => 'string', 'location' => 'xml', ), + 'Emotion' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ); + } + + public static function CreateMediaSmartCoverTemplate() { + return array( + 'httpMethod' => 'POST', + 'uri' => '/{Bucket}template', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'CreateMediaSmartCoverTemplateOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), + 'SmartCover' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Count' => array( 'type' => 'string', 'location' => 'xml', ), + 'DeleteDuplicates' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function CreateMediaSmartCoverTemplateOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'Template' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'SmartCover' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Count' => array( 'type' => 'string', 'location' => 'xml', ), + 'DeleteDuplicates' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ); + } + + public static function UpdateMediaSmartCoverTemplate() { + return array( + 'httpMethod' => 'PUT', + 'uri' => '/{Bucket}template/{/Key*}', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'UpdateMediaSmartCoverTemplateOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Key' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), + 'SmartCover' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Count' => array( 'type' => 'string', 'location' => 'xml', ), + 'DeleteDuplicates' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function UpdateMediaSmartCoverTemplateOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'Template' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'SmartCover' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Count' => array( 'type' => 'string', 'location' => 'xml', ), + 'DeleteDuplicates' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ); + } + + public static function CreateVoiceSpeechRecognitionTemplate() { + return array( + 'httpMethod' => 'POST', + 'uri' => '/{Bucket}template', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'CreateVoiceSpeechRecognitionTemplateOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'SpeechRecognition' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EngineModelType' => array( 'type' => 'string', 'location' => 'xml', ), + 'ChannelNum' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ResTextFormat' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterDirty' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterModal' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ConvertNumMode' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerDiarization' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerNumber' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterPunc' => array( 'type' => 'integer', 'location' => 'xml', ), + 'OutputFileType' => array( 'type' => 'string', 'location' => 'xml', ), + 'FlashAsr' => array( 'type' => 'string', 'location' => 'xml', ), + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'FirstChannelOnly' => array( 'type' => 'integer', 'location' => 'xml', ), + 'WordInfo' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SentenceMaxLength' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function CreateVoiceSpeechRecognitionTemplateOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'Template' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'SpeechRecognition' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EngineModelType' => array( 'type' => 'string', 'location' => 'xml', ), + 'ChannelNum' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ResTextFormat' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterDirty' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterModal' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ConvertNumMode' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerDiarization' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerNumber' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterPunc' => array( 'type' => 'integer', 'location' => 'xml', ), + 'OutputFileType' => array( 'type' => 'string', 'location' => 'xml', ), + 'FlashAsr' => array( 'type' => 'string', 'location' => 'xml', ), + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'FirstChannelOnly' => array( 'type' => 'integer', 'location' => 'xml', ), + 'WordInfo' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SentenceMaxLength' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ); + } + + public static function UpdateVoiceSpeechRecognitionTemplate() { + return array( + 'httpMethod' => 'PUT', + 'uri' => '/{Bucket}template/{/Key*}', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'UpdateVoiceSpeechRecognitionTemplateOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Key' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'SpeechRecognition' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EngineModelType' => array( 'type' => 'string', 'location' => 'xml', ), + 'ChannelNum' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ResTextFormat' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterDirty' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterModal' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ConvertNumMode' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerDiarization' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerNumber' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterPunc' => array( 'type' => 'integer', 'location' => 'xml', ), + 'OutputFileType' => array( 'type' => 'string', 'location' => 'xml', ), + 'FlashAsr' => array( 'type' => 'string', 'location' => 'xml', ), + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'FirstChannelOnly' => array( 'type' => 'integer', 'location' => 'xml', ), + 'WordInfo' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SentenceMaxLength' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function UpdateVoiceSpeechRecognitionTemplateOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'Template' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'SpeechRecognition' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EngineModelType' => array( 'type' => 'string', 'location' => 'xml', ), + 'ChannelNum' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ResTextFormat' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterDirty' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterModal' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ConvertNumMode' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerDiarization' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerNumber' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterPunc' => array( 'type' => 'integer', 'location' => 'xml', ), + 'OutputFileType' => array( 'type' => 'string', 'location' => 'xml', ), + 'FlashAsr' => array( 'type' => 'string', 'location' => 'xml', ), + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'FirstChannelOnly' => array( 'type' => 'integer', 'location' => 'xml', ), + 'WordInfo' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SentenceMaxLength' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ); + } + + public static function CreateVoiceTtsJobs() { + return array( + 'httpMethod' => 'POST', + 'uri' => '/{Bucket}jobs', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'CreateVoiceTtsJobsOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), + 'Operation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'TtsConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'InputType' => array( 'type' => 'string', 'location' => 'xml', ), + 'Input' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'TtsTpl' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'VoiceType' => array( 'type' => 'string', 'location' => 'xml', ), + 'Volume' => array( 'type' => 'string', 'location' => 'xml', ), + 'Speed' => array( 'type' => 'string', 'location' => 'xml', ), + 'Emotion' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Output' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'CallBackMqConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function CreateVoiceTtsJobsOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'JobsDetail' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Code' => array( 'type' => 'string', 'location' => 'xml', ), + 'Message' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreationTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'QueueId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Operation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'TemplateName' => array( 'type' => 'string', 'location' => 'xml', ), + 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'TtsConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'InputType' => array( 'type' => 'string', 'location' => 'xml', ), + 'Input' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Output' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'MediaInfo' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'NumStream' => array( 'type' => 'integer', 'location' => 'xml', ), + 'NumProgram' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FormatName' => array( 'type' => 'string', 'location' => 'xml', ), + 'FormatLongName' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Size' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), + 'Stream' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Index' => array( 'type' => 'integer', 'location' => 'xml', ), + 'CodecName' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecLongName' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecTimeBase' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecTagString' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecTag' => array( 'type' => 'string', 'location' => 'xml', ), + 'Profile' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Width' => array( 'type' => 'integer', 'location' => 'xml', ), + 'HasBFrame' => array( 'type' => 'integer', 'location' => 'xml', ), + 'RefFrames' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Sar' => array( 'type' => 'string', 'location' => 'xml', ), + 'Dar' => array( 'type' => 'string', 'location' => 'xml', ), + 'PixFormat' => array( 'type' => 'string', 'location' => 'xml', ), + 'FieldOrder' => array( 'type' => 'string', 'location' => 'xml', ), + 'Level' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'integer', 'location' => 'xml', ), + 'AvgFps' => array( 'type' => 'string', 'location' => 'xml', ), + 'Timebase' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'NumFrames' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Language' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Index' => array( 'type' => 'integer', 'location' => 'xml', ), + 'CodecName' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecLongName' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecTimeBase' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecTagString' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecTag' => array( 'type' => 'string', 'location' => 'xml', ), + 'SampleFmt' => array( 'type' => 'string', 'location' => 'xml', ), + 'SampleRate' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Channel' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ChannelLayout' => array( 'type' => 'string', 'location' => 'xml', ), + 'Timebase' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Language' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Subtitle' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Index' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Language' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ), + 'MediaResult' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'OutputFile' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'ObjectName' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( 'type' => 'string', 'location' => 'xml',), + ), + 'Md5Info' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'ObjectName' => array( 'type' => 'string', 'location' => 'xml',), + 'Md5' => array( 'type' => 'string', 'location' => 'xml',), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ); + } + + public static function CreateAiTranslationJobs() { + return array( + 'httpMethod' => 'POST', + 'uri' => '/{Bucket}jobs', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'CreateAiTranslationJobsOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), + 'Input' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + 'Lang' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'BasicType' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Operation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'NoNeedOutput' => array( 'type' => 'string', 'location' => 'xml', ), + 'Translation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Lang' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Output' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'CallBackMqConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function CreateAiTranslationJobsOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'JobsDetail' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Code' => array( 'type' => 'string', 'location' => 'xml', ), + 'Message' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreationTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'QueueId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Input' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + 'Lang' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'BasicType' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Operation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'Translation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Lang' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Output' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'AITranslateResult' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Result' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ), + ), + ); + } + + public static function CreateVoiceSpeechRecognitionJobs() { + return array( + 'httpMethod' => 'POST', + 'uri' => '/{Bucket}jobs', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'CreateVoiceSpeechRecognitionJobsOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), + 'Input' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + 'Url' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Operation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'SpeechRecognition' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EngineModelType' => array( 'type' => 'string', 'location' => 'xml', ), + 'ChannelNum' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ResTextFormat' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterDirty' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterModal' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ConvertNumMode' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerDiarization' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerNumber' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterPunc' => array( 'type' => 'integer', 'location' => 'xml', ), + 'OutputFileType' => array( 'type' => 'string', 'location' => 'xml', ), + 'FlashAsr' => array( 'type' => 'string', 'location' => 'xml', ), + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'FirstChannelOnly' => array( 'type' => 'integer', 'location' => 'xml', ), + 'WordInfo' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SentenceMaxLength' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), + 'Output' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'CallBackMqConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function CreateVoiceSpeechRecognitionJobsOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'JobsDetail' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Code' => array( 'type' => 'string', 'location' => 'xml', ), + 'Message' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreationTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'QueueId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Input' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + 'Url' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Operation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'TemplateName' => array( 'type' => 'string', 'location' => 'xml', ), + 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'SpeechRecognition' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'EngineModelType' => array( 'type' => 'string', 'location' => 'xml', ), + 'ChannelNum' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ResTextFormat' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterDirty' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterModal' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ConvertNumMode' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerDiarization' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SpeakerNumber' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FilterPunc' => array( 'type' => 'integer', 'location' => 'xml', ), + 'OutputFileType' => array( 'type' => 'string', 'location' => 'xml', ), + 'FlashAsr' => array( 'type' => 'string', 'location' => 'xml', ), + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'FirstChannelOnly' => array( 'type' => 'integer', 'location' => 'xml', ), + 'WordInfo' => array( 'type' => 'integer', 'location' => 'xml', ), + 'SentenceMaxLength' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), + 'Output' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'SpeechRecognitionResult' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'AudioTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'Result' => array( 'type' => 'string', 'location' => 'xml', ), + 'FlashResult' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'channel_id' => array( 'type' => 'integer', 'location' => 'xml',), + 'text' => array( 'type' => 'string', 'location' => 'xml',), + 'sentence_list' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'text' => array( 'type' => 'string', 'location' => 'xml',), + 'start_time' => array( 'type' => 'integer', 'location' => 'xml',), + 'end_time' => array( 'type' => 'integer', 'location' => 'xml',), + 'speaker_id' => array( 'type' => 'integer', 'location' => 'xml',), + 'word_list' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'word' => array( 'type' => 'string', 'location' => 'xml',), + 'start_time' => array( 'type' => 'integer', 'location' => 'xml',), + 'end_time' => array( 'type' => 'integer', 'location' => 'xml',), + ), + ), + ), + ), + ), + ), + ), + ), + ), + 'ResultDetail' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'FinalSentence' => array( 'type' => 'string', 'location' => 'xml',), + 'SliceSentence' => array( 'type' => 'string', 'location' => 'xml',), + 'StartMs' => array( 'type' => 'string', 'location' => 'xml',), + 'EndMs' => array( 'type' => 'string', 'location' => 'xml',), + 'WordsNum' => array( 'type' => 'string', 'location' => 'xml',), + 'SpeechSpeed' => array( 'type' => 'string', 'location' => 'xml',), + 'SpeakerId' => array( 'type' => 'string', 'location' => 'xml',), + 'Words' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Word' => array( 'type' => 'string', 'location' => 'xml',), + 'OffsetStartMs' => array( 'type' => 'string', 'location' => 'xml',), + 'OffsetEndMs' => array( 'type' => 'string', 'location' => 'xml',), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ); + } + + public static function CreateAiWordsGeneralizeJobs() { + return array( + 'httpMethod' => 'POST', + 'uri' => '/{Bucket}jobs', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'CreateAiWordsGeneralizeJobsOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), + 'Input' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Operation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'WordsGeneralize' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'NerMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'SegMethod' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'CallBackMqConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function CreateAiWordsGeneralizeJobsOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'JobsDetail' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Code' => array( 'type' => 'string', 'location' => 'xml', ), + 'Message' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreationTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'QueueId' => array( 'type' => 'string', 'location' => 'xml', ), + 'QueueType' => array( 'type' => 'string', 'location' => 'xml', ), + 'Input' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Operation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'WordsGeneralize' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'NerMethod' => array( 'type' => 'string', 'location' => 'xml', ), + 'SegMethod' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'WordsGeneralizeResult' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'WordsGeneralizeLable' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Category' => array( 'type' => 'string', 'location' => 'xml',), + 'Word' => array( 'type' => 'string', 'location' => 'xml',), + ), + ), + ), + 'WordsGeneralizeToken' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Word' => array( 'type' => 'string', 'location' => 'xml',), + 'Offset' => array( 'type' => 'string', 'location' => 'xml',), + 'Length' => array( 'type' => 'string', 'location' => 'xml',), + 'Pos' => array( 'type' => 'string', 'location' => 'xml',), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ), + ); + } + + public static function CreateMediaVideoEnhanceJobs() { + return array( + 'httpMethod' => 'POST', + 'uri' => '/{Bucket}jobs', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'CreateMediaVideoEnhanceJobsOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'QueueId' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBack' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBackFormat' => array( 'location' => 'xml', 'type' => 'string', ), + 'CallBackType' => array( 'location' => 'xml', 'type' => 'string', ), + 'Input' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Operation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Transcode' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'ClipConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Samplerate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Channels' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'SuperResolution' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Resolution' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableScaleUp' => array( 'type' => 'string', 'location' => 'xml', ), + 'Version' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'SDRtoHDR' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'HdrMode' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'ColorEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Contrast' => array( 'type' => 'string', 'location' => 'xml', ), + 'Correction' => array( 'type' => 'string', 'location' => 'xml', ), + 'Saturation' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'MsSharpen' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'SharpenLevel' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'FrameEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'FrameDoubling' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'WatermarkTemplateId' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'name' => 'WatermarkTemplateId', + 'type' => 'string', + 'location' => 'xml', + 'sentAs' => 'WatermarkTemplateId', + ), + ), + 'Watermark' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( + 'name' => 'Watermark', + 'type' => 'object', + 'sentAs' => 'Watermark', + 'properties' => array( + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Pos' => array( 'type' => 'string', 'location' => 'xml', ), + 'LocMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Dx' => array( 'type' => 'string', 'location' => 'xml', ), + 'Dy' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'Image' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Url' => array( 'type' => 'string', 'location' => 'xml', ), + 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Transparency' => array( 'type' => 'string', 'location' => 'xml', ), + 'Background' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Text' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'FontSize' => array( 'type' => 'string', 'location' => 'xml', ), + 'FontType' => array( 'type' => 'string', 'location' => 'xml', ), + 'FontColor' => array( 'type' => 'string', 'location' => 'xml', ), + 'Transparency' => array( 'type' => 'string', 'location' => 'xml', ), + 'Text' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'SlideConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'SlideMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'XSlideSpeed' => array( 'type' => 'string', 'location' => 'xml', ), + 'YSlideSpeed' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ) + ), + 'DigitalWatermark' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Message' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Version' => array( 'type' => 'string', 'location' => 'xml', ), + 'IgnoreError' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Output' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'CallBackMqConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'MqRegion' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'MqName' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ); + } + public static function CreateMediaVideoEnhanceJobsOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'JobsDetail' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Code' => array( 'type' => 'string', 'location' => 'xml', ), + 'Message' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + 'Progress' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreationTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'QueueId' => array( 'type' => 'string', 'location' => 'xml', ), + 'QueueType' => array( 'type' => 'string', 'location' => 'xml', ), + 'Input' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Operation' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'TemplateName' => array( 'type' => 'string', 'location' => 'xml', ), + 'UserData' => array( 'type' => 'string', 'location' => 'xml', ), + 'JobLevel' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Transcode' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'ClipConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Samplerate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Channels' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'SuperResolution' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Resolution' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableScaleUp' => array( 'type' => 'string', 'location' => 'xml', ), + 'Version' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'SDRtoHDR' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'HdrMode' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'ColorEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Contrast' => array( 'type' => 'string', 'location' => 'xml', ), + 'Correction' => array( 'type' => 'string', 'location' => 'xml', ), + 'Saturation' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'MsSharpen' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'SharpenLevel' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'FrameEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'FrameDoubling' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'Watermark' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Pos' => array( 'type' => 'string', 'location' => 'xml', ), + 'LocMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Dx' => array( 'type' => 'string', 'location' => 'xml', ), + 'Dy' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'EndTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'Image' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Url' => array( 'type' => 'string', 'location' => 'xml', ), + 'Mode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Transparency' => array( 'type' => 'string', 'location' => 'xml', ), + 'Background' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Text' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'FontSize' => array( 'type' => 'string', 'location' => 'xml', ), + 'FontType' => array( 'type' => 'string', 'location' => 'xml', ), + 'FontColor' => array( 'type' => 'string', 'location' => 'xml', ), + 'Transparency' => array( 'type' => 'string', 'location' => 'xml', ), + 'Text' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'SlideConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'SlideMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'XSlideSpeed' => array( 'type' => 'string', 'location' => 'xml', ), + 'YSlideSpeed' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ) + ), + 'WatermarkTemplateId' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( 'type' => 'string', 'location' => 'xml', ), + ), + 'Output' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Object' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'MediaInfo' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'NumStream' => array( 'type' => 'integer', 'location' => 'xml', ), + 'NumProgram' => array( 'type' => 'integer', 'location' => 'xml', ), + 'FormatName' => array( 'type' => 'string', 'location' => 'xml', ), + 'FormatLongName' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Size' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), + 'Stream' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Index' => array( 'type' => 'integer', 'location' => 'xml', ), + 'CodecName' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecLongName' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecTimeBase' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecTagString' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecTag' => array( 'type' => 'string', 'location' => 'xml', ), + 'Profile' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Width' => array( 'type' => 'integer', 'location' => 'xml', ), + 'HasBFrame' => array( 'type' => 'integer', 'location' => 'xml', ), + 'RefFrames' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Sar' => array( 'type' => 'string', 'location' => 'xml', ), + 'Dar' => array( 'type' => 'string', 'location' => 'xml', ), + 'PixFormat' => array( 'type' => 'string', 'location' => 'xml', ), + 'FieldOrder' => array( 'type' => 'string', 'location' => 'xml', ), + 'Level' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'integer', 'location' => 'xml', ), + 'AvgFps' => array( 'type' => 'string', 'location' => 'xml', ), + 'Timebase' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'NumFrames' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Language' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Index' => array( 'type' => 'integer', 'location' => 'xml', ), + 'CodecName' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecLongName' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecTimeBase' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecTagString' => array( 'type' => 'string', 'location' => 'xml', ), + 'CodecTag' => array( 'type' => 'string', 'location' => 'xml', ), + 'SampleFmt' => array( 'type' => 'string', 'location' => 'xml', ), + 'SampleRate' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Channel' => array( 'type' => 'integer', 'location' => 'xml', ), + 'ChannelLayout' => array( 'type' => 'string', 'location' => 'xml', ), + 'Timebase' => array( 'type' => 'string', 'location' => 'xml', ), + 'StartTime' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Duration' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'numeric', 'location' => 'xml', ), + 'Language' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Subtitle' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Index' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Language' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ), + 'MediaResult' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'OutputFile' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Bucket' => array( 'type' => 'string', 'location' => 'xml', ), + 'Region' => array( 'type' => 'string', 'location' => 'xml', ), + 'ObjectName' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( 'type' => 'string', 'location' => 'xml',), + ), + 'Md5Info' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'ObjectName' => array( 'type' => 'string', 'location' => 'xml',), + 'Md5' => array( 'type' => 'string', 'location' => 'xml',), + ), + ), + ), + ), + ), + ), + ), + 'DigitalWatermark' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Message' => array( 'type' => 'string', 'location' => 'xml', ), + 'Type' => array( 'type' => 'string', 'location' => 'xml', ), + 'Version' => array( 'type' => 'string', 'location' => 'xml', ), + 'IgnoreError' => array( 'type' => 'string', 'location' => 'xml', ), + 'State' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ), + ), + ); + } + + public static function CreateMediaVideoEnhanceTemplate() { + return array( + 'httpMethod' => 'POST', + 'uri' => '/{Bucket}template', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'CreateMediaVideoEnhanceTemplateOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), + 'VideoEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Transcode' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'ClipConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Samplerate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Channels' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'SuperResolution' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Resolution' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableScaleUp' => array( 'type' => 'string', 'location' => 'xml', ), + 'Version' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'SDRtoHDR' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'HdrMode' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'ColorEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Contrast' => array( 'type' => 'string', 'location' => 'xml', ), + 'Correction' => array( 'type' => 'string', 'location' => 'xml', ), + 'Saturation' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'MsSharpen' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'SharpenLevel' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'FrameEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'FrameDoubling' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ); + } + public static function CreateMediaVideoEnhanceTemplateOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'Template' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Transcode' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'ClipConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Samplerate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Channels' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'SuperResolution' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Resolution' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableScaleUp' => array( 'type' => 'string', 'location' => 'xml', ), + 'Version' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'SDRtoHDR' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'HdrMode' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'ColorEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Contrast' => array( 'type' => 'string', 'location' => 'xml', ), + 'Correction' => array( 'type' => 'string', 'location' => 'xml', ), + 'Saturation' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'MsSharpen' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'SharpenLevel' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'FrameEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'FrameDoubling' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ), + ), + ); + } + + public static function UpdateMediaVideoEnhanceTemplate() { + return array( + 'httpMethod' => 'PUT', + 'uri' => '/{Bucket}template/{/Key*}', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'UpdateMediaVideoEnhanceTemplateOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'Request', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Key' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'Tag' => array( 'location' => 'xml', 'type' => 'string', ), + 'Name' => array( 'location' => 'xml', 'type' => 'string', ), + 'VideoEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Transcode' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'ClipConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Samplerate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Channels' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'SuperResolution' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Resolution' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableScaleUp' => array( 'type' => 'string', 'location' => 'xml', ), + 'Version' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'SDRtoHDR' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'HdrMode' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'ColorEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Contrast' => array( 'type' => 'string', 'location' => 'xml', ), + 'Correction' => array( 'type' => 'string', 'location' => 'xml', ), + 'Saturation' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'MsSharpen' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'SharpenLevel' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'FrameEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'FrameDoubling' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ); + } + public static function UpdateMediaVideoEnhanceTemplateOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'x-ci-request-id', ), + 'ContentType' => array( 'type' => 'string', 'location' => 'header', 'sentAs' => 'Content-Type', ), + 'ContentLength' => array( 'type' => 'numeric', 'minimum'=> 0, 'location' => 'header', 'sentAs' => 'Content-Length', ), + 'Template' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'TemplateId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Name' => array( 'type' => 'string', 'location' => 'xml', ), + 'BucketId' => array( 'type' => 'string', 'location' => 'xml', ), + 'Category' => array( 'type' => 'string', 'location' => 'xml', ), + 'Tag' => array( 'type' => 'string', 'location' => 'xml', ), + 'UpdateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'CreateTime' => array( 'type' => 'string', 'location' => 'xml', ), + 'VideoEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Transcode' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Container' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Format' => array( 'type' => 'string', 'location' => 'xml', ), + 'ClipConfig' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Duration' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'Video' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Width' => array( 'type' => 'string', 'location' => 'xml', ), + 'Height' => array( 'type' => 'string', 'location' => 'xml', ), + 'Fps' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'Audio' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Codec' => array( 'type' => 'string', 'location' => 'xml', ), + 'Samplerate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Bitrate' => array( 'type' => 'string', 'location' => 'xml', ), + 'Channels' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + 'SuperResolution' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Resolution' => array( 'type' => 'string', 'location' => 'xml', ), + 'EnableScaleUp' => array( 'type' => 'string', 'location' => 'xml', ), + 'Version' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'SDRtoHDR' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'HdrMode' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'ColorEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Contrast' => array( 'type' => 'string', 'location' => 'xml', ), + 'Correction' => array( 'type' => 'string', 'location' => 'xml', ), + 'Saturation' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'MsSharpen' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'SharpenLevel' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + 'FrameEnhance' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'FrameDoubling' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ), + ), + ), + ), + ); + } + + public static function OpenImageSlim() { + return array( + 'httpMethod' => 'PUT', + 'uri' => '/{Bucket}?image-slim', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'OpenImageSlimOutput', + 'responseType' => 'model', + 'data' => array( + 'xmlRoot' => array( + 'name' => 'ImageSlim', + ), + ), + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + 'SlimMode' => array( 'location' => 'xml', 'type' => 'string', ), + 'Suffixs' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Suffix' => array( + 'type' => 'array', + 'location' => 'xml', + 'data' => array( + 'xmlFlattened' => true, + ), + 'items' => array( 'name' => 'Suffix', 'type' => 'string', 'location' => 'xml', 'sentAs' => 'Suffix', ), + ), + ), + ), + ), + ); + } + public static function OpenImageSlimOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-cos-request-id', + ), + 'ContentType' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'Content-Type', + ), + 'ContentLength' => array( + 'type' => 'numeric', + 'minimum'=> 0, + 'location' => 'header', + 'sentAs' => 'Content-Length', + ), + ) + ); + } + + public static function CloseImageSlim() { + return array( + 'httpMethod' => 'DELETE', + 'uri' => '/{Bucket}?image-slim', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'CloseImageSlimOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + ), + ); + } + public static function CloseImageSlimOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-cos-request-id', + ), + 'ContentType' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'Content-Type', + ), + 'ContentLength' => array( + 'type' => 'numeric', + 'minimum'=> 0, + 'location' => 'header', + 'sentAs' => 'Content-Length', + ), + ) + ); + } + + public static function GetImageSlim() { + return array( + 'httpMethod' => 'GET', + 'uri' => '/{Bucket}?image-slim', + 'class' => 'Qcloud\\Cos\\Command', + 'responseClass' => 'GetImageSlimOutput', + 'responseType' => 'model', + 'parameters' => array( + 'Bucket' => array( 'required' => true, 'type' => 'string', 'location' => 'uri', ), + ), + ); + } + public static function GetImageSlimOutput() { + return array( + 'type' => 'object', + 'additionalProperties' => true, + 'properties' => array( + 'RequestId' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'x-cos-request-id', + ), + 'ContentType' => array( + 'type' => 'string', + 'location' => 'header', + 'sentAs' => 'Content-Type', + ), + 'ContentLength' => array( + 'type' => 'numeric', + 'minimum'=> 0, + 'location' => 'header', + 'sentAs' => 'Content-Length', + ), + 'Status' => array( 'type' => 'string', 'location' => 'xml', ), + 'SlimMode' => array( 'type' => 'string', 'location' => 'xml', ), + 'Suffixs' => array( + 'type' => 'object', + 'location' => 'xml', + 'properties' => array( + 'Suffix' => array( + 'type' => 'array', + 'location' => 'xml', + 'items' => array( 'type' => 'string', 'location' => 'xml', ), + ), + ), + ), + ) + ); + } + } diff --git a/vendor/qcloud/cos-sdk-v5/src/ImageParamTemplate/TextWatermarkTemplate.php b/vendor/qcloud/cos-sdk-v5/src/ImageParamTemplate/TextWatermarkTemplate.php index 7f359931..6fbc05d7 100644 --- a/vendor/qcloud/cos-sdk-v5/src/ImageParamTemplate/TextWatermarkTemplate.php +++ b/vendor/qcloud/cos-sdk-v5/src/ImageParamTemplate/TextWatermarkTemplate.php @@ -18,6 +18,8 @@ class TextWatermarkTemplate extends ImageTemplate private $batch; private $degree; private $shadow; + private $scatype; + private $spcent; public function __construct() { parent::__construct(); @@ -32,6 +34,8 @@ class TextWatermarkTemplate extends ImageTemplate $this->batch = ""; $this->degree = ""; $this->shadow = ""; + $this->scatype = ""; + $this->spcent = ""; } public function setText($value) { @@ -78,6 +82,14 @@ class TextWatermarkTemplate extends ImageTemplate $this->shadow = "/shadow/" . $value; } + public function setScatype($value) { + $this->scatype = "/scatype/" . $value; + } + + public function setSpcent($value) { + $this->spcent = "/spcent/" . $value; + } + public function getText() { return $this->text; } @@ -122,6 +134,14 @@ class TextWatermarkTemplate extends ImageTemplate return $this->shadow; } + public function getScatype() { + return $this->scatype; + } + + public function getSpcent() { + return $this->spcent; + } + public function queryString() { $head = "watermark/2"; $res = ""; @@ -158,6 +178,12 @@ class TextWatermarkTemplate extends ImageTemplate if($this->shadow) { $res .= $this->shadow; } + if($this->scatype) { + $res .= $this->scatype; + } + if($this->spcent) { + $res .= $this->spcent; + } if($res) { $res = $head . $res; } @@ -176,5 +202,7 @@ class TextWatermarkTemplate extends ImageTemplate $this->batch = ""; $this->degree = ""; $this->shadow = ""; + $this->scatype = ""; + $this->spcent = ""; } } diff --git a/vendor/qcloud/cos-sdk-v5/src/ResultTransformer.php b/vendor/qcloud/cos-sdk-v5/src/ResultTransformer.php index 8ccc28ee..f4f1d5d1 100644 --- a/vendor/qcloud/cos-sdk-v5/src/ResultTransformer.php +++ b/vendor/qcloud/cos-sdk-v5/src/ResultTransformer.php @@ -56,7 +56,10 @@ class ResultTransformer { if ($command['Bucket'] != null && $result['Bucket'] == null) { $result['Bucket'] = $command['Bucket']; } - $result['Location'] = $request->getHeader("Host")[0] . $request->getUri()->getPath(); + $result['Location'] = $request->getHeader('Host')[0] . $request->getUri()->getPath(); + if ($this->config['locationWithSchema']) { + $result['Location'] = $this->config['schema'] . '://' . $result['Location']; + } return $result; } @@ -94,7 +97,7 @@ class ResultTransformer { } } - if ($action == "GetBucketGuetzli" ) { + if ($action == "GetBucketGuetzli") { $length = intval($result['ContentLength']); if($length > 0){ $content = $this->geCiContentInfo($result, $length); @@ -104,7 +107,7 @@ class ResultTransformer { } } - if ($action == "GetCiService" ) { + if ($action == "GetCiService") { $length = intval($result['ContentLength']); if($length > 0){ $content = $this->geCiContentInfo($result, $length); @@ -115,7 +118,7 @@ class ResultTransformer { } } - if ($action == "GetOriginProtect" ) { + if ($action == "GetOriginProtect") { $length = intval($result['ContentLength']); if($length > 0){ $content = $this->geCiContentInfo($result, $length); @@ -126,7 +129,7 @@ class ResultTransformer { } } - if ($action == "GetHotLink" ) { + if ($action == "GetHotLink") { $length = intval($result['ContentLength']); if($length > 0){ $content = $this->geCiContentInfo($result, $length); diff --git a/vendor/qcloud/cos-sdk-v5/src/Service.php b/vendor/qcloud/cos-sdk-v5/src/Service.php index 61cfbb1d..0ca33909 100644 --- a/vendor/qcloud/cos-sdk-v5/src/Service.php +++ b/vendor/qcloud/cos-sdk-v5/src/Service.php @@ -3513,6 +3513,18 @@ class Service { 'BizType' => array( 'type' => 'string', 'location' => 'xml', ), 'CallbackVersion' => array( 'type' => 'string', 'location' => 'xml', ), 'CallbackType' => array( 'type' => 'integer', 'location' => 'xml', ), + 'Freeze' => array( + 'location' => 'xml', + 'type' => 'object', + 'properties' => array( + 'PornScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'AdsScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'IllegalScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'AbuseScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'PoliticsScore' => array( 'type' => 'integer', 'location' => 'xml', ), + 'TerrorismScore' => array( 'type' => 'integer', 'location' => 'xml', ), + ), + ), ), ), ), @@ -3792,6 +3804,32 @@ class Service { 'GetFileUncompressResult' => Descriptions::GetFileUncompressResult(), // 查询文件解压结果 'CreateFileCompressJobs' => Descriptions::CreateFileCompressJobs(), // 提交多文件打包压缩任务 'GetFileCompressResult' => Descriptions::GetFileCompressResult(), // 查询多文件打包压缩结果 + 'CreateM3U8PlayListJobs' => Descriptions::CreateM3U8PlayListJobs(), // 获取指定hls/m3u8文件指定时间区间内的ts资源 + 'GetPicQueueList' => Descriptions::GetPicQueueList(), // 搜索图片处理队列 + 'UpdatePicQueue' => Descriptions::UpdatePicQueue(), // 更新图片处理队列 + 'GetPicBucketList' => Descriptions::GetPicBucketList(), // 查询图片处理服务状态 + 'GetAiBucketList' => Descriptions::GetAiBucketList(), // 查询 AI 内容识别服务状态 + 'OpenAiService' => Descriptions::OpenAiService(), // 开通 AI 内容识别 + 'GetAiQueueList' => Descriptions::GetAiQueueList(), // 搜索 AI 内容识别队列 + 'UpdateAiQueue' => Descriptions::UpdateAiQueue(), // 更新 AI 内容识别队列 + 'CreateMediaTranscodeProTemplate' => Descriptions::CreateMediaTranscodeProTemplate(), // 创建音视频转码 pro 模板 + 'UpdateMediaTranscodeProTemplate' => Descriptions::UpdateMediaTranscodeProTemplate(), // 更新音视频转码 pro 模板 + 'CreateVoiceTtsTemplate' => Descriptions::CreateVoiceTtsTemplate(), // 创建语音合成模板 + 'UpdateVoiceTtsTemplate' => Descriptions::UpdateVoiceTtsTemplate(), // 更新语音合成模板 + 'CreateMediaSmartCoverTemplate' => Descriptions::CreateMediaSmartCoverTemplate(), // 创建智能封面模板 + 'UpdateMediaSmartCoverTemplate' => Descriptions::UpdateMediaSmartCoverTemplate(), // 更新智能封面模板 + 'CreateVoiceSpeechRecognitionTemplate' => Descriptions::CreateVoiceSpeechRecognitionTemplate(), // 创建语音识别模板 + 'UpdateVoiceSpeechRecognitionTemplate' => Descriptions::UpdateVoiceSpeechRecognitionTemplate(), // 更新语音识别模板 + 'CreateVoiceTtsJobs' => Descriptions::CreateVoiceTtsJobs(), // 提交一个语音合成任务 + 'CreateAiTranslationJobs' => Descriptions::CreateAiTranslationJobs(), // 提交一个翻译任务 + 'CreateVoiceSpeechRecognitionJobs' => Descriptions::CreateVoiceSpeechRecognitionJobs(), // 提交一个语音识别任务 + 'CreateAiWordsGeneralizeJobs' => Descriptions::CreateAiWordsGeneralizeJobs(), // 提交一个分词任务 + 'CreateMediaVideoEnhanceJobs' => Descriptions::CreateMediaVideoEnhanceJobs(), // 提交画质增强任务 + 'CreateMediaVideoEnhanceTemplate' => Descriptions::CreateMediaVideoEnhanceTemplate(), // 创建画质增强模板 + 'UpdateMediaVideoEnhanceTemplate' => Descriptions::UpdateMediaVideoEnhanceTemplate(), // 更新画质增强模板 + 'OpenImageSlim' => Descriptions::OpenImageSlim(), // 开通图片瘦身 + 'CloseImageSlim' => Descriptions::CloseImageSlim(), // 关闭图片瘦身 + 'GetImageSlim' => Descriptions::GetImageSlim(), // 查询图片瘦身状态 ), 'models' => array( 'AbortMultipartUploadOutput' => array( @@ -6095,6 +6133,14 @@ class Service { 'location' => 'header', 'sentAs' => 'x-cos-request-id', ), + 'BucketAzType' => array( + 'location' => 'header', + 'sentAs' => 'x-cos-bucket-az-type', // undefined 或 MAZ + ), + 'BucketArch' => array( + 'location' => 'header', + 'sentAs' => 'x-cos-bucket-arch', // undefined 或 OFS + ), ), ), 'SelectObjectContentOutput' => array( @@ -7401,6 +7447,32 @@ class Service { 'GetFileUncompressResultOutput' => Descriptions::GetFileUncompressResultOutput(), 'CreateFileCompressJobsOutput' => Descriptions::CreateFileCompressJobsOutput(), 'GetFileCompressResultOutput' => Descriptions::GetFileCompressResultOutput(), + 'CreateM3U8PlayListJobsOutput' => Descriptions::CreateM3U8PlayListJobsOutput(), + 'GetPicQueueListOutput' => Descriptions::GetPicQueueListOutput(), + 'UpdatePicQueueOutput' => Descriptions::UpdatePicQueueOutput(), + 'GetPicBucketListOutput' => Descriptions::GetPicBucketListOutput(), + 'GetAiBucketListOutput' => Descriptions::GetAiBucketListOutput(), + 'OpenAiServiceOutput' => Descriptions::OpenAiServiceOutput(), + 'GetAiQueueListOutput' => Descriptions::GetAiQueueListOutput(), + 'UpdateAiQueueOutput' => Descriptions::UpdateAiQueueOutput(), + 'CreateMediaTranscodeProTemplateOutput' => Descriptions::CreateMediaTranscodeProTemplateOutput(), + 'UpdateMediaTranscodeProTemplateOutput' => Descriptions::UpdateMediaTranscodeProTemplateOutput(), + 'CreateVoiceTtsTemplateOutput' => Descriptions::CreateVoiceTtsTemplateOutput(), + 'UpdateVoiceTtsTemplateOutput' => Descriptions::UpdateVoiceTtsTemplateOutput(), + 'CreateMediaSmartCoverTemplateOutput' => Descriptions::CreateMediaSmartCoverTemplateOutput(), + 'UpdateMediaSmartCoverTemplateOutput' => Descriptions::UpdateMediaSmartCoverTemplateOutput(), + 'CreateVoiceSpeechRecognitionTemplateOutput' => Descriptions::CreateVoiceSpeechRecognitionTemplateOutput(), + 'UpdateVoiceSpeechRecognitionTemplateOutput' => Descriptions::UpdateVoiceSpeechRecognitionTemplateOutput(), + 'CreateVoiceTtsJobsOutput' => Descriptions::CreateVoiceTtsJobsOutput(), + 'CreateAiTranslationJobsOutput' => Descriptions::CreateAiTranslationJobsOutput(), + 'CreateVoiceSpeechRecognitionJobsOutput' => Descriptions::CreateVoiceSpeechRecognitionJobsOutput(), + 'CreateAiWordsGeneralizeJobsOutput' => Descriptions::CreateAiWordsGeneralizeJobsOutput(), + 'CreateMediaVideoEnhanceJobsOutput' => Descriptions::CreateMediaVideoEnhanceJobsOutput(), + 'CreateMediaVideoEnhanceTemplateOutput' => Descriptions::CreateMediaVideoEnhanceTemplateOutput(), + 'UpdateMediaVideoEnhanceTemplateOutput' => Descriptions::UpdateMediaVideoEnhanceTemplateOutput(), + 'OpenImageSlimOutput' => Descriptions::OpenImageSlimOutput(), + 'CloseImageSlimOutput' => Descriptions::CloseImageSlimOutput(), + 'GetImageSlimOutput' => Descriptions::GetImageSlimOutput(), ) ); } diff --git a/vendor/rmccue/requests/CHANGELOG.md b/vendor/rmccue/requests/CHANGELOG.md index 08d31445..2facf674 100644 --- a/vendor/rmccue/requests/CHANGELOG.md +++ b/vendor/rmccue/requests/CHANGELOG.md @@ -1,6 +1,44 @@ Changelog ========= +2.0.8 +----- + +### Overview of changes +- Update bundled certificates as of 2023-08-22. [#823] +- Fixed: only force close cURL connection when needed (cURL < 7.22). [#656], [#657] Props [@mircobabini][gh-mircobabini] +- Composer: updated list of suggested PHP extensions to enable. [#821] +- README: add information about the PSR-7/PSR-18 wrapper for Requests. [#827] + +[#656]: https://github.com/WordPress/Requests/pull/656 +[#657]: https://github.com/WordPress/Requests/pull/657 +[#821]: https://github.com/WordPress/Requests/pull/821 +[#823]: https://github.com/WordPress/Requests/pull/823 +[#827]: https://github.com/WordPress/Requests/pull/827 + +2.0.7 +----- + +### Overview of changes +- Update bundled certificates as of 2023-05-30. [#809] + +[#809]: https://github.com/WordPress/Requests/pull/809 + +2.0.6 +----- + +### Overview of changes +- Update bundled certificates as of 2023-01-10. [#791] +- Fix typo in deprecation notice. [#785] Props [@costdev][gh-costdev] +- Minor internal improvements for passing the correct type to function calls. [#779] +- Confirmed compatibility with PHP 8.2. + No changes were needed, so Request 2.0.1 and higher can be considered compatible with PHP 8.2. +- Various documentation improvements and other general housekeeping. + +[#779]: https://github.com/WordPress/Requests/pull/779 +[#785]: https://github.com/WordPress/Requests/pull/785 +[#791]: https://github.com/WordPress/Requests/pull/791 + 2.0.5 ----- @@ -979,6 +1017,7 @@ Initial release! [gh-kwuerl]: https://github.com/kwuerl [gh-laurentmartelli]: https://github.com/laurentmartelli [gh-mbabker]: https://github.com/mbabker +[gh-mircobabini]: https://github.com/mircobabini [gh-mishan]: https://github.com/mishan [gh-ntwb]: https://github.com/ntwb [gh-ocean90]: https://github.com/ocean90 diff --git a/vendor/rmccue/requests/README.md b/vendor/rmccue/requests/README.md index c8680b0e..756bc532 100644 --- a/vendor/rmccue/requests/README.md +++ b/vendor/rmccue/requests/README.md @@ -151,6 +151,24 @@ If you'd like to run a single set of tests, specify just the name: $ phpunit Transport/cURL ``` +Requests and PSR-7/PSR-18 +------------------------- + +[PSR-7][psr-7] describes common interfaces for representing HTTP messages. +[PSR-18][psr-18] describes a common interface for sending HTTP requests and receiving HTTP responses. + +Both PSR-7 as well as PSR-18 were created after Requests' conception. +At this time, there is no intention to add a native PSR-7/PSR-18 implementation to the Requests library. + +However, the amazing [Artur Weigandt][art4] has created a [package][requests-psr-18], which allows you to use Requests as a PSR-7 compatible PSR-18 HTTP Client. +If you are interested in a PSR-7/PSR-18 compatible version of Requests, we highly recommend you check out [this package][requests-psr-18]. + +[psr-7]: https://www.php-fig.org/psr/psr-7/ +[psr-18]: https://www.php-fig.org/psr/psr-18/ +[art4]: https://github.com/Art4 +[requests-psr-18]: https://packagist.org/packages/art4/requests-psr18-adapter + + Contribute ---------- diff --git a/vendor/rmccue/requests/certificates/cacert.pem b/vendor/rmccue/requests/certificates/cacert.pem index 0c69f9fc..9551dfd8 100644 --- a/vendor/rmccue/requests/certificates/cacert.pem +++ b/vendor/rmccue/requests/certificates/cacert.pem @@ -1,7 +1,7 @@ ## ## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Tue Oct 11 03:12:05 2022 GMT +## Certificate data from Mozilla as of: Tue Aug 22 03:12:04 2023 GMT ## ## This is a bundle of X.509 certificates of public Certificate Authorities ## (CA). These were automatically extracted from Mozilla's root certificates @@ -14,7 +14,7 @@ ## Just configure this file as the SSLCACertificateFile. ## ## Conversion done with mk-ca-bundle.pl version 1.29. -## SHA256: 3ff8bd209b5f2e739b9f2b96eacb694a774114685b02978257824f37ff528f71 +## SHA256: 0ff137babc6a5561a9cfbe9f29558972e5b528202681b7d3803d03a3e82922bd ## @@ -489,29 +489,6 @@ IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN +8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ== -----END CERTIFICATE----- -Network Solutions Certificate Authority -======================================= ------BEGIN CERTIFICATE----- -MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG -EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr -IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx -MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu -MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx -jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT -aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT -crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc -/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB -AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP -BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv -bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA -A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q -4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/ -GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv -wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD -ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey ------END CERTIFICATE----- - COMODO ECC Certification Authority ================================== -----BEGIN CERTIFICATE----- @@ -626,26 +603,6 @@ NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= -----END CERTIFICATE----- -Hongkong Post Root CA 1 -======================= ------BEGIN CERTIFICATE----- -MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT -DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx -NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n -IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF -AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1 -ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr -auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh -qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY -V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV -HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i -h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio -l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei -IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps -T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT -c4afU9hDDl3WY4JxHYB0yvbiAmvZWg== ------END CERTIFICATE----- - SecureSign RootCA11 =================== -----BEGIN CERTIFICATE----- @@ -1284,40 +1241,6 @@ Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY= -----END CERTIFICATE----- -E-Tugra Certification Authority -=============================== ------BEGIN CERTIFICATE----- -MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w -DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls -ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN -ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw -NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx -QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl -cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD -DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A -MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd -hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K -CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g -ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0ypQ -BaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcHfC425lAcP9tDJMW/hkd5s3kc91r0 -E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsutdEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gz -rt48Ue7LE3wBf4QOXVGUnhMMti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAq -jqFGOjGY5RH8zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn -rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5 -dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB -/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG -MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK -kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO -XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807 -VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo -a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc -dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV -KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT -Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0 -8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G -C7TbO6Orb1wdtn7os4I07QZcJA== ------END CERTIFICATE----- - T-TeleSec GlobalRoot Class 2 ============================ -----BEGIN CERTIFICATE----- @@ -1654,36 +1577,6 @@ uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7 yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3 -----END CERTIFICATE----- -Staat der Nederlanden EV Root CA -================================ ------BEGIN CERTIFICATE----- -MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE -CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g -RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M -MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl -cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk -SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW -O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r -0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8 -Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV -XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr -08C+eKxCKFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS/ZbV -0b5GnUngC6agIk440ME8MLxwjyx1zNDFjFE7PZQIZCZhfbnDZY8UnCHQqv0XcgOPvZuM5l5Tnrmd -74K74bzickFbIZTTRTeU0d8JOV3nI6qaHcptqAqGhYqCvkIH1vI4gnPah1vlPNOePqc7nvQDs/nx -fRN0Av+7oeX6AHkcpmZBiFxgV6YuCcS6/ZrPpx9Aw7vMWgpVSzs4dlG4Y4uElBbmVvMCAwEAAaNC -MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFP6rAJCYniT8qcwa -ivsnuL8wbqg7MA0GCSqGSIb3DQEBCwUAA4ICAQDPdyxuVr5Os7aEAJSrR8kN0nbHhp8dB9O2tLsI -eK9p0gtJ3jPFrK3CiAJ9Brc1AsFgyb/E6JTe1NOpEyVa/m6irn0F3H3zbPB+po3u2dfOWBfoqSmu -c0iH55vKbimhZF8ZE/euBhD/UcabTVUlT5OZEAFTdfETzsemQUHSv4ilf0X8rLiltTMMgsT7B/Zq -5SWEXwbKwYY5EdtYzXc7LMJMD16a4/CrPmEbUCTCwPTxGfARKbalGAKb12NMcIxHowNDXLldRqAN -b/9Zjr7dn3LDWyvfjFvO5QxGbJKyCqNMVEIYFRIYvdr8unRu/8G2oGTYqV9Vrp9canaW2HNnh/tN -f1zuacpzEPuKqf2evTY4SUmH9A4U8OmHuD+nT3pajnnUk+S7aFKErGzp85hwVXIy+TSrK0m1zSBi -5Dp6Z2Orltxtrpfs/J92VoguZs9btsmksNcFuuEnL5O7Jiqik7Ab846+HUCjuTaPPoIaGl6I6lD4 -WeKDRikL40Rc4ZW2aZCaFG+XroHPaO+Zmr615+F/+PoTRxZMzG0IQOeLeG9QgkRQP2YGiqtDhFZK -DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy -eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg== ------END CERTIFICATE----- - IdenTrust Commercial Root CA 1 ============================== -----BEGIN CERTIFICATE----- @@ -2135,87 +2028,6 @@ F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g== -----END CERTIFICATE----- -TrustCor RootCert CA-1 -====================== ------BEGIN CERTIFICATE----- -MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP -MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig -U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp -dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx -MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu -YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe -VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYDVQQDDBZUcnVzdENvciBSb290Q2Vy -dCBDQS0xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv463leLCJhJrMxnHQFgKq1mq -jQCj/IDHUHuO1CAmujIS2CNUSSUQIpidRtLByZ5OGy4sDjjzGiVoHKZaBeYei0i/mJZ0PmnK6bV4 -pQa81QBeCQryJ3pS/C3Vseq0iWEk8xoT26nPUu0MJLq5nux+AHT6k61sKZKuUbS701e/s/OojZz0 -JEsq1pme9J7+wH5COucLlVPat2gOkEz7cD+PSiyU8ybdY2mplNgQTsVHCJCZGxdNuWxu72CVEY4h -gLW9oHPY0LJ3xEXqWib7ZnZ2+AYfYW0PVcWDtxBWcgYHpfOxGgMFZA6dWorWhnAbJN7+KIor0Gqw -/Hqi3LJ5DotlDwIDAQABo2MwYTAdBgNVHQ4EFgQU7mtJPHo/DeOxCbeKyKsZn3MzUOcwHwYDVR0j -BBgwFoAU7mtJPHo/DeOxCbeKyKsZn3MzUOcwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC -AYYwDQYJKoZIhvcNAQELBQADggEBACUY1JGPE+6PHh0RU9otRCkZoB5rMZ5NDp6tPVxBb5UrJKF5 -mDo4Nvu7Zp5I/5CQ7z3UuJu0h3U/IJvOcs+hVcFNZKIZBqEHMwwLKeXx6quj7LUKdJDHfXLy11yf -ke+Ri7fc7Waiz45mO7yfOgLgJ90WmMCV1Aqk5IGadZQ1nJBfiDcGrVmVCrDRZ9MZyonnMlo2HD6C -qFqTvsbQZJG2z9m2GM/bftJlo6bEjhcxwft+dtvTheNYsnd6djtsL1Ac59v2Z3kf9YKVmgenFK+P -3CghZwnS1k1aHBkcjndcw5QkPTJrS37UeJSDvjdNzl/HHk484IkzlQsPpTLWPFp5LBk= ------END CERTIFICATE----- - -TrustCor RootCert CA-2 -====================== ------BEGIN CERTIFICATE----- -MIIGLzCCBBegAwIBAgIIJaHfyjPLWQIwDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNVBAYTAlBBMQ8w -DQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5MSQwIgYDVQQKDBtUcnVzdENvciBT -eXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29yIENlcnRpZmljYXRlIEF1dGhvcml0 -eTEfMB0GA1UEAwwWVHJ1c3RDb3IgUm9vdENlcnQgQ0EtMjAeFw0xNjAyMDQxMjMyMjNaFw0zNDEy -MzExNzI2MzlaMIGkMQswCQYDVQQGEwJQQTEPMA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5h -bWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3IgU3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5U -cnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0 -IENBLTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnIG7CKqJiJJWQdsg4foDSq8Gb -ZQWU9MEKENUCrO2fk8eHyLAnK0IMPQo+QVqedd2NyuCb7GgypGmSaIwLgQ5WoD4a3SwlFIIvl9Nk -RvRUqdw6VC0xK5mC8tkq1+9xALgxpL56JAfDQiDyitSSBBtlVkxs1Pu2YVpHI7TYabS3OtB0PAx1 -oYxOdqHp2yqlO/rOsP9+aij9JxzIsekp8VduZLTQwRVtDr4uDkbIXvRR/u8OYzo7cbrPb1nKDOOb -XUm4TOJXsZiKQlecdu/vvdFoqNL0Cbt3Nb4lggjEFixEIFapRBF37120Hapeaz6LMvYHL1cEksr1 -/p3C6eizjkxLAjHZ5DxIgif3GIJ2SDpxsROhOdUuxTTCHWKF3wP+TfSvPd9cW436cOGlfifHhi5q -jxLGhF5DUVCcGZt45vz27Ud+ez1m7xMTiF88oWP7+ayHNZ/zgp6kPwqcMWmLmaSISo5uZk3vFsQP -eSghYA2FFn3XVDjxklb9tTNMg9zXEJ9L/cb4Qr26fHMC4P99zVvh1Kxhe1fVSntb1IVYJ12/+Ctg -rKAmrhQhJ8Z3mjOAPF5GP/fDsaOGM8boXg25NSyqRsGFAnWAoOsk+xWq5Gd/bnc/9ASKL3x74xdh -8N0JqSDIvgmk0H5Ew7IwSjiqqewYmgeCK9u4nBit2uBGF6zPXQIDAQABo2MwYTAdBgNVHQ4EFgQU -2f4hQG6UnrybPZx9mCAZ5YwwYrIwHwYDVR0jBBgwFoAU2f4hQG6UnrybPZx9mCAZ5YwwYrIwDwYD -VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAJ5Fngw7tu/h -Osh80QA9z+LqBrWyOrsGS2h60COXdKcs8AjYeVrXWoSK2BKaG9l9XE1wxaX5q+WjiYndAfrs3fnp -kpfbsEZC89NiqpX+MWcUaViQCqoL7jcjx1BRtPV+nuN79+TMQjItSQzL/0kMmx40/W5ulop5A7Zv -2wnL/V9lFDfhOPXzYRZY5LVtDQsEGz9QLX+zx3oaFoBg+Iof6Rsqxvm6ARppv9JYx1RXCI/hOWB3 -S6xZhBqI8d3LT3jX5+EzLfzuQfogsL7L9ziUwOHQhQ+77Sxzq+3+knYaZH9bDTMJBzN7Bj8RpFxw -PIXAz+OQqIN3+tvmxYxoZxBnpVIt8MSZj3+/0WvitUfW2dCFmU2Umw9Lje4AWkcdEQOsQRivh7dv -DDqPys/cA8GiCcjl/YBeyGBCARsaU1q7N6a3vLqE6R5sGtRk2tRD/pOLS/IseRYQ1JMLiI+h2IYU -RpFHmygk71dSTlxCnKr3Sewn6EAes6aJInKc9Q0ztFijMDvd1GpUk74aTfOTlPf8hAs/hCBcNANE -xdqtvArBAs8e5ZTZ845b2EzwnexhF7sUMlQMAimTHpKG9n/v55IFDlndmQguLvqcAFLTxWYp5KeX -RKQOKIETNcX2b2TmQcTVL8w0RSXPQQCWPUouwpaYT05KnJe32x+SMsj/D1Fu1uwJ ------END CERTIFICATE----- - -TrustCor ECA-1 -============== ------BEGIN CERTIFICATE----- -MIIEIDCCAwigAwIBAgIJAISCLF8cYtBAMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYDVQQGEwJQQTEP -MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig -U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp -dHkxFzAVBgNVBAMMDlRydXN0Q29yIEVDQS0xMB4XDTE2MDIwNDEyMzIzM1oXDTI5MTIzMTE3Mjgw -N1owgZwxCzAJBgNVBAYTAlBBMQ8wDQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5 -MSQwIgYDVQQKDBtUcnVzdENvciBTeXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29y -IENlcnRpZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAwwOVHJ1c3RDb3IgRUNBLTEwggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPj+ARtZ+odnbb3w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR -MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23 -xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc -p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+ -fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj -YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL -f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF -AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u -/ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F -hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs -J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC -jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g== ------END CERTIFICATE----- - SSL.com Root Certification Authority RSA ======================================== -----BEGIN CERTIFICATE----- @@ -3410,55 +3222,6 @@ AwMDaAAwZQIxALGOWiDDshliTd6wT99u0nCK8Z9+aozmut6Dacpps6kFtZaSF4fC0urQe87YQVt8 rgIwRt7qy12a7DLCZRawTDBcMPPaTnOGBtjOiQRINzf43TNRnXCve1XYAS59BWQOhriR -----END CERTIFICATE----- -E-Tugra Global Root CA RSA v3 -============================= ------BEGIN CERTIFICATE----- -MIIF8zCCA9ugAwIBAgIUDU3FzRYilZYIfrgLfxUGNPt5EDQwDQYJKoZIhvcNAQELBQAwgYAxCzAJ -BgNVBAYTAlRSMQ8wDQYDVQQHEwZBbmthcmExGTAXBgNVBAoTEEUtVHVncmEgRUJHIEEuUy4xHTAb -BgNVBAsTFEUtVHVncmEgVHJ1c3QgQ2VudGVyMSYwJAYDVQQDEx1FLVR1Z3JhIEdsb2JhbCBSb290 -IENBIFJTQSB2MzAeFw0yMDAzMTgwOTA3MTdaFw00NTAzMTIwOTA3MTdaMIGAMQswCQYDVQQGEwJU -UjEPMA0GA1UEBxMGQW5rYXJhMRkwFwYDVQQKExBFLVR1Z3JhIEVCRyBBLlMuMR0wGwYDVQQLExRF -LVR1Z3JhIFRydXN0IENlbnRlcjEmMCQGA1UEAxMdRS1UdWdyYSBHbG9iYWwgUm9vdCBDQSBSU0Eg -djMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCiZvCJt3J77gnJY9LTQ91ew6aEOErx -jYG7FL1H6EAX8z3DeEVypi6Q3po61CBxyryfHUuXCscxuj7X/iWpKo429NEvx7epXTPcMHD4QGxL -sqYxYdE0PD0xesevxKenhOGXpOhL9hd87jwH7eKKV9y2+/hDJVDqJ4GohryPUkqWOmAalrv9c/SF -/YP9f4RtNGx/ardLAQO/rWm31zLZ9Vdq6YaCPqVmMbMWPcLzJmAy01IesGykNz709a/r4d+ABs8q -QedmCeFLl+d3vSFtKbZnwy1+7dZ5ZdHPOrbRsV5WYVB6Ws5OUDGAA5hH5+QYfERaxqSzO8bGwzrw -bMOLyKSRBfP12baqBqG3q+Sx6iEUXIOk/P+2UNOMEiaZdnDpwA+mdPy70Bt4znKS4iicvObpCdg6 -04nmvi533wEKb5b25Y08TVJ2Glbhc34XrD2tbKNSEhhw5oBOM/J+JjKsBY04pOZ2PJ8QaQ5tndLB -eSBrW88zjdGUdjXnXVXHt6woq0bM5zshtQoK5EpZ3IE1S0SVEgpnpaH/WwAH0sDM+T/8nzPyAPiM -bIedBi3x7+PmBvrFZhNb/FAHnnGGstpvdDDPk1Po3CLW3iAfYY2jLqN4MpBs3KwytQXk9TwzDdbg -h3cXTJ2w2AmoDVf3RIXwyAS+XF1a4xeOVGNpf0l0ZAWMowIDAQABo2MwYTAPBgNVHRMBAf8EBTAD -AQH/MB8GA1UdIwQYMBaAFLK0ruYt9ybVqnUtdkvAG1Mh0EjvMB0GA1UdDgQWBBSytK7mLfcm1ap1 -LXZLwBtTIdBI7zAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQELBQADggIBAImocn+M684uGMQQ -gC0QDP/7FM0E4BQ8Tpr7nym/Ip5XuYJzEmMmtcyQ6dIqKe6cLcwsmb5FJ+Sxce3kOJUxQfJ9emN4 -38o2Fi+CiJ+8EUdPdk3ILY7r3y18Tjvarvbj2l0Upq7ohUSdBm6O++96SmotKygY/r+QLHUWnw/q -ln0F7psTpURs+APQ3SPh/QMSEgj0GDSz4DcLdxEBSL9htLX4GdnLTeqjjO/98Aa1bZL0SmFQhO3s -SdPkvmjmLuMxC1QLGpLWgti2omU8ZgT5Vdps+9u1FGZNlIM7zR6mK7L+d0CGq+ffCsn99t2HVhjY -sCxVYJb6CH5SkPVLpi6HfMsg2wY+oF0Dd32iPBMbKaITVaA9FCKvb7jQmhty3QUBjYZgv6Rn7rWl -DdF/5horYmbDB7rnoEgcOMPpRfunf/ztAmgayncSd6YAVSgU7NbHEqIbZULpkejLPoeJVF3Zr52X -nGnnCv8PWniLYypMfUeUP95L6VPQMPHF9p5J3zugkaOj/s1YzOrfr28oO6Bpm4/srK4rVJ2bBLFH -IK+WEj5jlB0E5y67hscMmoi/dkfv97ALl2bSRM9gUgfh1SxKOidhd8rXj+eHDjD/DLsE4mHDosiX -YY60MGo8bcIHX0pzLz/5FooBZu+6kcpSV3uu1OYP3Qt6f4ueJiDPO++BcYNZ ------END CERTIFICATE----- - -E-Tugra Global Root CA ECC v3 -============================= ------BEGIN CERTIFICATE----- -MIICpTCCAiqgAwIBAgIUJkYZdzHhT28oNt45UYbm1JeIIsEwCgYIKoZIzj0EAwMwgYAxCzAJBgNV -BAYTAlRSMQ8wDQYDVQQHEwZBbmthcmExGTAXBgNVBAoTEEUtVHVncmEgRUJHIEEuUy4xHTAbBgNV -BAsTFEUtVHVncmEgVHJ1c3QgQ2VudGVyMSYwJAYDVQQDEx1FLVR1Z3JhIEdsb2JhbCBSb290IENB -IEVDQyB2MzAeFw0yMDAzMTgwOTQ2NThaFw00NTAzMTIwOTQ2NThaMIGAMQswCQYDVQQGEwJUUjEP -MA0GA1UEBxMGQW5rYXJhMRkwFwYDVQQKExBFLVR1Z3JhIEVCRyBBLlMuMR0wGwYDVQQLExRFLVR1 -Z3JhIFRydXN0IENlbnRlcjEmMCQGA1UEAxMdRS1UdWdyYSBHbG9iYWwgUm9vdCBDQSBFQ0MgdjMw -djAQBgcqhkjOPQIBBgUrgQQAIgNiAASOmCm/xxAeJ9urA8woLNheSBkQKczLWYHMjLiSF4mDKpL2 -w6QdTGLVn9agRtwcvHbB40fQWxPa56WzZkjnIZpKT4YKfWzqTTKACrJ6CZtpS5iB4i7sAnCWH/31 -Rs7K3IKjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAU/4Ixcj75xGZsrTie0bBRiKWQ -zPUwHQYDVR0OBBYEFP+CMXI++cRmbK04ntGwUYilkMz1MA4GA1UdDwEB/wQEAwIBBjAKBggqhkjO -PQQDAwNpADBmAjEA5gVYaWHlLcoNy/EZCL3W/VGSGn5jVASQkZo1kTmZ+gepZpO6yGjUij/67W4W -Aie3AjEA3VoXK3YdZUKWpqxdinlW2Iob35reX8dQj7FbcQwm32pAAOwzkSFxvmjkI6TZraE3 ------END CERTIFICATE----- - Security Communication RootCA3 ============================== -----BEGIN CERTIFICATE----- @@ -3504,3 +3267,185 @@ BggqhkjOPQQDAwNoADBlAjAVXUI9/Lbu9zuxNuie9sRGKEkz0FhDKmMpzE2xtHqiuQ04pV1IKv3L snNdo4gIxwwCMQDAqy0Obe0YottT6SXbVQjgUMzfRGEWgqtJsLKB7HOHeLRMsmIbEvoWTSVLY70e N9k= -----END CERTIFICATE----- + +BJCA Global Root CA1 +==================== +-----BEGIN CERTIFICATE----- +MIIFdDCCA1ygAwIBAgIQVW9l47TZkGobCdFsPsBsIDANBgkqhkiG9w0BAQsFADBUMQswCQYDVQQG +EwJDTjEmMCQGA1UECgwdQkVJSklORyBDRVJUSUZJQ0FURSBBVVRIT1JJVFkxHTAbBgNVBAMMFEJK +Q0EgR2xvYmFsIFJvb3QgQ0ExMB4XDTE5MTIxOTAzMTYxN1oXDTQ0MTIxMjAzMTYxN1owVDELMAkG +A1UEBhMCQ04xJjAkBgNVBAoMHUJFSUpJTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZMR0wGwYDVQQD +DBRCSkNBIEdsb2JhbCBSb290IENBMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAPFm +CL3ZxRVhy4QEQaVpN3cdwbB7+sN3SJATcmTRuHyQNZ0YeYjjlwE8R4HyDqKYDZ4/N+AZspDyRhyS +sTphzvq3Rp4Dhtczbu33RYx2N95ulpH3134rhxfVizXuhJFyV9xgw8O558dnJCNPYwpj9mZ9S1Wn +P3hkSWkSl+BMDdMJoDIwOvqfwPKcxRIqLhy1BDPapDgRat7GGPZHOiJBhyL8xIkoVNiMpTAK+BcW +yqw3/XmnkRd4OJmtWO2y3syJfQOcs4ll5+M7sSKGjwZteAf9kRJ/sGsciQ35uMt0WwfCyPQ10WRj +eulumijWML3mG90Vr4TqnMfK9Q7q8l0ph49pczm+LiRvRSGsxdRpJQaDrXpIhRMsDQa4bHlW/KNn +MoH1V6XKV0Jp6VwkYe/iMBhORJhVb3rCk9gZtt58R4oRTklH2yiUAguUSiz5EtBP6DF+bHq/pj+b +OT0CFqMYs2esWz8sgytnOYFcuX6U1WTdno9uruh8W7TXakdI136z1C2OVnZOz2nxbkRs1CTqjSSh +GL+9V/6pmTW12xB3uD1IutbB5/EjPtffhZ0nPNRAvQoMvfXnjSXWgXSHRtQpdaJCbPdzied9v3pK +H9MiyRVVz99vfFXQpIsHETdfg6YmV6YBW37+WGgHqel62bno/1Afq8K0wM7o6v0PvY1NuLxxAgMB +AAGjQjBAMB0GA1UdDgQWBBTF7+3M2I0hxkjk49cULqcWk+WYATAPBgNVHRMBAf8EBTADAQH/MA4G +A1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsFAAOCAgEAUoKsITQfI/Ki2Pm4rzc2IInRNwPWaZ+4 +YRC6ojGYWUfo0Q0lHhVBDOAqVdVXUsv45Mdpox1NcQJeXyFFYEhcCY5JEMEE3KliawLwQ8hOnThJ +dMkycFRtwUf8jrQ2ntScvd0g1lPJGKm1Vrl2i5VnZu69mP6u775u+2D2/VnGKhs/I0qUJDAnyIm8 +60Qkmss9vk/Ves6OF8tiwdneHg56/0OGNFK8YT88X7vZdrRTvJez/opMEi4r89fO4aL/3Xtw+zuh +TaRjAv04l5U/BXCga99igUOLtFkNSoxUnMW7gZ/NfaXvCyUeOiDbHPwfmGcCCtRzRBPbUYQaVQNW +4AB+dAb/OMRyHdOoP2gxXdMJxy6MW2Pg6Nwe0uxhHvLe5e/2mXZgLR6UcnHGCyoyx5JO1UbXHfmp +GQrI+pXObSOYqgs4rZpWDW+N8TEAiMEXnM0ZNjX+VVOg4DwzX5Ze4jLp3zO7Bkqp2IRzznfSxqxx +4VyjHQy7Ct9f4qNx2No3WqB4K/TUfet27fJhcKVlmtOJNBir+3I+17Q9eVzYH6Eze9mCUAyTF6ps +3MKCuwJXNq+YJyo5UOGwifUll35HaBC07HPKs5fRJNz2YqAo07WjuGS3iGJCz51TzZm+ZGiPTx4S +SPfSKcOYKMryMguTjClPPGAyzQWWYezyr/6zcCwupvI= +-----END CERTIFICATE----- + +BJCA Global Root CA2 +==================== +-----BEGIN CERTIFICATE----- +MIICJTCCAaugAwIBAgIQLBcIfWQqwP6FGFkGz7RK6zAKBggqhkjOPQQDAzBUMQswCQYDVQQGEwJD +TjEmMCQGA1UECgwdQkVJSklORyBDRVJUSUZJQ0FURSBBVVRIT1JJVFkxHTAbBgNVBAMMFEJKQ0Eg +R2xvYmFsIFJvb3QgQ0EyMB4XDTE5MTIxOTAzMTgyMVoXDTQ0MTIxMjAzMTgyMVowVDELMAkGA1UE +BhMCQ04xJjAkBgNVBAoMHUJFSUpJTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZMR0wGwYDVQQDDBRC +SkNBIEdsb2JhbCBSb290IENBMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABJ3LgJGNU2e1uVCxA/jl +SR9BIgmwUVJY1is0j8USRhTFiy8shP8sbqjV8QnjAyEUxEM9fMEsxEtqSs3ph+B99iK++kpRuDCK +/eHeGBIK9ke35xe/J4rUQUyWPGCWwf0VHKNCMEAwHQYDVR0OBBYEFNJKsVF/BvDRgh9Obl+rg/xI +1LCRMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMAoGCCqGSM49BAMDA2gAMGUCMBq8 +W9f+qdJUDkpd0m2xQNz0Q9XSSpkZElaA94M04TVOSG0ED1cxMDAtsaqdAzjbBgIxAMvMh1PLet8g +UXOQwKhbYdDFUDn9hf7B43j4ptZLvZuHjw/l1lOWqzzIQNph91Oj9w== +-----END CERTIFICATE----- + +Sectigo Public Server Authentication Root E46 +============================================= +-----BEGIN CERTIFICATE----- +MIICOjCCAcGgAwIBAgIQQvLM2htpN0RfFf51KBC49DAKBggqhkjOPQQDAzBfMQswCQYDVQQGEwJH +QjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0aWdvIFB1YmxpYyBTZXJ2 +ZXIgQXV0aGVudGljYXRpb24gUm9vdCBFNDYwHhcNMjEwMzIyMDAwMDAwWhcNNDYwMzIxMjM1OTU5 +WjBfMQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0 +aWdvIFB1YmxpYyBTZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBFNDYwdjAQBgcqhkjOPQIBBgUr +gQQAIgNiAAR2+pmpbiDt+dd34wc7qNs9Xzjoq1WmVk/WSOrsfy2qw7LFeeyZYX8QeccCWvkEN/U0 +NSt3zn8gj1KjAIns1aeibVvjS5KToID1AZTc8GgHHs3u/iVStSBDHBv+6xnOQ6OjQjBAMB0GA1Ud +DgQWBBTRItpMWfFLXyY4qp3W7usNw/upYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB +/zAKBggqhkjOPQQDAwNnADBkAjAn7qRaqCG76UeXlImldCBteU/IvZNeWBj7LRoAasm4PdCkT0RH +lAFWovgzJQxC36oCMB3q4S6ILuH5px0CMk7yn2xVdOOurvulGu7t0vzCAxHrRVxgED1cf5kDW21U +SAGKcw== +-----END CERTIFICATE----- + +Sectigo Public Server Authentication Root R46 +============================================= +-----BEGIN CERTIFICATE----- +MIIFijCCA3KgAwIBAgIQdY39i658BwD6qSWn4cetFDANBgkqhkiG9w0BAQwFADBfMQswCQYDVQQG +EwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1TZWN0aWdvIFB1YmxpYyBT +ZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBSNDYwHhcNMjEwMzIyMDAwMDAwWhcNNDYwMzIxMjM1 +OTU5WjBfMQswCQYDVQQGEwJHQjEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTYwNAYDVQQDEy1T +ZWN0aWdvIFB1YmxpYyBTZXJ2ZXIgQXV0aGVudGljYXRpb24gUm9vdCBSNDYwggIiMA0GCSqGSIb3 +DQEBAQUAA4ICDwAwggIKAoICAQCTvtU2UnXYASOgHEdCSe5jtrch/cSV1UgrJnwUUxDaef0rty2k +1Cz66jLdScK5vQ9IPXtamFSvnl0xdE8H/FAh3aTPaE8bEmNtJZlMKpnzSDBh+oF8HqcIStw+Kxwf +GExxqjWMrfhu6DtK2eWUAtaJhBOqbchPM8xQljeSM9xfiOefVNlI8JhD1mb9nxc4Q8UBUQvX4yMP +FF1bFOdLvt30yNoDN9HWOaEhUTCDsG3XME6WW5HwcCSrv0WBZEMNvSE6Lzzpng3LILVCJ8zab5vu +ZDCQOc2TZYEhMbUjUDM3IuM47fgxMMxF/mL50V0yeUKH32rMVhlATc6qu/m1dkmU8Sf4kaWD5Qaz +Yw6A3OASVYCmO2a0OYctyPDQ0RTp5A1NDvZdV3LFOxxHVp3i1fuBYYzMTYCQNFu31xR13NgESJ/A +wSiItOkcyqex8Va3e0lMWeUgFaiEAin6OJRpmkkGj80feRQXEgyDet4fsZfu+Zd4KKTIRJLpfSYF +plhym3kT2BFfrsU4YjRosoYwjviQYZ4ybPUHNs2iTG7sijbt8uaZFURww3y8nDnAtOFr94MlI1fZ +EoDlSfB1D++N6xybVCi0ITz8fAr/73trdf+LHaAZBav6+CuBQug4urv7qv094PPK306Xlynt8xhW +6aWWrL3DkJiy4Pmi1KZHQ3xtzwIDAQABo0IwQDAdBgNVHQ4EFgQUVnNYZJX5khqwEioEYnmhQBWI +IUkwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAC9c +mTz8Bl6MlC5w6tIyMY208FHVvArzZJ8HXtXBc2hkeqK5Duj5XYUtqDdFqij0lgVQYKlJfp/imTYp +E0RHap1VIDzYm/EDMrraQKFz6oOht0SmDpkBm+S8f74TlH7Kph52gDY9hAaLMyZlbcp+nv4fjFg4 +exqDsQ+8FxG75gbMY/qB8oFM2gsQa6H61SilzwZAFv97fRheORKkU55+MkIQpiGRqRxOF3yEvJ+M +0ejf5lG5Nkc/kLnHvALcWxxPDkjBJYOcCj+esQMzEhonrPcibCTRAUH4WAP+JWgiH5paPHxsnnVI +84HxZmduTILA7rpXDhjvLpr3Etiga+kFpaHpaPi8TD8SHkXoUsCjvxInebnMMTzD9joiFgOgyY9m +pFuiTdaBJQbpdqQACj7LzTWb4OE4y2BThihCQRxEV+ioratF4yUQvNs+ZUH7G6aXD+u5dHn5Hrwd +Vw1Hr8Mvn4dGp+smWg9WY7ViYG4A++MnESLn/pmPNPW56MORcr3Ywx65LvKRRFHQV80MNNVIIb/b +E/FmJUNS0nAiNs2fxBx1IK1jcmMGDw4nztJqDby1ORrp0XZ60Vzk50lJLVU3aPAaOpg+VBeHVOmm +J1CJeyAvP/+/oYtKR5j/K3tJPsMpRmAYQqszKbrAKbkTidOIijlBO8n9pu0f9GBj39ItVQGL +-----END CERTIFICATE----- + +SSL.com TLS RSA Root CA 2022 +============================ +-----BEGIN CERTIFICATE----- +MIIFiTCCA3GgAwIBAgIQb77arXO9CEDii02+1PdbkTANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQG +EwJVUzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMSUwIwYDVQQDDBxTU0wuY29tIFRMUyBSU0Eg +Um9vdCBDQSAyMDIyMB4XDTIyMDgyNTE2MzQyMloXDTQ2MDgxOTE2MzQyMVowTjELMAkGA1UEBhMC +VVMxGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjElMCMGA1UEAwwcU1NMLmNvbSBUTFMgUlNBIFJv +b3QgQ0EgMjAyMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANCkCXJPQIgSYT41I57u +9nTPL3tYPc48DRAokC+X94xI2KDYJbFMsBFMF3NQ0CJKY7uB0ylu1bUJPiYYf7ISf5OYt6/wNr/y +7hienDtSxUcZXXTzZGbVXcdotL8bHAajvI9AI7YexoS9UcQbOcGV0insS657Lb85/bRi3pZ7Qcac +oOAGcvvwB5cJOYF0r/c0WRFXCsJbwST0MXMwgsadugL3PnxEX4MN8/HdIGkWCVDi1FW24IBydm5M +R7d1VVm0U3TZlMZBrViKMWYPHqIbKUBOL9975hYsLfy/7PO0+r4Y9ptJ1O4Fbtk085zx7AGL0SDG +D6C1vBdOSHtRwvzpXGk3R2azaPgVKPC506QVzFpPulJwoxJF3ca6TvvC0PeoUidtbnm1jPx7jMEW +TO6Af77wdr5BUxIzrlo4QqvXDz5BjXYHMtWrifZOZ9mxQnUjbvPNQrL8VfVThxc7wDNY8VLS+YCk +8OjwO4s4zKTGkH8PnP2L0aPP2oOnaclQNtVcBdIKQXTbYxE3waWglksejBYSd66UNHsef8JmAOSq +g+qKkK3ONkRN0VHpvB/zagX9wHQfJRlAUW7qglFA35u5CCoGAtUjHBPW6dvbxrB6y3snm/vg1UYk +7RBLY0ulBY+6uB0rpvqR4pJSvezrZ5dtmi2fgTIFZzL7SAg/2SW4BCUvAgMBAAGjYzBhMA8GA1Ud +EwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAU+y437uOEeicuzRk1sTN8/9REQrkwHQYDVR0OBBYEFPsu +N+7jhHonLs0ZNbEzfP/UREK5MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAjYlt +hEUY8U+zoO9opMAdrDC8Z2awms22qyIZZtM7QbUQnRC6cm4pJCAcAZli05bg4vsMQtfhWsSWTVTN +j8pDU/0quOr4ZcoBwq1gaAafORpR2eCNJvkLTqVTJXojpBzOCBvfR4iyrT7gJ4eLSYwfqUdYe5by +iB0YrrPRpgqU+tvT5TgKa3kSM/tKWTcWQA673vWJDPFs0/dRa1419dvAJuoSc06pkZCmF8NsLzjU +o3KUQyxi4U5cMj29TH0ZR6LDSeeWP4+a0zvkEdiLA9z2tmBVGKaBUfPhqBVq6+AL8BQx1rmMRTqo +ENjwuSfr98t67wVylrXEj5ZzxOhWc5y8aVFjvO9nHEMaX3cZHxj4HCUp+UmZKbaSPaKDN7Egkaib +MOlqbLQjk2UEqxHzDh1TJElTHaE/nUiSEeJ9DU/1172iWD54nR4fK/4huxoTtrEoZP2wAgDHbICi +vRZQIA9ygV/MlP+7mea6kMvq+cYMwq7FGc4zoWtcu358NFcXrfA/rs3qr5nsLFR+jM4uElZI7xc7 +P0peYNLcdDa8pUNjyw9bowJWCZ4kLOGGgYz+qxcs+sjiMho6/4UIyYOf8kpIEFR3N+2ivEC+5BB0 +9+Rbu7nzifmPQdjH5FCQNYA+HLhNkNPU98OwoX6EyneSMSy4kLGCenROmxMmtNVQZlR4rmA= +-----END CERTIFICATE----- + +SSL.com TLS ECC Root CA 2022 +============================ +-----BEGIN CERTIFICATE----- +MIICOjCCAcCgAwIBAgIQFAP1q/s3ixdAW+JDsqXRxDAKBggqhkjOPQQDAzBOMQswCQYDVQQGEwJV +UzEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMSUwIwYDVQQDDBxTU0wuY29tIFRMUyBFQ0MgUm9v +dCBDQSAyMDIyMB4XDTIyMDgyNTE2MzM0OFoXDTQ2MDgxOTE2MzM0N1owTjELMAkGA1UEBhMCVVMx +GDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjElMCMGA1UEAwwcU1NMLmNvbSBUTFMgRUNDIFJvb3Qg +Q0EgMjAyMjB2MBAGByqGSM49AgEGBSuBBAAiA2IABEUpNXP6wrgjzhR9qLFNoFs27iosU8NgCTWy +JGYmacCzldZdkkAZDsalE3D07xJRKF3nzL35PIXBz5SQySvOkkJYWWf9lCcQZIxPBLFNSeR7T5v1 +5wj4A4j3p8OSSxlUgaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBSJjy+j6CugFFR7 +81a4Jl9nOAuc0DAdBgNVHQ4EFgQUiY8vo+groBRUe/NWuCZfZzgLnNAwDgYDVR0PAQH/BAQDAgGG +MAoGCCqGSM49BAMDA2gAMGUCMFXjIlbp15IkWE8elDIPDAI2wv2sdDJO4fscgIijzPvX6yv/N33w +7deedWo1dlJF4AIxAMeNb0Igj762TVntd00pxCAgRWSGOlDGxK0tk/UYfXLtqc/ErFc2KAhl3zx5 +Zn6g6g== +-----END CERTIFICATE----- + +Atos TrustedRoot Root CA ECC TLS 2021 +===================================== +-----BEGIN CERTIFICATE----- +MIICFTCCAZugAwIBAgIQPZg7pmY9kGP3fiZXOATvADAKBggqhkjOPQQDAzBMMS4wLAYDVQQDDCVB +dG9zIFRydXN0ZWRSb290IFJvb3QgQ0EgRUNDIFRMUyAyMDIxMQ0wCwYDVQQKDARBdG9zMQswCQYD +VQQGEwJERTAeFw0yMTA0MjIwOTI2MjNaFw00MTA0MTcwOTI2MjJaMEwxLjAsBgNVBAMMJUF0b3Mg +VHJ1c3RlZFJvb3QgUm9vdCBDQSBFQ0MgVExTIDIwMjExDTALBgNVBAoMBEF0b3MxCzAJBgNVBAYT +AkRFMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEloZYKDcKZ9Cg3iQZGeHkBQcfl+3oZIK59sRxUM6K +DP/XtXa7oWyTbIOiaG6l2b4siJVBzV3dscqDY4PMwL502eCdpO5KTlbgmClBk1IQ1SQ4AjJn8ZQS +b+/Xxd4u/RmAo0IwQDAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR2KCXWfeBmmnoJsmo7jjPX +NtNPojAOBgNVHQ8BAf8EBAMCAYYwCgYIKoZIzj0EAwMDaAAwZQIwW5kp85wxtolrbNa9d+F851F+ +uDrNozZffPc8dz7kUK2o59JZDCaOMDtuCCrCp1rIAjEAmeMM56PDr9NJLkaCI2ZdyQAUEv049OGY +a3cpetskz2VAv9LcjBHo9H1/IISpQuQo +-----END CERTIFICATE----- + +Atos TrustedRoot Root CA RSA TLS 2021 +===================================== +-----BEGIN CERTIFICATE----- +MIIFZDCCA0ygAwIBAgIQU9XP5hmTC/srBRLYwiqipDANBgkqhkiG9w0BAQwFADBMMS4wLAYDVQQD +DCVBdG9zIFRydXN0ZWRSb290IFJvb3QgQ0EgUlNBIFRMUyAyMDIxMQ0wCwYDVQQKDARBdG9zMQsw +CQYDVQQGEwJERTAeFw0yMTA0MjIwOTIxMTBaFw00MTA0MTcwOTIxMDlaMEwxLjAsBgNVBAMMJUF0 +b3MgVHJ1c3RlZFJvb3QgUm9vdCBDQSBSU0EgVExTIDIwMjExDTALBgNVBAoMBEF0b3MxCzAJBgNV +BAYTAkRFMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtoAOxHm9BYx9sKOdTSJNy/BB +l01Z4NH+VoyX8te9j2y3I49f1cTYQcvyAh5x5en2XssIKl4w8i1mx4QbZFc4nXUtVsYvYe+W/CBG +vevUez8/fEc4BKkbqlLfEzfTFRVOvV98r61jx3ncCHvVoOX3W3WsgFWZkmGbzSoXfduP9LVq6hdK +ZChmFSlsAvFr1bqjM9xaZ6cF4r9lthawEO3NUDPJcFDsGY6wx/J0W2tExn2WuZgIWWbeKQGb9Cpt +0xU6kGpn8bRrZtkh68rZYnxGEFzedUlnnkL5/nWpo63/dgpnQOPF943HhZpZnmKaau1Fh5hnstVK +PNe0OwANwI8f4UDErmwh3El+fsqyjW22v5MvoVw+j8rtgI5Y4dtXz4U2OLJxpAmMkokIiEjxQGMY +sluMWuPD0xeqqxmjLBvk1cbiZnrXghmmOxYsL3GHX0WelXOTwkKBIROW1527k2gV+p2kHYzygeBY +Br3JtuP2iV2J+axEoctr+hbxx1A9JNr3w+SH1VbxT5Aw+kUJWdo0zuATHAR8ANSbhqRAvNncTFd+ +rrcztl524WWLZt+NyteYr842mIycg5kDcPOvdO3GDjbnvezBc6eUWsuSZIKmAMFwoW4sKeFYV+xa +fJlrJaSQOoD0IJ2azsct+bJLKZWD6TWNp0lIpw9MGZHQ9b8Q4HECAwEAAaNCMEAwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUdEmZ0f+0emhFdcN+tNzMzjkz2ggwDgYDVR0PAQH/BAQDAgGGMA0G +CSqGSIb3DQEBDAUAA4ICAQAjQ1MkYlxt/T7Cz1UAbMVWiLkO3TriJQ2VSpfKgInuKs1l+NsW4AmS +4BjHeJi78+xCUvuppILXTdiK/ORO/auQxDh1MoSf/7OwKwIzNsAQkG8dnK/haZPso0UvFJ/1TCpl +Q3IM98P4lYsU84UgYt1UU90s3BiVaU+DR3BAM1h3Egyi61IxHkzJqM7F78PRreBrAwA0JrRUITWX +AdxfG/F851X6LWh3e9NpzNMOa7pNdkTWwhWaJuywxfW70Xp0wmzNxbVe9kzmWy2B27O3Opee7c9G +slA9hGCZcbUztVdF5kJHdWoOsAgMrr3e97sPWD2PAzHoPYJQyi9eDF20l74gNAf0xBLh7tew2Vkt +afcxBPTy+av5EzH4AXcOPUIjJsyacmdRIXrMPIWo6iFqO9taPKU0nprALN+AnCng33eU0aKAQv9q +TFsR0PXNor6uzFFcw9VUewyu1rkGd4Di7wcaaMxZUa1+XGdrudviB0JbuAEFWDlN5LuYo7Ey7Nmj +1m+UI/87tyll5gfp77YZ6ufCOB0yiJA8EytuzO+rdwY0d4RPcuSBhPm5dDTedk+SKlOxJTnbPP/l +PqYO5Wue/9vsL3SD3460s6neFE3/MaNFcyT6lSnMEpcEoji2jbDwN/zIIX8/syQbPYtuzE2wFg2W +HYMfRsCbvUOZ58SWLs5fyQ== +-----END CERTIFICATE----- diff --git a/vendor/rmccue/requests/certificates/cacert.pem.sha256 b/vendor/rmccue/requests/certificates/cacert.pem.sha256 index b4e36b34..834b1d88 100644 --- a/vendor/rmccue/requests/certificates/cacert.pem.sha256 +++ b/vendor/rmccue/requests/certificates/cacert.pem.sha256 @@ -1 +1 @@ -2cff03f9efdaf52626bd1b451d700605dc1ea000c5da56bd0fc59f8f43071040 cacert.pem +23c2469e2a568362a62eecf1b49ed90a15621e6fa30e29947ded3436422de9b9 cacert.pem diff --git a/vendor/rmccue/requests/composer.json b/vendor/rmccue/requests/composer.json index 2ea9e6e4..2e1410a9 100644 --- a/vendor/rmccue/requests/composer.json +++ b/vendor/rmccue/requests/composer.json @@ -56,6 +56,12 @@ "yoast/phpunit-polyfills": "^1.0.0", "roave/security-advisories": "dev-latest" }, + "suggest": { + "ext-curl": "For improved performance", + "ext-openssl": "For secure transport support", + "ext-zlib": "For improved performance when decompressing encoded streams", + "art4/requests-psr18-adapter": "For using Requests as a PSR-18 HTTP Client" + }, "autoload": { "psr-4": { "WpOrg\\Requests\\": "src/" diff --git a/vendor/rmccue/requests/library/Requests.php b/vendor/rmccue/requests/library/Requests.php index 05250640..14dcba4c 100644 --- a/vendor/rmccue/requests/library/Requests.php +++ b/vendor/rmccue/requests/library/Requests.php @@ -19,7 +19,7 @@ if (!defined('REQUESTS_SILENCE_PSR0_DEPRECATIONS') || REQUESTS_SILENCE_PSR0_DEPRECATIONS !== true) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error trigger_error( - 'The PSR-0 `Requests_...` class names in the Request library are deprecated.' + 'The PSR-0 `Requests_...` class names in the Requests library are deprecated.' . ' Switch to the PSR-4 `WpOrg\Requests\...` class names at your earliest convenience.', E_USER_DEPRECATED ); diff --git a/vendor/rmccue/requests/src/Autoload.php b/vendor/rmccue/requests/src/Autoload.php index 26dd280e..669ddeca 100644 --- a/vendor/rmccue/requests/src/Autoload.php +++ b/vendor/rmccue/requests/src/Autoload.php @@ -166,7 +166,7 @@ if (class_exists('WpOrg\Requests\Autoload') === false) { if (!defined('REQUESTS_SILENCE_PSR0_DEPRECATIONS') || REQUESTS_SILENCE_PSR0_DEPRECATIONS !== true) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error trigger_error( - 'The PSR-0 `Requests_...` class names in the Request library are deprecated.' + 'The PSR-0 `Requests_...` class names in the Requests library are deprecated.' . ' Switch to the PSR-4 `WpOrg\Requests\...` class names at your earliest convenience.', E_USER_DEPRECATED ); diff --git a/vendor/rmccue/requests/src/Capability.php b/vendor/rmccue/requests/src/Capability.php index 87b8340a..30572bab 100644 --- a/vendor/rmccue/requests/src/Capability.php +++ b/vendor/rmccue/requests/src/Capability.php @@ -28,7 +28,7 @@ interface Capability { * * Note: this does not automatically mean that the capability will be supported for your chosen transport! * - * @var array + * @var string[] */ const ALL = [ self::SSL, diff --git a/vendor/rmccue/requests/src/Cookie.php b/vendor/rmccue/requests/src/Cookie.php index ccbbc73d..6f971d6d 100644 --- a/vendor/rmccue/requests/src/Cookie.php +++ b/vendor/rmccue/requests/src/Cookie.php @@ -36,8 +36,8 @@ class Cookie { /** * Cookie attributes * - * Valid keys are (currently) path, domain, expires, max-age, secure and - * httponly. + * Valid keys are `'path'`, `'domain'`, `'expires'`, `'max-age'`, `'secure'` and + * `'httponly'`. * * @var \WpOrg\Requests\Utility\CaseInsensitiveDictionary|array Array-like object */ @@ -46,8 +46,7 @@ class Cookie { /** * Cookie flags * - * Valid keys are (currently) creation, last-access, persistent and - * host-only. + * Valid keys are `'creation'`, `'last-access'`, `'persistent'` and `'host-only'`. * * @var array */ @@ -66,11 +65,13 @@ class Cookie { /** * Create a new cookie object * - * @param string $name - * @param string $value + * @param string $name The name of the cookie. + * @param string $value The value for the cookie. * @param array|\WpOrg\Requests\Utility\CaseInsensitiveDictionary $attributes Associative array of attribute data - * @param array $flags - * @param int|null $reference_time + * @param array $flags The flags for the cookie. + * Valid keys are `'creation'`, `'last-access'`, + * `'persistent'` and `'host-only'`. + * @param int|null $reference_time Reference time for relative calculations. * * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $name argument is not a string. * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $value argument is not a string. @@ -279,7 +280,11 @@ class Cookie { public function normalize() { foreach ($this->attributes as $key => $value) { $orig_value = $value; - $value = $this->normalize_attribute($key, $value); + + if (is_string($key)) { + $value = $this->normalize_attribute($key, $value); + } + if ($value === null) { unset($this->attributes[$key]); continue; @@ -299,7 +304,7 @@ class Cookie { * Handles parsing individual attributes from the cookie values. * * @param string $name Attribute name - * @param string|boolean $value Attribute value (string value, or true if empty/flag) + * @param string|int|bool $value Attribute value (string/integer value, or true if empty/flag) * @return mixed Value if available, or null if the attribute value is invalid (and should be skipped) */ protected function normalize_attribute($name, $value) { diff --git a/vendor/rmccue/requests/src/Cookie/Jar.php b/vendor/rmccue/requests/src/Cookie/Jar.php index dfbb8b73..7633786b 100644 --- a/vendor/rmccue/requests/src/Cookie/Jar.php +++ b/vendor/rmccue/requests/src/Cookie/Jar.php @@ -49,7 +49,8 @@ class Jar implements ArrayAccess, IteratorAggregate { /** * Normalise cookie data into a \WpOrg\Requests\Cookie * - * @param string|\WpOrg\Requests\Cookie $cookie + * @param string|\WpOrg\Requests\Cookie $cookie Cookie header value, possibly pre-parsed (object). + * @param string $key Optional. The name for this cookie. * @return \WpOrg\Requests\Cookie */ public function normalize_cookie($cookie, $key = '') { @@ -106,7 +107,7 @@ class Jar implements ArrayAccess, IteratorAggregate { /** * Unset the given header * - * @param string $offset + * @param string $offset The key for the item to unset. */ #[ReturnTypeWillChange] public function offsetUnset($offset) { @@ -171,7 +172,7 @@ class Jar implements ArrayAccess, IteratorAggregate { /** * Parse all cookies from a response and attach them to the response * - * @param \WpOrg\Requests\Response $response + * @param \WpOrg\Requests\Response $response Response as received. */ public function before_redirect_check(Response $response) { $url = $response->url; diff --git a/vendor/rmccue/requests/src/IdnaEncoder.php b/vendor/rmccue/requests/src/IdnaEncoder.php index 094fff3d..4257a1ac 100644 --- a/vendor/rmccue/requests/src/IdnaEncoder.php +++ b/vendor/rmccue/requests/src/IdnaEncoder.php @@ -137,7 +137,7 @@ class IdnaEncoder { * * @internal (Testing found regex was the fastest implementation) * - * @param string $text + * @param string $text Text to examine. * @return bool Is the text string ASCII-only? */ protected static function is_ascii($text) { @@ -148,7 +148,7 @@ class IdnaEncoder { * Prepare a text string for use as an IDNA name * * @todo Implement this based on RFC 3491 and the newer 5891 - * @param string $text + * @param string $text Text to prepare. * @return string Prepared string */ protected static function nameprep($text) { @@ -160,7 +160,7 @@ class IdnaEncoder { * * Based on \WpOrg\Requests\Iri::replace_invalid_with_pct_encoding() * - * @param string $input + * @param string $input Text to convert. * @return array Unicode code points * * @throws \WpOrg\Requests\Exception Invalid UTF-8 codepoint (`idna.invalidcodepoint`) @@ -329,10 +329,10 @@ class IdnaEncoder { } // output the code point for digit t + ((q - t) mod (base - t)) - $digit = $t + (($q - $t) % (self::BOOTSTRAP_BASE - $t)); + $digit = (int) ($t + (($q - $t) % (self::BOOTSTRAP_BASE - $t))); $output .= self::digit_to_char($digit); // let q = (q - t) div (base - t) - $q = floor(($q - $t) / (self::BOOTSTRAP_BASE - $t)); + $q = (int) floor(($q - $t) / (self::BOOTSTRAP_BASE - $t)); } // end // output the code point for digit q $output .= self::digit_to_char($q); @@ -381,7 +381,7 @@ class IdnaEncoder { * @param int $delta * @param int $numpoints * @param bool $firsttime - * @return int New bias + * @return int|float New bias * * function adapt(delta,numpoints,firsttime): */ diff --git a/vendor/rmccue/requests/src/Iri.php b/vendor/rmccue/requests/src/Iri.php index 244578d3..c452c736 100644 --- a/vendor/rmccue/requests/src/Iri.php +++ b/vendor/rmccue/requests/src/Iri.php @@ -395,11 +395,11 @@ class Iri { // preceding "/" (if any) from the output buffer; otherwise, elseif (strpos($input, '/../') === 0) { $input = substr($input, 3); - $output = substr_replace($output, '', strrpos($output, '/')); + $output = substr_replace($output, '', (strrpos($output, '/') ?: 0)); } elseif ($input === '/..') { $input = '/'; - $output = substr_replace($output, '', strrpos($output, '/')); + $output = substr_replace($output, '', (strrpos($output, '/') ?: 0)); } // D: if the input buffer consists only of "." or "..", then remove // that from the input buffer; otherwise, @@ -824,7 +824,8 @@ class Iri { else { $iuserinfo = null; } - if (($port_start = strpos($remaining, ':', strpos($remaining, ']'))) !== false) { + + if (($port_start = strpos($remaining, ':', (strpos($remaining, ']') ?: 0))) !== false) { $port = substr($remaining, $port_start + 1); if ($port === false || $port === '') { $port = null; diff --git a/vendor/rmccue/requests/src/Requests.php b/vendor/rmccue/requests/src/Requests.php index a8d9d7e5..edf37f22 100644 --- a/vendor/rmccue/requests/src/Requests.php +++ b/vendor/rmccue/requests/src/Requests.php @@ -148,7 +148,7 @@ class Requests { * * @var string */ - const VERSION = '2.0.5'; + const VERSION = '2.0.8'; /** * Selected transport name @@ -642,12 +642,14 @@ class Requests { /** * Set the default values * + * The $options parameter is updated with the results. + * * @param string $url URL to request * @param array $headers Extra headers to send with the request * @param array|null $data Data to send either as a query string for GET/HEAD requests, or in the body for POST requests * @param string $type HTTP request type * @param array $options Options for the request - * @return void $options is updated with the results + * @return void * * @throws \WpOrg\Requests\Exception When the $url is not an http(s) URL. */ @@ -824,9 +826,11 @@ class Requests { * Internal use only. Converts a raw HTTP response to a \WpOrg\Requests\Response * while still executing a multiple request. * + * `$response` is either set to a \WpOrg\Requests\Response instance, or a \WpOrg\Requests\Exception object + * * @param string $response Full response text including headers and body (will be overwritten with Response instance) * @param array $request Request data as passed into {@see \WpOrg\Requests\Requests::request_multiple()} - * @return void `$response` is either set to a \WpOrg\Requests\Response instance, or a \WpOrg\Requests\Exception object + * @return void */ public static function parse_multiple(&$response, $request) { try { diff --git a/vendor/rmccue/requests/src/Response.php b/vendor/rmccue/requests/src/Response.php index 8964521a..86a0438b 100644 --- a/vendor/rmccue/requests/src/Response.php +++ b/vendor/rmccue/requests/src/Response.php @@ -137,16 +137,16 @@ class Response { * * @link https://php.net/json-decode * - * @param ?bool $associative Optional. When `true`, JSON objects will be returned as associative arrays; - * When `false`, JSON objects will be returned as objects. - * When `null`, JSON objects will be returned as associative arrays - * or objects depending on whether `JSON_OBJECT_AS_ARRAY` is set in the flags. - * Defaults to `true` (in contrast to the PHP native default of `null`). - * @param int $depth Optional. Maximum nesting depth of the structure being decoded. - * Defaults to `512`. - * @param int $options Optional. Bitmask of JSON_BIGINT_AS_STRING, JSON_INVALID_UTF8_IGNORE, - * JSON_INVALID_UTF8_SUBSTITUTE, JSON_OBJECT_AS_ARRAY, JSON_THROW_ON_ERROR. - * Defaults to `0` (no options set). + * @param bool|null $associative Optional. When `true`, JSON objects will be returned as associative arrays; + * When `false`, JSON objects will be returned as objects. + * When `null`, JSON objects will be returned as associative arrays + * or objects depending on whether `JSON_OBJECT_AS_ARRAY` is set in the flags. + * Defaults to `true` (in contrast to the PHP native default of `null`). + * @param int $depth Optional. Maximum nesting depth of the structure being decoded. + * Defaults to `512`. + * @param int $options Optional. Bitmask of JSON_BIGINT_AS_STRING, JSON_INVALID_UTF8_IGNORE, + * JSON_INVALID_UTF8_SUBSTITUTE, JSON_OBJECT_AS_ARRAY, JSON_THROW_ON_ERROR. + * Defaults to `0` (no options set). * * @return array * diff --git a/vendor/rmccue/requests/src/Response/Headers.php b/vendor/rmccue/requests/src/Response/Headers.php index eb4f6873..b4d0fcf9 100644 --- a/vendor/rmccue/requests/src/Response/Headers.php +++ b/vendor/rmccue/requests/src/Response/Headers.php @@ -27,7 +27,7 @@ class Headers extends CaseInsensitiveDictionary { * Avoid using this where commas may be used unquoted in values, such as * Set-Cookie headers. * - * @param string $offset + * @param string $offset Name of the header to retrieve. * @return string|null Header value */ public function offsetGet($offset) { @@ -69,7 +69,7 @@ class Headers extends CaseInsensitiveDictionary { /** * Get all values for a given header * - * @param string $offset + * @param string $offset Name of the header to retrieve. * @return array|null Header values * * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed argument is not valid as an array key. @@ -79,7 +79,10 @@ class Headers extends CaseInsensitiveDictionary { throw InvalidArgument::create(1, '$offset', 'string|int', gettype($offset)); } - $offset = strtolower($offset); + if (is_string($offset)) { + $offset = strtolower($offset); + } + if (!isset($this->data[$offset])) { return null; } diff --git a/vendor/rmccue/requests/src/Transport/Curl.php b/vendor/rmccue/requests/src/Transport/Curl.php index 8b0a1308..29034b25 100644 --- a/vendor/rmccue/requests/src/Transport/Curl.php +++ b/vendor/rmccue/requests/src/Transport/Curl.php @@ -25,6 +25,7 @@ use WpOrg\Requests\Utility\InputValidator; final class Curl implements Transport { const CURL_7_10_5 = 0x070A05; const CURL_7_16_2 = 0x071002; + const CURL_7_22_0 = 0x071600; /** * Raw HTTP data @@ -363,7 +364,7 @@ final class Curl implements Transport { $options['hooks']->dispatch('curl.before_request', [&$this->handle]); // Force closing the connection for old versions of cURL (<7.22). - if (!isset($headers['Connection'])) { + if ($this->version < self::CURL_7_22_0 && !isset($headers['Connection'])) { $headers['Connection'] = 'close'; } @@ -465,7 +466,7 @@ final class Curl implements Transport { * @param string $response Response data from the body * @param array $options Request options * @return string|false HTTP response data including headers. False if non-blocking. - * @throws \WpOrg\Requests\Exception + * @throws \WpOrg\Requests\Exception If the request resulted in a cURL error. */ public function process_response($response, $options) { if ($options['blocking'] === false) { @@ -561,7 +562,7 @@ final class Curl implements Transport { /** * Format a URL given GET data * - * @param string $url + * @param string $url Original URL. * @param array|object $data Data to build query using, see {@link https://www.php.net/http_build_query} * @return string URL with data */ diff --git a/vendor/rmccue/requests/src/Transport/Fsockopen.php b/vendor/rmccue/requests/src/Transport/Fsockopen.php index c3bd4a63..2b53d0c1 100644 --- a/vendor/rmccue/requests/src/Transport/Fsockopen.php +++ b/vendor/rmccue/requests/src/Transport/Fsockopen.php @@ -51,6 +51,11 @@ final class Fsockopen implements Transport { */ private $max_bytes = false; + /** + * Cache for received connection errors. + * + * @var string + */ private $connect_error = ''; /** @@ -405,7 +410,7 @@ final class Fsockopen implements Transport { /** * Format a URL given GET data * - * @param array $url_parts + * @param array $url_parts Array of URL parts as received from {@link https://www.php.net/parse_url} * @param array|object $data Data to build query using, see {@link https://www.php.net/http_build_query} * @return string URL with data */ diff --git a/vendor/rmccue/requests/src/Utility/CaseInsensitiveDictionary.php b/vendor/rmccue/requests/src/Utility/CaseInsensitiveDictionary.php index 3c24cebd..0e1a914c 100644 --- a/vendor/rmccue/requests/src/Utility/CaseInsensitiveDictionary.php +++ b/vendor/rmccue/requests/src/Utility/CaseInsensitiveDictionary.php @@ -95,7 +95,7 @@ class CaseInsensitiveDictionary implements ArrayAccess, IteratorAggregate { /** * Unset the given header * - * @param string $offset + * @param string $offset The key for the item to unset. */ #[ReturnTypeWillChange] public function offsetUnset($offset) { diff --git a/vendor/rmccue/requests/src/Utility/FilteredIterator.php b/vendor/rmccue/requests/src/Utility/FilteredIterator.php index 973a5d25..4865966c 100644 --- a/vendor/rmccue/requests/src/Utility/FilteredIterator.php +++ b/vendor/rmccue/requests/src/Utility/FilteredIterator.php @@ -28,7 +28,7 @@ final class FilteredIterator extends ArrayIterator { /** * Create a new iterator * - * @param array $data + * @param array $data The array or object to be iterated on. * @param callable $callback Callback to be called on each value * * @throws \WpOrg\Requests\Exception\InvalidArgument When the passed $data argument is not iterable. @@ -46,14 +46,25 @@ final class FilteredIterator extends ArrayIterator { } /** - * @inheritdoc + * Prevent unserialization of the object for security reasons. * * @phpcs:disable PHPCompatibility.FunctionNameRestrictions.NewMagicMethods.__unserializeFound + * + * @param array $data Restored array of data originally serialized. + * + * @return void */ #[ReturnTypeWillChange] public function __unserialize($data) {} // phpcs:enable + /** + * Perform reinitialization tasks. + * + * Prevents a callback from being injected during unserialization of an object. + * + * @return void + */ public function __wakeup() { unset($this->callback); } @@ -75,7 +86,11 @@ final class FilteredIterator extends ArrayIterator { } /** - * @inheritdoc + * Prevent creating a PHP value from a stored representation of the object for security reasons. + * + * @param string $data The serialized string. + * + * @return void */ #[ReturnTypeWillChange] public function unserialize($data) {} diff --git a/vendor/services.php b/vendor/services.php index 0e404b60..36d00c12 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\app\\Service', diff --git a/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php b/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php index 700ad95b..2650869e 100644 --- a/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php +++ b/vendor/symfony/cache/Adapter/DoctrineDbalAdapter.php @@ -11,13 +11,17 @@ namespace Symfony\Component\Cache\Adapter; +use Doctrine\DBAL\ArrayParameterType; +use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\Exception\TableNotFoundException; use Doctrine\DBAL\ParameterType; +use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; use Doctrine\DBAL\Schema\Schema; +use Doctrine\DBAL\Tools\DsnParser; use Symfony\Component\Cache\Exception\InvalidArgumentException; use Symfony\Component\Cache\Marshaller\DefaultMarshaller; use Symfony\Component\Cache\Marshaller\MarshallerInterface; @@ -68,7 +72,28 @@ class DoctrineDbalAdapter extends AbstractAdapter implements PruneableInterface if (!class_exists(DriverManager::class)) { throw new InvalidArgumentException(sprintf('Failed to parse the DSN "%s". Try running "composer require doctrine/dbal".', $connOrDsn)); } - $this->conn = DriverManager::getConnection(['url' => $connOrDsn]); + if (class_exists(DsnParser::class)) { + $params = (new DsnParser([ + 'db2' => 'ibm_db2', + 'mssql' => 'pdo_sqlsrv', + 'mysql' => 'pdo_mysql', + 'mysql2' => 'pdo_mysql', + 'postgres' => 'pdo_pgsql', + 'postgresql' => 'pdo_pgsql', + 'pgsql' => 'pdo_pgsql', + 'sqlite' => 'pdo_sqlite', + 'sqlite3' => 'pdo_sqlite', + ]))->parse($connOrDsn); + } else { + $params = ['url' => $connOrDsn]; + } + + $config = new Configuration(); + if (class_exists(DefaultSchemaManagerFactory::class)) { + $config->setSchemaManagerFactory(new DefaultSchemaManagerFactory()); + } + + $this->conn = DriverManager::getConnection($params, $config); } else { throw new \TypeError(sprintf('Argument 1 passed to "%s()" must be "%s" or string, "%s" given.', __METHOD__, Connection::class, get_debug_type($connOrDsn))); } @@ -156,7 +181,7 @@ class DoctrineDbalAdapter extends AbstractAdapter implements PruneableInterface $ids, ], [ ParameterType::INTEGER, - Connection::PARAM_STR_ARRAY, + class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY, ])->iterateNumeric(); foreach ($result as $row) { @@ -174,7 +199,7 @@ class DoctrineDbalAdapter extends AbstractAdapter implements PruneableInterface $expired, ], [ ParameterType::INTEGER, - Connection::PARAM_STR_ARRAY, + class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY, ]); } } @@ -226,7 +251,7 @@ class DoctrineDbalAdapter extends AbstractAdapter implements PruneableInterface { $sql = "DELETE FROM $this->table WHERE $this->idCol IN (?)"; try { - $this->conn->executeStatement($sql, [array_values($ids)], [Connection::PARAM_STR_ARRAY]); + $this->conn->executeStatement($sql, [array_values($ids)], [class_exists(ArrayParameterType::class) ? ArrayParameterType::STRING : Connection::PARAM_STR_ARRAY]); } catch (TableNotFoundException $e) { } @@ -285,35 +310,42 @@ class DoctrineDbalAdapter extends AbstractAdapter implements PruneableInterface $stmt = $this->conn->prepare($sql); } - // $id and $data are defined later in the loop. Binding is done by reference, values are read on execution. if ('sqlsrv' === $platformName || 'oci' === $platformName) { - $stmt->bindParam(1, $id); - $stmt->bindParam(2, $id); - $stmt->bindParam(3, $data, ParameterType::LARGE_OBJECT); + $bind = static function ($id, $data) use ($stmt) { + $stmt->bindValue(1, $id); + $stmt->bindValue(2, $id); + $stmt->bindValue(3, $data, ParameterType::LARGE_OBJECT); + $stmt->bindValue(6, $data, ParameterType::LARGE_OBJECT); + }; $stmt->bindValue(4, $lifetime, ParameterType::INTEGER); $stmt->bindValue(5, $now, ParameterType::INTEGER); - $stmt->bindParam(6, $data, ParameterType::LARGE_OBJECT); $stmt->bindValue(7, $lifetime, ParameterType::INTEGER); $stmt->bindValue(8, $now, ParameterType::INTEGER); } elseif (null !== $platformName) { - $stmt->bindParam(1, $id); - $stmt->bindParam(2, $data, ParameterType::LARGE_OBJECT); + $bind = static function ($id, $data) use ($stmt) { + $stmt->bindValue(1, $id); + $stmt->bindValue(2, $data, ParameterType::LARGE_OBJECT); + }; $stmt->bindValue(3, $lifetime, ParameterType::INTEGER); $stmt->bindValue(4, $now, ParameterType::INTEGER); } else { - $stmt->bindParam(1, $data, ParameterType::LARGE_OBJECT); $stmt->bindValue(2, $lifetime, ParameterType::INTEGER); $stmt->bindValue(3, $now, ParameterType::INTEGER); - $stmt->bindParam(4, $id); $insertStmt = $this->conn->prepare($insertSql); - $insertStmt->bindParam(1, $id); - $insertStmt->bindParam(2, $data, ParameterType::LARGE_OBJECT); $insertStmt->bindValue(3, $lifetime, ParameterType::INTEGER); $insertStmt->bindValue(4, $now, ParameterType::INTEGER); + + $bind = static function ($id, $data) use ($stmt, $insertStmt) { + $stmt->bindValue(1, $data, ParameterType::LARGE_OBJECT); + $stmt->bindValue(4, $id); + $insertStmt->bindValue(1, $id); + $insertStmt->bindValue(2, $data, ParameterType::LARGE_OBJECT); + }; } foreach ($values as $id => $data) { + $bind($id, $data); try { $rowCount = $stmt->executeStatement(); } catch (TableNotFoundException $e) { diff --git a/vendor/symfony/cache/Traits/RedisTrait.php b/vendor/symfony/cache/Traits/RedisTrait.php index 67d86631..287c0ea9 100644 --- a/vendor/symfony/cache/Traits/RedisTrait.php +++ b/vendor/symfony/cache/Traits/RedisTrait.php @@ -174,6 +174,11 @@ trait RedisTrait throw new CacheException(sprintf('Redis Sentinel support requires the "predis/predis" package or the "redis" extension v5.2 or higher: "%s".', $dsn)); } + if (isset($params['lazy'])) { + $params['lazy'] = filter_var($params['lazy'], \FILTER_VALIDATE_BOOLEAN); + } + $params['redis_cluster'] = filter_var($params['redis_cluster'], \FILTER_VALIDATE_BOOLEAN); + if ($params['redis_cluster'] && isset($params['redis_sentinel'])) { throw new InvalidArgumentException(sprintf('Cannot use both "redis_cluster" and "redis_sentinel" at the same time: "%s".', $dsn)); } @@ -197,6 +202,7 @@ trait RedisTrait do { $host = $hosts[$hostIndex]['host'] ?? $hosts[$hostIndex]['path']; $port = $hosts[$hostIndex]['port'] ?? 0; + $passAuth = \defined('Redis::OPT_NULL_MULTIBULK_AS_NULL') && isset($params['auth']); $address = false; if (isset($hosts[$hostIndex]['host']) && $tls) { @@ -206,14 +212,33 @@ trait RedisTrait if (!isset($params['redis_sentinel'])) { break; } - $extra = []; - if (\defined('Redis::OPT_NULL_MULTIBULK_AS_NULL') && isset($params['auth'])) { - $extra = [$params['auth']]; - } - $sentinel = new \RedisSentinel($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...$extra); - if ($address = $sentinel->getMasterAddrByName($params['redis_sentinel'])) { - [$host, $port] = $address; + if (version_compare(phpversion('redis'), '6.0.0', '>=')) { + $options = [ + 'host' => $host, + 'port' => $port, + 'connectTimeout' => $params['timeout'], + 'persistent' => $params['persistent_id'], + 'retryInterval' => $params['retry_interval'], + 'readTimeout' => $params['read_timeout'], + ]; + + if ($passAuth) { + $options['auth'] = $params['auth']; + } + + $sentinel = new \RedisSentinel($options); + } else { + $extra = $passAuth ? [$params['auth']] : []; + + $sentinel = new \RedisSentinel($host, $port, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval'], $params['read_timeout'], ...$extra); + } + + try { + if ($address = $sentinel->getMasterAddrByName($params['redis_sentinel'])) { + [$host, $port] = $address; + } + } catch (\RedisException $e) { } } while (++$hostIndex < \count($hosts) && !$address); diff --git a/vendor/symfony/polyfill-ctype/LICENSE b/vendor/symfony/polyfill-ctype/LICENSE index 3f853aaf..7536caea 100644 --- a/vendor/symfony/polyfill-ctype/LICENSE +++ b/vendor/symfony/polyfill-ctype/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2019 Fabien Potencier +Copyright (c) 2018-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-ctype/composer.json b/vendor/symfony/polyfill-ctype/composer.json index 1b3efff5..e5c978f1 100644 --- a/vendor/symfony/polyfill-ctype/composer.json +++ b/vendor/symfony/polyfill-ctype/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", diff --git a/vendor/symfony/polyfill-intl-idn/Idn.php b/vendor/symfony/polyfill-intl-idn/Idn.php index 86710b94..3dc06120 100644 --- a/vendor/symfony/polyfill-intl-idn/Idn.php +++ b/vendor/symfony/polyfill-intl-idn/Idn.php @@ -11,8 +11,6 @@ namespace Symfony\Polyfill\Intl\Idn; -use Exception; -use Normalizer; use Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges; use Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex; @@ -167,7 +165,7 @@ final class Idn if (1 === preg_match('/[^\x00-\x7F]/', $label)) { try { $label = 'xn--'.self::punycodeEncode($label); - } catch (Exception $e) { + } catch (\Exception $e) { $info->errors |= self::ERROR_PUNYCODE; } @@ -335,8 +333,8 @@ final class Idn $domain = self::mapCodePoints($domain, $options, $info); // Step 2. Normalize the domain name string to Unicode Normalization Form C. - if (!Normalizer::isNormalized($domain, Normalizer::FORM_C)) { - $domain = Normalizer::normalize($domain, Normalizer::FORM_C); + if (!\Normalizer::isNormalized($domain, \Normalizer::FORM_C)) { + $domain = \Normalizer::normalize($domain, \Normalizer::FORM_C); } // Step 3. Break the string into labels at U+002E (.) FULL STOP. @@ -350,7 +348,7 @@ final class Idn if ('xn--' === substr($label, 0, 4)) { try { $label = self::punycodeDecode(substr($label, 4)); - } catch (Exception $e) { + } catch (\Exception $e) { $info->errors |= self::ERROR_PUNYCODE; continue; @@ -496,7 +494,7 @@ final class Idn } // Step 1. The label must be in Unicode Normalization Form C. - if (!Normalizer::isNormalized($label, Normalizer::FORM_C)) { + if (!\Normalizer::isNormalized($label, \Normalizer::FORM_C)) { $info->errors |= self::ERROR_INVALID_ACE_LABEL; } @@ -583,7 +581,7 @@ final class Idn for ($j = 0; $j < $b; ++$j) { if ($bytes[$j] > 0x7F) { - throw new Exception('Invalid input'); + throw new \Exception('Invalid input'); } $output[$out++] = $input[$j]; @@ -599,17 +597,17 @@ final class Idn for ($k = self::BASE; /* no condition */; $k += self::BASE) { if ($in >= $inputLength) { - throw new Exception('Invalid input'); + throw new \Exception('Invalid input'); } $digit = self::$basicToDigit[$bytes[$in++] & 0xFF]; if ($digit < 0) { - throw new Exception('Invalid input'); + throw new \Exception('Invalid input'); } if ($digit > intdiv(self::MAX_INT - $i, $w)) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } $i += $digit * $w; @@ -629,7 +627,7 @@ final class Idn $baseMinusT = self::BASE - $t; if ($w > intdiv(self::MAX_INT, $baseMinusT)) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } $w *= $baseMinusT; @@ -639,7 +637,7 @@ final class Idn $bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi); if (intdiv($i, $outPlusOne) > self::MAX_INT - $n) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } $n += intdiv($i, $outPlusOne); @@ -694,7 +692,7 @@ final class Idn } if ($m - $n > intdiv(self::MAX_INT - $delta, $h + 1)) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } $delta += ($m - $n) * ($h + 1); @@ -702,7 +700,7 @@ final class Idn foreach ($iter as $codePoint) { if ($codePoint < $n && 0 === ++$delta) { - throw new Exception('Integer overflow'); + throw new \Exception('Integer overflow'); } if ($codePoint === $n) { diff --git a/vendor/symfony/polyfill-intl-idn/LICENSE b/vendor/symfony/polyfill-intl-idn/LICENSE index 03c5e257..fd0a0626 100644 --- a/vendor/symfony/polyfill-intl-idn/LICENSE +++ b/vendor/symfony/polyfill-intl-idn/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2019 Fabien Potencier and Trevor Rowbotham +Copyright (c) 2018-present Fabien Potencier and Trevor Rowbotham Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php b/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php index 5bb70e48..d285acd1 100644 --- a/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php +++ b/vendor/symfony/polyfill-intl-idn/Resources/unidata/DisallowedRanges.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Polyfill\Intl\Idn\Resources\unidata; /** diff --git a/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php b/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php index 5c1c51dd..3c6af0c1 100644 --- a/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php +++ b/vendor/symfony/polyfill-intl-idn/Resources/unidata/Regex.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + namespace Symfony\Polyfill\Intl\Idn\Resources\unidata; /** diff --git a/vendor/symfony/polyfill-intl-idn/composer.json b/vendor/symfony/polyfill-intl-idn/composer.json index 105e3d06..78e478ee 100644 --- a/vendor/symfony/polyfill-intl-idn/composer.json +++ b/vendor/symfony/polyfill-intl-idn/composer.json @@ -34,7 +34,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", diff --git a/vendor/symfony/polyfill-intl-normalizer/LICENSE b/vendor/symfony/polyfill-intl-normalizer/LICENSE index 4cd8bdd3..6e3afce6 100644 --- a/vendor/symfony/polyfill-intl-normalizer/LICENSE +++ b/vendor/symfony/polyfill-intl-normalizer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2019 Fabien Potencier +Copyright (c) 2015-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-intl-normalizer/composer.json b/vendor/symfony/polyfill-intl-normalizer/composer.json index 65f72d64..2c4de2c8 100644 --- a/vendor/symfony/polyfill-intl-normalizer/composer.json +++ b/vendor/symfony/polyfill-intl-normalizer/composer.json @@ -29,7 +29,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", diff --git a/vendor/symfony/polyfill-mbstring/LICENSE b/vendor/symfony/polyfill-mbstring/LICENSE index 4cd8bdd3..6e3afce6 100644 --- a/vendor/symfony/polyfill-mbstring/LICENSE +++ b/vendor/symfony/polyfill-mbstring/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2019 Fabien Potencier +Copyright (c) 2015-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-mbstring/Mbstring.php b/vendor/symfony/polyfill-mbstring/Mbstring.php index bce5c4a8..2e0b9694 100644 --- a/vendor/symfony/polyfill-mbstring/Mbstring.php +++ b/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -69,7 +69,7 @@ final class Mbstring { public const MB_CASE_FOLD = \PHP_INT_MAX; - private const CASE_FOLD = [ + private const SIMPLE_CASE_FOLD = [ ['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"], ['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'], ]; @@ -301,7 +301,11 @@ final class Mbstring $map = $upper; } else { if (self::MB_CASE_FOLD === $mode) { - $s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s); + static $caseFolding = null; + if (null === $caseFolding) { + $caseFolding = self::getData('caseFolding'); + } + $s = strtr($s, $caseFolding); } static $lower = null; @@ -406,6 +410,12 @@ final class Mbstring public static function mb_check_encoding($var = null, $encoding = null) { + if (PHP_VERSION_ID < 70200 && \is_array($var)) { + trigger_error('mb_check_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING); + + return null; + } + if (null === $encoding) { if (null === $var) { return false; @@ -413,7 +423,21 @@ final class Mbstring $encoding = self::$internalEncoding; } - return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var); + if (!\is_array($var)) { + return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var); + } + + foreach ($var as $key => $value) { + if (!self::mb_check_encoding($key, $encoding)) { + return false; + } + if (!self::mb_check_encoding($value, $encoding)) { + return false; + } + } + + return true; + } public static function mb_detect_encoding($str, $encodingList = null, $strict = false) @@ -638,8 +662,10 @@ final class Mbstring public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) { - $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); - $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + [$haystack, $needle] = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], [ + self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding), + self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding), + ]); return self::mb_strpos($haystack, $needle, $offset, $encoding); } @@ -674,8 +700,11 @@ final class Mbstring public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null) { - $haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding); - $needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding); + $haystack = self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding); + $needle = self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding); + + $haystack = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $haystack); + $needle = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $needle); return self::mb_strrpos($haystack, $needle, $offset, $encoding); } @@ -798,6 +827,50 @@ final class Mbstring return $code; } + public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, string $encoding = null): string + { + if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) { + throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH'); + } + + if (null === $encoding) { + $encoding = self::mb_internal_encoding(); + } + + try { + $validEncoding = @self::mb_check_encoding('', $encoding); + } catch (\ValueError $e) { + throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding)); + } + + // BC for PHP 7.3 and lower + if (!$validEncoding) { + throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding)); + } + + if (self::mb_strlen($pad_string, $encoding) <= 0) { + throw new \ValueError('mb_str_pad(): Argument #3 ($pad_string) must be a non-empty string'); + } + + $paddingRequired = $length - self::mb_strlen($string, $encoding); + + if ($paddingRequired < 1) { + return $string; + } + + switch ($pad_type) { + case \STR_PAD_LEFT: + return self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding).$string; + case \STR_PAD_RIGHT: + return $string.self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding); + default: + $leftPaddingLength = floor($paddingRequired / 2); + $rightPaddingLength = $paddingRequired - $leftPaddingLength; + + return self::mb_substr(str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding).$string.self::mb_substr(str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding); + } + } + private static function getSubpart($pos, $part, $haystack, $encoding) { if (false === $pos) { diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php new file mode 100644 index 00000000..512bba0b --- /dev/null +++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/caseFolding.php @@ -0,0 +1,119 @@ + 'i̇', + 'µ' => 'μ', + 'ſ' => 's', + 'ͅ' => 'ι', + 'ς' => 'σ', + 'ϐ' => 'β', + 'ϑ' => 'θ', + 'ϕ' => 'φ', + 'ϖ' => 'π', + 'ϰ' => 'κ', + 'ϱ' => 'ρ', + 'ϵ' => 'ε', + 'ẛ' => 'ṡ', + 'ι' => 'ι', + 'ß' => 'ss', + 'ʼn' => 'ʼn', + 'ǰ' => 'ǰ', + 'ΐ' => 'ΐ', + 'ΰ' => 'ΰ', + 'և' => 'եւ', + 'ẖ' => 'ẖ', + 'ẗ' => 'ẗ', + 'ẘ' => 'ẘ', + 'ẙ' => 'ẙ', + 'ẚ' => 'aʾ', + 'ẞ' => 'ss', + 'ὐ' => 'ὐ', + 'ὒ' => 'ὒ', + 'ὔ' => 'ὔ', + 'ὖ' => 'ὖ', + 'ᾀ' => 'ἀι', + 'ᾁ' => 'ἁι', + 'ᾂ' => 'ἂι', + 'ᾃ' => 'ἃι', + 'ᾄ' => 'ἄι', + 'ᾅ' => 'ἅι', + 'ᾆ' => 'ἆι', + 'ᾇ' => 'ἇι', + 'ᾈ' => 'ἀι', + 'ᾉ' => 'ἁι', + 'ᾊ' => 'ἂι', + 'ᾋ' => 'ἃι', + 'ᾌ' => 'ἄι', + 'ᾍ' => 'ἅι', + 'ᾎ' => 'ἆι', + 'ᾏ' => 'ἇι', + 'ᾐ' => 'ἠι', + 'ᾑ' => 'ἡι', + 'ᾒ' => 'ἢι', + 'ᾓ' => 'ἣι', + 'ᾔ' => 'ἤι', + 'ᾕ' => 'ἥι', + 'ᾖ' => 'ἦι', + 'ᾗ' => 'ἧι', + 'ᾘ' => 'ἠι', + 'ᾙ' => 'ἡι', + 'ᾚ' => 'ἢι', + 'ᾛ' => 'ἣι', + 'ᾜ' => 'ἤι', + 'ᾝ' => 'ἥι', + 'ᾞ' => 'ἦι', + 'ᾟ' => 'ἧι', + 'ᾠ' => 'ὠι', + 'ᾡ' => 'ὡι', + 'ᾢ' => 'ὢι', + 'ᾣ' => 'ὣι', + 'ᾤ' => 'ὤι', + 'ᾥ' => 'ὥι', + 'ᾦ' => 'ὦι', + 'ᾧ' => 'ὧι', + 'ᾨ' => 'ὠι', + 'ᾩ' => 'ὡι', + 'ᾪ' => 'ὢι', + 'ᾫ' => 'ὣι', + 'ᾬ' => 'ὤι', + 'ᾭ' => 'ὥι', + 'ᾮ' => 'ὦι', + 'ᾯ' => 'ὧι', + 'ᾲ' => 'ὰι', + 'ᾳ' => 'αι', + 'ᾴ' => 'άι', + 'ᾶ' => 'ᾶ', + 'ᾷ' => 'ᾶι', + 'ᾼ' => 'αι', + 'ῂ' => 'ὴι', + 'ῃ' => 'ηι', + 'ῄ' => 'ήι', + 'ῆ' => 'ῆ', + 'ῇ' => 'ῆι', + 'ῌ' => 'ηι', + 'ῒ' => 'ῒ', + 'ῖ' => 'ῖ', + 'ῗ' => 'ῗ', + 'ῢ' => 'ῢ', + 'ῤ' => 'ῤ', + 'ῦ' => 'ῦ', + 'ῧ' => 'ῧ', + 'ῲ' => 'ὼι', + 'ῳ' => 'ωι', + 'ῴ' => 'ώι', + 'ῶ' => 'ῶ', + 'ῷ' => 'ῶι', + 'ῼ' => 'ωι', + 'ff' => 'ff', + 'fi' => 'fi', + 'fl' => 'fl', + 'ffi' => 'ffi', + 'ffl' => 'ffl', + 'ſt' => 'st', + 'st' => 'st', + 'ﬓ' => 'մն', + 'ﬔ' => 'մե', + 'ﬕ' => 'մի', + 'ﬖ' => 'վն', + 'ﬗ' => 'մխ', +]; diff --git a/vendor/symfony/polyfill-mbstring/bootstrap.php b/vendor/symfony/polyfill-mbstring/bootstrap.php index 1fedd1f7..ecf1a035 100644 --- a/vendor/symfony/polyfill-mbstring/bootstrap.php +++ b/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -132,6 +132,10 @@ if (!function_exists('mb_str_split')) { function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); } } +if (!function_exists('mb_str_pad')) { + function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } +} + if (extension_loaded('mbstring')) { return; } diff --git a/vendor/symfony/polyfill-mbstring/bootstrap80.php b/vendor/symfony/polyfill-mbstring/bootstrap80.php index 82f5ac4d..2f9fb5b4 100644 --- a/vendor/symfony/polyfill-mbstring/bootstrap80.php +++ b/vendor/symfony/polyfill-mbstring/bootstrap80.php @@ -128,6 +128,10 @@ if (!function_exists('mb_str_split')) { function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); } } +if (!function_exists('mb_str_pad')) { + function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); } +} + if (extension_loaded('mbstring')) { return; } diff --git a/vendor/symfony/polyfill-mbstring/composer.json b/vendor/symfony/polyfill-mbstring/composer.json index 44895536..943e5029 100644 --- a/vendor/symfony/polyfill-mbstring/composer.json +++ b/vendor/symfony/polyfill-mbstring/composer.json @@ -31,7 +31,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", diff --git a/vendor/symfony/polyfill-php72/LICENSE b/vendor/symfony/polyfill-php72/LICENSE index 4cd8bdd3..6e3afce6 100644 --- a/vendor/symfony/polyfill-php72/LICENSE +++ b/vendor/symfony/polyfill-php72/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2015-2019 Fabien Potencier +Copyright (c) 2015-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-php72/composer.json b/vendor/symfony/polyfill-php72/composer.json index 5f17af34..b61b4c8a 100644 --- a/vendor/symfony/polyfill-php72/composer.json +++ b/vendor/symfony/polyfill-php72/composer.json @@ -25,7 +25,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", diff --git a/vendor/symfony/polyfill-php73/LICENSE b/vendor/symfony/polyfill-php73/LICENSE index 3f853aaf..7536caea 100644 --- a/vendor/symfony/polyfill-php73/LICENSE +++ b/vendor/symfony/polyfill-php73/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018-2019 Fabien Potencier +Copyright (c) 2018-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-php73/composer.json b/vendor/symfony/polyfill-php73/composer.json index b5c58ec1..48295ef9 100644 --- a/vendor/symfony/polyfill-php73/composer.json +++ b/vendor/symfony/polyfill-php73/composer.json @@ -26,7 +26,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", diff --git a/vendor/symfony/polyfill-php80/LICENSE b/vendor/symfony/polyfill-php80/LICENSE index 5593b1d8..0ed3a246 100644 --- a/vendor/symfony/polyfill-php80/LICENSE +++ b/vendor/symfony/polyfill-php80/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2020 Fabien Potencier +Copyright (c) 2020-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-php80/composer.json b/vendor/symfony/polyfill-php80/composer.json index bd9a3262..f1801f40 100644 --- a/vendor/symfony/polyfill-php80/composer.json +++ b/vendor/symfony/polyfill-php80/composer.json @@ -30,7 +30,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", diff --git a/vendor/symfony/polyfill-php81/LICENSE b/vendor/symfony/polyfill-php81/LICENSE index efb17f98..99c6bdf3 100644 --- a/vendor/symfony/polyfill-php81/LICENSE +++ b/vendor/symfony/polyfill-php81/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2021 Fabien Potencier +Copyright (c) 2021-present Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/polyfill-php81/README.md b/vendor/symfony/polyfill-php81/README.md index 7d8dd190..c07ef782 100644 --- a/vendor/symfony/polyfill-php81/README.md +++ b/vendor/symfony/polyfill-php81/README.md @@ -7,6 +7,7 @@ This component provides features added to PHP 8.1 core: - [`enum_exists`](https://php.net/enum-exists) - [`MYSQLI_REFRESH_REPLICA`](https://php.net/mysqli.constants#constantmysqli-refresh-replica) constant - [`ReturnTypeWillChange`](https://wiki.php.net/rfc/internal_method_return_types) +- [`CURLStringFile`](https://php.net/CURLStringFile) (but only if PHP >= 7.4 is used) More information can be found in the [main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). diff --git a/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php b/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php new file mode 100644 index 00000000..eb5952ee --- /dev/null +++ b/vendor/symfony/polyfill-php81/Resources/stubs/CURLStringFile.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID >= 70400 && extension_loaded('curl')) { + /** + * @property string $data + */ + class CURLStringFile extends CURLFile + { + private $data; + + public function __construct(string $data, string $postname, string $mime = 'application/octet-stream') + { + $this->data = $data; + parent::__construct('data://application/octet-stream;base64,'.base64_encode($data), $mime, $postname); + } + + public function __set(string $name, $value): void + { + if ('data' !== $name) { + $this->$name = $value; + + return; + } + + if (is_object($value) ? !method_exists($value, '__toString') : !is_scalar($value)) { + throw new \TypeError('Cannot assign '.gettype($value).' to property CURLStringFile::$data of type string'); + } + + $this->name = 'data://application/octet-stream;base64,'.base64_encode($value); + } + + public function __isset(string $name): bool + { + return isset($this->$name); + } + + public function &__get(string $name) + { + return $this->$name; + } + } +} diff --git a/vendor/symfony/polyfill-php81/composer.json b/vendor/symfony/polyfill-php81/composer.json index 149b5982..e02d673d 100644 --- a/vendor/symfony/polyfill-php81/composer.json +++ b/vendor/symfony/polyfill-php81/composer.json @@ -26,7 +26,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", diff --git a/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/PsrServerRequestResolver.php b/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/PsrServerRequestResolver.php index 29dc7dc9..61cd8c5c 100644 --- a/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/PsrServerRequestResolver.php +++ b/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/PsrServerRequestResolver.php @@ -17,6 +17,7 @@ use Psr\Http\Message\ServerRequestInterface; use Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface as BaseValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; /** @@ -25,7 +26,7 @@ use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; * @author Iltar van der Berg * @author Alexander M. Turek */ -final class PsrServerRequestResolver implements ArgumentValueResolverInterface +final class PsrServerRequestResolver implements ArgumentValueResolverInterface, ValueResolverInterface { private const SUPPORTED_TYPES = [ ServerRequestInterface::class => true, @@ -45,6 +46,10 @@ final class PsrServerRequestResolver implements ArgumentValueResolverInterface */ public function supports(Request $request, ArgumentMetadata $argument): bool { + if ($this instanceof BaseValueResolverInterface) { + trigger_deprecation('symfony/psr-http-message-bridge', '2.3', 'Method "%s" is deprecated, call "resolve()" without calling "supports()" first.', __METHOD__); + } + return self::SUPPORTED_TYPES[$argument->getType()] ?? false; } @@ -53,6 +58,10 @@ final class PsrServerRequestResolver implements ArgumentValueResolverInterface */ public function resolve(Request $request, ArgumentMetadata $argument): \Traversable { + if (!isset(self::SUPPORTED_TYPES[$argument->getType()])) { + return; + } + yield $this->httpMessageFactory->createRequest($request); } } diff --git a/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/ValueResolverInterface.php b/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/ValueResolverInterface.php new file mode 100644 index 00000000..83a321ab --- /dev/null +++ b/vendor/symfony/psr-http-message-bridge/ArgumentValueResolver/ValueResolverInterface.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Bridge\PsrHttpMessage\ArgumentValueResolver; + +use Symfony\Component\HttpKernel\Controller\ValueResolverInterface as BaseValueResolverInterface; + +if (interface_exists(BaseValueResolverInterface::class)) { + /** @internal */ + interface ValueResolverInterface extends BaseValueResolverInterface + { + } +} else { + /** @internal */ + interface ValueResolverInterface + { + } +} diff --git a/vendor/symfony/psr-http-message-bridge/CHANGELOG.md b/vendor/symfony/psr-http-message-bridge/CHANGELOG.md index 1378fd6a..f32c06f2 100644 --- a/vendor/symfony/psr-http-message-bridge/CHANGELOG.md +++ b/vendor/symfony/psr-http-message-bridge/CHANGELOG.md @@ -1,6 +1,15 @@ CHANGELOG ========= +# 2.3.1 (2023-07-26) + +* Don't rely on `Request::getPayload()` to populate the parsed body + +# 2.3.0 (2023-07-25) + +* Leverage `Request::getPayload()` to populate the parsed body of PSR-7 requests +* Implement `ValueResolverInterface` introduced with Symfony 6.2 + # 2.2.0 (2023-04-21) * Drop support for Symfony 4 diff --git a/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php b/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php index 457e3468..a69e8ffe 100644 --- a/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php +++ b/vendor/symfony/psr-http-message-bridge/Factory/HttpFoundationFactory.php @@ -41,6 +41,8 @@ class HttpFoundationFactory implements HttpFoundationFactoryInterface /** * {@inheritdoc} + * + * @return Request */ public function createRequest(ServerRequestInterface $psrRequest, bool $streamed = false) { @@ -121,6 +123,8 @@ class HttpFoundationFactory implements HttpFoundationFactoryInterface /** * {@inheritdoc} + * + * @return Response */ public function createResponse(ResponseInterface $psrResponse, bool $streamed = false) { @@ -217,13 +221,13 @@ class HttpFoundationFactory implements HttpFoundationFactoryInterface return new Cookie( $cookieName, $cookieValue, - isset($cookieExpire) ? $cookieExpire : 0, - isset($cookiePath) ? $cookiePath : '/', - isset($cookieDomain) ? $cookieDomain : null, + $cookieExpire ?? 0, + $cookiePath ?? '/', + $cookieDomain ?? null, isset($cookieSecure), isset($cookieHttpOnly), true, - isset($samesite) ? $samesite : null + $samesite ?? null ); } diff --git a/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php b/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php index b1b6f9ae..09c4360d 100644 --- a/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php +++ b/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php @@ -12,7 +12,9 @@ namespace Symfony\Bridge\PsrHttpMessage\Factory; use Psr\Http\Message\ResponseFactoryInterface; +use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestFactoryInterface; +use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\StreamFactoryInterface; use Psr\Http\Message\UploadedFileFactoryInterface; use Psr\Http\Message\UploadedFileInterface; @@ -27,6 +29,7 @@ use Symfony\Component\HttpFoundation\StreamedResponse; * Builds Psr\HttpMessage instances using a PSR-17 implementation. * * @author Antonio J. García Lagar + * @author Aurélien Pillevesse */ class PsrHttpFactory implements HttpMessageFactoryInterface { @@ -45,6 +48,8 @@ class PsrHttpFactory implements HttpMessageFactoryInterface /** * {@inheritdoc} + * + * @return ServerRequestInterface */ public function createRequest(Request $symfonyRequest) { @@ -67,12 +72,28 @@ class PsrHttpFactory implements HttpMessageFactoryInterface $body = $this->streamFactory->createStreamFromResource($symfonyRequest->getContent(true)); + if (method_exists(Request::class, 'getContentTypeFormat')) { + $format = $symfonyRequest->getContentTypeFormat(); + } else { + $format = $symfonyRequest->getContentType(); + } + + if ('json' === $format) { + $parsedBody = json_decode($symfonyRequest->getContent(), true, 512, \JSON_BIGINT_AS_STRING); + + if (!\is_array($parsedBody)) { + $parsedBody = null; + } + } else { + $parsedBody = $symfonyRequest->request->all(); + } + $request = $request ->withBody($body) ->withUploadedFiles($this->getFiles($symfonyRequest->files->all())) ->withCookieParams($symfonyRequest->cookies->all()) ->withQueryParams($symfonyRequest->query->all()) - ->withParsedBody($symfonyRequest->request->all()) + ->withParsedBody($parsedBody) ; foreach ($symfonyRequest->attributes->all() as $key => $value) { @@ -84,10 +105,8 @@ class PsrHttpFactory implements HttpMessageFactoryInterface /** * Converts Symfony uploaded files array to the PSR one. - * - * @return array */ - private function getFiles(array $uploadedFiles) + private function getFiles(array $uploadedFiles): array { $files = []; @@ -108,10 +127,8 @@ class PsrHttpFactory implements HttpMessageFactoryInterface /** * Creates a PSR-7 UploadedFile instance from a Symfony one. - * - * @return UploadedFileInterface */ - private function createUploadedFile(UploadedFile $symfonyUploadedFile) + private function createUploadedFile(UploadedFile $symfonyUploadedFile): UploadedFileInterface { return $this->uploadedFileFactory->createUploadedFile( $this->streamFactory->createStreamFromFile( @@ -126,6 +143,8 @@ class PsrHttpFactory implements HttpMessageFactoryInterface /** * {@inheritdoc} + * + * @return ResponseInterface */ public function createResponse(Response $symfonyResponse) { diff --git a/vendor/symfony/psr-http-message-bridge/Factory/UploadedFile.php b/vendor/symfony/psr-http-message-bridge/Factory/UploadedFile.php index b9510455..4d38a1f7 100644 --- a/vendor/symfony/psr-http-message-bridge/Factory/UploadedFile.php +++ b/vendor/symfony/psr-http-message-bridge/Factory/UploadedFile.php @@ -52,7 +52,7 @@ class UploadedFile extends BaseUploadedFile /** * {@inheritdoc} */ - public function move($directory, $name = null): File + public function move(string $directory, string $name = null): File { if (!$this->isValid() || $this->test) { return parent::move($directory, $name); diff --git a/vendor/symfony/psr-http-message-bridge/composer.json b/vendor/symfony/psr-http-message-bridge/composer.json index e08b15c7..b705eb2e 100644 --- a/vendor/symfony/psr-http-message-bridge/composer.json +++ b/vendor/symfony/psr-http-message-bridge/composer.json @@ -18,6 +18,7 @@ "require": { "php": ">=7.2.5", "psr/http-message": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0", "symfony/http-foundation": "^5.4 || ^6.0" }, "require-dev": { @@ -41,7 +42,7 @@ }, "extra": { "branch-alias": { - "dev-main": "2.2-dev" + "dev-main": "2.3-dev" } } } diff --git a/vendor/tencentcloud/common/src/TencentCloud/Common/AbstractClient.php b/vendor/tencentcloud/common/src/TencentCloud/Common/AbstractClient.php index 0fcbb2af..a12b22c6 100644 --- a/vendor/tencentcloud/common/src/TencentCloud/Common/AbstractClient.php +++ b/vendor/tencentcloud/common/src/TencentCloud/Common/AbstractClient.php @@ -37,7 +37,7 @@ abstract class AbstractClient /** * @var string SDK版本 */ - public static $SDK_VERSION = "SDK_PHP_3.0.990"; + public static $SDK_VERSION = "SDK_PHP_3.0.995"; /** * @var integer http响应码200 diff --git a/vendor/tencentcloud/sms/composer.json b/vendor/tencentcloud/sms/composer.json index 682c8c55..b2f1d986 100644 --- a/vendor/tencentcloud/sms/composer.json +++ b/vendor/tencentcloud/sms/composer.json @@ -13,7 +13,7 @@ } ], "require": { - "tencentcloud/common": "3.0.990" + "tencentcloud/common": "3.0.995" }, "autoload": { "psr-4": { diff --git a/vendor/tencentcloud/sms/src/TencentCloud/Sms/V20190711/Models/DeleteSignStatus.php b/vendor/tencentcloud/sms/src/TencentCloud/Sms/V20190711/Models/DeleteSignStatus.php index 5adf87e9..4e887efc 100644 --- a/vendor/tencentcloud/sms/src/TencentCloud/Sms/V20190711/Models/DeleteSignStatus.php +++ b/vendor/tencentcloud/sms/src/TencentCloud/Sms/V20190711/Models/DeleteSignStatus.php @@ -21,25 +21,33 @@ use TencentCloud\Common\AbstractModel; * 删除签名响应 * * @method string getDeleteStatus() 获取删除状态信息。 +注意:此字段可能返回 null,表示取不到有效值。 * @method void setDeleteStatus(string $DeleteStatus) 设置删除状态信息。 +注意:此字段可能返回 null,表示取不到有效值。 * @method integer getDeleteTime() 获取删除时间,UNIX 时间戳(单位:秒)。 +注意:此字段可能返回 null,表示取不到有效值。 * @method void setDeleteTime(integer $DeleteTime) 设置删除时间,UNIX 时间戳(单位:秒)。 +注意:此字段可能返回 null,表示取不到有效值。 */ class DeleteSignStatus extends AbstractModel { /** * @var string 删除状态信息。 +注意:此字段可能返回 null,表示取不到有效值。 */ public $DeleteStatus; /** * @var integer 删除时间,UNIX 时间戳(单位:秒)。 +注意:此字段可能返回 null,表示取不到有效值。 */ public $DeleteTime; /** * @param string $DeleteStatus 删除状态信息。 +注意:此字段可能返回 null,表示取不到有效值。 * @param integer $DeleteTime 删除时间,UNIX 时间戳(单位:秒)。 +注意:此字段可能返回 null,表示取不到有效值。 */ function __construct() { diff --git a/vendor/tencentcloud/sms/src/TencentCloud/Sms/V20190711/SmsClient.php b/vendor/tencentcloud/sms/src/TencentCloud/Sms/V20190711/SmsClient.php index e9d2a632..21880e7b 100644 --- a/vendor/tencentcloud/sms/src/TencentCloud/Sms/V20190711/SmsClient.php +++ b/vendor/tencentcloud/sms/src/TencentCloud/Sms/V20190711/SmsClient.php @@ -43,11 +43,9 @@ use TencentCloud\Sms\V20190711\Models as Models; * @method Models\DescribeSmsSignListResponse DescribeSmsSignList(Models\DescribeSmsSignListRequest $req) ⚠️注意:个人认证用户不支持使用 API 查询短信签名,请参阅了解 [实名认证基本介绍](https://cloud.tencent.com/document/product/378/3629),如果为个人认证请登录 [控制台](https://console.cloud.tencent.com/smsv2) 查询短信签名。 >- 注:由于云 **API3.0 安全性**有所提升,所以**接口鉴权**较为复杂,建议使用 [SDK](https://cloud.tencent.com/document/product/382/43193) 来使用云短信服务。 >- 您可以在 [API 3.0 Explorer](https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms) 中直接运行该接口,可以先免去签名计算步骤。运行成功后,API Explorer可以**自动生成**SDK代码示例。 - * @method Models\DescribeSmsTemplateListResponse DescribeSmsTemplateList(Models\DescribeSmsTemplateListRequest $req) ⚠️注意:个人认证用户不支持使用 API 查询短信正文模板,请参阅了解 [实名认证基本介绍](https://cloud.tencent.com/document/product/378/3629)。 >- 注:由于云 **API3.0 安全性**有所提升,所以**接口鉴权**较为复杂,建议使用 [SDK](https://cloud.tencent.com/document/product/382/43193) 来使用云短信服务。 >- 您可以在 [API 3.0 Explorer](https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms) 中直接运行该接口,可以先免去签名计算步骤。运行成功后,API Explorer可以**自动生成**SDK代码示例。 - * @method Models\ModifySmsSignResponse ModifySmsSign(Models\ModifySmsSignRequest $req) 1. 修改短信签名,修改之前请先认真参阅 [腾讯云短信签名审核标准](https://cloud.tencent.com/document/product/382/39022)。 2. ⚠️注意:个人认证用户不支持使用 API 修改短信签名,请参阅了解 [实名认证基本介绍](https://cloud.tencent.com/document/product/378/3629),如果为个人认证请登录 [控制台](https://console.cloud.tencent.com/smsv2) 修改短信签名。 3. 修改短信签名,仅当签名为**待审核**或**已拒绝**状态时,才能进行修改,**已审核通过**的签名不支持修改。 @@ -58,36 +56,30 @@ use TencentCloud\Sms\V20190711\Models as Models; 3. 修改短信模板,仅当正文模板为**待审核**或**已拒绝**状态时,才能进行修改,**已审核通过**的正文模板不支持修改。 >- 注:由于云 **API3.0 安全性**有所提升,所以**接口鉴权**较为复杂,建议使用 [SDK](https://cloud.tencent.com/document/product/382/43193) 来使用云短信服务。 >- 您可以在 [API 3.0 Explorer](https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms) 中直接运行该接口,可以先免去签名计算步骤。运行成功后,API Explorer可以**自动生成**SDK代码示例。 - * @method Models\PullSmsReplyStatusResponse PullSmsReplyStatus(Models\PullSmsReplyStatusRequest $req) 拉取短信回复状态。 目前也支持 [配置回复回调](https://cloud.tencent.com/document/product/382/42907) 的方式来获取上行回复。 >- 注:此接口需要联系 [腾讯云短信小助手](https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81) 开通。 >- 注:由于云 **API3.0 安全性**有所提升,所以**接口鉴权**较为复杂,建议使用 [SDK](https://cloud.tencent.com/document/product/382/43193) 来使用云短信服务。 >- 您可以在 [API 3.0 Explorer](https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms) 中直接运行该接口,可以先免去签名计算步骤。运行成功后,API Explorer可以**自动生成**SDK代码示例。 - * @method Models\PullSmsReplyStatusByPhoneNumberResponse PullSmsReplyStatusByPhoneNumber(Models\PullSmsReplyStatusByPhoneNumberRequest $req) 拉取单个号码短信回复状态。 目前也支持 [配置回复回调](https://cloud.tencent.com/document/product/382/42907) 的方式来获取上行回复。 >- 注:由于云 **API3.0 安全性**有所提升,所以**接口鉴权**较为复杂,建议使用 [SDK](https://cloud.tencent.com/document/product/382/43193) 来使用云短信服务。 >- 您可以在 [API 3.0 Explorer](https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms) 中直接运行该接口,可以先免去签名计算步骤。运行成功后,API Explorer可以**自动生成**SDK代码示例。 - * @method Models\PullSmsSendStatusResponse PullSmsSendStatus(Models\PullSmsSendStatusRequest $req) 拉取短信下发状态。 目前也支持 [配置回调](https://cloud.tencent.com/document/product/382/37809#.E8.AE.BE.E7.BD.AE.E4.BA.8B.E4.BB.B6.E5.9B.9E.E8.B0.83.E9.85.8D.E7.BD.AE) 的方式来获取下发状态。 >- 注:此接口需要联系 [sms helper](https://cloud.tencent.com/document/product/382/3773#.E6.8A.80.E6.9C.AF.E4.BA.A4.E6.B5.81) 开通。 >- 注:由于云 **API3.0 安全性**有所提升,所以**接口鉴权**较为复杂,建议使用 [SDK](https://cloud.tencent.com/document/product/382/43193) 来使用云短信服务。 >- 您可以在 [API 3.0 Explorer](https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms) 中直接运行该接口,可以先免去签名计算步骤。运行成功后,API Explorer可以**自动生成**SDK代码示例。 - * @method Models\PullSmsSendStatusByPhoneNumberResponse PullSmsSendStatusByPhoneNumber(Models\PullSmsSendStatusByPhoneNumberRequest $req) 拉取单个号码短信下发状态。 目前也支持 [配置回调](https://cloud.tencent.com/document/product/382/37809#.E8.AE.BE.E7.BD.AE.E4.BA.8B.E4.BB.B6.E5.9B.9E.E8.B0.83.E9.85.8D.E7.BD.AE) 的方式来获取下发状态。 >- 注:由于云 **API3.0 安全性**有所提升,所以**接口鉴权**较为复杂,建议使用 [SDK](https://cloud.tencent.com/document/product/382/43193) 来使用云短信服务。 >- 您可以在 [API 3.0 Explorer](https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms) 中直接运行该接口,可以先免去签名计算步骤。运行成功后,API Explorer可以**自动生成**SDK代码示例。 - * @method Models\SendSmsResponse SendSms(Models\SendSmsRequest $req) 短信发送接口,用于给用户发短信验证码、通知类短信或营销短信。 >- 注:由于云 **API3.0 安全性**有所提升,所以**接口鉴权**较为复杂,建议使用 [SDK](https://cloud.tencent.com/document/product/382/43193) 来使用云短信服务。 >- 您可以在 [API 3.0 Explorer](https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms) 中直接运行该接口,可以先免去签名计算步骤。运行成功后,API Explorer可以**自动生成**SDK代码示例。 * @method Models\SendStatusStatisticsResponse SendStatusStatistics(Models\SendStatusStatisticsRequest $req) 统计用户发送短信的数据。 >- 注:由于云 **API3.0 安全性**有所提升,所以**接口鉴权**较为复杂,建议使用 [SDK](https://cloud.tencent.com/document/product/382/43193) 来使用云短信服务。 >- 您可以在 [API 3.0 Explorer](https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms) 中直接运行该接口,可以先免去签名计算步骤。运行成功后,API Explorer可以**自动生成**SDK代码示例。 - * @method Models\SmsPackagesStatisticsResponse SmsPackagesStatistics(Models\SmsPackagesStatisticsRequest $req) 用户套餐包信息统计。 >- 注:由于云 **API3.0 安全性**有所提升,所以**接口鉴权**较为复杂,建议使用 [SDK](https://cloud.tencent.com/document/product/382/43193) 来使用云短信服务。 >- 您可以在 [API 3.0 Explorer](https://console.cloud.tencent.com/api/explorer?Product=sms&Version=2019-07-11&Action=SendSms) 中直接运行该接口,可以先免去签名计算步骤。运行成功后,API Explorer可以**自动生成**SDK代码示例。 diff --git a/vendor/topthink/framework/README.md b/vendor/topthink/framework/README.md index dd38e34c..8781de07 100644 --- a/vendor/topthink/framework/README.md +++ b/vendor/topthink/framework/README.md @@ -77,7 +77,7 @@ ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 本项目包含的第三方源码和二进制文件之版权信息另行标注。 -版权所有Copyright © 2006-2021 by ThinkPHP (http://thinkphp.cn) All rights reserved。 +版权所有Copyright © 2006-2023 by ThinkPHP (http://thinkphp.cn) All rights reserved。 ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 diff --git a/vendor/topthink/framework/src/think/App.php b/vendor/topthink/framework/src/think/App.php index 9f309c07..597cf878 100644 --- a/vendor/topthink/framework/src/think/App.php +++ b/vendor/topthink/framework/src/think/App.php @@ -38,7 +38,7 @@ use think\initializer\RegisterService; */ class App extends Container { - const VERSION = '6.1.1'; + const VERSION = '6.1.4'; /** * 应用调试模式 diff --git a/vendor/topthink/framework/src/think/Route.php b/vendor/topthink/framework/src/think/Route.php index e45cb33b..60eba4af 100644 --- a/vendor/topthink/framework/src/think/Route.php +++ b/vendor/topthink/framework/src/think/Route.php @@ -19,6 +19,7 @@ use think\route\dispatch\Callback; use think\route\dispatch\Url as UrlDispatch; use think\route\Domain; use think\route\Resource; +use think\route\ResourceRegister; use think\route\Rule; use think\route\RuleGroup; use think\route\RuleItem; @@ -182,6 +183,11 @@ class Route $this->removeSlash = $this->config['remove_slash']; $this->group->removeSlash($this->removeSlash); + + // 注册全局MISS路由 + $this->miss(function () { + return Response::create('', 'html', 204)->header(['Allow' => 'GET, POST, PUT, DELETE']); + }, 'options')->allowCrossDomain(); } public function config(string $name = null) @@ -317,8 +323,7 @@ class Route $domainName = is_array($name) ? array_shift($name) : $name; if (!isset($this->domains[$domainName])) { - $domain = (new Domain($this, $domainName, $rule)) - ->lazy($this->lazy) + $domain = (new Domain($this, $domainName, $rule, $this->lazy)) ->removeSlash($this->removeSlash) ->mergeRuleRegex($this->mergeRuleRegex); @@ -523,19 +528,18 @@ class Route } /** - * 设置跨域有效路由规则 + * 设置路由规则全局有效 * @access public * @param Rule $rule 路由规则 - * @param string $method 请求类型 * @return $this */ - public function setCrossDomainRule(Rule $rule, string $method = '*') + public function setCrossDomainRule(Rule $rule) { if (!isset($this->cross)) { $this->cross = (new RuleGroup($this))->mergeRuleRegex($this->mergeRuleRegex); } - $this->cross->addRuleItem($rule, $method); + $this->cross->addRuleItem($rule); return $this; } @@ -554,8 +558,7 @@ class Route $name = ''; } - return (new RuleGroup($this, $this->group, $name, $route)) - ->lazy($this->lazy) + return (new RuleGroup($this, $this->group, $name, $route, $this->lazy)) ->removeSlash($this->removeSlash) ->mergeRuleRegex($this->mergeRuleRegex); } @@ -661,12 +664,17 @@ class Route * @access public * @param string $rule 路由规则 * @param string $route 路由地址 - * @return Resource + * @return Resource|ResourceRegister */ - public function resource(string $rule, string $route): Resource + public function resource(string $rule, string $route) { - return (new Resource($this, $this->group, $rule, $route, $this->rest)) - ->lazy($this->lazy); + $resource = new Resource($this, $this->group, $rule, $route, $this->rest); + + if (!$this->lazy) { + return new ResourceRegister($resource); + } + + return $resource; } /** diff --git a/vendor/topthink/framework/src/think/cache/driver/File.php b/vendor/topthink/framework/src/think/cache/driver/File.php index b36b0696..70a4757d 100644 --- a/vendor/topthink/framework/src/think/cache/driver/File.php +++ b/vendor/topthink/framework/src/think/cache/driver/File.php @@ -176,7 +176,8 @@ class File extends Driver } $data = "\n" . $data; - $result = file_put_contents($filename, $data); + + $result = file_put_contents($filename, $data, LOCK_EX); if ($result) { clearstatcache(); diff --git a/vendor/topthink/framework/src/think/console/bin/README.md b/vendor/topthink/framework/src/think/console/bin/README.md new file mode 100644 index 00000000..9acc52fb --- /dev/null +++ b/vendor/topthink/framework/src/think/console/bin/README.md @@ -0,0 +1 @@ +console 工具使用 hiddeninput.exe 在 windows 上隐藏密码输入,该二进制文件由第三方提供,相关源码和其他细节可以在 [Hidden Input](https://github.com/Seldaek/hidden-input) 找到。 diff --git a/vendor/topthink/framework/src/think/console/bin/hiddeninput.exe b/vendor/topthink/framework/src/think/console/bin/hiddeninput.exe new file mode 100644 index 0000000000000000000000000000000000000000..c8cf65e8d819e6e525121cf6b21f1c2429746038 GIT binary patch literal 9216 zcmeHNe{@sVeZR8hV88~S)=Hp|Mpn({rC^@)BwNOI{ERJXCYlx+k1K6PLHo z_e!z_fhOzeA3JTX&-Z@s{rFOgjEwBlqjr!)9f zjyHz`A+ni`!0Taby{Uj5Y>jQq(k5A+X})PLWAi|{IZbtc8n^^trM{GI=P_15U6d?l zJJ3PW8XjfHpR}6`k{&5@JcEeH_SqQoQbU62o2YS30W)p_t&Fjy*RXQCZt$gCf|ao| zx&3R}m6|-Lfi@pua=$26n(UlnWo$>K67*|+#(qL_An=?l0M02AhOSJDv3;~?1ORfw z76EdK#MpSHqACHLcnJLIYlCSiX4eS@Pr8rN)Xwz0dk7O*y^0_C(Yks2Kvg! z-d-fJ)F9@k?>)m(XqDKIe2OKfhCQde9fpO0ko24yn*4xzX7q+ze`Z*=aJgwV?D?73 zaJ8UkSk|NN>@-|mB*f`EIK7$ElgAB<7p&p`^Vuq$58#;?B^*Bz7&d$B#+AYUC z(^m|`7{lqx&b^5$;i`j|S!+u|lcaQplp_&Nb)!>r>vGh3wb!tW zLq6%bkSt8jO|(vWH>LiPV(Xkp%BiGhl1q!PXXNKVKE!>Y5cHc2%cJOJA{-&ZsSn`T z#8~TA#(HWH4m>uCd+kCMTFgMI*s*n3!iCOwEI`{vGcVhzDu!Lw%-Ea^JATtrF`q3`+#KvvYJ0vM~A}D#LOD zlw`4ncB0U*Jji=--Wz#>I&5?hy;MgYW2u91d8ob=7MWfY`u;7Xe-J{Qsb0=0p|SM2 zG|=~mERIj4?gi)Ew|{LIN#oAsh20k_khIYjJBBN6rrIJ=eQO=nE;rTnPSiaQS$1$# z+|JRh0!IbQIa*f1(TZ}QM;|WO0+jTy(e)ggN4>zqp2E>C>hGPLHjHBh--2%@{EZNE zbUk{<3MABX&20QwK{MxK8`1Vk>^%dO5i@VTfu>NG3$K4NC=hSPsj9UYy`rNO}sBnB9QdKdIk7G+2_amnWstdTYVg z7HgLJGC~XLZG`63GwH8PdO_+G(k6~?J8Wj5mQos#21kC4W#2)guQXI)!z^{@F)U)5 z*re+r(2dib3D4P~%Z6TL=$PIkpmm<_#isu%t=%DcIwNkJhMeJ|bpahHO%8h|y~Ccf zUg#xVk+dyu>Q1O7JZ~8KS>tqi0qK**X*y6yHM71`bT=kFZ=@E%oe2!Km1^2sa>v+onZ%x_>aOJF+N0{i~z|<(IzgT*{0PpQq}E zQpU35@bm;qI?t_znGI&5&4sZV>+%m}w$(4hSDvLk)l<{5XyMlnCl7C%AjM3XnWvVz z{NoFsX)JB)SoqABZxUa*Yq+^^(cbq4mL%^lO12c${z{pf+)|kTTI~nQywyYF6}6|8 zlsN9&{-vwTrTyu<5^90_AsIU-ID#ZG@6d%poU44<**%xVe?`uxf}_Mr$SLHLS|K_N zQnw>(Lr2U=%$-<2D~RSzbG)2W2u^KMDnFFE?GmmbQ)V)fty957F`4OvQ_25E68ITr z5?`suu`|v?r!y=gFOGj$%9IJ zuTP=&2GcnoZZ0qSe6YL-*-lg>Q#>?Ew`a=GDc4vI#<1sNdKn?n7iSj0Orl$-#FMFi zykr>X-Xvi>sVr;92+8*H!r|3L$#o~hXa0z>AmF=z z?|@FF;*S|S0yqsw0j>Z(3mX-HD!|{N-vYc9paC8Ld=|6?00!6(_%lERupO`&um*4k z0b~W>e*uhTe4;V;mq>(ox$9FB`wLt!*DKj~!aOh|fL&#Pg*b??tm%5~_6M#02wqeC zS~wO>TWGnSp^r<0&8f2V6W->w=C+p~daC5e5wNQM*(* z66^}b0(!q3)zq$mu&VnbR#nr3;h5DS*o7{y66=!#;Dy4$pd1ZH<6WEOi0oJ8SxRL* z*v-9@Z^2w%^S(w5dO{_9Duby%2RT~;ppxaE$l()x6&}>7Wcg=u_&>f`Vs8OJGTy{X z2HpG=ThJz<{%|4Qq-~ad0qcrc87n88DHpM(nypwXIkZn<{zIT$ul&BQ?{ApCAZtyr zs2YpNt@x(G*faTU*HCKnAk(G=Tl~>r1QK8LY~J8mFFGoN5iIkYSwlm4Lsj#g4dsE5 zU-4;*Kdh-zv!rT4N$O}Q&n)?v0-9Y)lRFz58^P-KtKonzrfQ1p@0V_10^0||cGRn9 zRG<-#_TEV2nn4{BOh{YVBR4e!V!D?0K%BAlQN!D%M#k1bHypiIHT)5tlj>p0Pp_;+ z!cqC-JIs@JRhB+#teGs$Cib_=(yjRo4OJg^YPg%58aJVsC(LQ?W6%pn!-#aMZwoPcopo^Rn6BE z3=c5&W5~pP(C(-2r;PnH-S0{F`runM0ERCf3rESX$+S(MKOXmKJL9zXF}9-lf^xUs z+bb)+P%L&gV@<4q{6w^xEJ>Y>TQFUeoz0o-yq)jUqww=?wjUO8Y{a5G;DJ0Jr!LL+ zWhgsLuzi&eDrGDn$2DJwpFfH-?SGWbr>qRb?v{P`_%)So)CQgzO^HQ%;y#tJ=knH4 z95jX;^bF#BiuTH^%-j}{9VrZD=R%Q%wselH^p>5 z7d>gWB-st&3Fj%Mt*|tR5iK3J=`xhs&G)I7E>`FO@o7L z@S$B!pYMuzz5DN@X!O4DPm5n@raPJn-Q#o*m*e^5lk$g?0esg%$;>g5QW-|;c=H2GM}bo2tW^D924wmOkrUbWxcQ# z#v6bP%Tdfe~jtCRzAL;-OahZ=#yvUixu2-9fD2j$*|YY`F?0wF-{a# ztr<&kZjZ+81}6ZESqtgW)8kP#s@VLTSUR{}6?U^R*x7RE3Rl&n=VnFFqg9Uqz1n@N9N|=9<4} zuJfy^+}|D9X&vm3MAdqmu0&UMd^=K>b1hLAm_E!$rZC2b;;T~Dl zI`Eo_yRY76uM})|6wk9->of(=9&4jLv5#p@OzS~Yl>@pG)^>6`R+KtL{<4ly4o9WiM!%p_pfROU354)e8PIeE z1_s?#;OX6waNvvb&UQRN(WLbR+}&b#jo&WY-LlwCX}Q*$jGuKYuOGoIoyR(>e}}ix z+t}Q^cEcC8Y{@h}>HmJ^gD!l@gzwHmiBKl26x_lZVZG2UY!`w;RJd122;US&geQdW z3Qq}R!gIo5;ka;0I4c-Jq5X6A6?VzK&c4y!ZXdAUYu{r}*!SBXw?Aor+J4-A(*COb zb^CwV-?3k`zi-cX*c`VzL`RLI(b4MgIrGN z%ojf`E*6)Gg1A9!7q^N##2zsss^V9~-Qt7d!{UDNZ^XY9pA^3@9ui*?e=7c5d`nD; z?}~R(p>y1Kw!>|X4ycYEAkcZa*n-R%y! zqi)Up756UpqwfE7=hfigw$k~G@25gaxF9UGTkV>C(7x1Rbx4jb#|}rxq0vQ!n-c#f J0sQ~1{4brj`U(I5 literal 0 HcmV?d00001 diff --git a/vendor/topthink/framework/src/think/console/command/RouteList.php b/vendor/topthink/framework/src/think/console/command/RouteList.php index e9d4c5d8..cfc7293e 100644 --- a/vendor/topthink/framework/src/think/console/command/RouteList.php +++ b/vendor/topthink/framework/src/think/console/command/RouteList.php @@ -56,8 +56,8 @@ class RouteList extends Command protected function getRouteList(string $dir = null): string { - $this->app->route->setTestMode(true); $this->app->route->clear(); + $this->app->route->lazy(false); if ($dir) { $path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR; diff --git a/vendor/topthink/framework/src/think/console/command/optimize/Schema.php b/vendor/topthink/framework/src/think/console/command/optimize/Schema.php index 6ce3e64a..424daaf3 100644 --- a/vendor/topthink/framework/src/think/console/command/optimize/Schema.php +++ b/vendor/topthink/framework/src/think/console/command/optimize/Schema.php @@ -67,7 +67,12 @@ class Schema extends Command if (0 === strpos($file, '.')) { continue; } + $class = '\\' . $namespace . '\\model\\' . pathinfo($file, PATHINFO_FILENAME); + if (!class_exists($class)) { + continue; + } + $this->buildModelSchema($class); } } diff --git a/vendor/topthink/framework/src/think/facade/Route.php b/vendor/topthink/framework/src/think/facade/Route.php index 37504cef..1b9a8726 100644 --- a/vendor/topthink/framework/src/think/facade/Route.php +++ b/vendor/topthink/framework/src/think/facade/Route.php @@ -13,6 +13,7 @@ declare (strict_types = 1); namespace think\facade; use think\Facade; +use think\Response; use think\route\Dispatch; use think\route\Domain; use think\route\Rule; @@ -20,6 +21,7 @@ use think\route\RuleGroup; use think\route\RuleItem; use think\route\RuleName; use think\route\Url as UrlBuild; +use think\route\ResourceRegister as Resource; /** * @see \think\Route @@ -48,7 +50,7 @@ use think\route\Url as UrlBuild; * @method static array getRuleList() 读取路由列表 * @method static void clear() 清空路由规则 * @method static RuleItem rule(string $rule, mixed $route = null, string $method = '*') 注册路由规则 - * @method static \think\Route setCrossDomainRule(Rule $rule, string $method = '*') 设置跨域有效路由规则 + * @method static \think\Route setCrossDomainRule(Rule $rule) 设置跨域有效路由规则 * @method static RuleGroup group(string|\Closure $name, mixed $route = null) 注册路由分组 * @method static RuleItem any(string $rule, mixed $route) 注册路由 * @method static RuleItem get(string $rule, mixed $route) 注册GET路由 @@ -64,7 +66,7 @@ use think\route\Url as UrlBuild; * @method static \think\Route rest(string|array $name, array|bool $resource = []) rest方法定义和修改 * @method static array|null getRest(string $name = null) 获取rest方法定义的参数 * @method static RuleItem miss(string|\Closure $route, string $method = '*') 注册未匹配路由规则后的处理 - * @method static Response dispatch(\think\Request $request, Closure|bool $withRoute = true) 路由调度 + * @method static Response dispatch(\think\Request $request, \Closure|bool $withRoute = true) 路由调度 * @method static Dispatch|false check() 检测URL路由 * @method static Dispatch url(string $url) 默认URL解析 * @method static UrlBuild buildUrl(string $url = '', array $vars = []) URL生成 支持路由反射 diff --git a/vendor/topthink/framework/src/think/initializer/Error.php b/vendor/topthink/framework/src/think/initializer/Error.php index 201d9473..5018b1ef 100644 --- a/vendor/topthink/framework/src/think/initializer/Error.php +++ b/vendor/topthink/framework/src/think/initializer/Error.php @@ -55,7 +55,9 @@ class Error if ($this->app->runningInConsole()) { $handler->renderForConsole(new ConsoleOutput, $e); } else { - $handler->render($this->app->request, $e)->send(); + $response = $handler->render($this->app->request, $e); + $response->send(); + $this->app->http->end($response); } } diff --git a/vendor/topthink/framework/src/think/middleware/SessionInit.php b/vendor/topthink/framework/src/think/middleware/SessionInit.php index 3cb2fad9..55cea3b6 100644 --- a/vendor/topthink/framework/src/think/middleware/SessionInit.php +++ b/vendor/topthink/framework/src/think/middleware/SessionInit.php @@ -68,7 +68,7 @@ class SessionInit $response->setSession($this->session); - $this->app->cookie->set($cookieName, $this->session->getId()); + $this->app->cookie->set($cookieName, $this->session->getId(), $this->session->getConfig('expire')); return $response; } diff --git a/vendor/topthink/framework/src/think/response/Redirect.php b/vendor/topthink/framework/src/think/response/Redirect.php index ee067be0..c6d71aee 100644 --- a/vendor/topthink/framework/src/think/response/Redirect.php +++ b/vendor/topthink/framework/src/think/response/Redirect.php @@ -36,24 +36,28 @@ class Redirect extends Response $this->cacheControl('no-cache,must-revalidate'); } + public function data($data) + { + $this->header['Location'] = $data; + return parent::data($data); + } + /** * 处理数据 * @access protected - * @param mixed $data 要处理的数据 + * @param mixed $data 要处理的数据 * @return string */ protected function output($data): string { - $this->header['Location'] = $data; - return ''; } /** * 重定向传值(通过Session) * @access protected - * @param string|array $name 变量名或者数组 - * @param mixed $value 值 + * @param string|array $name 变量名或者数组 + * @param mixed $value 值 * @return $this */ public function with($name, $value = null) diff --git a/vendor/topthink/framework/src/think/route/Dispatch.php b/vendor/topthink/framework/src/think/route/Dispatch.php index 58666b50..e0baad9e 100644 --- a/vendor/topthink/framework/src/think/route/Dispatch.php +++ b/vendor/topthink/framework/src/think/route/Dispatch.php @@ -77,16 +77,6 @@ abstract class Dispatch */ public function run(): Response { - if ($this->rule instanceof RuleItem && $this->request->method() == 'OPTIONS' && $this->rule->isAutoOptions()) { - $rules = $this->rule->getRouter()->getRule($this->rule->getRule()); - $allow = []; - foreach ($rules as $item) { - $allow[] = strtoupper($item->getMethod()); - } - - return Response::create('', 'html', 204)->header(['Allow' => implode(', ', $allow)]); - } - $data = $this->exec(); return $this->autoResponse($data); } diff --git a/vendor/topthink/framework/src/think/route/Domain.php b/vendor/topthink/framework/src/think/route/Domain.php index 84f1d463..4cf03cf4 100644 --- a/vendor/topthink/framework/src/think/route/Domain.php +++ b/vendor/topthink/framework/src/think/route/Domain.php @@ -29,12 +29,17 @@ class Domain extends RuleGroup * @param Route $router 路由对象 * @param string $name 路由域名 * @param mixed $rule 域名路由 + * @param bool $lazy 延迟解析 */ - public function __construct(Route $router, string $name = null, $rule = null) + public function __construct(Route $router, string $name = null, $rule = null, bool $lazy = false) { $this->router = $router; $this->domain = $name; $this->rule = $rule; + + if (!$lazy) { + $this->parseGroupRule($rule); + } } /** diff --git a/vendor/topthink/framework/src/think/route/Resource.php b/vendor/topthink/framework/src/think/route/Resource.php index 5185cdc3..33cd8241 100644 --- a/vendor/topthink/framework/src/think/route/Resource.php +++ b/vendor/topthink/framework/src/think/route/Resource.php @@ -19,18 +19,6 @@ use think\Route; */ class Resource extends RuleGroup { - /** - * 资源路由名称 - * @var string - */ - protected $resource; - - /** - * 资源路由地址 - * @var string - */ - protected $route; - /** * REST方法定义 * @var array @@ -58,18 +46,18 @@ class Resource extends RuleGroup /** * 架构函数 * @access public - * @param Route $router 路由对象 - * @param RuleGroup $parent 上级对象 - * @param string $name 资源名称 - * @param string $route 路由地址 - * @param array $rest 资源定义 + * @param Route $router 路由对象 + * @param RuleGroup|null $parent 上级对象 + * @param string $name 资源名称 + * @param string $route 路由地址 + * @param array $rest 资源定义 */ public function __construct(Route $router, RuleGroup $parent = null, string $name = '', string $route = '', array $rest = []) { $name = ltrim($name, '/'); $this->router = $router; $this->parent = $parent; - $this->resource = $name; + $this->rule = $name; $this->route = $route; $this->name = strpos($name, '.') ? strstr($name, '.', true) : $name; @@ -84,20 +72,16 @@ class Resource extends RuleGroup $this->domain = $this->parent->getDomain(); $this->parent->addRuleItem($this); } - - if ($router->isTest()) { - $this->buildResourceRule(); - } } /** - * 生成资源路由规则 - * @access protected + * 解析资源路由规则 + * @access public + * @param mixed $rule 路由规则 * @return void */ - protected function buildResourceRule(): void + public function parseGroupRule($rule): void { - $rule = $this->resource; $option = $this->option; $origin = $this->router->getGroup(); $this->router->setGroup($this); @@ -141,6 +125,7 @@ class Resource extends RuleGroup } $this->router->setGroup($origin); + $this->hasParsed = true; } /** diff --git a/vendor/topthink/framework/src/think/route/ResourceRegister.php b/vendor/topthink/framework/src/think/route/ResourceRegister.php new file mode 100644 index 00000000..6a347874 --- /dev/null +++ b/vendor/topthink/framework/src/think/route/ResourceRegister.php @@ -0,0 +1,72 @@ + +// +---------------------------------------------------------------------- +declare (strict_types = 1); + +namespace think\route; + +/** + * 资源路由注册类 + */ +class ResourceRegister +{ + /** + * 资源路由 + * @var Resource + */ + protected $resource; + + /** + * 是否注册过 + * @var bool + */ + protected $registered = false; + + /** + * 架构函数 + * @access public + * @param Resource $resource 资源路由 + */ + public function __construct(Resource $resource) + { + $this->resource = $resource; + } + + /** + * 注册资源路由 + * @access protected + * @return void + */ + protected function register() + { + $this->registered = true; + + $this->resource->parseGroupRule($this->resource->getRule()); + } + + /** + * 动态方法 + * @access public + * @param string $method 方法名 + * @param array $args 调用参数 + * @return mixed + */ + public function __call($method, $args) + { + return call_user_func_array([$this->resource, $method], $args); + } + + public function __destruct() + { + if (!$this->registered) { + $this->register(); + } + } +} diff --git a/vendor/topthink/framework/src/think/route/Rule.php b/vendor/topthink/framework/src/think/route/Rule.php index 2d864cd2..e909e786 100644 --- a/vendor/topthink/framework/src/think/route/Rule.php +++ b/vendor/topthink/framework/src/think/route/Rule.php @@ -67,7 +67,7 @@ abstract class Rule * 请求类型 * @var string */ - protected $method; + protected $method = '*'; /** * 路由变量 @@ -572,14 +572,7 @@ abstract class Rule */ public function crossDomainRule() { - if ($this instanceof RuleGroup) { - $method = '*'; - } else { - $method = $this->method; - } - - $this->router->setCrossDomainRule($this, $method); - + $this->router->setCrossDomainRule($this); return $this; } diff --git a/vendor/topthink/framework/src/think/route/RuleGroup.php b/vendor/topthink/framework/src/think/route/RuleGroup.php index cd9ddbd1..f8fbc1ef 100644 --- a/vendor/topthink/framework/src/think/route/RuleGroup.php +++ b/vendor/topthink/framework/src/think/route/RuleGroup.php @@ -25,15 +25,15 @@ class RuleGroup extends Rule { /** * 分组路由(包括子分组) - * @var array + * @var Rule[] */ protected $rules = []; /** - * 分组路由规则 - * @var mixed + * 是否已经解析 + * @var bool */ - protected $rule; + protected $hasParsed; /** * MISS路由 @@ -56,12 +56,13 @@ class RuleGroup extends Rule /** * 架构函数 * @access public - * @param Route $router 路由对象 - * @param RuleGroup $parent 上级对象 - * @param string $name 分组名称 - * @param mixed $rule 分组路由 + * @param Route $router 路由对象 + * @param RuleGroup|null $parent 上级对象 + * @param string $name 分组名称 + * @param mixed $rule 分组路由 + * @param bool $lazy 延迟解析 */ - public function __construct(Route $router, RuleGroup $parent = null, string $name = '', $rule = null) + public function __construct(Route $router, RuleGroup $parent = null, string $name = '', $rule = null, bool $lazy = false) { $this->router = $router; $this->parent = $parent; @@ -75,8 +76,8 @@ class RuleGroup extends Rule $this->parent->addRuleItem($this); } - if ($router->isTest()) { - $this->lazy(false); + if (!$lazy) { + $this->parseGroupRule($rule); } } @@ -138,9 +139,7 @@ class RuleGroup extends Rule } // 解析分组路由 - if ($this instanceof Resource) { - $this->buildResourceRule(); - } else { + if (!$this->hasParsed) { $this->parseGroupRule($this->rule); } @@ -163,8 +162,8 @@ class RuleGroup extends Rule } // 检查分组路由 - foreach ($rules as $key => $item) { - $result = $item[1]->check($request, $url, $completeMatch); + foreach ($rules as $item) { + $result = $item->check($request, $url, $completeMatch); if (false !== $result) { return $result; @@ -173,9 +172,9 @@ class RuleGroup extends Rule if (!empty($option['dispatcher'])) { $result = $this->parseRule($request, '', $option['dispatcher'], $url, $option); - } elseif ($this->miss && in_array($this->miss->getMethod(), ['*', $method])) { + } elseif ($miss = $this->getMissRule($method)) { // 未匹配所有路由的路由规则处理 - $result = $this->parseRule($request, '', $this->miss->getRoute(), $url, $this->miss->getOption()); + $result = $miss->parseRule($request, '', $miss->getRoute(), $url, $miss->getOption()); } else { $result = false; } @@ -222,22 +221,6 @@ class RuleGroup extends Rule return $this; } - /** - * 延迟解析分组的路由规则 - * @access public - * @param bool $lazy 路由是否延迟解析 - * @return $this - */ - public function lazy(bool $lazy = true) - { - if (!$lazy) { - $this->parseGroupRule($this->rule); - $this->rule = null; - } - - return $this; - } - /** * 解析分组和域名的路由规则及绑定 * @access public @@ -246,6 +229,10 @@ class RuleGroup extends Rule */ public function parseGroupRule($rule): void { + if (is_null($rule)) { + return; + } + if (is_string($rule) && is_subclass_of($rule, Dispatch::class)) { $this->dispatcher($rule); return; @@ -254,13 +241,14 @@ class RuleGroup extends Rule $origin = $this->router->getGroup(); $this->router->setGroup($this); - if ($rule instanceof \Closure) { + if ($rule instanceof Closure) { Container::getInstance()->invokeFunction($rule); } elseif (is_string($rule) && $rule) { $this->router->bind($rule, $this->domain); } $this->router->setGroup($origin); + $this->hasParsed = true; } /** @@ -279,8 +267,7 @@ class RuleGroup extends Rule $regex = []; $items = []; - foreach ($rules as $key => $val) { - $item = $val[1]; + foreach ($rules as $key => $item) { if ($item instanceof RuleItem) { $rule = $depr . str_replace('/', $depr, $item->getRule()); if ($depr == $rule && $depr != $url) { @@ -368,11 +355,19 @@ class RuleGroup extends Rule /** * 获取分组的MISS路由 * @access public + * @param string $method 请求类型 * @return RuleItem|null */ - public function getMissRule(): ? RuleItem + public function getMissRule(string $method = '*'): ?RuleItem { - return $this->miss; + if (isset($this->miss[$method])) { + $miss = $this->miss[$method]; + } elseif (isset($this->miss['*'])) { + $miss = $this->miss['*']; + } else { + return null; + } + return $miss; } /** @@ -387,8 +382,7 @@ class RuleGroup extends Rule // 创建路由规则实例 $ruleItem = new RuleItem($this->router, $this, null, '', $route, strtolower($method)); - $ruleItem->setMiss(); - $this->miss = $ruleItem; + $this->miss[$method] = $ruleItem->setMiss(); return $ruleItem; } @@ -419,7 +413,7 @@ class RuleGroup extends Rule // 创建路由规则实例 $ruleItem = new RuleItem($this->router, $this, $name, $rule, $route, $method); - $this->addRuleItem($ruleItem, $method); + $this->addRuleItem($ruleItem); return $ruleItem; } @@ -428,21 +422,11 @@ class RuleGroup extends Rule * 注册分组下的路由规则 * @access public * @param Rule $rule 路由规则 - * @param string $method 请求类型 * @return $this */ - public function addRuleItem(Rule $rule, string $method = '*') + public function addRuleItem(Rule $rule) { - if (strpos($method, '|')) { - $rule->method($method); - $method = '*'; - } - - $this->rules[] = [$method, $rule]; - - if ($rule instanceof RuleItem && 'options' != $method) { - $this->rules[] = ['options', $rule->setAutoOptions()]; - } + $this->rules[] = $rule; return $this; } @@ -507,7 +491,8 @@ class RuleGroup extends Rule } return array_filter($this->rules, function ($item) use ($method) { - return $method == $item[0] || '*' == $item[0]; + $ruleMethod = $item->getMethod(); + return '*' == $ruleMethod || false !== strpos($ruleMethod, $method); }); } diff --git a/vendor/topthink/framework/src/think/route/RuleItem.php b/vendor/topthink/framework/src/think/route/RuleItem.php index e4e32468..cdde273e 100644 --- a/vendor/topthink/framework/src/think/route/RuleItem.php +++ b/vendor/topthink/framework/src/think/route/RuleItem.php @@ -38,7 +38,7 @@ class RuleItem extends Rule * @access public * @param Route $router 路由实例 * @param RuleGroup $parent 上级对象 - * @param string $name 路由标识 + * @param string|null $name 路由标识 * @param string $rule 路由规则 * @param string|\Closure $route 路由地址 * @param string $method 请求类型 @@ -77,27 +77,6 @@ class RuleItem extends Rule return $this->miss; } - /** - * 设置当前路由为自动注册OPTIONS - * @access public - * @return $this - */ - public function setAutoOptions() - { - $this->autoOption = true; - return $this; - } - - /** - * 判断当前路由规则是否为自动注册的OPTIONS路由 - * @access public - * @return bool - */ - public function isAutoOptions(): bool - { - return $this->autoOption; - } - /** * 获取当前路由的URL后缀 * @access public diff --git a/vendor/topthink/framework/src/think/route/RuleName.php b/vendor/topthink/framework/src/think/route/RuleName.php index 0684367c..dd93a0d6 100644 --- a/vendor/topthink/framework/src/think/route/RuleName.php +++ b/vendor/topthink/framework/src/think/route/RuleName.php @@ -113,8 +113,9 @@ class RuleName */ public function clear(): void { - $this->item = []; - $this->rule = []; + $this->item = []; + $this->rule = []; + $this->group = []; } /** diff --git a/vendor/topthink/framework/src/think/route/Url.php b/vendor/topthink/framework/src/think/route/Url.php index b3f8b9f5..9e60fca3 100644 --- a/vendor/topthink/framework/src/think/route/Url.php +++ b/vendor/topthink/framework/src/think/route/Url.php @@ -358,7 +358,7 @@ class Url * @access public * @return string */ - public function build() + public function build(): string { // 解析URL $url = $this->url; diff --git a/vendor/topthink/think-multi-app/composer.json b/vendor/topthink/think-multi-app/composer.json index 333d9e37..df25420c 100644 --- a/vendor/topthink/think-multi-app/composer.json +++ b/vendor/topthink/think-multi-app/composer.json @@ -1,6 +1,6 @@ { "name": "topthink/think-multi-app", - "description": "thinkphp6 multi app support", + "description": "thinkphp multi app support", "license": "Apache-2.0", "authors": [ { diff --git a/vendor/topthink/think-multi-app/src/MultiApp.php b/vendor/topthink/think-multi-app/src/MultiApp.php index b0ac260d..130d25ca 100644 --- a/vendor/topthink/think-multi-app/src/MultiApp.php +++ b/vendor/topthink/think-multi-app/src/MultiApp.php @@ -27,29 +27,9 @@ class MultiApp /** @var App */ protected $app; - /** - * 应用名称 - * @var string - */ - protected $name; - - /** - * 应用名称 - * @var string - */ - protected $appName; - - /** - * 应用路径 - * @var string - */ - protected $path; - public function __construct(App $app) { $this->app = $app; - $this->name = $this->app->http->getName(); - $this->path = $this->app->http->getPath(); } /** @@ -90,15 +70,15 @@ class MultiApp { $scriptName = $this->getScriptName(); $defaultApp = $this->app->config->get('app.default_app') ?: 'index'; + $appName = $this->app->http->getName(); - if ($this->name || ($scriptName && !in_array($scriptName, ['index', 'router', 'think']))) { - $appName = $this->name ?: $scriptName; + if ($appName || ($scriptName && !in_array($scriptName, ['index', 'router', 'think']))) { + $appName = $appName ?: $scriptName; $this->app->http->setBind(); } else { // 自动多应用识别 $this->app->http->setBind(false); - $appName = null; - $this->appName = ''; + $appName = null; $bind = $this->app->config->get('app.domain_bind', []); @@ -142,7 +122,7 @@ class MultiApp $appName = $map['*']; } else { $appName = $name ?: $defaultApp; - $appPath = $this->path ?: $this->app->getBasePath() . $appName . DIRECTORY_SEPARATOR; + $appPath = $this->app->http->getPath() ?: $this->app->getBasePath() . $appName . DIRECTORY_SEPARATOR; if (!is_dir($appPath)) { $express = $this->app->config->get('app.app_express', false); @@ -189,10 +169,9 @@ class MultiApp */ protected function setApp(string $appName): void { - $this->appName = $appName; $this->app->http->name($appName); - $appPath = $this->path ?: $this->app->getBasePath() . $appName . DIRECTORY_SEPARATOR; + $appPath = $this->app->http->getPath() ?: $this->app->getBasePath() . $appName . DIRECTORY_SEPARATOR; $this->app->setAppPath($appPath); // 设置应用命名空间 diff --git a/vendor/topthink/think-multi-app/src/Url.php b/vendor/topthink/think-multi-app/src/Url.php index df415ad6..34bf8da8 100644 --- a/vendor/topthink/think-multi-app/src/Url.php +++ b/vendor/topthink/think-multi-app/src/Url.php @@ -68,7 +68,7 @@ class Url extends UrlBuild return $url; } - public function build() + public function build(): string { // 解析URL $url = $this->url; diff --git a/vendor/w7corp/easywechat/README.md b/vendor/w7corp/easywechat/README.md index b759091d..d783674f 100644 --- a/vendor/w7corp/easywechat/README.md +++ b/vendor/w7corp/easywechat/README.md @@ -1,4 +1,4 @@ -# [EasyWeChat](https://www.easywechat.com) +# [EasyWeChat](https://easywechat.com) 📦 一个 PHP 微信开发 SDK,开源 SaaS 平台提供商 [微擎](https://www.w7.cc/) 旗下开源产品。 @@ -45,7 +45,7 @@ $response = $server->serve(); ## 文档和链接 -[官网](https://www.easywechat.com) · [讨论](https://github.com/w7corp/easywechat/discussions) · [更新策略](https://github.com/w7corp/easywechat/security/policy) +[官网](https://easywechat.com) · [讨论](https://github.com/w7corp/easywechat/discussions) · [更新策略](https://github.com/w7corp/easywechat/security/policy) ## :heart: 支持我 diff --git a/vendor/w7corp/easywechat/composer.json b/vendor/w7corp/easywechat/composer.json index a52d0947..18ae2c64 100644 --- a/vendor/w7corp/easywechat/composer.json +++ b/vendor/w7corp/easywechat/composer.json @@ -23,10 +23,9 @@ "ext-sodium": "*", "ext-libxml": "*", "ext-curl": "*", - "monolog/monolog": "^2.2", "nyholm/psr7": "^1.5", "nyholm/psr7-server": "^1.0", - "overtrue/socialite": "^3.5|^4.0.1", + "overtrue/socialite": "^3.5.4|^4.0.1", "psr/simple-cache": "^1.0|^2.0|^3.0", "psr/http-client": "^1.0", "symfony/cache": "^5.4|^6.0", diff --git a/vendor/w7corp/easywechat/docs/.npmrc b/vendor/w7corp/easywechat/docs/.npmrc new file mode 100644 index 00000000..3e775efb --- /dev/null +++ b/vendor/w7corp/easywechat/docs/.npmrc @@ -0,0 +1 @@ +auto-install-peers=true diff --git a/vendor/w7corp/easywechat/docs/package.json b/vendor/w7corp/easywechat/docs/package.json index 078544f0..c1469475 100644 --- a/vendor/w7corp/easywechat/docs/package.json +++ b/vendor/w7corp/easywechat/docs/package.json @@ -6,20 +6,19 @@ "preinstall": "npx only-allow pnpm" }, "dependencies": { - "@overtrue/easywechat-theme": "^1.0.5", - "autoprefixer": "^10.4.7", + "autoprefixer": "^10.4.12", "clipboard": "^2.0.11", "dynamics.js": "^1.1.5", - "gsap": "^3.10.4", - "postcss": "^8.4.14", - "postcss-import": "^14.1.0", - "tailwindcss": "^3.1.4", - "vitepress": "1.0.0-alpha.4", - "vue": "^3.2.37" + "gsap": "^3.11.3", + "tailwindcss": "^3.1.8" }, "devDependencies": { "@types/markdown-it": "^12.2.3", - "@types/node": "^16.11.41" + "@types/node": "^16.11.65", + "vitepress": "1.0.0-alpha.21", + "postcss": "^8.4.18", + "postcss-import": "^14.1.0", + "terser": "^5.15.1" }, "pnpm": { "peerDependencyRules": { diff --git a/vendor/w7corp/easywechat/docs/pnpm-lock.yaml b/vendor/w7corp/easywechat/docs/pnpm-lock.yaml index 497b7508..1494991b 100644 --- a/vendor/w7corp/easywechat/docs/pnpm-lock.yaml +++ b/vendor/w7corp/easywechat/docs/pnpm-lock.yaml @@ -1,175 +1,206 @@ -lockfileVersion: 5.4 +lockfileVersion: '6.0' -specifiers: - '@overtrue/easywechat-theme': ^1.0.5 - '@types/markdown-it': ^12.2.3 - '@types/node': ^16.11.41 - autoprefixer: ^10.4.7 - clipboard: ^2.0.11 - dynamics.js: ^1.1.5 - gsap: ^3.10.4 - postcss: ^8.4.14 - postcss-import: ^14.1.0 - tailwindcss: ^3.1.4 - vitepress: 1.0.0-alpha.4 - vue: ^3.2.37 +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false dependencies: - '@overtrue/easywechat-theme': 1.0.5_vue@3.2.37 - autoprefixer: 10.4.7_postcss@8.4.14 - clipboard: 2.0.11 - dynamics.js: 1.1.5 - gsap: 3.10.4 - postcss: 8.4.14 - postcss-import: 14.1.0_postcss@8.4.14 - tailwindcss: 3.1.4 - vitepress: 1.0.0-alpha.4 - vue: 3.2.37 + autoprefixer: + specifier: ^10.4.12 + version: 10.4.12(postcss@8.4.18) + clipboard: + specifier: ^2.0.11 + version: 2.0.11 + dynamics.js: + specifier: ^1.1.5 + version: 1.1.5 + gsap: + specifier: ^3.11.3 + version: 3.11.3 + tailwindcss: + specifier: ^3.1.8 + version: 3.1.8(postcss@8.4.18) devDependencies: - '@types/markdown-it': 12.2.3 - '@types/node': 16.11.41 + '@types/markdown-it': + specifier: ^12.2.3 + version: 12.2.3 + '@types/node': + specifier: ^16.11.65 + version: 16.11.65 + postcss: + specifier: ^8.4.18 + version: 8.4.18 + postcss-import: + specifier: ^14.1.0 + version: 14.1.0(postcss@8.4.18) + terser: + specifier: ^5.15.1 + version: 5.15.1 + vitepress: + specifier: 1.0.0-alpha.21 + version: 1.0.0-alpha.21(@types/node@16.11.65)(terser@5.15.1) packages: - /@algolia/autocomplete-core/1.6.3: - resolution: {integrity: sha512-dqQqRt01fX3YuVFrkceHsoCnzX0bLhrrg8itJI1NM68KjrPYQPYsE+kY8EZTCM4y8VDnhqJErR73xe/ZsV+qAA==} + /@algolia/autocomplete-core@1.7.1: + resolution: {integrity: sha512-eiZw+fxMzNQn01S8dA/hcCpoWCOCwcIIEUtHHdzN5TGB3IpzLbuhqFeTfh2OUhhgkE8Uo17+wH+QJ/wYyQmmzg==} dependencies: - '@algolia/autocomplete-shared': 1.6.3 - dev: false + '@algolia/autocomplete-shared': 1.7.1 + dev: true - /@algolia/autocomplete-shared/1.6.3: - resolution: {integrity: sha512-UV46bnkTztyADFaETfzFC5ryIdGVb2zpAoYgu0tfcuYWjhg1KbLXveFffZIrGVoboqmAk1b+jMrl6iCja1i3lg==} - dev: false - - /@algolia/cache-browser-local-storage/4.13.1: - resolution: {integrity: sha512-UAUVG2PEfwd/FfudsZtYnidJ9eSCpS+LW9cQiesePQLz41NAcddKxBak6eP2GErqyFagSlnVXe/w2E9h2m2ttg==} + /@algolia/autocomplete-preset-algolia@1.7.1(algoliasearch@4.14.2): + resolution: {integrity: sha512-pJwmIxeJCymU1M6cGujnaIYcY3QPOVYZOXhFkWVM7IxKzy272BwCvMFMyc5NpG/QmiObBxjo7myd060OeTNJXg==} + peerDependencies: + '@algolia/client-search': ^4.9.1 + algoliasearch: ^4.9.1 + peerDependenciesMeta: + '@algolia/client-search': + optional: true dependencies: - '@algolia/cache-common': 4.13.1 - dev: false + '@algolia/autocomplete-shared': 1.7.1 + algoliasearch: 4.14.2 + dev: true - /@algolia/cache-common/4.13.1: - resolution: {integrity: sha512-7Vaf6IM4L0Jkl3sYXbwK+2beQOgVJ0mKFbz/4qSxKd1iy2Sp77uTAazcX+Dlexekg1fqGUOSO7HS4Sx47ZJmjA==} - dev: false + /@algolia/autocomplete-shared@1.7.1: + resolution: {integrity: sha512-eTmGVqY3GeyBTT8IWiB2K5EuURAqhnumfktAEoHxfDY2o7vg2rSnO16ZtIG0fMgt3py28Vwgq42/bVEuaQV7pg==} + dev: true - /@algolia/cache-in-memory/4.13.1: - resolution: {integrity: sha512-pZzybCDGApfA/nutsFK1P0Sbsq6fYJU3DwIvyKg4pURerlJM4qZbB9bfLRef0FkzfQu7W11E4cVLCIOWmyZeuQ==} + /@algolia/cache-browser-local-storage@4.14.2: + resolution: {integrity: sha512-FRweBkK/ywO+GKYfAWbrepewQsPTIEirhi1BdykX9mxvBPtGNKccYAxvGdDCumU1jL4r3cayio4psfzKMejBlA==} dependencies: - '@algolia/cache-common': 4.13.1 - dev: false + '@algolia/cache-common': 4.14.2 + dev: true - /@algolia/client-account/4.13.1: - resolution: {integrity: sha512-TFLiZ1KqMiir3FNHU+h3b0MArmyaHG+eT8Iojio6TdpeFcAQ1Aiy+2gb3SZk3+pgRJa/BxGmDkRUwE5E/lv3QQ==} + /@algolia/cache-common@4.14.2: + resolution: {integrity: sha512-SbvAlG9VqNanCErr44q6lEKD2qoK4XtFNx9Qn8FK26ePCI8I9yU7pYB+eM/cZdS9SzQCRJBbHUumVr4bsQ4uxg==} + dev: true + + /@algolia/cache-in-memory@4.14.2: + resolution: {integrity: sha512-HrOukWoop9XB/VFojPv1R5SVXowgI56T9pmezd/djh2JnVN/vXswhXV51RKy4nCpqxyHt/aGFSq2qkDvj6KiuQ==} dependencies: - '@algolia/client-common': 4.13.1 - '@algolia/client-search': 4.13.1 - '@algolia/transporter': 4.13.1 - dev: false + '@algolia/cache-common': 4.14.2 + dev: true - /@algolia/client-analytics/4.13.1: - resolution: {integrity: sha512-iOS1JBqh7xaL5x00M5zyluZ9+9Uy9GqtYHv/2SMuzNW1qP7/0doz1lbcsP3S7KBbZANJTFHUOfuqyRLPk91iFA==} + /@algolia/client-account@4.14.2: + resolution: {integrity: sha512-WHtriQqGyibbb/Rx71YY43T0cXqyelEU0lB2QMBRXvD2X0iyeGl4qMxocgEIcbHyK7uqE7hKgjT8aBrHqhgc1w==} dependencies: - '@algolia/client-common': 4.13.1 - '@algolia/client-search': 4.13.1 - '@algolia/requester-common': 4.13.1 - '@algolia/transporter': 4.13.1 - dev: false + '@algolia/client-common': 4.14.2 + '@algolia/client-search': 4.14.2 + '@algolia/transporter': 4.14.2 + dev: true - /@algolia/client-common/4.13.1: - resolution: {integrity: sha512-LcDoUE0Zz3YwfXJL6lJ2OMY2soClbjrrAKB6auYVMNJcoKZZ2cbhQoFR24AYoxnGUYBER/8B+9sTBj5bj/Gqbg==} + /@algolia/client-analytics@4.14.2: + resolution: {integrity: sha512-yBvBv2mw+HX5a+aeR0dkvUbFZsiC4FKSnfqk9rrfX+QrlNOKEhCG0tJzjiOggRW4EcNqRmaTULIYvIzQVL2KYQ==} dependencies: - '@algolia/requester-common': 4.13.1 - '@algolia/transporter': 4.13.1 - dev: false + '@algolia/client-common': 4.14.2 + '@algolia/client-search': 4.14.2 + '@algolia/requester-common': 4.14.2 + '@algolia/transporter': 4.14.2 + dev: true - /@algolia/client-personalization/4.13.1: - resolution: {integrity: sha512-1CqrOW1ypVrB4Lssh02hP//YxluoIYXAQCpg03L+/RiXJlCs+uIqlzC0ctpQPmxSlTK6h07kr50JQoYH/TIM9w==} + /@algolia/client-common@4.14.2: + resolution: {integrity: sha512-43o4fslNLcktgtDMVaT5XwlzsDPzlqvqesRi4MjQz2x4/Sxm7zYg5LRYFol1BIhG6EwxKvSUq8HcC/KxJu3J0Q==} dependencies: - '@algolia/client-common': 4.13.1 - '@algolia/requester-common': 4.13.1 - '@algolia/transporter': 4.13.1 - dev: false + '@algolia/requester-common': 4.14.2 + '@algolia/transporter': 4.14.2 + dev: true - /@algolia/client-search/4.13.1: - resolution: {integrity: sha512-YQKYA83MNRz3FgTNM+4eRYbSmHi0WWpo019s5SeYcL3HUan/i5R09VO9dk3evELDFJYciiydSjbsmhBzbpPP2A==} + /@algolia/client-personalization@4.14.2: + resolution: {integrity: sha512-ACCoLi0cL8CBZ1W/2juehSltrw2iqsQBnfiu/Rbl9W2yE6o2ZUb97+sqN/jBqYNQBS+o0ekTMKNkQjHHAcEXNw==} dependencies: - '@algolia/client-common': 4.13.1 - '@algolia/requester-common': 4.13.1 - '@algolia/transporter': 4.13.1 - dev: false + '@algolia/client-common': 4.14.2 + '@algolia/requester-common': 4.14.2 + '@algolia/transporter': 4.14.2 + dev: true - /@algolia/logger-common/4.13.1: - resolution: {integrity: sha512-L6slbL/OyZaAXNtS/1A8SAbOJeEXD5JcZeDCPYDqSTYScfHu+2ePRTDMgUTY4gQ7HsYZ39N1LujOd8WBTmM2Aw==} - dev: false - - /@algolia/logger-console/4.13.1: - resolution: {integrity: sha512-7jQOTftfeeLlnb3YqF8bNgA2GZht7rdKkJ31OCeSH2/61haO0tWPoNRjZq9XLlgMQZH276pPo0NdiArcYPHjCA==} + /@algolia/client-search@4.14.2: + resolution: {integrity: sha512-L5zScdOmcZ6NGiVbLKTvP02UbxZ0njd5Vq9nJAmPFtjffUSOGEp11BmD2oMJ5QvARgx2XbX4KzTTNS5ECYIMWw==} dependencies: - '@algolia/logger-common': 4.13.1 - dev: false + '@algolia/client-common': 4.14.2 + '@algolia/requester-common': 4.14.2 + '@algolia/transporter': 4.14.2 + dev: true - /@algolia/requester-browser-xhr/4.13.1: - resolution: {integrity: sha512-oa0CKr1iH6Nc7CmU6RE7TnXMjHnlyp7S80pP/LvZVABeJHX3p/BcSCKovNYWWltgTxUg0U1o+2uuy8BpMKljwA==} + /@algolia/logger-common@4.14.2: + resolution: {integrity: sha512-/JGlYvdV++IcMHBnVFsqEisTiOeEr6cUJtpjz8zc0A9c31JrtLm318Njc72p14Pnkw3A/5lHHh+QxpJ6WFTmsA==} + dev: true + + /@algolia/logger-console@4.14.2: + resolution: {integrity: sha512-8S2PlpdshbkwlLCSAB5f8c91xyc84VM9Ar9EdfE9UmX+NrKNYnWR1maXXVDQQoto07G1Ol/tYFnFVhUZq0xV/g==} dependencies: - '@algolia/requester-common': 4.13.1 - dev: false + '@algolia/logger-common': 4.14.2 + dev: true - /@algolia/requester-common/4.13.1: - resolution: {integrity: sha512-eGVf0ID84apfFEuXsaoSgIxbU3oFsIbz4XiotU3VS8qGCJAaLVUC5BUJEkiFENZIhon7hIB4d0RI13HY4RSA+w==} - dev: false - - /@algolia/requester-node-http/4.13.1: - resolution: {integrity: sha512-7C0skwtLdCz5heKTVe/vjvrqgL/eJxmiEjHqXdtypcE5GCQCYI15cb+wC4ytYioZDMiuDGeVYmCYImPoEgUGPw==} + /@algolia/requester-browser-xhr@4.14.2: + resolution: {integrity: sha512-CEh//xYz/WfxHFh7pcMjQNWgpl4wFB85lUMRyVwaDPibNzQRVcV33YS+63fShFWc2+42YEipFGH2iPzlpszmDw==} dependencies: - '@algolia/requester-common': 4.13.1 - dev: false + '@algolia/requester-common': 4.14.2 + dev: true - /@algolia/transporter/4.13.1: - resolution: {integrity: sha512-pICnNQN7TtrcYJqqPEXByV8rJ8ZRU2hCiIKLTLRyNpghtQG3VAFk6fVtdzlNfdUGZcehSKGarPIZEHlQXnKjgw==} + /@algolia/requester-common@4.14.2: + resolution: {integrity: sha512-73YQsBOKa5fvVV3My7iZHu1sUqmjjfs9TteFWwPwDmnad7T0VTCopttcsM3OjLxZFtBnX61Xxl2T2gmG2O4ehg==} + dev: true + + /@algolia/requester-node-http@4.14.2: + resolution: {integrity: sha512-oDbb02kd1o5GTEld4pETlPZLY0e+gOSWjWMJHWTgDXbv9rm/o2cF7japO6Vj1ENnrqWvLBmW1OzV9g6FUFhFXg==} dependencies: - '@algolia/cache-common': 4.13.1 - '@algolia/logger-common': 4.13.1 - '@algolia/requester-common': 4.13.1 - dev: false + '@algolia/requester-common': 4.14.2 + dev: true - /@babel/helper-validator-identifier/7.16.7: - resolution: {integrity: sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==} + /@algolia/transporter@4.14.2: + resolution: {integrity: sha512-t89dfQb2T9MFQHidjHcfhh6iGMNwvuKUvojAj+JsrHAGbuSy7yE4BylhLX6R0Q1xYRoC4Vvv+O5qIw/LdnQfsQ==} + dependencies: + '@algolia/cache-common': 4.14.2 + '@algolia/logger-common': 4.14.2 + '@algolia/requester-common': 4.14.2 + dev: true + + /@babel/helper-string-parser@7.19.4: + resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} engines: {node: '>=6.9.0'} - dev: false + dev: true - /@babel/parser/7.18.5: - resolution: {integrity: sha512-YZWVaglMiplo7v8f1oMQ5ZPQr0vn7HPeZXxXWsxXJRjGVrzUFn9OxFQl1sb5wzfootjA/yChhW84BV+383FSOw==} + /@babel/helper-validator-identifier@7.19.1: + resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/parser@7.19.4: + resolution: {integrity: sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.18.4 - dev: false + '@babel/types': 7.19.4 + dev: true - /@babel/types/7.18.4: - resolution: {integrity: sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==} + /@babel/types@7.19.4: + resolution: {integrity: sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.16.7 + '@babel/helper-string-parser': 7.19.4 + '@babel/helper-validator-identifier': 7.19.1 to-fast-properties: 2.0.0 - dev: false + dev: true - /@docsearch/css/3.1.0: - resolution: {integrity: sha512-bh5IskwkkodbvC0FzSg1AxMykfDl95hebEKwxNoq4e5QaGzOXSBgW8+jnMFZ7JU4sTBiB04vZWoUSzNrPboLZA==} - dev: false + /@docsearch/css@3.2.1: + resolution: {integrity: sha512-gaP6TxxwQC+K8D6TRx5WULUWKrcbzECOPA2KCVMuI+6C7dNiGUk5yXXzVhc5sld79XKYLnO9DRTI4mjXDYkh+g==} + dev: true - /@docsearch/js/3.1.0: - resolution: {integrity: sha512-5XSK+xbP0hcTIp54MECqxkWLs6kf7Ug4nWdxWNtx8cUpLiFNFnKXDxCb35wnyNpjukmrx7Q9DkO5tFFsmNVxng==} + /@docsearch/js@3.2.1: + resolution: {integrity: sha512-H1PekEtSeS0msetR2YGGey2w7jQ2wAKfGODJvQTygSwMgUZ+2DHpzUgeDyEBIXRIfaBcoQneqrzsljM62pm6Xg==} dependencies: - '@docsearch/react': 3.1.0 - preact: 10.8.2 + '@docsearch/react': 3.2.1 + preact: 10.11.2 transitivePeerDependencies: + - '@algolia/client-search' - '@types/react' - react - react-dom - dev: false + dev: true - /@docsearch/react/3.1.0: - resolution: {integrity: sha512-bjB6ExnZzf++5B7Tfoi6UXgNwoUnNOfZ1NyvnvPhWgCMy5V/biAtLL4o7owmZSYdAKeFSvZ5Lxm0is4su/dBWg==} + /@docsearch/react@3.2.1: + resolution: {integrity: sha512-EzTQ/y82s14IQC5XVestiK/kFFMe2aagoYFuTAIfIb/e+4FU7kSMKonRtLwsCiLQHmjvNQq+HO+33giJ5YVtaQ==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' react: '>= 16.8.0 < 19.0.0' @@ -182,12 +213,70 @@ packages: react-dom: optional: true dependencies: - '@algolia/autocomplete-core': 1.6.3 - '@docsearch/css': 3.1.0 - algoliasearch: 4.13.1 - dev: false + '@algolia/autocomplete-core': 1.7.1 + '@algolia/autocomplete-preset-algolia': 1.7.1(algoliasearch@4.14.2) + '@docsearch/css': 3.2.1 + algoliasearch: 4.14.2 + transitivePeerDependencies: + - '@algolia/client-search' + dev: true - /@nodelib/fs.scandir/2.1.5: + /@esbuild/android-arm@0.15.11: + resolution: {integrity: sha512-PzMcQLazLBkwDEkrNPi9AbjFt6+3I7HKbiYF2XtWQ7wItrHvEOeO3T8Am434zAozWtVP7lrTue1bEfc2nYWeCA==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.15.11: + resolution: {integrity: sha512-geWp637tUhNmhL3Xgy4Bj703yXB9dqiLJe05lCUfjSFDrQf9C/8pArusyPUbUbPwlC/EAUjBw32sxuIl/11dZw==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@jridgewell/gen-mapping@0.3.2: + resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.2 + '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/trace-mapping': 0.3.17 + dev: true + + /@jridgewell/resolve-uri@3.1.0: + resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/set-array@1.1.2: + resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/source-map@0.3.2: + resolution: {integrity: sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==} + dependencies: + '@jridgewell/gen-mapping': 0.3.2 + '@jridgewell/trace-mapping': 0.3.17 + dev: true + + /@jridgewell/sourcemap-codec@1.4.14: + resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} + dev: true + + /@jridgewell/trace-mapping@0.3.17: + resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==} + dependencies: + '@jridgewell/resolve-uri': 3.1.0 + '@jridgewell/sourcemap-codec': 1.4.14 + dev: true + + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} dependencies: @@ -195,12 +284,12 @@ packages: run-parallel: 1.2.0 dev: false - /@nodelib/fs.stat/2.0.5: + /@nodelib/fs.stat@2.0.5: resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} engines: {node: '>= 8'} dev: false - /@nodelib/fs.walk/1.2.8: + /@nodelib/fs.walk@1.2.8: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} dependencies: @@ -208,213 +297,153 @@ packages: fastq: 1.13.0 dev: false - /@overtrue/easywechat-theme/1.0.5_vue@3.2.37: - resolution: {integrity: sha512-lAhge9nsO1rmfstWMd30qF8vWt3x2SuA1rc/i6FbctvGv7NzoN5p4Z4gIfxutcMiVJqdWYsCTFlTXH4bM5sPxg==} - dependencies: - '@docsearch/css': 3.1.0 - '@docsearch/js': 3.1.0 - '@vueuse/core': 7.7.1_vue@3.2.37 - body-scroll-lock: 3.1.5 - normalize.css: 8.0.1 - shiki: 0.9.15 - transitivePeerDependencies: - - '@types/react' - - '@vue/composition-api' - - react - - react-dom - - vue - dev: false - - /@types/linkify-it/3.0.2: + /@types/linkify-it@3.0.2: resolution: {integrity: sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==} dev: true - /@types/markdown-it/12.2.3: + /@types/markdown-it@12.2.3: resolution: {integrity: sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==} dependencies: '@types/linkify-it': 3.0.2 '@types/mdurl': 1.0.2 dev: true - /@types/mdurl/1.0.2: + /@types/mdurl@1.0.2: resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==} dev: true - /@types/node/16.11.41: - resolution: {integrity: sha512-mqoYK2TnVjdkGk8qXAVGc/x9nSaTpSrFaGFm43BUH3IdoBV0nta6hYaGmdOvIMlbHJbUEVen3gvwpwovAZKNdQ==} + /@types/node@16.11.65: + resolution: {integrity: sha512-Vfz7wGMOr4jbQGiQHVJm8VjeQwM9Ya7mHe9LtQ264/Epf5n1KiZShOFqk++nBzw6a/ubgYdB9Od7P+MH/LjoWw==} dev: true - /@types/web-bluetooth/0.0.14: - resolution: {integrity: sha512-5d2RhCard1nQUC3aHcq/gHzWYO6K0WJmAbjO7mQJgCQKtZpgXxv1rOM6O/dBDhDYYVutk1sciOgNSe+5YyfM8A==} - dev: false + /@types/web-bluetooth@0.0.15: + resolution: {integrity: sha512-w7hEHXnPMEZ+4nGKl/KDRVpxkwYxYExuHOYXyzIzCDzEZ9ZCGMAewulr9IqJu2LR4N37fcnb1XVeuZ09qgOxhA==} + dev: true - /@vitejs/plugin-vue/2.3.3_vite@2.9.12+vue@3.2.37: - resolution: {integrity: sha512-SmQLDyhz+6lGJhPELsBdzXGc+AcaT8stgkbiTFGpXPe8Tl1tJaBw1A6pxDqDuRsVkD8uscrkx3hA7QDOoKYtyw==} - engines: {node: '>=12.0.0'} + /@vitejs/plugin-vue@3.1.2(vite@3.2.7)(vue@3.2.41): + resolution: {integrity: sha512-3zxKNlvA3oNaKDYX0NBclgxTQ1xaFdL7PzwF6zj9tGFziKwmBa3Q/6XcJQxudlT81WxDjEhHmevvIC4Orc1LhQ==} + engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: - vite: ^2.5.10 + vite: ^3.0.0 vue: ^3.2.25 dependencies: - vite: 2.9.12 - vue: 3.2.37 - dev: false + vite: 3.2.7(@types/node@16.11.65)(terser@5.15.1) + vue: 3.2.41 + dev: true - /@vue/compiler-core/3.2.37: - resolution: {integrity: sha512-81KhEjo7YAOh0vQJoSmAD68wLfYqJvoiD4ulyedzF+OEk/bk6/hx3fTNVfuzugIIaTrOx4PGx6pAiBRe5e9Zmg==} + /@vue/compiler-core@3.2.41: + resolution: {integrity: sha512-oA4mH6SA78DT+96/nsi4p9DX97PHcNROxs51lYk7gb9Z4BPKQ3Mh+BLn6CQZBw857Iuhu28BfMSRHAlPvD4vlw==} dependencies: - '@babel/parser': 7.18.5 - '@vue/shared': 3.2.37 + '@babel/parser': 7.19.4 + '@vue/shared': 3.2.41 estree-walker: 2.0.2 source-map: 0.6.1 - dev: false + dev: true - /@vue/compiler-dom/3.2.37: - resolution: {integrity: sha512-yxJLH167fucHKxaqXpYk7x8z7mMEnXOw3G2q62FTkmsvNxu4FQSu5+3UMb+L7fjKa26DEzhrmCxAgFLLIzVfqQ==} + /@vue/compiler-dom@3.2.41: + resolution: {integrity: sha512-xe5TbbIsonjENxJsYRbDJvthzqxLNk+tb3d/c47zgREDa/PCp6/Y4gC/skM4H6PIuX5DAxm7fFJdbjjUH2QTMw==} dependencies: - '@vue/compiler-core': 3.2.37 - '@vue/shared': 3.2.37 - dev: false + '@vue/compiler-core': 3.2.41 + '@vue/shared': 3.2.41 + dev: true - /@vue/compiler-sfc/3.2.37: - resolution: {integrity: sha512-+7i/2+9LYlpqDv+KTtWhOZH+pa8/HnX/905MdVmAcI/mPQOBwkHHIzrsEsucyOIZQYMkXUiTkmZq5am/NyXKkg==} + /@vue/compiler-sfc@3.2.41: + resolution: {integrity: sha512-+1P2m5kxOeaxVmJNXnBskAn3BenbTmbxBxWOtBq3mQTCokIreuMULFantBUclP0+KnzNCMOvcnKinqQZmiOF8w==} dependencies: - '@babel/parser': 7.18.5 - '@vue/compiler-core': 3.2.37 - '@vue/compiler-dom': 3.2.37 - '@vue/compiler-ssr': 3.2.37 - '@vue/reactivity-transform': 3.2.37 - '@vue/shared': 3.2.37 + '@babel/parser': 7.19.4 + '@vue/compiler-core': 3.2.41 + '@vue/compiler-dom': 3.2.41 + '@vue/compiler-ssr': 3.2.41 + '@vue/reactivity-transform': 3.2.41 + '@vue/shared': 3.2.41 estree-walker: 2.0.2 magic-string: 0.25.9 - postcss: 8.4.14 + postcss: 8.4.18 source-map: 0.6.1 - dev: false + dev: true - /@vue/compiler-ssr/3.2.37: - resolution: {integrity: sha512-7mQJD7HdXxQjktmsWp/J67lThEIcxLemz1Vb5I6rYJHR5vI+lON3nPGOH3ubmbvYGt8xEUaAr1j7/tIFWiEOqw==} + /@vue/compiler-ssr@3.2.41: + resolution: {integrity: sha512-Y5wPiNIiaMz/sps8+DmhaKfDm1xgj6GrH99z4gq2LQenfVQcYXmHIOBcs5qPwl7jaW3SUQWjkAPKMfQemEQZwQ==} dependencies: - '@vue/compiler-dom': 3.2.37 - '@vue/shared': 3.2.37 - dev: false + '@vue/compiler-dom': 3.2.41 + '@vue/shared': 3.2.41 + dev: true - /@vue/devtools-api/6.1.4: - resolution: {integrity: sha512-IiA0SvDrJEgXvVxjNkHPFfDx6SXw0b/TUkqMcDZWNg9fnCAHbTpoo59YfJ9QLFkwa3raau5vSlRVzMSLDnfdtQ==} - dev: false + /@vue/devtools-api@6.4.4: + resolution: {integrity: sha512-Ku31WzpOV/8cruFaXaEZKF81WkNnvCSlBY4eOGtz5WMSdJvX1v1WWlSMGZeqUwPtQ27ZZz7B62erEMq8JDjcXw==} + dev: true - /@vue/reactivity-transform/3.2.37: - resolution: {integrity: sha512-IWopkKEb+8qpu/1eMKVeXrK0NLw9HicGviJzhJDEyfxTR9e1WtpnnbYkJWurX6WwoFP0sz10xQg8yL8lgskAZg==} + /@vue/reactivity-transform@3.2.41: + resolution: {integrity: sha512-mK5+BNMsL4hHi+IR3Ft/ho6Za+L3FA5j8WvreJ7XzHrqkPq8jtF/SMo7tuc9gHjLDwKZX1nP1JQOKo9IEAn54A==} dependencies: - '@babel/parser': 7.18.5 - '@vue/compiler-core': 3.2.37 - '@vue/shared': 3.2.37 + '@babel/parser': 7.19.4 + '@vue/compiler-core': 3.2.41 + '@vue/shared': 3.2.41 estree-walker: 2.0.2 magic-string: 0.25.9 - dev: false + dev: true - /@vue/reactivity/3.2.37: - resolution: {integrity: sha512-/7WRafBOshOc6m3F7plwzPeCu/RCVv9uMpOwa/5PiY1Zz+WLVRWiy0MYKwmg19KBdGtFWsmZ4cD+LOdVPcs52A==} + /@vue/reactivity@3.2.41: + resolution: {integrity: sha512-9JvCnlj8uc5xRiQGZ28MKGjuCoPhhTwcoAdv3o31+cfGgonwdPNuvqAXLhlzu4zwqavFEG5tvaoINQEfxz+l6g==} dependencies: - '@vue/shared': 3.2.37 - dev: false + '@vue/shared': 3.2.41 + dev: true - /@vue/runtime-core/3.2.37: - resolution: {integrity: sha512-JPcd9kFyEdXLl/i0ClS7lwgcs0QpUAWj+SKX2ZC3ANKi1U4DOtiEr6cRqFXsPwY5u1L9fAjkinIdB8Rz3FoYNQ==} + /@vue/runtime-core@3.2.41: + resolution: {integrity: sha512-0LBBRwqnI0p4FgIkO9q2aJBBTKDSjzhnxrxHYengkAF6dMOjeAIZFDADAlcf2h3GDALWnblbeprYYpItiulSVQ==} dependencies: - '@vue/reactivity': 3.2.37 - '@vue/shared': 3.2.37 - dev: false + '@vue/reactivity': 3.2.41 + '@vue/shared': 3.2.41 + dev: true - /@vue/runtime-dom/3.2.37: - resolution: {integrity: sha512-HimKdh9BepShW6YozwRKAYjYQWg9mQn63RGEiSswMbW+ssIht1MILYlVGkAGGQbkhSh31PCdoUcfiu4apXJoPw==} + /@vue/runtime-dom@3.2.41: + resolution: {integrity: sha512-U7zYuR1NVIP8BL6jmOqmapRAHovEFp7CSw4pR2FacqewXNGqZaRfHoNLQsqQvVQ8yuZNZtxSZy0FFyC70YXPpA==} dependencies: - '@vue/runtime-core': 3.2.37 - '@vue/shared': 3.2.37 - csstype: 2.6.20 - dev: false + '@vue/runtime-core': 3.2.41 + '@vue/shared': 3.2.41 + csstype: 2.6.21 + dev: true - /@vue/server-renderer/3.2.37_vue@3.2.37: - resolution: {integrity: sha512-kLITEJvaYgZQ2h47hIzPh2K3jG8c1zCVbp/o/bzQOyvzaKiCquKS7AaioPI28GNxIsE/zSx+EwWYsNxDCX95MA==} + /@vue/server-renderer@3.2.41(vue@3.2.41): + resolution: {integrity: sha512-7YHLkfJdTlsZTV0ae5sPwl9Gn/EGr2hrlbcS/8naXm2CDpnKUwC68i1wGlrYAfIgYWL7vUZwk2GkYLQH5CvFig==} peerDependencies: - vue: 3.2.37 + vue: 3.2.41 dependencies: - '@vue/compiler-ssr': 3.2.37 - '@vue/shared': 3.2.37 - vue: 3.2.37 - dev: false + '@vue/compiler-ssr': 3.2.41 + '@vue/shared': 3.2.41 + vue: 3.2.41 + dev: true - /@vue/shared/3.2.37: - resolution: {integrity: sha512-4rSJemR2NQIo9Klm1vabqWjD8rs/ZaJSzMxkMNeJS6lHiUjjUeYFbooN19NgFjztubEKh3WlZUeOLVdbbUWHsw==} - dev: false + /@vue/shared@3.2.41: + resolution: {integrity: sha512-W9mfWLHmJhkfAmV+7gDjcHeAWALQtgGT3JErxULl0oz6R6+3ug91I7IErs93eCFhPCZPHBs4QJS7YWEV7A3sxw==} + dev: true - /@vueuse/core/7.7.1_vue@3.2.37: - resolution: {integrity: sha512-PRRgbATMpoeUmkCEBtUeJgOwtew8s+4UsEd+Pm7MhkjL2ihCNrSqxNVtM6NFE4uP2sWnkGcZpCjPuNSxowJ1Ow==} - peerDependencies: - '@vue/composition-api': ^1.1.0 - vue: ^2.6.0 || ^3.2.0 - peerDependenciesMeta: - '@vue/composition-api': - optional: true - vue: - optional: true + /@vueuse/core@9.3.0(vue@3.2.41): + resolution: {integrity: sha512-64Rna8IQDWpdrJxgitDg7yv1yTp41ZmvV8zlLEylK4QQLWAhz1OFGZDPZ8bU4lwcGgbEJ2sGi2jrdNh4LttUSQ==} dependencies: - '@vueuse/shared': 7.7.1_vue@3.2.37 - vue: 3.2.37 - vue-demi: 0.13.1_vue@3.2.37 - dev: false + '@types/web-bluetooth': 0.0.15 + '@vueuse/metadata': 9.3.0 + '@vueuse/shared': 9.3.0(vue@3.2.41) + vue-demi: 0.13.11(vue@3.2.41) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: true - /@vueuse/core/8.7.5_vue@3.2.37: - resolution: {integrity: sha512-tqgzeZGoZcXzoit4kOGLWJibDMLp0vdm6ZO41SSUQhkhtrPhAg6dbIEPiahhUu6sZAmSYvVrZgEr5aKD51nrLA==} - peerDependencies: - '@vue/composition-api': ^1.1.0 - vue: ^2.6.0 || ^3.2.0 - peerDependenciesMeta: - '@vue/composition-api': - optional: true - vue: - optional: true + /@vueuse/metadata@9.3.0: + resolution: {integrity: sha512-GnnfjbzIPJIh9ngL9s9oGU1+Hx/h5/KFqTfJykzh/1xjaHkedV9g0MASpdmPZIP+ynNhKAcEfA6g5i8KXwtoMA==} + dev: true + + /@vueuse/shared@9.3.0(vue@3.2.41): + resolution: {integrity: sha512-caGUWLY0DpPC6l31KxeUy6vPVNA0yKxx81jFYLoMpyP6cF84FG5Dkf69DfSUqL57wX8JcUkJDMnQaQIZPWFEQQ==} dependencies: - '@types/web-bluetooth': 0.0.14 - '@vueuse/metadata': 8.7.5 - '@vueuse/shared': 8.7.5_vue@3.2.37 - vue: 3.2.37 - vue-demi: 0.13.1_vue@3.2.37 - dev: false + vue-demi: 0.13.11(vue@3.2.41) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: true - /@vueuse/metadata/8.7.5: - resolution: {integrity: sha512-emJZKRQSaEnVqmlu39NpNp8iaW+bPC2kWykWoWOZMSlO/0QVEmO/rt8A5VhOEJTKLX3vwTevqbiRy9WJRwVOQg==} - dev: false - - /@vueuse/shared/7.7.1_vue@3.2.37: - resolution: {integrity: sha512-rN2qd22AUl7VdBxihagWyhUNHCyVk9IpvBTTfHoLH9G7rGE552X1f+zeCfehuno0zXif13jPw+icW/wn2a0rnQ==} - peerDependencies: - '@vue/composition-api': ^1.1.0 - vue: ^2.6.0 || ^3.2.0 - peerDependenciesMeta: - '@vue/composition-api': - optional: true - vue: - optional: true - dependencies: - vue: 3.2.37 - vue-demi: 0.13.1_vue@3.2.37 - dev: false - - /@vueuse/shared/8.7.5_vue@3.2.37: - resolution: {integrity: sha512-THXPvMBFmg6Gf6AwRn/EdTh2mhqwjGsB2Yfp374LNQSQVKRHtnJ0I42bsZTn7nuEliBxqUrGQm/lN6qUHmhJLw==} - peerDependencies: - '@vue/composition-api': ^1.1.0 - vue: ^2.6.0 || ^3.2.0 - peerDependenciesMeta: - '@vue/composition-api': - optional: true - vue: - optional: true - dependencies: - vue: 3.2.37 - vue-demi: 0.13.1_vue@3.2.37 - dev: false - - /acorn-node/1.8.2: + /acorn-node@1.8.2: resolution: {integrity: sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==} dependencies: acorn: 7.4.1 @@ -422,37 +451,43 @@ packages: xtend: 4.0.2 dev: false - /acorn-walk/7.2.0: + /acorn-walk@7.2.0: resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} engines: {node: '>=0.4.0'} dev: false - /acorn/7.4.1: + /acorn@7.4.1: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} engines: {node: '>=0.4.0'} hasBin: true dev: false - /algoliasearch/4.13.1: - resolution: {integrity: sha512-dtHUSE0caWTCE7liE1xaL+19AFf6kWEcyn76uhcitWpntqvicFHXKFoZe5JJcv9whQOTRM6+B8qJz6sFj+rDJA==} - dependencies: - '@algolia/cache-browser-local-storage': 4.13.1 - '@algolia/cache-common': 4.13.1 - '@algolia/cache-in-memory': 4.13.1 - '@algolia/client-account': 4.13.1 - '@algolia/client-analytics': 4.13.1 - '@algolia/client-common': 4.13.1 - '@algolia/client-personalization': 4.13.1 - '@algolia/client-search': 4.13.1 - '@algolia/logger-common': 4.13.1 - '@algolia/logger-console': 4.13.1 - '@algolia/requester-browser-xhr': 4.13.1 - '@algolia/requester-common': 4.13.1 - '@algolia/requester-node-http': 4.13.1 - '@algolia/transporter': 4.13.1 - dev: false + /acorn@8.8.0: + resolution: {integrity: sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true - /anymatch/3.1.2: + /algoliasearch@4.14.2: + resolution: {integrity: sha512-ngbEQonGEmf8dyEh5f+uOIihv4176dgbuOZspiuhmTTBRBuzWu3KCGHre6uHj5YyuC7pNvQGzB6ZNJyZi0z+Sg==} + dependencies: + '@algolia/cache-browser-local-storage': 4.14.2 + '@algolia/cache-common': 4.14.2 + '@algolia/cache-in-memory': 4.14.2 + '@algolia/client-account': 4.14.2 + '@algolia/client-analytics': 4.14.2 + '@algolia/client-common': 4.14.2 + '@algolia/client-personalization': 4.14.2 + '@algolia/client-search': 4.14.2 + '@algolia/logger-common': 4.14.2 + '@algolia/logger-console': 4.14.2 + '@algolia/requester-browser-xhr': 4.14.2 + '@algolia/requester-common': 4.14.2 + '@algolia/requester-node-http': 4.14.2 + '@algolia/transporter': 4.14.2 + dev: true + + /anymatch@3.1.2: resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} engines: {node: '>= 8'} dependencies: @@ -460,67 +495,67 @@ packages: picomatch: 2.3.1 dev: false - /arg/5.0.2: + /arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} dev: false - /autoprefixer/10.4.7_postcss@8.4.14: - resolution: {integrity: sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA==} + /autoprefixer@10.4.12(postcss@8.4.18): + resolution: {integrity: sha512-WrCGV9/b97Pa+jtwf5UGaRjgQIg7OK3D06GnoYoZNcG1Xb8Gt3EfuKjlhh9i/VtT16g6PYjZ69jdJ2g8FxSC4Q==} engines: {node: ^10 || ^12 || >=14} hasBin: true peerDependencies: postcss: ^8.1.0 dependencies: - browserslist: 4.21.0 - caniuse-lite: 1.0.30001359 + browserslist: 4.21.4 + caniuse-lite: 1.0.30001419 fraction.js: 4.2.0 normalize-range: 0.1.2 picocolors: 1.0.0 - postcss: 8.4.14 + postcss: 8.4.18 postcss-value-parser: 4.2.0 dev: false - /binary-extensions/2.2.0: + /binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} dev: false - /body-scroll-lock/3.1.5: - resolution: {integrity: sha512-Yi1Xaml0EvNA0OYWxXiYNqY24AfWkbA6w5vxE7GWxtKfzIbZM+Qw+aSmkgsbWzbHiy/RCSkUZBplVxTA+E4jJg==} - dev: false - - /body-scroll-lock/4.0.0-beta.0: + /body-scroll-lock@4.0.0-beta.0: resolution: {integrity: sha512-a7tP5+0Mw3YlUJcGAKUqIBkYYGlYxk2fnCasq/FUph1hadxlTRjF+gAcZksxANnaMnALjxEddmSi/H3OR8ugcQ==} - dev: false + dev: true - /braces/3.0.2: + /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} dependencies: fill-range: 7.0.1 dev: false - /browserslist/4.21.0: - resolution: {integrity: sha512-UQxE0DIhRB5z/zDz9iA03BOfxaN2+GQdBYH/2WrSIWEUrnpzTPJbhqt+umq6r3acaPRTW1FNTkrcp0PXgtFkvA==} + /browserslist@4.21.4: + resolution: {integrity: sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001359 - electron-to-chromium: 1.4.169 - node-releases: 2.0.5 - update-browserslist-db: 1.0.4_browserslist@4.21.0 + caniuse-lite: 1.0.30001419 + electron-to-chromium: 1.4.283 + node-releases: 2.0.6 + update-browserslist-db: 1.0.10(browserslist@4.21.4) dev: false - /camelcase-css/2.0.1: + /buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + + /camelcase-css@2.0.1: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} dev: false - /caniuse-lite/1.0.30001359: - resolution: {integrity: sha512-Xln/BAsPzEuiVLgJ2/45IaqD9jShtk3Y33anKb4+yLwQzws3+v6odKfpgES/cDEaZMLzSChpIGdbOYtH9MyuHw==} + /caniuse-lite@1.0.30001419: + resolution: {integrity: sha512-aFO1r+g6R7TW+PNQxKzjITwLOyDhVRLjW0LcwS/HCZGUUKTGNp9+IwLC4xyDSZBygVL/mxaFR3HIV6wEKQuSzw==} dev: false - /chokidar/3.5.3: + /chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} dependencies: @@ -535,7 +570,7 @@ packages: fsevents: 2.3.2 dev: false - /clipboard/2.0.11: + /clipboard@2.0.11: resolution: {integrity: sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==} dependencies: good-listener: 1.2.2 @@ -543,273 +578,279 @@ packages: tiny-emitter: 2.1.0 dev: false - /color-name/1.1.4: + /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: false - /cssesc/3.0.0: + /commander@2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + dev: true + + /cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} hasBin: true dev: false - /csstype/2.6.20: - resolution: {integrity: sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==} + /csstype@2.6.21: + resolution: {integrity: sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==} + dev: true + + /defined@1.0.1: + resolution: {integrity: sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==} dev: false - /defined/1.0.0: - resolution: {integrity: sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=} - dev: false - - /delegate/3.2.0: + /delegate@3.2.0: resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==} dev: false - /detective/5.2.1: + /detective@5.2.1: resolution: {integrity: sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==} engines: {node: '>=0.8.0'} hasBin: true dependencies: acorn-node: 1.8.2 - defined: 1.0.0 - minimist: 1.2.6 + defined: 1.0.1 + minimist: 1.2.7 dev: false - /didyoumean/1.2.2: + /didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} dev: false - /dlv/1.1.3: + /dlv@1.1.3: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} dev: false - /dynamics.js/1.1.5: + /dynamics.js@1.1.5: resolution: {integrity: sha1-uQvcM2Bc7+ZSuEFucB95v27vzjI=} dev: false - /electron-to-chromium/1.4.169: - resolution: {integrity: sha512-Yb7UFva1sLlAaRyCkgoFF3qWvwZacFDtsGKi44rZsk8vnhL0DMhsUdhI4Dz9CCJQfftncDMGSI3AYiDtg8mD/w==} + /electron-to-chromium@1.4.283: + resolution: {integrity: sha512-g6RQ9zCOV+U5QVHW9OpFR7rdk/V7xfopNXnyAamdpFgCHgZ1sjI8VuR1+zG2YG/TZk+tQ8mpNkug4P8FU0fuOA==} dev: false - /esbuild-android-64/0.14.47: - resolution: {integrity: sha512-R13Bd9+tqLVFndncMHssZrPWe6/0Kpv2/dt4aA69soX4PRxlzsVpCvoJeFE8sOEoeVEiBkI0myjlkDodXlHa0g==} + /esbuild-android-64@0.15.11: + resolution: {integrity: sha512-rrwoXEiuI1kaw4k475NJpexs8GfJqQUKcD08VR8sKHmuW9RUuTR2VxcupVvHdiGh9ihxL9m3lpqB1kju92Ialw==} engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-android-arm64/0.14.47: - resolution: {integrity: sha512-OkwOjj7ts4lBp/TL6hdd8HftIzOy/pdtbrNA4+0oVWgGG64HrdVzAF5gxtJufAPOsEjkyh1oIYvKAUinKKQRSQ==} + /esbuild-android-arm64@0.15.11: + resolution: {integrity: sha512-/hDubOg7BHOhUUsT8KUIU7GfZm5bihqssvqK5PfO4apag7YuObZRZSzViyEKcFn2tPeHx7RKbSBXvAopSHDZJQ==} engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-darwin-64/0.14.47: - resolution: {integrity: sha512-R6oaW0y5/u6Eccti/TS6c/2c1xYTb1izwK3gajJwi4vIfNs1s8B1dQzI1UiC9T61YovOQVuePDcfqHLT3mUZJA==} + /esbuild-darwin-64@0.15.11: + resolution: {integrity: sha512-1DqHD0ms3AhiwkKnjRUzmiW7JnaJJr5FKrPiR7xuyMwnjDqvNWDdMq4rKSD9OC0piFNK6n0LghsglNMe2MwJtA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-darwin-arm64/0.14.47: - resolution: {integrity: sha512-seCmearlQyvdvM/noz1L9+qblC5vcBrhUaOoLEDDoLInF/VQ9IkobGiLlyTPYP5dW1YD4LXhtBgOyevoIHGGnw==} + /esbuild-darwin-arm64@0.15.11: + resolution: {integrity: sha512-OMzhxSbS0lwwrW40HHjRCeVIJTURdXFA8c3GU30MlHKuPCcvWNUIKVucVBtNpJySXmbkQMDJdJNrXzNDyvoqvQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-freebsd-64/0.14.47: - resolution: {integrity: sha512-ZH8K2Q8/Ux5kXXvQMDsJcxvkIwut69KVrYQhza/ptkW50DC089bCVrJZZ3sKzIoOx+YPTrmsZvqeZERjyYrlvQ==} + /esbuild-freebsd-64@0.15.11: + resolution: {integrity: sha512-8dKP26r0/Qyez8nTCwpq60QbuYKOeBygdgOAWGCRalunyeqWRoSZj9TQjPDnTTI9joxd3QYw3UhVZTKxO9QdRg==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-freebsd-arm64/0.14.47: - resolution: {integrity: sha512-ZJMQAJQsIOhn3XTm7MPQfCzEu5b9STNC+s90zMWe2afy9EwnHV7Ov7ohEMv2lyWlc2pjqLW8QJnz2r0KZmeAEQ==} + /esbuild-freebsd-arm64@0.15.11: + resolution: {integrity: sha512-aSGiODiukLGGnSg/O9+cGO2QxEacrdCtCawehkWYTt5VX1ni2b9KoxpHCT9h9Y6wGqNHmXFnB47RRJ8BIqZgmQ==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-linux-32/0.14.47: - resolution: {integrity: sha512-FxZOCKoEDPRYvq300lsWCTv1kcHgiiZfNrPtEhFAiqD7QZaXrad8LxyJ8fXGcWzIFzRiYZVtB3ttvITBvAFhKw==} + /esbuild-linux-32@0.15.11: + resolution: {integrity: sha512-lsrAfdyJBGx+6aHIQmgqUonEzKYeBnyfJPkT6N2dOf1RoXYYV1BkWB6G02tjsrz1d5wZzaTc3cF+TKmuTo/ZwA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-linux-64/0.14.47: - resolution: {integrity: sha512-nFNOk9vWVfvWYF9YNYksZptgQAdstnDCMtR6m42l5Wfugbzu11VpMCY9XrD4yFxvPo9zmzcoUL/88y0lfJZJJw==} + /esbuild-linux-64@0.15.11: + resolution: {integrity: sha512-Y2Rh+PcyVhQqXKBTacPCltINN3uIw2xC+dsvLANJ1SpK5NJUtxv8+rqWpjmBgaNWKQT1/uGpMmA9olALy9PLVA==} engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-linux-arm/0.14.47: - resolution: {integrity: sha512-ZGE1Bqg/gPRXrBpgpvH81tQHpiaGxa8c9Rx/XOylkIl2ypLuOcawXEAo8ls+5DFCcRGt/o3sV+PzpAFZobOsmA==} + /esbuild-linux-arm64@0.15.11: + resolution: {integrity: sha512-uhcXiTwTmD4OpxJu3xC5TzAAw6Wzf9O1XGWL448EE9bqGjgV1j+oK3lIHAfsHnuIn8K4nDW8yjX0Sv5S++oRuw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /esbuild-linux-arm@0.15.11: + resolution: {integrity: sha512-TJllTVk5aSyqPFvvcHTvf6Wu1ZKhWpJ/qNmZO8LL/XeB+LXCclm7HQHNEIz6MT7IX8PmlC1BZYrOiw2sXSB95A==} engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-linux-arm64/0.14.47: - resolution: {integrity: sha512-ywfme6HVrhWcevzmsufjd4iT3PxTfCX9HOdxA7Hd+/ZM23Y9nXeb+vG6AyA6jgq/JovkcqRHcL9XwRNpWG6XRw==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /esbuild-linux-mips64le/0.14.47: - resolution: {integrity: sha512-mg3D8YndZ1LvUiEdDYR3OsmeyAew4MA/dvaEJxvyygahWmpv1SlEEnhEZlhPokjsUMfRagzsEF/d/2XF+kTQGg==} + /esbuild-linux-mips64le@0.15.11: + resolution: {integrity: sha512-WD61y/R1M4BLe4gxXRypoQ0Ci+Vjf714QYzcPNkiYv5I8K8WDz2ZR8Bm6cqKxd6rD+e/rZgPDbhQ9PCf7TMHmA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-linux-ppc64le/0.14.47: - resolution: {integrity: sha512-WER+f3+szmnZiWoK6AsrTKGoJoErG2LlauSmk73LEZFQ/iWC+KhhDsOkn1xBUpzXWsxN9THmQFltLoaFEH8F8w==} + /esbuild-linux-ppc64le@0.15.11: + resolution: {integrity: sha512-JVleZS9oPVLTlBhPTWgOwxFWU/wMUdlBwTbGA4GF8c38sLbS13cupj+C8bLq929jU7EMWry4SaL+tKGIaTlqKg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-linux-riscv64/0.14.47: - resolution: {integrity: sha512-1fI6bP3A3rvI9BsaaXbMoaOjLE3lVkJtLxsgLHqlBhLlBVY7UqffWBvkrX/9zfPhhVMd9ZRFiaqXnB1T7BsL2g==} + /esbuild-linux-riscv64@0.15.11: + resolution: {integrity: sha512-9aLIalZ2HFHIOZpmVU11sEAS9F8TnHw49daEjcgMpBXHFF57VuT9f9/9LKJhw781Gda0P9jDkuCWJ0tFbErvJw==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-linux-s390x/0.14.47: - resolution: {integrity: sha512-eZrWzy0xFAhki1CWRGnhsHVz7IlSKX6yT2tj2Eg8lhAwlRE5E96Hsb0M1mPSE1dHGpt1QVwwVivXIAacF/G6mw==} + /esbuild-linux-s390x@0.15.11: + resolution: {integrity: sha512-sZHtiXXOKsLI3XGBGoYO4qKBzJlb8xNsWmvFiwFMHFzA4AXgDP1KDp7Dawe9C2pavTRBDvl+Ok4n/DHQ59oaTg==} engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-netbsd-64/0.14.47: - resolution: {integrity: sha512-Qjdjr+KQQVH5Q2Q1r6HBYswFTToPpss3gqCiSw2Fpq/ua8+eXSQyAMG+UvULPqXceOwpnPo4smyZyHdlkcPppQ==} + /esbuild-netbsd-64@0.15.11: + resolution: {integrity: sha512-hUC9yN06K9sg7ju4Vgu9ChAPdsEgtcrcLfyNT5IKwKyfpLvKUwCMZSdF+gRD3WpyZelgTQfJ+pDx5XFbXTlB0A==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-openbsd-64/0.14.47: - resolution: {integrity: sha512-QpgN8ofL7B9z8g5zZqJE+eFvD1LehRlxr25PBkjyyasakm4599iroUpaj96rdqRlO2ShuyqwJdr+oNqWwTUmQw==} + /esbuild-openbsd-64@0.15.11: + resolution: {integrity: sha512-0bBo9SQR4t66Wd91LGMAqmWorzO0TTzVjYiifwoFtel8luFeXuPThQnEm5ztN4g0fnvcp7AnUPPzS/Depf17wQ==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-sunos-64/0.14.47: - resolution: {integrity: sha512-uOeSgLUwukLioAJOiGYm3kNl+1wJjgJA8R671GYgcPgCx7QR73zfvYqXFFcIO93/nBdIbt5hd8RItqbbf3HtAQ==} + /esbuild-sunos-64@0.15.11: + resolution: {integrity: sha512-EuBdTGlsMTjEl1sQnBX2jfygy7iR6CKfvOzi+gEOfhDqbHXsmY1dcpbVtcwHAg9/2yUZSfMJHMAgf1z8M4yyyw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-windows-32/0.14.47: - resolution: {integrity: sha512-H0fWsLTp2WBfKLBgwYT4OTfFly4Im/8B5f3ojDv1Kx//kiubVY0IQunP2Koc/fr/0wI7hj3IiBDbSrmKlrNgLQ==} + /esbuild-windows-32@0.15.11: + resolution: {integrity: sha512-O0/Wo1Wk6dc0rZSxkvGpmTNIycEznHmkObTFz2VHBhjPsO4ZpCgfGxNkCpz4AdAIeMczpTXt/8d5vdJNKEGC+Q==} engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-windows-64/0.14.47: - resolution: {integrity: sha512-/Pk5jIEH34T68r8PweKRi77W49KwanZ8X6lr3vDAtOlH5EumPE4pBHqkCUdELanvsT14yMXLQ/C/8XPi1pAtkQ==} + /esbuild-windows-64@0.15.11: + resolution: {integrity: sha512-x977Q4HhNjnHx00b4XLAnTtj5vfbdEvkxaQwC1Zh5AN8g5EX+izgZ6e5QgqJgpzyRNJqh4hkgIJF1pyy1be0mQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] requiresBuild: true - dev: false + dev: true optional: true - /esbuild-windows-arm64/0.14.47: - resolution: {integrity: sha512-HFSW2lnp62fl86/qPQlqw6asIwCnEsEoNIL1h2uVMgakddf+vUuMcCbtUY1i8sst7KkgHrVKCJQB33YhhOweCQ==} + /esbuild-windows-arm64@0.15.11: + resolution: {integrity: sha512-VwUHFACuBahrvntdcMKZteUZ9HaYrBRODoKe4tIWxguQRvvYoYb7iu5LrcRS/FQx8KPZNaa72zuqwVtHeXsITw==} engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true - dev: false + dev: true optional: true - /esbuild/0.14.47: - resolution: {integrity: sha512-wI4ZiIfFxpkuxB8ju4MHrGwGLyp1+awEHAHVpx6w7a+1pmYIq8T9FGEVVwFo0iFierDoMj++Xq69GXWYn2EiwA==} + /esbuild@0.15.11: + resolution: {integrity: sha512-OgHGuhlfZ//mToxjte1D5iiiQgWfJ2GByVMwEC/IuoXsBGkuyK1+KrjYu0laSpnN/L1UmLUCv0s25vObdc1bVg==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - esbuild-android-64: 0.14.47 - esbuild-android-arm64: 0.14.47 - esbuild-darwin-64: 0.14.47 - esbuild-darwin-arm64: 0.14.47 - esbuild-freebsd-64: 0.14.47 - esbuild-freebsd-arm64: 0.14.47 - esbuild-linux-32: 0.14.47 - esbuild-linux-64: 0.14.47 - esbuild-linux-arm: 0.14.47 - esbuild-linux-arm64: 0.14.47 - esbuild-linux-mips64le: 0.14.47 - esbuild-linux-ppc64le: 0.14.47 - esbuild-linux-riscv64: 0.14.47 - esbuild-linux-s390x: 0.14.47 - esbuild-netbsd-64: 0.14.47 - esbuild-openbsd-64: 0.14.47 - esbuild-sunos-64: 0.14.47 - esbuild-windows-32: 0.14.47 - esbuild-windows-64: 0.14.47 - esbuild-windows-arm64: 0.14.47 - dev: false + '@esbuild/android-arm': 0.15.11 + '@esbuild/linux-loong64': 0.15.11 + esbuild-android-64: 0.15.11 + esbuild-android-arm64: 0.15.11 + esbuild-darwin-64: 0.15.11 + esbuild-darwin-arm64: 0.15.11 + esbuild-freebsd-64: 0.15.11 + esbuild-freebsd-arm64: 0.15.11 + esbuild-linux-32: 0.15.11 + esbuild-linux-64: 0.15.11 + esbuild-linux-arm: 0.15.11 + esbuild-linux-arm64: 0.15.11 + esbuild-linux-mips64le: 0.15.11 + esbuild-linux-ppc64le: 0.15.11 + esbuild-linux-riscv64: 0.15.11 + esbuild-linux-s390x: 0.15.11 + esbuild-netbsd-64: 0.15.11 + esbuild-openbsd-64: 0.15.11 + esbuild-sunos-64: 0.15.11 + esbuild-windows-32: 0.15.11 + esbuild-windows-64: 0.15.11 + esbuild-windows-arm64: 0.15.11 + dev: true - /escalade/3.1.1: + /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} dev: false - /estree-walker/2.0.2: + /estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - dev: false + dev: true - /fast-glob/3.2.11: - resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} + /fast-glob@3.2.12: + resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -819,117 +860,113 @@ packages: micromatch: 4.0.5 dev: false - /fastq/1.13.0: + /fastq@1.13.0: resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} dependencies: reusify: 1.0.4 dev: false - /fill-range/7.0.1: + /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 dev: false - /fraction.js/4.2.0: + /fraction.js@4.2.0: resolution: {integrity: sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==} dev: false - /fsevents/2.3.2: + /fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true - dev: false optional: true - /function-bind/1.1.1: + /function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: false - /glob-parent/5.1.2: + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} dependencies: is-glob: 4.0.3 dev: false - /glob-parent/6.0.2: + /glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} dependencies: is-glob: 4.0.3 dev: false - /good-listener/1.2.2: + /good-listener@1.2.2: resolution: {integrity: sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=} dependencies: delegate: 3.2.0 dev: false - /gsap/3.10.4: - resolution: {integrity: sha512-6QatdkKxXCMfvCW4rM++0RqyLQAzFX5nwl3yHS0XPgkZBkiSEY3VZVbMltrdtsbER/xZonLtyHt684wRp4erlQ==} + /gsap@3.11.3: + resolution: {integrity: sha512-xc/iIJy+LWiMbRa4IdMtdnnKa/7PXEK6NNzV71gdOYUVeTZN7UWnLU0fB7Hi1iwiz4ZZoYkBZPPYGg+2+zzFHA==} dev: false - /has/1.0.3: + /has@1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} dependencies: function-bind: 1.1.1 - dev: false - /is-binary-path/2.1.0: + /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} dependencies: binary-extensions: 2.2.0 dev: false - /is-core-module/2.9.0: - resolution: {integrity: sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==} + /is-core-module@2.10.0: + resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==} dependencies: has: 1.0.3 - dev: false - /is-extglob/2.1.1: + /is-extglob@2.1.1: resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=} engines: {node: '>=0.10.0'} dev: false - /is-glob/4.0.3: + /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 dev: false - /is-number/7.0.0: + /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} dev: false - /jsonc-parser/3.0.0: - resolution: {integrity: sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==} - dev: false + /jsonc-parser@3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + dev: true - /lilconfig/2.0.5: - resolution: {integrity: sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==} + /lilconfig@2.0.6: + resolution: {integrity: sha512-9JROoBW7pobfsx+Sq2JsASvCo6Pfo6WWoUW79HuB1BCoBXD4PLWJPqDF6fNj67pqBYTbAHkE57M1kS/+L1neOg==} engines: {node: '>=10'} dev: false - /magic-string/0.25.9: + /magic-string@0.25.9: resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==} dependencies: sourcemap-codec: 1.4.8 - dev: false + dev: true - /merge2/1.4.1: + /merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} dev: false - /micromatch/4.0.5: + /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} dependencies: @@ -937,80 +974,71 @@ packages: picomatch: 2.3.1 dev: false - /minimist/1.2.6: - resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} + /minimist@1.2.7: + resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} dev: false - /nanoid/3.3.4: + /nanoid@3.3.4: resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + + /node-releases@2.0.6: + resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==} dev: false - /node-releases/2.0.5: - resolution: {integrity: sha512-U9h1NLROZTq9uE1SNffn6WuPDg8icmi3ns4rEl/oTfIle4iLjTliCzgTsbaIFMq/Xn078/lfY/BL0GWZ+psK4Q==} - dev: false - - /normalize-path/3.0.0: + /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} dev: false - /normalize-range/0.1.2: + /normalize-range@0.1.2: resolution: {integrity: sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=} engines: {node: '>=0.10.0'} dev: false - /normalize.css/8.0.1: - resolution: {integrity: sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==} - dev: false - - /object-hash/3.0.0: + /object-hash@3.0.0: resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} engines: {node: '>= 6'} dev: false - /path-parse/1.0.7: + /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: false - /picocolors/1.0.0: + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: false - /picomatch/2.3.1: + /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} dev: false - /pify/2.3.0: + /pify@2.3.0: resolution: {integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw=} engines: {node: '>=0.10.0'} - dev: false - /postcss-import/14.1.0_postcss@8.4.14: + /postcss-import@14.1.0(postcss@8.4.18): resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==} engines: {node: '>=10.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.14 + postcss: 8.4.18 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.1 - dev: false - /postcss-js/4.0.0_postcss@8.4.14: + /postcss-js@4.0.0(postcss@8.4.18): resolution: {integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: postcss: ^8.3.3 dependencies: camelcase-css: 2.0.1 - postcss: 8.4.14 + postcss: 8.4.18 dev: false - /postcss-load-config/3.1.4_postcss@8.4.14: + /postcss-load-config@3.1.4(postcss@8.4.18): resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} peerDependencies: @@ -1022,22 +1050,22 @@ packages: ts-node: optional: true dependencies: - lilconfig: 2.0.5 - postcss: 8.4.14 + lilconfig: 2.0.6 + postcss: 8.4.18 yaml: 1.10.2 dev: false - /postcss-nested/5.0.6_postcss@8.4.14: + /postcss-nested@5.0.6(postcss@8.4.18): resolution: {integrity: sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.14 + postcss: 8.4.18 postcss-selector-parser: 6.0.10 dev: false - /postcss-selector-parser/6.0.10: + /postcss-selector-parser@6.0.10: resolution: {integrity: sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==} engines: {node: '>=4'} dependencies: @@ -1045,116 +1073,111 @@ packages: util-deprecate: 1.0.2 dev: false - /postcss-value-parser/4.2.0: + /postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - dev: false - /postcss/8.4.14: - resolution: {integrity: sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==} + /postcss@8.4.18: + resolution: {integrity: sha512-Wi8mWhncLJm11GATDaQKobXSNEYGUHeQLiQqDFG1qQ5UTDPTEvKw0Xt5NsTpktGTwLps3ByrWsBrG0rB8YQ9oA==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.4 picocolors: 1.0.0 source-map-js: 1.0.2 - dev: false - /preact/10.8.2: - resolution: {integrity: sha512-AKGt0BsDSiAYzVS78jZ9qRwuorY2CoSZtf1iOC6gLb/3QyZt+fLT09aYJBjRc/BEcRc4j+j3ggERMdNE43i1LQ==} - dev: false + /preact@10.11.2: + resolution: {integrity: sha512-skAwGDFmgxhq1DCBHke/9e12ewkhc7WYwjuhHB8HHS8zkdtITXLRmUMTeol2ldxvLwYtwbFeifZ9uDDWuyL4Iw==} + dev: true - /queue-microtask/1.2.3: + /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: false - /quick-lru/5.1.1: + /quick-lru@5.1.1: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} dev: false - /read-cache/1.0.0: + /read-cache@1.0.0: resolution: {integrity: sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=} dependencies: pify: 2.3.0 - dev: false - /readdirp/3.6.0: + /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} dependencies: picomatch: 2.3.1 dev: false - /resolve/1.22.1: + /resolve@1.22.1: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} hasBin: true dependencies: - is-core-module: 2.9.0 + is-core-module: 2.10.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - dev: false - /reusify/1.0.4: + /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: false - /rollup/2.75.7: - resolution: {integrity: sha512-VSE1iy0eaAYNCxEXaleThdFXqZJ42qDBatAwrfnPlENEZ8erQ+0LYX4JXOLPceWfZpV1VtZwZ3dFCuOZiSyFtQ==} + /rollup@2.79.1: + resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} engines: {node: '>=10.0.0'} hasBin: true optionalDependencies: fsevents: 2.3.2 - dev: false + dev: true - /run-parallel/1.2.0: + /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 dev: false - /select/1.1.2: + /select@1.1.2: resolution: {integrity: sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=} dev: false - /shiki/0.10.1: - resolution: {integrity: sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==} + /shiki@0.11.1: + resolution: {integrity: sha512-EugY9VASFuDqOexOgXR18ZV+TbFrQHeCpEYaXamO+SZlsnT/2LxuLBX25GGtIrwaEVFXUAbUQ601SWE2rMwWHA==} dependencies: - jsonc-parser: 3.0.0 + jsonc-parser: 3.2.0 vscode-oniguruma: 1.6.2 - vscode-textmate: 5.2.0 - dev: false + vscode-textmate: 6.0.0 + dev: true - /shiki/0.9.15: - resolution: {integrity: sha512-/Y0z9IzhJ8nD9nbceORCqu6NgT9X6I8Fk8c3SICHI5NbZRLdZYFaB233gwct9sU0vvSypyaL/qaKvzyQGJBZSw==} - dependencies: - jsonc-parser: 3.0.0 - vscode-oniguruma: 1.6.2 - vscode-textmate: 5.2.0 - dev: false - - /source-map-js/1.0.2: + /source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} - dev: false - /source-map/0.6.1: + /source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - dev: false + dev: true - /sourcemap-codec/1.4.8: + /sourcemap-codec@1.4.8: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} - dev: false + dev: true - /supports-preserve-symlinks-flag/1.0.0: + /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - dev: false - /tailwindcss/3.1.4: - resolution: {integrity: sha512-NrxbFV4tYsga/hpWbRyUfIaBrNMXDxx5BsHgBS4v5tlyjf+sDsgBg5m9OxjrXIqAS/uR9kicxLKP+bEHI7BSeQ==} + /tailwindcss@3.1.8(postcss@8.4.18): + resolution: {integrity: sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==} engines: {node: '>=12.13.0'} hasBin: true + peerDependencies: + postcss: ^8.0.9 dependencies: arg: 5.0.2 chokidar: 3.5.3 @@ -1162,18 +1185,18 @@ packages: detective: 5.2.1 didyoumean: 1.2.2 dlv: 1.1.3 - fast-glob: 3.2.11 + fast-glob: 3.2.12 glob-parent: 6.0.2 is-glob: 4.0.3 - lilconfig: 2.0.5 + lilconfig: 2.0.6 normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.14 - postcss-import: 14.1.0_postcss@8.4.14 - postcss-js: 4.0.0_postcss@8.4.14 - postcss-load-config: 3.1.4_postcss@8.4.14 - postcss-nested: 5.0.6_postcss@8.4.14 + postcss: 8.4.18 + postcss-import: 14.1.0(postcss@8.4.18) + postcss-js: 4.0.0(postcss@8.4.18) + postcss-load-config: 3.1.4(postcss@8.4.18) + postcss-nested: 5.0.6(postcss@8.4.18) postcss-selector-parser: 6.0.10 postcss-value-parser: 4.2.0 quick-lru: 5.1.1 @@ -1182,76 +1205,99 @@ packages: - ts-node dev: false - /tiny-emitter/2.1.0: + /terser@5.15.1: + resolution: {integrity: sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==} + engines: {node: '>=10'} + hasBin: true + dependencies: + '@jridgewell/source-map': 0.3.2 + acorn: 8.8.0 + commander: 2.20.3 + source-map-support: 0.5.21 + dev: true + + /tiny-emitter@2.1.0: resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==} dev: false - /to-fast-properties/2.0.0: + /to-fast-properties@2.0.0: resolution: {integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=} engines: {node: '>=4'} - dev: false + dev: true - /to-regex-range/5.0.1: + /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} dependencies: is-number: 7.0.0 dev: false - /update-browserslist-db/1.0.4_browserslist@4.21.0: - resolution: {integrity: sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==} + /update-browserslist-db@1.0.10(browserslist@4.21.4): + resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' dependencies: - browserslist: 4.21.0 + browserslist: 4.21.4 escalade: 3.1.1 picocolors: 1.0.0 dev: false - /util-deprecate/1.0.2: + /util-deprecate@1.0.2: resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} dev: false - /vite/2.9.12: - resolution: {integrity: sha512-suxC36dQo9Rq1qMB2qiRorNJtJAdxguu5TMvBHOc/F370KvqAe9t48vYp+/TbPKRNrMh/J55tOUmkuIqstZaew==} - engines: {node: '>=12.2.0'} + /vite@3.2.7(@types/node@16.11.65)(terser@5.15.1): + resolution: {integrity: sha512-29pdXjk49xAP0QBr0xXqu2s5jiQIXNvE/xwd0vUizYT2Hzqe4BksNNoWllFVXJf4eLZ+UlVQmXfB4lWrc+t18g==} + engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: + '@types/node': '>= 14' less: '*' sass: '*' stylus: '*' + sugarss: '*' + terser: ^5.4.0 peerDependenciesMeta: + '@types/node': + optional: true less: optional: true sass: optional: true stylus: optional: true + sugarss: + optional: true + terser: + optional: true dependencies: - esbuild: 0.14.47 - postcss: 8.4.14 + '@types/node': 16.11.65 + esbuild: 0.15.11 + postcss: 8.4.18 resolve: 1.22.1 - rollup: 2.75.7 + rollup: 2.79.1 + terser: 5.15.1 optionalDependencies: fsevents: 2.3.2 - dev: false + dev: true - /vitepress/1.0.0-alpha.4: - resolution: {integrity: sha512-bOAA4KW6vYGlkbcrPLZLTKWTgXVroObU+o9xj9EENyEl6yg26WWvfN7DGA4BftjdM5O8nR93Z5khPQ3W/tFE7Q==} - engines: {node: '>=14.6.0'} + /vitepress@1.0.0-alpha.21(@types/node@16.11.65)(terser@5.15.1): + resolution: {integrity: sha512-D/tkoDW16uUZ9pnWd28Kk1vX26zNiTml3m9oGbfx2pAfYg99PHd1GceZyEm4jZsJU0+n9S++1ctFxoQvsq376A==} hasBin: true dependencies: - '@docsearch/css': 3.1.0 - '@docsearch/js': 3.1.0 - '@vitejs/plugin-vue': 2.3.3_vite@2.9.12+vue@3.2.37 - '@vue/devtools-api': 6.1.4 - '@vueuse/core': 8.7.5_vue@3.2.37 + '@docsearch/css': 3.2.1 + '@docsearch/js': 3.2.1 + '@vitejs/plugin-vue': 3.1.2(vite@3.2.7)(vue@3.2.41) + '@vue/devtools-api': 6.4.4 + '@vueuse/core': 9.3.0(vue@3.2.41) body-scroll-lock: 4.0.0-beta.0 - shiki: 0.10.1 - vite: 2.9.12 - vue: 3.2.37 + shiki: 0.11.1 + vite: 3.2.7(@types/node@16.11.65)(terser@5.15.1) + vue: 3.2.41 transitivePeerDependencies: + - '@algolia/client-search' + - '@types/node' - '@types/react' - '@vue/composition-api' - less @@ -1259,18 +1305,20 @@ packages: - react-dom - sass - stylus - dev: false + - sugarss + - terser + dev: true - /vscode-oniguruma/1.6.2: + /vscode-oniguruma@1.6.2: resolution: {integrity: sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==} - dev: false + dev: true - /vscode-textmate/5.2.0: - resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} - dev: false + /vscode-textmate@6.0.0: + resolution: {integrity: sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==} + dev: true - /vue-demi/0.13.1_vue@3.2.37: - resolution: {integrity: sha512-xmkJ56koG3ptpLnpgmIzk9/4nFf4CqduSJbUM0OdPoU87NwRuZ6x49OLhjSa/fC15fV+5CbEnrxU4oyE022svg==} + /vue-demi@0.13.11(vue@3.2.41): + resolution: {integrity: sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==} engines: {node: '>=12'} hasBin: true requiresBuild: true @@ -1281,25 +1329,25 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.2.37 - dev: false + vue: 3.2.41 + dev: true - /vue/3.2.37: - resolution: {integrity: sha512-bOKEZxrm8Eh+fveCqS1/NkG/n6aMidsI6hahas7pa0w/l7jkbssJVsRhVDs07IdDq7h9KHswZOgItnwJAgtVtQ==} + /vue@3.2.41: + resolution: {integrity: sha512-uuuvnrDXEeZ9VUPljgHkqB5IaVO8SxhPpqF2eWOukVrBnRBx2THPSGQBnVRt0GrIG1gvCmFXMGbd7FqcT1ixNQ==} dependencies: - '@vue/compiler-dom': 3.2.37 - '@vue/compiler-sfc': 3.2.37 - '@vue/runtime-dom': 3.2.37 - '@vue/server-renderer': 3.2.37_vue@3.2.37 - '@vue/shared': 3.2.37 - dev: false + '@vue/compiler-dom': 3.2.41 + '@vue/compiler-sfc': 3.2.41 + '@vue/runtime-dom': 3.2.41 + '@vue/server-renderer': 3.2.41(vue@3.2.41) + '@vue/shared': 3.2.41 + dev: true - /xtend/4.0.2: + /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} dev: false - /yaml/1.10.2: + /yaml@1.10.2: resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} engines: {node: '>= 6'} dev: false diff --git a/vendor/w7corp/easywechat/docs/src/3.x/notice.md b/vendor/w7corp/easywechat/docs/src/3.x/notice.md index 2ddfa1f6..5b871efb 100644 --- a/vendor/w7corp/easywechat/docs/src/3.x/notice.md +++ b/vendor/w7corp/easywechat/docs/src/3.x/notice.md @@ -15,12 +15,12 @@ $notice = $app->notice; ### API -+ `boolean setIndustry($industryId1, $industryId2)` 修改账号所属行业; -+ `array getIndustry()` 返回所有支持的行业列表,用于做下拉选择行业可视化更新; -+ `string addTemplate($shortId)` 添加模板并获取模板ID; -+ `collection send($message)` 发送模板消息, 返回消息ID; -+ `array getPrivateTemplates()` 获取所有模板列表; -+ `array deletePrivateTemplate($templateId)` 删除指定ID的模板。 +- `boolean setIndustry($industryId1, $industryId2)` 修改账号所属行业; +- `array getIndustry()` 返回所有支持的行业列表,用于做下拉选择行业可视化更新; +- `string addTemplate($shortId)` 添加模板并获取模板 ID; +- `collection send($message)` 发送模板消息, 返回消息 ID; +- `array getPrivateTemplates()` 获取所有模板列表; +- `array deletePrivateTemplate($templateId)` 删除指定 ID 的模板。 非链接调用方法: @@ -93,50 +93,48 @@ var_dump($result); // } ``` -结果: - -![notice-demo](http://7u2jwa.com1.z0.glb.clouddn.com/QQ20160111-0@2x.png) - ## 模板数据 为了方便大家开发,我们拓展支持以下格式的模板数据,其它格式的数据可能会导致接口调用失败: - 所有数据项颜色一样的(这是方便的一种方式): - ```php - $data = array( - "first" => "恭喜你购买成功!", - "keynote1" => "巧克力", - "keynote2" => "39.8元", - "keynote3" => "2014年9月16日", - "remark" => "欢迎再次购买!", - ); - ``` + ```php + $data = array( + "first" => "恭喜你购买成功!", + "keynote1" => "巧克力", + "keynote2" => "39.8元", + "keynote3" => "2014年9月16日", + "remark" => "欢迎再次购买!", + ); + ``` + 默认颜色为'#173177', 你可以通过 `defaultColor($color)` 来修改 - 独立设置每个模板项颜色的: - + 简便型: + - 简便型: - ```php - $data = array( - "first" => array("恭喜你购买成功!", '#555555'), - "keynote1" => array("巧克力", "#336699"), - "keynote2" => array("39.8元", "#FF0000"), - "keynote3" => array("2014年9月16日", "#888888"), - "remark" => array("欢迎再次购买!", "#5599FF"), - ); - ``` - + 复杂型(也是微信官方唯一支持的方式,估计没有人想这么用): + ```php + $data = array( + "first" => array("恭喜你购买成功!", '#555555'), + "keynote1" => array("巧克力", "#336699"), + "keynote2" => array("39.8元", "#FF0000"), + "keynote3" => array("2014年9月16日", "#888888"), + "remark" => array("欢迎再次购买!", "#5599FF"), + ); + ``` - ```php - $data = array( - "first" => array("value" => "恭喜你购买成功!", "color" => '#555555'), - "keynote1" => array("value" => "巧克力", "color" => "#336699"), - "keynote2" => array("value" => "39.8元","color" => "#FF0000"), - "keynote3" => array("value" => "2014年9月16日", "color" => "#888888"), - "remark" => array("value" => "欢迎再次购买!", "color" => "#5599FF"), - ); - ``` + - 复杂型(也是微信官方唯一支持的方式,估计没有人想这么用): + + ```php + $data = array( + "first" => array("value" => "恭喜你购买成功!", "color" => '#555555'), + "keynote1" => array("value" => "巧克力", "color" => "#336699"), + "keynote2" => array("value" => "39.8元","color" => "#FF0000"), + "keynote3" => array("value" => "2014年9月16日", "color" => "#888888"), + "remark" => array("value" => "欢迎再次购买!", "color" => "#5599FF"), + ); + ``` 关于模板消息的使用请参考 [微信官方文档](http://mp.weixin.qq.com/wiki/) diff --git a/vendor/w7corp/easywechat/docs/src/3.x/oauth.md b/vendor/w7corp/easywechat/docs/src/3.x/oauth.md index d724960f..ce54379e 100644 --- a/vendor/w7corp/easywechat/docs/src/3.x/oauth.md +++ b/vendor/w7corp/easywechat/docs/src/3.x/oauth.md @@ -1,9 +1,8 @@ # 网页授权 - ## 关于 OAuth2.0 -OAuth是一个关于授权(authorization)的开放网络标准,在全世界得到广泛应用,目前的版本是2.0版。 +OAuth 是一个关于授权(authorization)的开放网络标准,在全世界得到广泛应用,目前的版本是 2.0 版。 ``` @@ -26,6 +25,7 @@ OAuth是一个关于授权(authorization)的开放网络标准,在全世 +--------+ +---------------+ OAuth 授权流程 ``` + > 摘自:[RFC 6749](https://datatracker.ietf.org/doc/rfc6749/?include_text=1) 步骤解释: @@ -59,8 +59,8 @@ OAuth是一个关于授权(authorization)的开放网络标准,在全世 1. 用户尝试访问一个我们的业务页面,例如: `/user/profile` 2. 如果用户已经登录,则正常显示该页面 -2. 系统检查当前访问的用户并未登录(从 session 或者其它方式检查),则跳转到**跳转到微信授权服务器**(上面的两种中一种**授权 URL**),并告知微信授权服务器我的**回调URL(redirect_uri=callback.php)**,此时用户看到蓝色的授权确认页面(`scope` 为 `snsapi_base` 时不显示) -4. 用户点击确定完成授权,浏览器跳转到**回调URL**: `callback.php` 并带上 `code`: `?code=CODE&state=STATE`。 +3. 系统检查当前访问的用户并未登录(从 session 或者其它方式检查),则跳转到**跳转到微信授权服务器**(上面的两种中一种**授权 URL**),并告知微信授权服务器我的**回调 URL(redirect_uri=callback.php)**,此时用户看到蓝色的授权确认页面(`scope` 为 `snsapi_base` 时不显示) +4. 用户点击确定完成授权,浏览器跳转到**回调 URL**: `callback.php` 并带上 `code`: `?code=CODE&state=STATE`。 5. 在 `callback.php` 中得到 `code` 后,通过 `code` 再次向微信服务器请求得到 **网页授权 access_token** 与 `openid` 6. 你可以选择拿 `openid` 去请求 API 得到用户信息(可选) 7. 将用户信息写入 SESSION。 @@ -68,12 +68,12 @@ OAuth是一个关于授权(authorization)的开放网络标准,在全世 > 看懵了?没事,使用 SDK,你不用管这么多。:smile: > -> 注意,上面的第3步:redirect_uri=callback.php实际上我们会在 `callback.php` 后面还会带上授权目标页面 `user/profile`,所以完整的 `redirect_uri` 应该是下面的这样的PHP去拼出来:`'redirect_uri='.urlencode('callback.php?target=user/profile')` +> 注意,上面的第 3 步:redirect_uri=callback.php 实际上我们会在 `callback.php` 后面还会带上授权目标页面 `user/profile`,所以完整的 `redirect_uri` 应该是下面的这样的 PHP 去拼出来:`'redirect_uri='.urlencode('callback.php?target=user/profile')` > 结果:redirect_uri=callback.php%3Ftarget%3Duser%2Fprofile ## 逻辑组成 -从上面我们所描述的授权流程来看,我们至少有3个页面: +从上面我们所描述的授权流程来看,我们至少有 3 个页面: 1. **业务页面**,也就是需要授权才能访问的页面。 2. **发起授权页**,此页面其实可以省略,可以做成一个中间件,全局检查未登录就发起授权。 @@ -87,7 +87,7 @@ OAuth是一个关于授权(authorization)的开放网络标准,在全世 ## SDK 中 OAuth 模块的 API - 在 SDK 中,我们使用名称为 `oauth` 的模块来完成授权服务,我们主要用到以下两个 API: +在 SDK 中,我们使用名称为 `oauth` 的模块来完成授权服务,我们主要用到以下两个 API: ### 发起授权 @@ -96,7 +96,7 @@ $response = $app->oauth->scopes(['snsapi_userinfo']) ->redirect(); ``` -当你的应用是分布式架构且没有会话保持的情况下,你需要自行设置请求对象以实现会话共享。比如在 [Laravel](http://laravel.com) 框架中支持Session储存在Redis中,那么需要这样: +当你的应用是分布式架构且没有会话保持的情况下,你需要自行设置请求对象以实现会话共享。比如在 [Laravel](http://laravel.com) 框架中支持 Session 储存在 Redis 中,那么需要这样: ```php $response = $app->oauth->scopes(['snsapi_userinfo']) @@ -115,7 +115,7 @@ $response = $app->oauth->scopes(['snsapi_userinfo']) return $response; ``` -在有的框架 (比如yii2) 中是直接 `echo` 或者 `$this->display()` 这种的时候,你就直接: +在有的框架 (比如 yii2) 中是直接 `echo` 或者 `$this->display()` 这种的时候,你就直接: ```php $response->send(); // Laravel 里请使用:return $response; @@ -143,10 +143,10 @@ $user = $app->oauth->user(); ## 网页授权实例 -我们这里来用原生 PHP 写法举个例子,`oauth_callback` 是我们的授权回调URL (未urlencode编码的URL), `user/profile` 是我们需要授权才能访问的页面,它的 PHP 代码如下: +我们这里来用原生 PHP 写法举个例子,`oauth_callback` 是我们的授权回调 URL (未 urlencode 编码的 URL), `user/profile` 是我们需要授权才能访问的页面,它的 PHP 代码如下: ```php -// http://easywechat.org/user/profile +// http://easywechat.com/user/profile 'iPad mini 16G 白色', 'out_trade_no' => '1217752501201407033233368018',    'total_fee'       => 5388, // 单位:分 -    'notify_url'       => 'http://xxx.com/order-notify', // 支付结果通知网址,如果不设置则会使用配置里的默认地址 +    'notify_url'       => 'http://easywechat.com/order-notify', // 支付结果通知网址,如果不设置则会使用配置里的默认地址 'openid' => '当前用户的 openid', // trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识, // ... ]; @@ -76,7 +74,7 @@ $attributes = [ 'detail' => 'iPad mini 16G 白色', 'out_trade_no' => '1217752501201407033233368018', 'total_fee' => 5388, // 单位:分 - 'notify_url' => 'http://xxx.com/order-notify', // 支付结果通知网址,如果不设置则会使用配置里的默认地址 + 'notify_url' => 'http://easywechat.com/order-notify', // 支付结果通知网址,如果不设置则会使用配置里的默认地址    'sub_openid'        => '当前用户的 openid', // 如果传入sub_openid, 请在实例化Application时, 同时传入$sub_app_id, $sub_merchant_id    // ... ]; @@ -85,8 +83,7 @@ $order = new Order($attributes); ``` - -通知url必须为直接可访问的url,不能携带参数。示例:notify_url:“https://pay.weixin.qq.com/wxpay/pay.action” +通知 url 必须为直接可访问的 url,不能携带参数。示例:notify_url:“https://pay.weixin.qq.com/wxpay/pay.action” ## 下单接口 @@ -113,7 +110,7 @@ if ($result->return_code == 'SUCCESS' && $result->result_code == 'SUCCESS'){ ## 支付结果通知 -在用户成功支付后,微信服务器会向该 **订单中设置的回调URL** 发起一个 POST 请求,请求的内容为一个 XML。里面包含了所有的详细信息,具体请参考: +在用户成功支付后,微信服务器会向该 **订单中设置的回调 URL** 发起一个 POST 请求,请求的内容为一个 XML。里面包含了所有的详细信息,具体请参考: [支付结果通用通知](https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7) 在本 SDK 中处理回调真的再简单不过了,请求验证你就不用管了,SDK 已经为你做好了,你只需要关注业务即可: @@ -132,8 +129,8 @@ $response->send(); // Laravel 里请使用:return $response; 1. `handleNotify` 只接收一个 [`callable`](http://php.net/manual/zh/language.types.callable.php) 参数,通常用一个匿名函数即可。 2. 该匿名函数接收两个参数,这两个参数分别为: - - `$notify` 为封装了通知信息的 `EasyWeChat\Support\Collection` 对象,前面已经讲过这里就不赘述了,你可以以对象或者数组形式来读取通知内容,比如:`$notify->total_fee` 或者 `$notify['total_fee']`。 - - `$successful` 这个参数其实就是判断 **用户是否付款成功了**(result_code == 'SUCCESS') + - `$notify` 为封装了通知信息的 `EasyWeChat\Support\Collection` 对象,前面已经讲过这里就不赘述了,你可以以对象或者数组形式来读取通知内容,比如:`$notify->total_fee` 或者 `$notify['total_fee']`。 + - `$successful` 这个参数其实就是判断 **用户是否付款成功了**(result_code == 'SUCCESS') 3. 该函数返回值就是告诉微信 **“我是否处理完成”**,如果你返回一个 `false` 或者一个具体的错误消息,那么微信会在稍后再次继续通知你,直到你明确的告诉它:“我已经处理完成了”,在函数里 `return true;` 代表处理完成。 @@ -176,12 +173,11 @@ return $response; > 注意:请把 “支付成功与否” 与 “是否处理完成” 分开,它俩没有必然关系。 > 比如:微信通知你用户支付完成,但是支付失败了(result_code 为 'FAIL'),你应该**更新你的订单为支付失败**,但是要**告诉微信处理完成**。 - -## 撤销订单API +## 撤销订单 API 目前只有 **刷卡支付** 有此功能。 -> 调用支付接口后请勿立即调用撤销订单API,建议支付后至少15s后再调用撤销订单接口。 +> 调用支付接口后请勿立即调用撤销订单 API,建议支付后至少 15s 后再调用撤销订单接口。 ```php $orderNo = "商户系统内部的订单号(out_trade_no)"; @@ -196,17 +192,16 @@ $orderNo = "微信的订单号(transaction_id)"; $payment->reverseByTransactionId($orderNo); ``` - ## 查询订单 该接口提供所有微信支付订单的查询,商户可以通过该接口主动查询订单状态,完成下一步的业务逻辑。 需要调用查询接口的情况: - - 当商户后台、网络、服务器等出现异常,商户系统最终未接收到支付通知; - - 调用支付接口后,返回系统错误或未知交易状态情况; - - 调用被扫支付API,返回USERPAYING的状态; - - 调用关单或撤销接口API之前,需确认支付状态; +- 当商户后台、网络、服务器等出现异常,商户系统最终未接收到支付通知; +- 调用支付接口后,返回系统错误或未知交易状态情况; +- 调用被扫支付 API,返回 USERPAYING 的状态; +- 调用关单或撤销接口 API 之前,需确认支付状态; ```php $orderNo = "商户系统内部的订单号(out_trade_no)"; @@ -223,7 +218,7 @@ $payment->queryByTransactionId($orderNo); ## 关闭订单 -> 注意:订单生成后不能马上调用关单接口,最短调用时间间隔为5分钟。 +> 注意:订单生成后不能马上调用关单接口,最短调用时间间隔为 5 分钟。 ```php $orderNo = "商户系统内部的订单号(out_trade_no)"; @@ -273,7 +268,7 @@ $result = $payment->refundByTransactionId($transactionId, $refundNo, 100, 80, 19 ## 查询退款 -提交退款申请后,通过调用该接口查询退款状态。退款有一定延时,用零钱支付的退款20分钟内到账,银行卡支付的退款3个工作日后重新查询退款状态。 +提交退款申请后,通过调用该接口查询退款状态。退款有一定延时,用零钱支付的退款 20 分钟内到账,银行卡支付的退款 3 个工作日后重新查询退款状态。 ```php $result = $payment->queryRefund($outTradeNo); @@ -299,10 +294,10 @@ file_put_contents('YOUR/PATH/TO/bill-20140603.csv', $bill); 第二个参数为类型: - - **ALL**:返回当日所有订单信息(默认值) - - **SUCCESS**:返回当日成功支付的订单 - - **REFUND**:返回当日退款订单 - - **REVOKED**:已撤销的订单 +- **ALL**:返回当日所有订单信息(默认值) +- **SUCCESS**:返回当日成功支付的订单 +- **REFUND**:返回当日退款订单 +- **REVOKED**:已撤销的订单 ## 测速上报 @@ -320,10 +315,10 @@ $payment->report($api, $timeConsuming, $resultCode, $returnCode, [ ## 转换短链接 ```php -$shortUrl = $payment->urlShorten('http://easywechat.org'); +$shortUrl = $payment->urlShorten('http://easywechat.com'); ``` -## 授权码查询OPENID接口 +## 授权码查询 OPENID 接口 ```php $response = $payment->authCodeToOpenId($authCode); @@ -336,47 +331,47 @@ $response->openid; 1. WeixinJSBridge: - ```php - $json = $payment->configForPayment($prepayId); // 返回 json 字符串,如果想返回数组,传第二个参数 false - ``` + ```php + $json = $payment->configForPayment($prepayId); // 返回 json 字符串,如果想返回数组,传第二个参数 false + ``` - javascript: + javascript: - ```js - ... - WeixinJSBridge.invoke( - 'getBrandWCPayRequest', , - function(res){ - if(res.err_msg == "get_brand_wcpay_request:ok" ) { - // 使用以上方式判断前端返回,微信团队郑重提示: - // res.err_msg将在用户支付成功后返回 - // ok,但并不保证它绝对可靠。 - } - } - ); - ... - ``` + ```js + ... + WeixinJSBridge.invoke( + 'getBrandWCPayRequest', , + function(res){ + if(res.err_msg == "get_brand_wcpay_request:ok" ) { + // 使用以上方式判断前端返回,微信团队郑重提示: + // res.err_msg将在用户支付成功后返回 + // ok,但并不保证它绝对可靠。 + } + } + ); + ... + ``` 2. JSSDK: - ```php - $config = $payment->configForJSSDKPayment($prepayId); // 返回数组 - ``` + ```php + $config = $payment->configForJSSDKPayment($prepayId); // 返回数组 + ``` - javascript: + javascript: - ```js - wx.chooseWXPay({ - timestamp: , - nonceStr: '', - package: '', - signType: '', - paySign: '', // 支付签名 - success: function (res) { - // 支付成功后的回调函数 - } - }); - ``` + ```js + wx.chooseWXPay({ + timestamp: , + nonceStr: '', + package: '', + signType: '', + paySign: '', // 支付签名 + success: function (res) { + // 支付成功后的回调函数 + } + }); + ``` ## 生成共享收货地址 JS 配置 @@ -419,4 +414,3 @@ $config = $payment->configForAppPayment($prepayId); - https://github.com/Bacon/BaconQrCode - https://github.com/SimpleSoftwareIO/simple-qrcode (Bacon/BaconQrCode 的 Laravel 版本) - https://github.com/aferrandini/PHPQRCode - diff --git a/vendor/w7corp/easywechat/docs/src/3.x/poi.md b/vendor/w7corp/easywechat/docs/src/3.x/poi.md index 1e6bed09..fcb81f0a 100644 --- a/vendor/w7corp/easywechat/docs/src/3.x/poi.md +++ b/vendor/w7corp/easywechat/docs/src/3.x/poi.md @@ -1,6 +1,5 @@ # 门店 - ## 获取实例 ```php @@ -43,8 +42,8 @@ $info = array( "longitude" => 115.32375, "latitude" => 25.097486, "photo_list" => array( - array("photo_url" => "https://XXX.com"), - array("photo_url" => "https://XXX.com"), + array("photo_url" => "https://easywechat.com"), + array("photo_url" => "https://easywechat.com"), ), "recommend" => "麦辣鸡腿堡套餐,麦乐鸡,全家桶", "special" => "免费 wifi,外卖服务", @@ -56,14 +55,15 @@ $info = array( $result = $poi->create($info); // true or exception ``` -> 注意:新创建的门店在审核通过后,会以事件形式推送给商户填写的回调URL +> 注意:新创建的门店在审核通过后,会以事件形式推送给商户填写的回调 URL ## 获取指定门店信息 ```php $poi->get($poiId); ``` -- `$poiId` 为门店ID + +- `$poiId` 为门店 ID example: @@ -117,7 +117,7 @@ $pois = $poi->lists(0, 2);// 取2条记录 $poi->update($poiId, $data); ``` -- `$poiId` 为门店ID +- `$poiId` 为门店 ID - `$data` 需要更新的部分数据,**若有填写内容则为覆盖更新,若无内容则视为不 修改,维持原有内容。photo_list 字段为全列表覆盖,若需要增加图片,需将之前图片同样放入 list 中,在其后增加新增图片。如:已有 A、B、C 三张图片,又要增加 D、E 两张图,则需要调 用该接口,photo_list 传入 A、B、C、D、E 五张图片的链接。** example: @@ -149,6 +149,6 @@ $poi->delete(271262077);// true or exception - `invalid categories` 分类不合法,必须严格按照附表的分类填写 - `invalid photo url` 图片 url 不合法,必须使用接口 1 的图片上传 接口所获取的 url - `poi audit state must be approved` 门店状态必须未审核通过 -- `invalid poiid` poi_id 不正确 -- `invalid args` 参数不正确,请检查 json 字段 -- `system error` 系统错误,请稍后重试 \ No newline at end of file +- `invalid poiid` poi_id 不正确 +- `invalid args` 参数不正确,请检查 json 字段 +- `system error` 系统错误,请稍后重试 diff --git a/vendor/w7corp/easywechat/docs/src/3.x/roadmap.md b/vendor/w7corp/easywechat/docs/src/3.x/roadmap.md index 46cde9e4..238dea5e 100644 --- a/vendor/w7corp/easywechat/docs/src/3.x/roadmap.md +++ b/vendor/w7corp/easywechat/docs/src/3.x/roadmap.md @@ -1,6 +1,5 @@ # 路线图 - ## 3.1 - 微信小店 @@ -11,12 +10,12 @@ - 全新的架构,更清晰的模块拆分 - Debug 优化,便于快速定位问题 -- 统一返回微信API原值,以 Collection 类装载,便于便捷操作 +- 统一返回微信 API 原值,以 Collection 类装载,便于便捷操作 - 大量模块重写 - 全新的支付模块 - 多类型缓存系统 - 新的命名空间:EasyWeChat -- 专属网站与更清晰与文档:http://easywechat.org +- 专属网站与更清晰与文档:http://easywechat.com ## 2.1 diff --git a/vendor/w7corp/easywechat/docs/src/3.x/tutorial.md b/vendor/w7corp/easywechat/docs/src/3.x/tutorial.md index 0e5192df..cca31c52 100644 --- a/vendor/w7corp/easywechat/docs/src/3.x/tutorial.md +++ b/vendor/w7corp/easywechat/docs/src/3.x/tutorial.md @@ -1,7 +1,6 @@ # 快速开始 - -在我们已经安装完成后,即可很快的开始使用它了,当然你还是有必要明白PHP基本知识,如命名空间等,我这里就不赘述了。 +在我们已经安装完成后,即可很快的开始使用它了,当然你还是有必要明白 PHP 基本知识,如命名空间等,我这里就不赘述了。 我们以完成服务器端验证与接收响应用户发送的消息为例来演示,首先你有必要了解一下微信交互的运行流程: @@ -25,7 +24,7 @@ 考虑到这些,我已经把验证这一步给封装到 SDK 里了,你可以完全忽略这一步。 -下面我们来配置一个基本的服务端,这里假设我们自己的服务器域名叫 `easywechat.org`,我们在服务器上准备这么一个文件`server.php`: +下面我们来配置一个基本的服务端,这里假设我们自己的服务器域名叫 `easywechat.com`,我们在服务器上准备这么一个文件`server.php`: // server.php @@ -91,20 +90,17 @@ $response->send(); // Laravel 里请使用:return $response; 最后这一行我有必要详细讲一下: - ->1. 我们的 `$app->server->serve()` 就是执行服务端业务了,那么它的返回值呢,是一个 `Symfony\Component\HttpFoundation\Response` 实例。 ->2. 我这里是直接调用了它的 `send()` 方法,它就是直接输出了,我们在一些框架就不能直接输出了,那你就直接拿到 Response 实例后做相应的操作即可,比如 Laravel 里你就可以直接 `return $app->server->serve();` - +> 1. 我们的 `$app->server->serve()` 就是执行服务端业务了,那么它的返回值呢,是一个 `Symfony\Component\HttpFoundation\Response` 实例。 +> 2. 我这里是直接调用了它的 `send()` 方法,它就是直接输出了,我们在一些框架就不能直接输出了,那你就直接拿到 Response 实例后做相应的操作即可,比如 Laravel 里你就可以直接 `return $app->server->serve();` OK, 有了上面的代码,那么请你按 **[微信官方的接入指引](http://mp.weixin.qq.com/wiki/17/2d4265491f12608cd170a95559800f2d.html)** 操作,并相应修改上面的 `$options` 的配置。 -> URL 就是我们的 `http://easywechat.org/server.php`,这里我是举例哦,你可不要填写我的域名。 +> URL 就是我们的 `http://easywechat.com/server.php`,这里我是举例哦,你可不要填写我的域名。 -这样,点击提交验证就OK了。 +这样,点击提交验证就 OK 了。 > :heart: 请一定要将微信后台的开发者模式 “**启用**” !!!!!!看到红色 “**停用**” 才真正的是启用了。 - ## 接收 & 回复用户消息 那服务端验证通过了,我们就来试一下接收消息吧。 @@ -137,42 +133,41 @@ $response->send(); // Laravel 里请使用:return $response; 1. 所有的服务都通过主入口 `EasyWeChat\Foundation\Application` 类来获取: - ```php - $app = new Application($options); +```php +$app = new Application($options); - // services... - $server = $app->server; - $user = $app->user; - $oauth = $app->oauth; +// services... +$server = $app->server; +$user = $app->user; +$oauth = $app->oauth; - // ... js/menu/staff/material/qrcode/notice/stats... +// ... js/menu/staff/material/qrcode/notice/stats... - ``` +``` 2. 所有的 API 返回值均为 [`EasyWeChat\Support\Collection`](https://github.com/EasyWeChat/support/blob/master/src/Collection.php) 类,这个类是个什么东西呢? - 它实现了一些 **[PHP预定义接口](http://php.net/manual/zh/reserved.interfaces.php)**,比如:[`ArrayAccess`](http://php.net/manual/zh/class.arrayaccess.php)、[`Serializable`](http://php.net/manual/zh/class.serializable.php) 等。 +它实现了一些 **[PHP 预定义接口](http://php.net/manual/zh/reserved.interfaces.php)**,比如:[`ArrayAccess`](http://php.net/manual/zh/class.arrayaccess.php)、[`Serializable`](http://php.net/manual/zh/class.serializable.php) 等。 - 有啥好处呢?它让我们操作起返回值来更方便,比如: +有啥好处呢?它让我们操作起返回值来更方便,比如: - ```php - $userService = $app->user; // 用户API +```php +$userService = $app->user; // 用户API - $user = $userService->get($openId); +$user = $userService->get($openId); - // $user 便是一个 EasyWeChat\Support\Collection 实例 - $user['nickname']; - $user->nickname; - $user->get('nickname'); +// $user 便是一个 EasyWeChat\Support\Collection 实例 +$user['nickname']; +$user->nickname; +$user->get('nickname'); - //... - ``` +//... +``` - 还有这些方便的操作:检查是否存在某个属性 `$user->has('email')`、元素个数 `$user->count()`,还有返回数组 `$user->toArray()` ,生成 JSON `$user->toJSON()` 等。 +还有这些方便的操作:检查是否存在某个属性 `$user->has('email')`、元素个数 `$user->count()`,还有返回数组 `$user->toArray()` ,生成 JSON `$user->toJSON()` 等。 +## 最后 - ## 最后 +希望你在使用本 SDK 的时候能忘记微信官方给你的痛苦,同时如果你发现 SDK 的不足,欢迎提交 PR 或者给我[提建议 & 报告问题](https://github.com/overtrue/wechat/issues)。 - 希望你在使用本 SDK 的时候能忘记微信官方给你的痛苦,同时如果你发现 SDK 的不足,欢迎提交 PR 或者给我[提建议 & 报告问题](https://github.com/overtrue/wechat/issues)。 - - 祝你生活愉快! +祝你生活愉快! diff --git a/vendor/w7corp/easywechat/docs/src/4.x/client.md b/vendor/w7corp/easywechat/docs/src/4.x/client.md new file mode 100644 index 00000000..8c486d0d --- /dev/null +++ b/vendor/w7corp/easywechat/docs/src/4.x/client.md @@ -0,0 +1,44 @@ +# API 调用 + +该方法将 API 交由开发者自行调用,微信有部分新的接口4.x并未全部兼容支持,可以使用该方案去自行封装接口: + +例如URL Link接口 +```php +$api = $app->getClient(); + +$response = $api->httpPostJson('wxa/generate_urllink',[ + 'path' => 'pages/index/index', + 'is_expire' => true, + 'expire_type' => 1, + 'expire_interval' => 1 +]); +``` + +## 语法说明 + +```php +httpGet(string $uri, array $query = []) +httpPostJson(string $uri, array $data = [], array $query = []) +``` + + + +### GET + +```php +$response = $api->httpGet('/cgi-bin/user/list', [ + 'next_openid' => 'OPENID1', +]); +``` + +### POST + +```php +$response = $api->httpPostJson('/cgi-bin/user/info/updateremark', [ + "openid" => "oDF3iY9ffA-hqb2vVvbr7qxf6A0Q", + "remark" => "pangzi" +]); +``` + + + diff --git a/vendor/w7corp/easywechat/docs/src/4.x/official-account/accounts.md b/vendor/w7corp/easywechat/docs/src/4.x/official-account/accounts.md index bdbd37eb..c0f31045 100644 --- a/vendor/w7corp/easywechat/docs/src/4.x/official-account/accounts.md +++ b/vendor/w7corp/easywechat/docs/src/4.x/official-account/accounts.md @@ -12,7 +12,7 @@ 在微信公众平台的设置中,您可以将您帐号中平台的 `url` 设置为 `您的网址/?id=xxx`,如: ``` -http://www.easywechat.com/wechat?id=1 +http://easywechat.com/wechat?id=1 ``` 而在程序入口处,根据 `id` 查找对应帐号的 `appid` 和 其它信息来创建配置数组创建实例即可。 diff --git a/vendor/w7corp/easywechat/docs/src/4.x/official-account/card.md b/vendor/w7corp/easywechat/docs/src/4.x/official-account/card.md index adaf3edc..153a3c7d 100644 --- a/vendor/w7corp/easywechat/docs/src/4.x/official-account/card.md +++ b/vendor/w7corp/easywechat/docs/src/4.x/official-account/card.md @@ -37,7 +37,7 @@ $card->create($cardType = 'member_card', array $attributes); ```php [ @@ -109,7 +109,7 @@ $attributes = [ 'logo_url' => 'http://mmbiz.qpic.cn/mmbiz/2aJY6aCPatSeibYAyy7yct9zJXL9WsNVL4JdkTbBr184gNWS6nibcA75Hia9CqxicsqjYiaw2xuxYZiaibkmORS2oovdg/0', 'center_title' => '顶部居中按钮', 'center_sub_title' => '按钮下方的wording', - 'center_url' => 'http://www.easywechat.com', + 'center_url' => 'http://easywechat.com', 'custom_url_name' => '立即使用', 'custom_url' => 'http://www.qq.com', 'custom_url_sub_title' => '6个汉字tips', diff --git a/vendor/w7corp/easywechat/docs/src/4.x/official-account/material.md b/vendor/w7corp/easywechat/docs/src/4.x/official-account/material.md index 4ff1e227..d25098a4 100644 --- a/vendor/w7corp/easywechat/docs/src/4.x/official-account/material.md +++ b/vendor/w7corp/easywechat/docs/src/4.x/official-account/material.md @@ -84,7 +84,7 @@ $result = $app->material->updateArticle($mediaId, [ 'show_cover' => 1, // 是否在文章内容显示封面图片 'digest' => '这里是文章摘要', 'content' => '这里是文章内容,你可以放很长的内容', - 'source_url' => 'https://www.easywechat.com', + 'source_url' => 'https://easywechat.com', ]); // 指定更新多图文中的第 2 篇 @@ -230,7 +230,7 @@ $stats = $app->material->stats(); // } ``` -### 删除永久素材; +### 删除永久素材 ```php $app->material->delete($mediaId); diff --git a/vendor/w7corp/easywechat/docs/src/4.x/official-account/oauth.md b/vendor/w7corp/easywechat/docs/src/4.x/official-account/oauth.md index 559ac632..d8e23564 100644 --- a/vendor/w7corp/easywechat/docs/src/4.x/official-account/oauth.md +++ b/vendor/w7corp/easywechat/docs/src/4.x/official-account/oauth.md @@ -133,7 +133,7 @@ $user = $app->oauth->user(); 我们这里来用原生 PHP 写法举个例子,`oauth_callback` 是我们的授权回调 URL (未 urlencode 编码的 URL), `user/profile` 是我们需要授权才能访问的页面,它的 PHP 代码如下: ```php -// http://easywechat.org/user/profile +// http://easywechat.com/user/profile 115.32375, "latitude" => 25.097486, "photo_list" => array( - array("photo_url" => "https://XXX.com"), - array("photo_url" => "https://XXX.com"), + array("photo_url" => "https://easywechat.com"), + array("photo_url" => "https://easywechat.com"), ), "recommend" => "麦辣鸡腿堡套餐,麦乐鸡,全家桶", "special" => "免费 wifi,外卖服务", diff --git a/vendor/w7corp/easywechat/docs/src/4.x/official-account/template_message.md b/vendor/w7corp/easywechat/docs/src/4.x/official-account/template_message.md index b48d94cf..9f6d31a2 100644 --- a/vendor/w7corp/easywechat/docs/src/4.x/official-account/template_message.md +++ b/vendor/w7corp/easywechat/docs/src/4.x/official-account/template_message.md @@ -40,7 +40,7 @@ $app->template_message->deletePrivateTemplate($templateId); $app->template_message->send([ 'touser' => 'user-openid', 'template_id' => 'template-id', - 'url' => 'https://easywechat.org', + 'url' => 'https://easywechat.com', 'miniprogram' => [ 'appid' => 'xxxxxxx', 'pagepath' => 'pages/xxx', @@ -52,6 +52,7 @@ $app->template_message->send([ ], ]); ``` + > 如果 url 和 miniprogram 字段都传,会优先跳转小程序。 ## 发送一次性订阅消息 @@ -60,7 +61,7 @@ $app->template_message->send([ $app->template_message->sendSubscription([ 'touser' => 'user-openid', 'template_id' => 'template-id', - 'url' => 'https://easywechat.org', + 'url' => 'https://easywechat.com', 'scene' => 1000, 'data' => [ 'key1' => 'VALUE', diff --git a/vendor/w7corp/easywechat/docs/src/4.x/overview.md b/vendor/w7corp/easywechat/docs/src/4.x/overview.md index 0454d812..2b7b5a36 100644 --- a/vendor/w7corp/easywechat/docs/src/4.x/overview.md +++ b/vendor/w7corp/easywechat/docs/src/4.x/overview.md @@ -28,7 +28,7 @@ EasyWeChat 的安装非常简单,因为它是一个标准的 [Composer](https: ### 开始之前 -我们提供了视频教程:https://www.easywechat.com/tutorials 当然,我还是建议你具备以下基础知识,否则可能没有那么快上手。 +我们提供了视频教程: 当然,我还是建议你具备以下基础知识,否则可能没有那么快上手。 本 SDK 不是一个全新再造的东西,所以我不会从 0 开始教会你开发微信,你完全有必要在使用本 SDK 前做好以下工作: @@ -43,8 +43,8 @@ EasyWeChat 的安装非常简单,因为它是一个标准的 [Composer](https: 另外你有必要看一下以下的链接: -> - https://learnku.com/laravel/t/535/assertion-people-who-do-not-understand-the-wisdom-of-asking-questions-will-not-graduate-from-junior-programmers -> - http://laravel-china.github.io/php-the-right-way/ +> - +> - 如果你在群里问以下类似的问题,这真的是你没有做好上面的工作: diff --git a/vendor/w7corp/easywechat/docs/src/4.x/payment/order.md b/vendor/w7corp/easywechat/docs/src/4.x/payment/order.md index 9997e4bc..e5a7e809 100644 --- a/vendor/w7corp/easywechat/docs/src/4.x/payment/order.md +++ b/vendor/w7corp/easywechat/docs/src/4.x/payment/order.md @@ -57,7 +57,7 @@ $result = $app->order->unify([ 'plan_id' => 123,// 协议模板id 'contract_code' => 100001256,// 签约协议号 'contract_display_account' => '腾讯充值中心',// 签约用户的名称 - 'contract_notify_url' => 'http://easywechat.org/contract_notify' + 'contract_notify_url' => 'http://easywechat.com/contract_notify' ], $isContract); //$result: diff --git a/vendor/w7corp/easywechat/docs/src/4.x/payment/scan-pay.md b/vendor/w7corp/easywechat/docs/src/4.x/payment/scan-pay.md index e7b0b7d7..a035356a 100644 --- a/vendor/w7corp/easywechat/docs/src/4.x/payment/scan-pay.md +++ b/vendor/w7corp/easywechat/docs/src/4.x/payment/scan-pay.md @@ -2,7 +2,7 @@ ### 模式一:先生成产品二维码,扫码下单后支付 -> 请务必先熟悉流程:https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=6_4 +> 请务必先熟悉流程: #### 生成产品二维码内容 @@ -14,13 +14,13 @@ $content = $app->scheme($productId); // $productId 为你的产品/商品ID, 将 `$content` 生成二维码,SDK 并不内置二维码生成库,使用你熟悉的工具创建二维码即可,比如 PHP 部分有以下工具可以选择: -> - https://github.com/endroid/qr-code -> - https://github.com/SimpleSoftwareIO/simple-qrcode -> - https://github.com/aferrandini/PHPQRCode +> - +> - +> - #### 处理回调 -当用户扫码时,你的回调接口会收到一个通知,调用[统一下单接口](https://www.easywechat.com/docs/master/zh-CN/payment/order)创建订单后返回 `prepay_id`,你可以使用下面的代码处理扫码通知: +当用户扫码时,你的回调接口会收到一个通知,调用[统一下单接口](https://easywechat.com/docs/master/zh-CN/payment/order)创建订单后返回 `prepay_id`,你可以使用下面的代码处理扫码通知: ```php // 扫码支付通知接收第三个参数 `$alert`,如果触发该函数,会返回“业务错误”到微信服务器,触发 `$fail` 则返回“通信错误” @@ -39,15 +39,15 @@ $response = $app->handleScannedNotify(function ($message, $fail, $alert) use ($a $response->send(); ``` -用户在手机上付完钱以后,你会再收到**付款结果通知**,这时候请参考:[处理微信支付通知](https://www.easywechat.com/docs/master/zh-CN/payment/notify) 更新您的订单状态。 +用户在手机上付完钱以后,你会再收到**付款结果通知**,这时候请参考:[处理微信支付通知](https://easywechat.com/docs/master/zh-CN/payment/notify) 更新您的订单状态。 ### 模式二:先下单,生成订单后创建二维码 -> :https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=6_5 +> : #### 根据用户选购的商品生成订单 -调用[统一下单接口](https://www.easywechat.com/docs/master/zh-CN/payment/order)创建订单: +调用[统一下单接口](https://easywechat.com/docs/master/zh-CN/payment/order)创建订单: ```php $result = $app->order->unify([ @@ -67,4 +67,4 @@ $result = $app->order->unify([ #### 支付通知 -这种方式的通知就只有**付款结果通知**了,这时候请参考:[处理微信支付通知](https://www.easywechat.com/docs/master/zh-CN/payment/notify) 更新您的订单状态。 +这种方式的通知就只有**付款结果通知**了,这时候请参考:[处理微信支付通知](https://easywechat.com/docs/master/zh-CN/payment/notify) 更新您的订单状态。 diff --git a/vendor/w7corp/easywechat/docs/src/4.x/sidebar.js b/vendor/w7corp/easywechat/docs/src/4.x/sidebar.js index c193ec94..ae975716 100644 --- a/vendor/w7corp/easywechat/docs/src/4.x/sidebar.js +++ b/vendor/w7corp/easywechat/docs/src/4.x/sidebar.js @@ -95,10 +95,6 @@ exports = module.exports = [ link: '/4.x/mini-program/template_message.html' }, { text: '消息解密', link: '/4.x/mini-program/decrypt.html' }, - { - text: '内容安全', - link: '/4.x/basic-services/content_security.html' - }, { text: '物流助手', link: '/4.x/mini-program/express.html' }, { text: '生物认证', link: '/4.x/mini-program/soter.html' }, { text: '插件管理', link: '/4.x/mini-program/plugin.html' }, @@ -106,11 +102,6 @@ exports = module.exports = [ { text: '订阅消息', link: '/4.x/mini-program/subscribe_message.html' - }, - { text: '安全风控', link: '/4.x/mini-program/safety_control.html' }, - { - text: 'URL Scheme', - link: '/4.x/mini-program/url_scheme_generate.html' } ] }, @@ -195,6 +186,13 @@ exports = module.exports = [ { text: '模块替换', link: '/4.x/customize/replace-service.html' } ] }, + { + text: '通用', + collapsible: true, + items: [ + { text: 'API 调用', link: '/4.x/client.html' } + ] + }, { text: '其他', collapsible: true, diff --git a/vendor/w7corp/easywechat/docs/src/4.x/wework/external-contact.md b/vendor/w7corp/easywechat/docs/src/4.x/wework/external-contact.md index d23196ad..4d7b8754 100644 --- a/vendor/w7corp/easywechat/docs/src/4.x/wework/external-contact.md +++ b/vendor/w7corp/easywechat/docs/src/4.x/wework/external-contact.md @@ -128,6 +128,57 @@ $configId = '42b34949e138eb6e027c123cba77fad7'; $app->contact_way->delete($configId); ``` +## 客户朋友圈 + +### 企业发表内容到客户的朋友圈 + +```php +$msg = [ + "text" => [ + "content" => "文本消息内容" + ], + "attachments" => [ + [ + "msgtype" => "image", + "image" => [ + "media_id" => "MEDIA_ID" + ] + ], + [ + "msgtype" => "video", + "video" => [ + "media_id" => "MEDIA_ID" + ] + ], + [ + "msgtype" => "link", + "link" => [ + "title" => "消息标题", + "url" => "https://example.link.com/path", + "media_id" => "MEDIA_ID" + ] + ] + ], + "visible_range" => [ + "sender_list" => [ + "user_list" => ["zhangshan","lisi"], + "department_list" => [2,3] + ], + "external_contact_list" => [ + "tag_list" => [ "etXXXXXXXXXX", "etYYYYYYYYYY"] + ] + ] +]; + +$app->external_contact_message->moments($msg); + +//{ +// "errcode":0, +// "errmsg":"ok", +// "jobid":"xxxx" +//} +``` + ## 消息管理 diff --git a/vendor/w7corp/easywechat/docs/src/4.x/wework/group-robot.md b/vendor/w7corp/easywechat/docs/src/4.x/wework/group-robot.md index 305d4729..6d18af0b 100644 --- a/vendor/w7corp/easywechat/docs/src/4.x/wework/group-robot.md +++ b/vendor/w7corp/easywechat/docs/src/4.x/wework/group-robot.md @@ -1,11 +1,12 @@ # 群机器人 ## 使用说明 + 使用前必须先在群组里面添加机器人,然后将 `Webhook 地址` 中的 `key` 取出来,作为示例中 `$groupKey` 的值。 -> Webhook 地址示例:https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=`ab4f609a-3feb-427c-ae9d-b319ca712d36` +> Webhook 地址示例: -> 微信文档:https://work.weixin.qq.com/api/doc#90000/90136/91770 +> 微信文档: ## 发送文本类型消息 @@ -100,7 +101,7 @@ $items = [ new NewsItem([ 'title' => '中秋节礼品领取', 'description' => '今年中秋节公司有豪礼相送', - 'url' => 'https://www.easywechat.com', + 'url' => 'https://easywechat.com', 'image' => 'http://res.mail.qq.com/node/ww/wwopenmng/images/independent/doc/test_pic_msg1.png', ]), diff --git a/vendor/w7corp/easywechat/docs/src/4.x/wework/media.md b/vendor/w7corp/easywechat/docs/src/4.x/wework/media.md index d115b647..0d94643a 100644 --- a/vendor/w7corp/easywechat/docs/src/4.x/wework/media.md +++ b/vendor/w7corp/easywechat/docs/src/4.x/wework/media.md @@ -41,4 +41,18 @@ $app->media->uploadFile($path); ```php $app->media->get($mediaId); +``` + +## 上传附件资源 + +所有文件size必须大于5个字节 + +目前 商品图册只支持图片类型; 朋友圈只支持图片、视频类型 + +> - 图片(image):10MB,支持JPG,PNG格式,朋友圈类型图片不超过1440 x 1080 +> - 视频(video) :10MB,支持MP4格式,朋友圈类型视频时长不超过30秒 +> - 文件(file) :10MB + +```php +$app->media->uploadAttachmentResources($path, 'image', 1); ``` \ No newline at end of file diff --git a/vendor/w7corp/easywechat/docs/src/5.x/official-account/accounts.md b/vendor/w7corp/easywechat/docs/src/5.x/official-account/accounts.md index bdbd37eb..c0f31045 100644 --- a/vendor/w7corp/easywechat/docs/src/5.x/official-account/accounts.md +++ b/vendor/w7corp/easywechat/docs/src/5.x/official-account/accounts.md @@ -12,7 +12,7 @@ 在微信公众平台的设置中,您可以将您帐号中平台的 `url` 设置为 `您的网址/?id=xxx`,如: ``` -http://www.easywechat.com/wechat?id=1 +http://easywechat.com/wechat?id=1 ``` 而在程序入口处,根据 `id` 查找对应帐号的 `appid` 和 其它信息来创建配置数组创建实例即可。 diff --git a/vendor/w7corp/easywechat/docs/src/5.x/official-account/card.md b/vendor/w7corp/easywechat/docs/src/5.x/official-account/card.md index adaf3edc..153a3c7d 100644 --- a/vendor/w7corp/easywechat/docs/src/5.x/official-account/card.md +++ b/vendor/w7corp/easywechat/docs/src/5.x/official-account/card.md @@ -37,7 +37,7 @@ $card->create($cardType = 'member_card', array $attributes); ```php [ @@ -109,7 +109,7 @@ $attributes = [ 'logo_url' => 'http://mmbiz.qpic.cn/mmbiz/2aJY6aCPatSeibYAyy7yct9zJXL9WsNVL4JdkTbBr184gNWS6nibcA75Hia9CqxicsqjYiaw2xuxYZiaibkmORS2oovdg/0', 'center_title' => '顶部居中按钮', 'center_sub_title' => '按钮下方的wording', - 'center_url' => 'http://www.easywechat.com', + 'center_url' => 'http://easywechat.com', 'custom_url_name' => '立即使用', 'custom_url' => 'http://www.qq.com', 'custom_url_sub_title' => '6个汉字tips', diff --git a/vendor/w7corp/easywechat/docs/src/5.x/official-account/material.md b/vendor/w7corp/easywechat/docs/src/5.x/official-account/material.md index 4ff1e227..d25098a4 100644 --- a/vendor/w7corp/easywechat/docs/src/5.x/official-account/material.md +++ b/vendor/w7corp/easywechat/docs/src/5.x/official-account/material.md @@ -84,7 +84,7 @@ $result = $app->material->updateArticle($mediaId, [ 'show_cover' => 1, // 是否在文章内容显示封面图片 'digest' => '这里是文章摘要', 'content' => '这里是文章内容,你可以放很长的内容', - 'source_url' => 'https://www.easywechat.com', + 'source_url' => 'https://easywechat.com', ]); // 指定更新多图文中的第 2 篇 @@ -230,7 +230,7 @@ $stats = $app->material->stats(); // } ``` -### 删除永久素材; +### 删除永久素材 ```php $app->material->delete($mediaId); diff --git a/vendor/w7corp/easywechat/docs/src/5.x/official-account/oauth.md b/vendor/w7corp/easywechat/docs/src/5.x/official-account/oauth.md index 66ff72eb..f4a35b4a 100644 --- a/vendor/w7corp/easywechat/docs/src/5.x/official-account/oauth.md +++ b/vendor/w7corp/easywechat/docs/src/5.x/official-account/oauth.md @@ -127,7 +127,7 @@ $user = $app->oauth->userFromCode($code); 我们这里来用原生 PHP 写法举个例子,`oauth_callback` 是我们的授权回调 URL (未 urlencode 编码的 URL), `user/profile` 是我们需要授权才能访问的页面,它的 PHP 代码如下: ```php -// http://easywechat.org/user/profile +// http://easywechat.com/user/profile 115.32375, "latitude" => 25.097486, "photo_list" => array( - array("photo_url" => "https://XXX.com"), - array("photo_url" => "https://XXX.com"), + array("photo_url" => "https://easywechat.com"), + array("photo_url" => "https://easywechat.com"), ), "recommend" => "麦辣鸡腿堡套餐,麦乐鸡,全家桶", "special" => "免费 wifi,外卖服务", diff --git a/vendor/w7corp/easywechat/docs/src/5.x/official-account/template_message.md b/vendor/w7corp/easywechat/docs/src/5.x/official-account/template_message.md index b48d94cf..9f6d31a2 100644 --- a/vendor/w7corp/easywechat/docs/src/5.x/official-account/template_message.md +++ b/vendor/w7corp/easywechat/docs/src/5.x/official-account/template_message.md @@ -40,7 +40,7 @@ $app->template_message->deletePrivateTemplate($templateId); $app->template_message->send([ 'touser' => 'user-openid', 'template_id' => 'template-id', - 'url' => 'https://easywechat.org', + 'url' => 'https://easywechat.com', 'miniprogram' => [ 'appid' => 'xxxxxxx', 'pagepath' => 'pages/xxx', @@ -52,6 +52,7 @@ $app->template_message->send([ ], ]); ``` + > 如果 url 和 miniprogram 字段都传,会优先跳转小程序。 ## 发送一次性订阅消息 @@ -60,7 +61,7 @@ $app->template_message->send([ $app->template_message->sendSubscription([ 'touser' => 'user-openid', 'template_id' => 'template-id', - 'url' => 'https://easywechat.org', + 'url' => 'https://easywechat.com', 'scene' => 1000, 'data' => [ 'key1' => 'VALUE', diff --git a/vendor/w7corp/easywechat/docs/src/5.x/open-platform/authorizer-delegate.md b/vendor/w7corp/easywechat/docs/src/5.x/open-platform/authorizer-delegate.md index c145d4fb..86ca4f46 100644 --- a/vendor/w7corp/easywechat/docs/src/5.x/open-platform/authorizer-delegate.md +++ b/vendor/w7corp/easywechat/docs/src/5.x/open-platform/authorizer-delegate.md @@ -25,7 +25,7 @@ $miniProgram = $openPlatform->miniProgram(string $appId, string $refreshToken); > $appId 为授权方公众号 APPID,非开放平台第三方平台 APPID > -> $refreshToken 为授权方的 refresh_token,可通过 [获取授权方授权信息](https://www.easywechat.com/docs/master/open-platform/index#heading-h2-2) 接口获得。 +> $refreshToken 为授权方的 refresh_token,可通过 [获取授权方授权信息](https://easywechat.com/docs/master/open-platform/index#heading-h2-2) 接口获得。 ### 帮助授权方管理开放平台账号 @@ -51,11 +51,11 @@ $result = $account->getBinding(); > 授权第三方平台注册的开放平台帐号只可用于获取用户 unionid 实现用户身份打通。 > -> 第三方平台不可操作(包括绑定/解绑)通过 open.weixin.qq.com 线上流程注册的开放平台帐号。 +> 第三方平台不可操作(包括绑定/解绑)通过 open.weixin.qq.com 线上流程注册的开放平台帐号。 > -> 公众号只可将此权限集授权给一个第三方平台,授权互斥。 +> 公众号只可将此权限集授权给一个第三方平台,授权互斥。 -接下来的 API 调用等操作和公众号、小程序的开发一致,请移步到[公众号](https://www.easywechat.com/docs/master/official-account/index)或[小程序](https://www.easywechat.com/docs/master/mini-program/index)开发章节继续进行开发吧。 +接下来的 API 调用等操作和公众号、小程序的开发一致,请移步到[公众号](https://easywechat.com/docs/master/official-account/index)或[小程序](https://easywechat.com/docs/master/mini-program/index)开发章节继续进行开发吧。 ### 代码示例 diff --git a/vendor/w7corp/easywechat/docs/src/5.x/overview.md b/vendor/w7corp/easywechat/docs/src/5.x/overview.md index 90d0b69a..a5abcbdc 100644 --- a/vendor/w7corp/easywechat/docs/src/5.x/overview.md +++ b/vendor/w7corp/easywechat/docs/src/5.x/overview.md @@ -28,7 +28,7 @@ EasyWeChat 的安装非常简单,因为它是一个标准的 [Composer](https: ### 开始之前 -我们提供了视频教程:https://www.easywechat.com/tutorials 当然,我还是建议你具备以下基础知识,否则可能没有那么快上手。 +我们提供了视频教程: 当然,我还是建议你具备以下基础知识,否则可能没有那么快上手。 本 SDK 不是一个全新再造的东西,所以我不会从 0 开始教会你开发微信,你完全有必要在使用本 SDK 前做好以下工作: @@ -43,8 +43,8 @@ EasyWeChat 的安装非常简单,因为它是一个标准的 [Composer](https: 另外你有必要看一下以下的链接: -> - https://learnku.com/laravel/t/535/assertion-people-who-do-not-understand-the-wisdom-of-asking-questions-will-not-graduate-from-junior-programmers -> - http://laravel-china.github.io/php-the-right-way/ +> - +> - 如果你在群里问以下类似的问题,这真的是你没有做好上面的工作: diff --git a/vendor/w7corp/easywechat/docs/src/5.x/payment/order.md b/vendor/w7corp/easywechat/docs/src/5.x/payment/order.md index 7516daab..a55844c9 100644 --- a/vendor/w7corp/easywechat/docs/src/5.x/payment/order.md +++ b/vendor/w7corp/easywechat/docs/src/5.x/payment/order.md @@ -53,7 +53,7 @@ $result = $app->order->unify([ 'plan_id' => 123,// 协议模板id 'contract_code' => 100001256,// 签约协议号 'contract_display_account' => '腾讯充值中心',// 签约用户的名称 - 'contract_notify_url' => 'http://easywechat.org/contract_notify' + 'contract_notify_url' => 'http://easywechat.com/contract_notify' ], $isContract); //$result: diff --git a/vendor/w7corp/easywechat/docs/src/5.x/payment/scan-pay.md b/vendor/w7corp/easywechat/docs/src/5.x/payment/scan-pay.md index f1642aec..a6eac7bc 100644 --- a/vendor/w7corp/easywechat/docs/src/5.x/payment/scan-pay.md +++ b/vendor/w7corp/easywechat/docs/src/5.x/payment/scan-pay.md @@ -2,7 +2,7 @@ ### 模式一:先生成产品二维码,扫码下单后支付 -> 请务必先熟悉流程:https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=6_4 +> 请务必先熟悉流程: #### 生成产品二维码内容 @@ -14,13 +14,13 @@ $content = $app->scheme($productId); // $productId 为你的产品/商品ID, 将 `$content` 生成二维码,SDK 并不内置二维码生成库,使用你熟悉的工具创建二维码即可,比如 PHP 部分有以下工具可以选择: -> - https://github.com/endroid/qr-code -> - https://github.com/SimpleSoftwareIO/simple-qrcode -> - https://github.com/aferrandini/PHPQRCode +> - +> - +> - #### 处理回调 -当用户扫码时,你的回调接口会收到一个通知,调用[统一下单接口](https://www.easywechat.com/5.x/payment/order)创建订单后返回 `prepay_id`,你可以使用下面的代码处理扫码通知: +当用户扫码时,你的回调接口会收到一个通知,调用[统一下单接口](https://easywechat.com/5.x/payment/order)创建订单后返回 `prepay_id`,你可以使用下面的代码处理扫码通知: ```php // 扫码支付通知接收第三个参数 `$alert`,如果触发该函数,会返回“业务错误”到微信服务器,触发 `$fail` 则返回“通信错误” @@ -39,15 +39,15 @@ $response = $app->handleScannedNotify(function ($message, $fail, $alert) use ($a $response->send(); ``` -用户在手机上付完钱以后,你会再收到**付款结果通知**,这时候请参考:[处理微信支付通知](https://www.easywechat.com/5.x/payment/notify) 更新您的订单状态。 +用户在手机上付完钱以后,你会再收到**付款结果通知**,这时候请参考:[处理微信支付通知](https://easywechat.com/5.x/payment/notify) 更新您的订单状态。 ### 模式二:先下单,生成订单后创建二维码 -> :https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=6_5 +> : #### 根据用户选购的商品生成订单 -调用[统一下单接口](https://www.easywechat.com/5.x/payment/order)创建订单: +调用[统一下单接口](https://easywechat.com/5.x/payment/order)创建订单: ```php $result = $app->order->unify([ @@ -67,4 +67,4 @@ $result = $app->order->unify([ #### 支付通知 -这种方式的通知就只有**付款结果通知**了,这时候请参考:[处理微信支付通知](https://www.easywechat.com/5.x/payment/notify) 更新您的订单状态。 +这种方式的通知就只有**付款结果通知**了,这时候请参考:[处理微信支付通知](https://easywechat.com/5.x/payment/notify) 更新您的订单状态。 diff --git a/vendor/w7corp/easywechat/docs/src/5.x/wework/group-robot.md b/vendor/w7corp/easywechat/docs/src/5.x/wework/group-robot.md index 305d4729..6d18af0b 100644 --- a/vendor/w7corp/easywechat/docs/src/5.x/wework/group-robot.md +++ b/vendor/w7corp/easywechat/docs/src/5.x/wework/group-robot.md @@ -1,11 +1,12 @@ # 群机器人 ## 使用说明 + 使用前必须先在群组里面添加机器人,然后将 `Webhook 地址` 中的 `key` 取出来,作为示例中 `$groupKey` 的值。 -> Webhook 地址示例:https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=`ab4f609a-3feb-427c-ae9d-b319ca712d36` +> Webhook 地址示例: -> 微信文档:https://work.weixin.qq.com/api/doc#90000/90136/91770 +> 微信文档: ## 发送文本类型消息 @@ -100,7 +101,7 @@ $items = [ new NewsItem([ 'title' => '中秋节礼品领取', 'description' => '今年中秋节公司有豪礼相送', - 'url' => 'https://www.easywechat.com', + 'url' => 'https://easywechat.com', 'image' => 'http://res.mail.qq.com/node/ww/wwopenmng/images/independent/doc/test_pic_msg1.png', ]), diff --git a/vendor/w7corp/easywechat/docs/src/6.x/client.md b/vendor/w7corp/easywechat/docs/src/6.x/client.md index facdd002..99e1b5e5 100644 --- a/vendor/w7corp/easywechat/docs/src/6.x/client.md +++ b/vendor/w7corp/easywechat/docs/src/6.x/client.md @@ -39,7 +39,7 @@ delete(string $uri, array $options = []): Symfony\Contracts\HttpClient\ResponseI ### GET ```php -$response = $api->get('/cgi-bin/user/list', [ +$response = $api->get('/cgi-bin/user/list', [ 'next_openid' => 'OPENID1', ]); ``` diff --git a/vendor/w7corp/easywechat/docs/src/6.x/index.md b/vendor/w7corp/easywechat/docs/src/6.x/index.md index 0f2e3fcb..87db69a6 100644 --- a/vendor/w7corp/easywechat/docs/src/6.x/index.md +++ b/vendor/w7corp/easywechat/docs/src/6.x/index.md @@ -1,5 +1,6 @@ > 👋🏼 您当前浏览的文档为 6.x,其它版本的文档请参考:[5.x](/5.x/)、[4.x](/4.x/)、[3.x](/3.x/) + # EasyWeChat EasyWeChat 是一个开源的 [微信](http://www.wechat.com) 非官方 SDK。安装非常简单,因为它是一个标准的 [Composer](https://getcomposer.org/) 包,这意味着任何满足下列安装条件的 PHP 项目支持 Composer 都可以使用它。 @@ -14,6 +15,11 @@ EasyWeChat 是一个开源的 [微信](http://www.wechat.com) 非官方 SDK。 ## 安装 +::: warning +阿里云的 Composer 源已经停止维护,请停止使用,或更换官方源,或者[腾讯软件源](https://mirrors.tencent.com/help/composer.html) +::: + + ```shell composer require w7corp/easywechat:^6.7 ``` diff --git a/vendor/w7corp/easywechat/docs/src/6.x/mini-app/config.md b/vendor/w7corp/easywechat/docs/src/6.x/mini-app/config.md index 42a07c54..0ad90865 100644 --- a/vendor/w7corp/easywechat/docs/src/6.x/mini-app/config.md +++ b/vendor/w7corp/easywechat/docs/src/6.x/mini-app/config.md @@ -14,6 +14,14 @@ 'token' => 'your-token', // Token 'aes_key' => '', // EncodingAESKey,兼容与安全模式下请一定要填写!!! + /** + * 是否使用 Stable Access Token + * 默认 false + * https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/mp-access-token/getStableAccessToken.html + * true 使用 false 不使用 + */ + 'use_stable_access_token' => false, + /** * 接口请求相关配置,超时时间等,具体可用参数请参考: * https://github.com/symfony/symfony/blob/5.3/src/Symfony/Contracts/HttpClient/HttpClientInterface.php diff --git a/vendor/w7corp/easywechat/docs/src/6.x/mini-app/index.md b/vendor/w7corp/easywechat/docs/src/6.x/mini-app/index.md index 4693e64e..690e9795 100644 --- a/vendor/w7corp/easywechat/docs/src/6.x/mini-app/index.md +++ b/vendor/w7corp/easywechat/docs/src/6.x/mini-app/index.md @@ -11,7 +11,7 @@ $config = [ 'app_id' => 'wx3cf0f39249eb0exx', 'secret' => 'f1c242f4f28f735d4687abb469072axx', 'token' => 'easywechat', - 'aes_key' => '......' + 'aes_key' => '......', /** * 接口请求相关配置,超时时间等,具体可用参数请参考: diff --git a/vendor/w7corp/easywechat/docs/src/6.x/oauth.md b/vendor/w7corp/easywechat/docs/src/6.x/oauth.md index 207cf676..420b287f 100644 --- a/vendor/w7corp/easywechat/docs/src/6.x/oauth.md +++ b/vendor/w7corp/easywechat/docs/src/6.x/oauth.md @@ -27,12 +27,12 @@ OAuth 是一个关于授权(authorization)的开放网络标准,在全世 > - **公众平台网页授权获取用户信息** -**授权 URL**: `https://open.weixin.qq.com/connect/oauth2/authorize` +**授权 URL**: `https://open.weixin.qq.com/connect/oauth2/authorize` **Scopes**: `snsapi_base` 与 `snsapi_userinfo` > - **开放平台网页登录** -**授权 URL**: `https://open.weixin.qq.com/connect/qrconnect` +**授权 URL**: `https://open.weixin.qq.com/connect/qrconnect` **Scopes**: `snsapi_login` 他们的逻辑都一样: @@ -101,14 +101,14 @@ $user = $oauth->userFromCode($code); - `$user->getNickname(); ` 对应微信的 `nickname` - `$user->getName(); ` 对应微信的 `nickname` - `$user->getAvatar(); ` 头像地址 -- ~~`$user->getRaw(); ` 原始 API 返回的结果~~ +- `$user->getRaw(); ` 原始 API 返回的结果 - `$user->getAccessToken(); ` `access_token` - `$user->getRefreshToken(); ` `refresh_token` - `$user->getExpiresIn(); ` `expires_in`,Access Token 过期时间 - `$user->getTokenResponse(); ` 返回 `access_token` 时的响应值 > `$user` 里没有`openid`, `$user->id` 便是 `openid`. -> 如果你想拿微信返回给你的原样的全部信息,请使用:~~$user->getRaw();~~$user->getAttributes(); +> 如果你想拿微信返回给你的原样的全部信息,请使用:$user->getRaw(); 当 `scope` 为 `snsapi_base` 时 `$oauth->userFromCode($code);` 对象里只有 `id`,没有其它信息。 @@ -117,7 +117,7 @@ $user = $oauth->userFromCode($code); 我们这里来用公众号原生 PHP 写法举个例子,`oauth_callback` 是我们的授权回调 URL (未 urlencode 编码的 URL), `user/profile` 是我们需要授权才能访问的页面,它的 PHP 代码如下: ```php -// http://easywechat.org/user/profile +// http://easywechat.com/user/profile 'your-token', // Token 'aes_key' => '', // EncodingAESKey,兼容与安全模式下请一定要填写!!! + /** + * 是否使用 Stable Access Token + * 默认 false + * https://developers.weixin.qq.com/doc/offiaccount/Basic_Information/getStableAccessToken.html + * true 使用 false 不使用 + */ + 'use_stable_access_token' => false, + /** * OAuth 配置 * diff --git a/vendor/w7corp/easywechat/docs/src/6.x/official-account/examples.md b/vendor/w7corp/easywechat/docs/src/6.x/official-account/examples.md index f6dea7c7..2e470d25 100644 --- a/vendor/w7corp/easywechat/docs/src/6.x/official-account/examples.md +++ b/vendor/w7corp/easywechat/docs/src/6.x/official-account/examples.md @@ -2,6 +2,39 @@ > 👏🏻 欢迎点击本页下方 "帮助我们改善此页面!" 链接参与贡献更多的使用示例! +
+ webman 服务端验证消息 + +```php +get(), $request->post(), [], $request->cookie(), [], [], $request->rawBody()); + $symfony_request->headers = new HeaderBag($request->header()); + $app->setRequestFromSymfonyRequest($symfony_request); + $server = $app->getServer(); + $response = $server->serve(); + + return response($response->getBody()); + } +} +``` + +