+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ repeated string repeated_field = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
+ * @return \Google\Protobuf\RepeatedField
*/
public function getRepeatedField()
{
@@ -152,7 +152,7 @@ public function getRepeatedField()
/**
* Generated from protobuf field repeated string repeated_field = 3;
- * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param string[]|\Google\Protobuf\RepeatedField $var
* @return $this
*/
public function setRepeatedField($var)
diff --git a/lib/Google/vendor/google/gax/src/Testing/MockResponse.php b/lib/Google/vendor/google/gax/src/Testing/MockResponse.php
index cbe7ba659..6d93ad96c 100644
--- a/lib/Google/vendor/google/gax/src/Testing/MockResponse.php
+++ b/lib/Google/vendor/google/gax/src/Testing/MockResponse.php
@@ -42,7 +42,7 @@ class MockResponse extends \Google\Protobuf\Internal\Message
*
* @type string $name
* @type int|string $number
- * @type string[]|\Google\Protobuf\Internal\RepeatedField $resources_list
+ * @type string[]|\Google\Protobuf\RepeatedField $resources_list
* @type string $next_page_token
* @type array|\Google\Protobuf\Internal\MapField $resources_map
* }
@@ -99,7 +99,7 @@ public function setNumber($var)
/**
* Generated from protobuf field repeated string resources_list = 3;
- * @return \Google\Protobuf\Internal\RepeatedField
+ * @return \Google\Protobuf\RepeatedField
*/
public function getResourcesList()
{
@@ -108,7 +108,7 @@ public function getResourcesList()
/**
* Generated from protobuf field repeated string resources_list = 3;
- * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
+ * @param string[]|\Google\Protobuf\RepeatedField $var
* @return $this
*/
public function setResourcesList($var)
diff --git a/lib/Google/vendor/google/gax/src/Transport/GrpcTransport.php b/lib/Google/vendor/google/gax/src/Transport/GrpcTransport.php
index ebcbc07b2..5fd03a6fe 100644
--- a/lib/Google/vendor/google/gax/src/Transport/GrpcTransport.php
+++ b/lib/Google/vendor/google/gax/src/Transport/GrpcTransport.php
@@ -178,7 +178,7 @@ public function startBidiStreamingCall(Call $call, array $options)
{
$this->verifyUniverseDomain($options);
- return new BidiStream(
+ $bidiStream = new BidiStream(
$this->_bidiRequest(
'/' . $call->getMethod(),
[$call->getDecodeType(), 'decode'],
@@ -188,6 +188,21 @@ public function startBidiStreamingCall(Call $call, array $options)
$call->getDescriptor(),
$this->logger
);
+
+ if ($this->logger) {
+ $requestEvent = new RpcLogEvent();
+
+ $requestEvent->headers = $options['headers'] ?? [];
+ $requestEvent->retryAttempt = $options['retryAttempt'] ?? null;
+ $requestEvent->serviceName = $options['serviceName'] ?? null;
+ $requestEvent->rpcName = $call->getMethod();
+ $requestEvent->processId = (int) getmypid();
+ $requestEvent->requestId = crc32((string) spl_object_id($bidiStream) . getmypid());
+
+ $this->logRequest($requestEvent);
+ }
+
+ return $bidiStream;
}
/**
diff --git a/lib/Google/vendor/google/grpc-gcp/.github/release-please.yml b/lib/Google/vendor/google/grpc-gcp/.github/release-please.yml
new file mode 100644
index 000000000..ddc69395d
--- /dev/null
+++ b/lib/Google/vendor/google/grpc-gcp/.github/release-please.yml
@@ -0,0 +1,3 @@
+releaseType: simple
+handleGHRelease: true
+primaryBranch: main
diff --git a/lib/Google/vendor/google/grpc-gcp/.github/workflows/tests.yml b/lib/Google/vendor/google/grpc-gcp/.github/workflows/tests.yml
new file mode 100644
index 000000000..fe47b44c0
--- /dev/null
+++ b/lib/Google/vendor/google/grpc-gcp/.github/workflows/tests.yml
@@ -0,0 +1,30 @@
+name: Test Suite
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ php: [ "8.0", "8.1", "8.2", "8.3", "8.4" ]
+ name: "PHP ${{ matrix.php }} Unit Test"
+ steps:
+ - uses: actions/checkout@v2
+ - uses: codecov/codecov-action@v1
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ tools: pecl
+ extensions: grpc-1.49.0
+ - name: Install composer dependencies
+ uses: nick-invision/retry@v1
+ with:
+ timeout_minutes: 10
+ max_attempts: 3
+ command: composer install
+ - name: Run PHPUnit
+ run: vendor/bin/phpunit -v
diff --git a/lib/Google/vendor/google/grpc-gcp/.gitmodules b/lib/Google/vendor/google/grpc-gcp/.gitmodules
new file mode 100644
index 000000000..6c20e7b68
--- /dev/null
+++ b/lib/Google/vendor/google/grpc-gcp/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "third_party/googleapis"]
+ path = third_party/googleapis
+ url = https://github.com/googleapis/googleapis.git
diff --git a/lib/Google/vendor/google/protobuf/composer.json b/lib/Google/vendor/google/protobuf/composer.json
index 70af0a033..534647221 100644
--- a/lib/Google/vendor/google/protobuf/composer.json
+++ b/lib/Google/vendor/google/protobuf/composer.json
@@ -6,10 +6,10 @@
"homepage": "https://developers.google.com/protocol-buffers/",
"license": "BSD-3-Clause",
"require": {
- "php": ">=7.0.0"
+ "php": ">=8.1.0"
},
"require-dev": {
- "phpunit/phpunit": ">=5.0.0"
+ "phpunit/phpunit": ">=5.0.0 <8.5.27"
},
"suggest": {
"ext-bcmath": "Need to support JSON deserialization"
@@ -21,3 +21,4 @@
}
}
}
+
diff --git a/lib/Google/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php b/lib/Google/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php
index 4485d3d0b..83e2748e4 100644
--- a/lib/Google/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php
+++ b/lib/Google/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Api.php
@@ -18,7 +18,7 @@ public static function initOnce() {
\GPBMetadata\Google\Protobuf\SourceContext::initOnce();
\GPBMetadata\Google\Protobuf\Type::initOnce();
$pool->internalAddGeneratedFile(
- "\x0A\xC9\x05\x0A\x19google/protobuf/api.proto\x12\x0Fgoogle.protobuf\x1A\x1Agoogle/protobuf/type.proto\"\x81\x02\x0A\x03Api\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12(\x0A\x07methods\x18\x02 \x03(\x0B2\x17.google.protobuf.Method\x12(\x0A\x07options\x18\x03 \x03(\x0B2\x17.google.protobuf.Option\x12\x0F\x0A\x07version\x18\x04 \x01(\x09\x126\x0A\x0Esource_context\x18\x05 \x01(\x0B2\x1E.google.protobuf.SourceContext\x12&\x0A\x06mixins\x18\x06 \x03(\x0B2\x16.google.protobuf.Mixin\x12'\x0A\x06syntax\x18\x07 \x01(\x0E2\x17.google.protobuf.Syntax\"\xD5\x01\x0A\x06Method\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x18\x0A\x10request_type_url\x18\x02 \x01(\x09\x12\x19\x0A\x11request_streaming\x18\x03 \x01(\x08\x12\x19\x0A\x11response_type_url\x18\x04 \x01(\x09\x12\x1A\x0A\x12response_streaming\x18\x05 \x01(\x08\x12(\x0A\x07options\x18\x06 \x03(\x0B2\x17.google.protobuf.Option\x12'\x0A\x06syntax\x18\x07 \x01(\x0E2\x17.google.protobuf.Syntax\"#\x0A\x05Mixin\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x0C\x0A\x04root\x18\x02 \x01(\x09Bv\x0A\x13com.google.protobufB\x08ApiProtoP\x01Z,google.golang.org/protobuf/types/known/apipb\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3"
+ "\x0A\xF3\x05\x0A\x19google/protobuf/api.proto\x12\x0Fgoogle.protobuf\x1A\x1Agoogle/protobuf/type.proto\"\x92\x02\x0A\x03Api\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12(\x0A\x07methods\x18\x02 \x03(\x0B2\x17.google.protobuf.Method\x12(\x0A\x07options\x18\x03 \x03(\x0B2\x17.google.protobuf.Option\x12\x0F\x0A\x07version\x18\x04 \x01(\x09\x126\x0A\x0Esource_context\x18\x05 \x01(\x0B2\x1E.google.protobuf.SourceContext\x12&\x0A\x06mixins\x18\x06 \x03(\x0B2\x16.google.protobuf.Mixin\x12'\x0A\x06syntax\x18\x07 \x01(\x0E2\x17.google.protobuf.Syntax\x12\x0F\x0A\x07edition\x18\x08 \x01(\x09\"\xEE\x01\x0A\x06Method\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x18\x0A\x10request_type_url\x18\x02 \x01(\x09\x12\x19\x0A\x11request_streaming\x18\x03 \x01(\x08\x12\x19\x0A\x11response_type_url\x18\x04 \x01(\x09\x12\x1A\x0A\x12response_streaming\x18\x05 \x01(\x08\x12(\x0A\x07options\x18\x06 \x03(\x0B2\x17.google.protobuf.Option\x12+\x0A\x06syntax\x18\x07 \x01(\x0E2\x17.google.protobuf.SyntaxB\x02\x18\x01\x12\x13\x0A\x07edition\x18\x08 \x01(\x09B\x02\x18\x01\"#\x0A\x05Mixin\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x0C\x0A\x04root\x18\x02 \x01(\x09Bv\x0A\x13com.google.protobufB\x08ApiProtoP\x01Z,google.golang.org/protobuf/types/known/apipb\xA2\x02\x03GPB\xAA\x02\x1EGoogle.Protobuf.WellKnownTypesb\x06proto3"
, true);
static::$is_initialized = true;
diff --git a/lib/Google/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php b/lib/Google/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
index 84486a90b..9a80d8b16 100644
--- a/lib/Google/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
+++ b/lib/Google/vendor/google/protobuf/src/GPBMetadata/Google/Protobuf/Internal/Descriptor.php
@@ -431,6 +431,7 @@ public static function initOnce() {
->value("EDITION_PROTO3", 999)
->value("EDITION_2023", 1000)
->value("EDITION_2024", 1001)
+ ->value("EDITION_UNSTABLE", 9999)
->value("EDITION_1_TEST_ONLY", 1)
->value("EDITION_2_TEST_ONLY", 2)
->value("EDITION_99997_TEST_ONLY", 99997)
diff --git a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Api.php b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Api.php
index 341c56984..a44c858dc 100644
--- a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Api.php
+++ b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Api.php
@@ -18,6 +18,10 @@
* sometimes simply referred to as "APIs" in other contexts, such as the name of
* this message itself. See https://cloud.google.com/apis/design/glossary for
* detailed terminology.
+ * New usages of this message as an alternative to ServiceDescriptorProto are
+ * strongly discouraged. This message does not reliability preserve all
+ * information necessary to model the schema and preserve semantics. Instead
+ * make use of FileDescriptorSet which preserves the necessary information.
*
* Generated from protobuf message google.protobuf.Api
*/
@@ -83,6 +87,12 @@ class Api extends \Google\Protobuf\Internal\Message
* Generated from protobuf field .google.protobuf.Syntax syntax = 7;
*/
protected $syntax = 0;
+ /**
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
+ *
+ * Generated from protobuf field string edition = 8;
+ */
+ protected $edition = '';
/**
* Constructor.
@@ -122,6 +132,8 @@ class Api extends \Google\Protobuf\Internal\Message
* Included interfaces. See [Mixin][].
* @type int $syntax
* The source syntax of the service.
+ * @type string $edition
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
* }
*/
public function __construct($data = NULL) {
@@ -357,5 +369,31 @@ public function setSyntax($var)
return $this;
}
+ /**
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
+ *
+ * Generated from protobuf field string edition = 8;
+ * @return string
+ */
+ public function getEdition()
+ {
+ return $this->edition;
+ }
+
+ /**
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
+ *
+ * Generated from protobuf field string edition = 8;
+ * @param string $var
+ * @return $this
+ */
+ public function setEdition($var)
+ {
+ GPBUtil::checkString($var, True);
+ $this->edition = $var;
+
+ return $this;
+ }
+
}
diff --git a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Enum.php b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Enum.php
index 296b0a019..ea3be4056 100644
--- a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Enum.php
+++ b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Enum.php
@@ -11,6 +11,10 @@
/**
* Enum type definition.
+ * New usages of this message as an alternative to EnumDescriptorProto are
+ * strongly discouraged. This message does not reliability preserve all
+ * information necessary to model the schema and preserve semantics. Instead
+ * make use of FileDescriptorSet which preserves the necessary information.
*
* Generated from protobuf message google.protobuf.Enum
*/
diff --git a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php
index a782640b8..f9dfece17 100644
--- a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php
+++ b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/EnumValue.php
@@ -11,6 +11,10 @@
/**
* Enum value definition.
+ * New usages of this message as an alternative to EnumValueDescriptorProto are
+ * strongly discouraged. This message does not reliability preserve all
+ * information necessary to model the schema and preserve semantics. Instead
+ * make use of FileDescriptorSet which preserves the necessary information.
*
* Generated from protobuf message google.protobuf.EnumValue
*/
diff --git a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Field.php b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Field.php
index 405a2c0ad..727453027 100644
--- a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Field.php
+++ b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Field.php
@@ -11,6 +11,10 @@
/**
* A single field of a message type.
+ * New usages of this message as an alternative to FieldDescriptorProto are
+ * strongly discouraged. This message does not reliability preserve all
+ * information necessary to model the schema and preserve semantics. Instead
+ * make use of FileDescriptorSet which preserves the necessary information.
*
* Generated from protobuf message google.protobuf.Field
*/
diff --git a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/Edition.php b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/Edition.php
index 7493ee1b8..a4df1fbc2 100644
--- a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/Edition.php
+++ b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/Edition.php
@@ -52,6 +52,12 @@ class Edition
* Generated from protobuf enum EDITION_2024 = 1001;
*/
const EDITION_2024 = 1001;
+ /**
+ * A placeholder edition for developing and testing unscheduled features.
+ *
+ * Generated from protobuf enum EDITION_UNSTABLE = 9999;
+ */
+ const EDITION_UNSTABLE = 9999;
/**
* Placeholder editions for testing feature resolution. These should not be
* used or relied on outside of tests.
@@ -91,6 +97,7 @@ class Edition
self::EDITION_PROTO3 => 'EDITION_PROTO3',
self::EDITION_2023 => 'EDITION_2023',
self::EDITION_2024 => 'EDITION_2024',
+ self::EDITION_UNSTABLE => 'EDITION_UNSTABLE',
self::EDITION_1_TEST_ONLY => 'EDITION_1_TEST_ONLY',
self::EDITION_2_TEST_ONLY => 'EDITION_2_TEST_ONLY',
self::EDITION_99997_TEST_ONLY => 'EDITION_99997_TEST_ONLY',
diff --git a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions.php b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions.php
index 0e6bff555..5442e5182 100644
--- a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions.php
+++ b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/FieldOptions.php
@@ -97,9 +97,11 @@ class FieldOptions extends \Google\Protobuf\Internal\Message
*/
protected $deprecated = null;
/**
+ * DEPRECATED. DO NOT USE!
* For Google-internal migration only. Do not use.
*
- * Generated from protobuf field optional bool weak = 10 [default = false];
+ * Generated from protobuf field optional bool weak = 10 [default = false, deprecated = true];
+ * @deprecated
*/
protected $weak = null;
/**
@@ -204,6 +206,7 @@ class FieldOptions extends \Google\Protobuf\Internal\Message
* for accessors, or it will be completely ignored; in the very least, this
* is a formalization for deprecating fields.
* @type bool $weak
+ * DEPRECATED. DO NOT USE!
* For Google-internal migration only. Do not use.
* @type bool $debug_redact
* Indicate that the field value should not be printed out when using debug
@@ -531,35 +534,47 @@ public function setDeprecated($var)
}
/**
+ * DEPRECATED. DO NOT USE!
* For Google-internal migration only. Do not use.
*
- * Generated from protobuf field optional bool weak = 10 [default = false];
+ * Generated from protobuf field optional bool weak = 10 [default = false, deprecated = true];
* @return bool
+ * @deprecated
*/
public function getWeak()
{
+ if (isset($this->weak)) {
+ @trigger_error('weak is deprecated.', E_USER_DEPRECATED);
+ }
return isset($this->weak) ? $this->weak : false;
}
public function hasWeak()
{
+ if (isset($this->weak)) {
+ @trigger_error('weak is deprecated.', E_USER_DEPRECATED);
+ }
return isset($this->weak);
}
public function clearWeak()
{
+ @trigger_error('weak is deprecated.', E_USER_DEPRECATED);
unset($this->weak);
}
/**
+ * DEPRECATED. DO NOT USE!
* For Google-internal migration only. Do not use.
*
- * Generated from protobuf field optional bool weak = 10 [default = false];
+ * Generated from protobuf field optional bool weak = 10 [default = false, deprecated = true];
* @param bool $var
* @return $this
+ * @deprecated
*/
public function setWeak($var)
{
+ @trigger_error('weak is deprecated.', E_USER_DEPRECATED);
GPBUtil::checkBool($var);
$this->weak = $var;
diff --git a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBDecodeException.php b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBDecodeException.php
index 6a143a2a0..7104109fa 100644
--- a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBDecodeException.php
+++ b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/GPBDecodeException.php
@@ -14,7 +14,7 @@ class GPBDecodeException extends \Exception
public function __construct(
$message,
$code = 0,
- \Exception $previous = null)
+ ?\Exception $previous = null)
{
parent::__construct(
"Error occurred during parsing: " . $message,
diff --git a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedField.php b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedField.php
index cd6ef02cb..face4fc67 100644
--- a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedField.php
+++ b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Internal/RepeatedField.php
@@ -7,7 +7,7 @@
* This class is deprecated. Use Google\Protobuf\RepeatedField instead.
* @deprecated
*/
- class RepeatedField {}
+ class RepeatedField extends \Google\Protobuf\RepeatedField {}
}
class_exists(\Google\Protobuf\RepeatedField::class);
@trigger_error('Google\Protobuf\Internal\RepeatedField is deprecated and will be removed in the next major release. Use Google\Protobuf\RepeatedField instead', E_USER_DEPRECATED);
diff --git a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Method.php b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Method.php
index 5e55a764c..6eb9c358c 100644
--- a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Method.php
+++ b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Method.php
@@ -11,6 +11,10 @@
/**
* Method represents a method of an API interface.
+ * New usages of this message as an alternative to MethodDescriptorProto are
+ * strongly discouraged. This message does not reliability preserve all
+ * information necessary to model the schema and preserve semantics. Instead
+ * make use of FileDescriptorSet which preserves the necessary information.
*
* Generated from protobuf message google.protobuf.Method
*/
@@ -54,10 +58,22 @@ class Method extends \Google\Protobuf\Internal\Message
private $options;
/**
* The source syntax of this method.
+ * This field should be ignored, instead the syntax should be inherited from
+ * Api. This is similar to Field and EnumValue.
*
- * Generated from protobuf field .google.protobuf.Syntax syntax = 7;
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 7 [deprecated = true];
+ * @deprecated
*/
protected $syntax = 0;
+ /**
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
+ * This field should be ignored, instead the edition should be inherited from
+ * Api. This is similar to Field and EnumValue.
+ *
+ * Generated from protobuf field string edition = 8 [deprecated = true];
+ * @deprecated
+ */
+ protected $edition = '';
/**
* Constructor.
@@ -79,6 +95,12 @@ class Method extends \Google\Protobuf\Internal\Message
* Any metadata attached to the method.
* @type int $syntax
* The source syntax of this method.
+ * This field should be ignored, instead the syntax should be inherited from
+ * Api. This is similar to Field and EnumValue.
+ * @type string $edition
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
+ * This field should be ignored, instead the edition should be inherited from
+ * Api. This is similar to Field and EnumValue.
* }
*/
public function __construct($data = NULL) {
@@ -244,29 +266,75 @@ public function setOptions($var)
/**
* The source syntax of this method.
+ * This field should be ignored, instead the syntax should be inherited from
+ * Api. This is similar to Field and EnumValue.
*
- * Generated from protobuf field .google.protobuf.Syntax syntax = 7;
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 7 [deprecated = true];
* @return int
+ * @deprecated
*/
public function getSyntax()
{
+ if ($this->syntax !== 0) {
+ @trigger_error('syntax is deprecated.', E_USER_DEPRECATED);
+ }
return $this->syntax;
}
/**
* The source syntax of this method.
+ * This field should be ignored, instead the syntax should be inherited from
+ * Api. This is similar to Field and EnumValue.
*
- * Generated from protobuf field .google.protobuf.Syntax syntax = 7;
+ * Generated from protobuf field .google.protobuf.Syntax syntax = 7 [deprecated = true];
* @param int $var
* @return $this
+ * @deprecated
*/
public function setSyntax($var)
{
+ @trigger_error('syntax is deprecated.', E_USER_DEPRECATED);
GPBUtil::checkEnum($var, \Google\Protobuf\Syntax::class);
$this->syntax = $var;
return $this;
}
+ /**
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
+ * This field should be ignored, instead the edition should be inherited from
+ * Api. This is similar to Field and EnumValue.
+ *
+ * Generated from protobuf field string edition = 8 [deprecated = true];
+ * @return string
+ * @deprecated
+ */
+ public function getEdition()
+ {
+ if ($this->edition !== '') {
+ @trigger_error('edition is deprecated.', E_USER_DEPRECATED);
+ }
+ return $this->edition;
+ }
+
+ /**
+ * The source edition string, only valid when syntax is SYNTAX_EDITIONS.
+ * This field should be ignored, instead the edition should be inherited from
+ * Api. This is similar to Field and EnumValue.
+ *
+ * Generated from protobuf field string edition = 8 [deprecated = true];
+ * @param string $var
+ * @return $this
+ * @deprecated
+ */
+ public function setEdition($var)
+ {
+ @trigger_error('edition is deprecated.', E_USER_DEPRECATED);
+ GPBUtil::checkString($var, True);
+ $this->edition = $var;
+
+ return $this;
+ }
+
}
diff --git a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Option.php b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Option.php
index 7674fda83..4dc52ca23 100644
--- a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Option.php
+++ b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Option.php
@@ -12,6 +12,9 @@
/**
* A protocol buffer option, which can be attached to a message, field,
* enumeration, etc.
+ * New usages of this message as an alternative to FileOptions, MessageOptions,
+ * FieldOptions, EnumOptions, EnumValueOptions, ServiceOptions, or MethodOptions
+ * are strongly discouraged.
*
* Generated from protobuf message google.protobuf.Option
*/
diff --git a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Timestamp.php b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Timestamp.php
index 54d675cb2..bd23d8076 100644
--- a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Timestamp.php
+++ b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Timestamp.php
@@ -82,17 +82,18 @@
class Timestamp extends \Google\Protobuf\Internal\TimestampBase
{
/**
- * Represents seconds of UTC time since Unix epoch
- * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
- * 9999-12-31T23:59:59Z inclusive.
+ * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
+ * be between -315576000000 and 315576000000 inclusive (which corresponds to
+ * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
*
* Generated from protobuf field int64 seconds = 1;
*/
protected $seconds = 0;
/**
- * Non-negative fractions of a second at nanosecond resolution. Negative
- * second values with fractions must still have non-negative nanos values
- * that count forward in time. Must be from 0 to 999,999,999
+ * Non-negative fractions of a second at nanosecond resolution. This field is
+ * the nanosecond portion of the duration, not an alternative to seconds.
+ * Negative second values with fractions must still have non-negative nanos
+ * values that count forward in time. Must be between 0 and 999,999,999
* inclusive.
*
* Generated from protobuf field int32 nanos = 2;
@@ -106,13 +107,14 @@ class Timestamp extends \Google\Protobuf\Internal\TimestampBase
* Optional. Data for populating the Message object.
*
* @type int|string $seconds
- * Represents seconds of UTC time since Unix epoch
- * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
- * 9999-12-31T23:59:59Z inclusive.
+ * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
+ * be between -315576000000 and 315576000000 inclusive (which corresponds to
+ * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
* @type int $nanos
- * Non-negative fractions of a second at nanosecond resolution. Negative
- * second values with fractions must still have non-negative nanos values
- * that count forward in time. Must be from 0 to 999,999,999
+ * Non-negative fractions of a second at nanosecond resolution. This field is
+ * the nanosecond portion of the duration, not an alternative to seconds.
+ * Negative second values with fractions must still have non-negative nanos
+ * values that count forward in time. Must be between 0 and 999,999,999
* inclusive.
* }
*/
@@ -122,9 +124,9 @@ public function __construct($data = NULL) {
}
/**
- * Represents seconds of UTC time since Unix epoch
- * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
- * 9999-12-31T23:59:59Z inclusive.
+ * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
+ * be between -315576000000 and 315576000000 inclusive (which corresponds to
+ * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
*
* Generated from protobuf field int64 seconds = 1;
* @return int|string
@@ -135,9 +137,9 @@ public function getSeconds()
}
/**
- * Represents seconds of UTC time since Unix epoch
- * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
- * 9999-12-31T23:59:59Z inclusive.
+ * Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
+ * be between -315576000000 and 315576000000 inclusive (which corresponds to
+ * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
*
* Generated from protobuf field int64 seconds = 1;
* @param int|string $var
@@ -152,9 +154,10 @@ public function setSeconds($var)
}
/**
- * Non-negative fractions of a second at nanosecond resolution. Negative
- * second values with fractions must still have non-negative nanos values
- * that count forward in time. Must be from 0 to 999,999,999
+ * Non-negative fractions of a second at nanosecond resolution. This field is
+ * the nanosecond portion of the duration, not an alternative to seconds.
+ * Negative second values with fractions must still have non-negative nanos
+ * values that count forward in time. Must be between 0 and 999,999,999
* inclusive.
*
* Generated from protobuf field int32 nanos = 2;
@@ -166,9 +169,10 @@ public function getNanos()
}
/**
- * Non-negative fractions of a second at nanosecond resolution. Negative
- * second values with fractions must still have non-negative nanos values
- * that count forward in time. Must be from 0 to 999,999,999
+ * Non-negative fractions of a second at nanosecond resolution. This field is
+ * the nanosecond portion of the duration, not an alternative to seconds.
+ * Negative second values with fractions must still have non-negative nanos
+ * values that count forward in time. Must be between 0 and 999,999,999
* inclusive.
*
* Generated from protobuf field int32 nanos = 2;
diff --git a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Type.php b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Type.php
index c274909ab..ef37e778a 100644
--- a/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Type.php
+++ b/lib/Google/vendor/google/protobuf/src/Google/Protobuf/Type.php
@@ -11,6 +11,10 @@
/**
* A protocol buffer message type.
+ * New usages of this message as an alternative to DescriptorProto are strongly
+ * discouraged. This message does not reliability preserve all information
+ * necessary to model the schema and preserve semantics. Instead make use of
+ * FileDescriptorSet which preserves the necessary information.
*
* Generated from protobuf message google.protobuf.Type
*/
diff --git a/lib/Google/vendor/monolog/monolog/CHANGELOG.md b/lib/Google/vendor/monolog/monolog/CHANGELOG.md
index 122d85cde..2c89f9d18 100644
--- a/lib/Google/vendor/monolog/monolog/CHANGELOG.md
+++ b/lib/Google/vendor/monolog/monolog/CHANGELOG.md
@@ -1,3 +1,172 @@
+### 3.10.0 (2026-01-02)
+
+ * Added automatic directory cleanup in RotatingFileHandler (#2000)
+ * Added timezone-aware file rotation to RotatingFileHandler (#1982)
+ * Added support for mongodb/mongodb 2.0+ (#1998)
+ * Added NoDiscard attribute to TestHandler methods to ensure the result is used (#2013)
+ * Fixed JsonFormatter crashing if __toString throws while normalizing data (#1968)
+ * Fixed PHP 8.5 deprecation warnings (#1997, #2009)
+ * Fixed DeduplicatingHandler collecting duplicate logs if the file cannot be locked (2e97231)
+ * Fixed GelfMessageFormatter to use integers instead of bool for gelf 1.1 support (#1973)
+ * Fixed empty stack traces being output anyway (#1979)
+ * Fixed StreamHandler not reopening the file if the inode changed (#1963)
+ * Fixed TelegramBotHandler sending empty messages (#1992)
+ * Fixed file paths in stack traces containing backslashes on windows, always using / now to unify logs (#1980)
+ * Fixed RotatingFileHandler unlink errors not being suppressed correctly (#1999)
+
+### 3.9.0 (2025-03-24)
+
+ * BC Warning: Fixed SendGridHandler to use the V3 API as V2 is now shut down, but this requires a new API key (#1952)
+ * Deprecated Monolog\Test\TestCase in favor of Monolog\Test\MonologTestCase (#1953)
+ * Added extension point for NativeMailerHandler::mail (#1948)
+ * Added setHandler method to BufferHandler to modify the nested handler at runtime (#1946)
+ * Fixed date format in ElasticsearchFormatter to use +00:00 vs +0000 tz identifiers (#1942)
+ * Fixed GelfMessageFormatter handling numeric context/extra keys (#1932)
+
+### 3.8.1 (2024-12-05)
+
+ * Deprecated Monolog\DateTimeImmutable in favor of Monolog\JsonSerializableDateTimeImmutable (#1928)
+ * Fixed gelf keys not being valid when context/extra data keys have spaces in them (#1927)
+ * Fixed empty lines appearing in the stack traces when a custom formatter returned null (#1925)
+
+### 3.8.0 (2024-11-12)
+
+ * Added `$fileOpenMode` param to `StreamHandler` to define a custom fopen mode to open the log file (#1913)
+ * Fixed PHP 8.4 deprecation notices (#1903)
+ * Added ability to extend/override `IntrospectionProcessor` (#1899)
+ * Added `$timeout` param to `ProcessHandler` to configure the stream_select() timeout to avoid blocking too long (default is 1.0 sec) (#1916)
+ * Fixed JsonFormatter batch handling to normalize records individually to make sure they look the same as if they were handled one by one (#1906)
+ * Fixed `StreamHandler` handling of write failures so that it now closes/reopens the stream and retries the write once before failing (#1882)
+ * Fixed `StreamHandler` error handler causing issues if a stream handler triggers an error (#1866)
+ * Fixed `StreamHandler::reset` not closing the stream, so that it would fail to write in some cases with long running processes (#1862)
+ * Fixed `RotatingFileHandler` issue where rotation does not happen in some long running processes (#1905)
+ * Fixed `JsonFormatter` handling of incomplete classes (#1834)
+ * Fixed `RotatingFileHandler` bug where rotation could sometimes not happen correctly (#1905)
+
+### 3.7.0 (2024-06-28)
+
+ * Added `NormalizerFormatter->setBasePath(...)` (and `JsonFormatter` by extension) that allows removing the project's path from the stack trace output (47e301d3e)
+ * Fixed JsonFormatter handling of incomplete classes (#1834)
+ * Fixed private error handlers causing problems with custom StreamHandler implementations (#1866)
+
+### 3.6.0 (2024-04-12)
+
+ * Added `LineFormatter->setBasePath(...)` that allows removing the project's path from the stack trace output (#1873)
+ * Added `$includeExtra` option in `PsrHandler` to also use extra data to replace placeholder values in the message (#1852)
+ * Added ability to customize what is a duplicated message by extending the `DeduplicationHandler` (#1879)
+ * Added handling for using `GelfMessageFormatter` together with the `AmqpHandler` (#1869)
+ * Added ability to extend `GoogleCloudLoggingFormatter` (#1859)
+ * Fixed `__toString` failures in context data crashing the normalization process (#1868)
+ * Fixed PHP 8.4 deprecation warnings (#1874)
+
+### 3.5.0 (2023-10-27)
+
+ * Added ability to indent stack traces in LineFormatter via e.g. `indentStacktraces(' ')` (#1835)
+ * Added ability to configure a max level name length in LineFormatter via e.g. `setMaxLevelNameLength(3)` (#1850)
+ * Added support for indexed arrays (i.e. `[]` and not `{}` arrays once json serialized) containing inline linebreaks in LineFormatter (#1818)
+ * Added `WithMonologChannel` attribute for integrators to use to configure autowiring (#1847)
+ * Fixed log record `extra` data leaking between handlers that have handler-specific processors set (#1819)
+ * Fixed LogglyHandler issue with record level filtering (#1841)
+ * Fixed display_errors parsing in ErrorHandler which did not support string values (#1804)
+ * Fixed bug where the previous error handler would not be restored in some cases where StreamHandler fails (#1815)
+ * Fixed normalization error when normalizing incomplete classes (#1833)
+
+### 3.4.0 (2023-06-21)
+
+ * Added `LoadAverageProcessor` to track one of the 1, 5 or 15min load averages (#1803)
+ * Added support for priority to the `AsMonologProcessor` attribute (#1797)
+ * Added `TelegramBotHandler` `topic`/`message_thread_id` support (#1802)
+ * Fixed `FingersCrossedHandler` passthruLevel checking (#1801)
+ * Fixed support of yearly and monthly rotation log file to rotate only once a month/year (#1805)
+ * Fixed `TestHandler` method docs (#1794)
+ * Fixed handling of falsey `display_errors` string values (#1804)
+
+### 3.3.1 (2023-02-06)
+
+ * Fixed Logger not being serializable anymore (#1792)
+
+### 3.3.0 (2023-02-06)
+
+ * Deprecated FlowdockHandler & Formatter as the flowdock service was shutdown (#1748)
+ * Added `ClosureContextProcessor` to allow delaying the creation of context data by setting a Closure in context which is called when the log record is used (#1745)
+ * Added an ElasticsearchHandler option to set the `op_type` to `create` instead of the default `index` (#1766)
+ * 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 GitProcessor not filtering correctly based on Level (#1749)
+ * 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)
+
+### 3.2.0 (2022-07-24)
+
+ * Deprecated `CubeHandler` and `PHPConsoleHandler` as both projects are abandoned and those should not be used anymore (#1734)
+ * Marked `Logger` `@final` as it should not be extended, prefer composition or talk to us if you are missing something
+ * Added RFC 5424 level (`7` to `0`) support to `Logger::log` and `Logger::addRecord` to increase interoperability (#1723)
+ * Added `SyslogFormatter` to output syslog-like files which can be consumed by tools like [lnav](https://lnav.org/) (#1689)
+ * 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)
+
+### 3.1.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)
+ * Fixed interop issue by removing the need for a return type in ProcessorInterface (#1680)
+ * 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)
+
+### 3.0.0 (2022-05-10)
+
+Changes from RC1
+
+- The `Monolog\LevelName` enum does not exist anymore, use `Monolog\Level->getName()` instead.
+
+### 3.0.0-RC1 (2022-05-08)
+
+This is mostly a cleanup release offering stronger type guarantees for integrators with the
+array->object/enum changes, but there is no big new feature for end users.
+
+See [UPGRADE notes](UPGRADE.md#300) for details on all breaking changes especially if you are extending/implementing Monolog classes/interfaces.
+
+Noteworthy BC Breaks:
+
+- The minimum supported PHP version is now `8.1.0`.
+- Log records have been converted from an array to a [`Monolog\LogRecord` object](src/Monolog/LogRecord.php)
+ with public (and mostly readonly) properties. e.g. instead of doing
+ `$record['context']` use `$record->context`.
+ In formatters or handlers if you rather need an array to work with you can use `$record->toArray()`
+ to get back a Monolog 1/2 style record array. This will contain the enum values instead of enum cases
+ in the `level` and `level_name` keys to be more backwards compatible and use simpler data types.
+- `FormatterInterface`, `HandlerInterface`, `ProcessorInterface`, etc. changed to contain `LogRecord $record`
+ instead of `array $record` parameter types. If you want to support multiple Monolog versions this should
+ be possible by type-hinting nothing, or `array|LogRecord` if you support PHP 8.0+. You can then code
+ against the $record using Monolog 2 style as LogRecord implements ArrayAccess for BC.
+ The interfaces do not require a `LogRecord` return type even where it would be applicable, but if you only
+ support Monolog 3 in integration code I would recommend you use `LogRecord` return types wherever fitting
+ to ensure forward compatibility as it may be added in Monolog 4.
+- Log levels are now enums [`Monolog\Level`](src/Monolog/Level.php) and [`Monolog\LevelName`](src/Monolog/LevelName.php)
+- Removed deprecated SwiftMailerHandler, migrate to SymfonyMailerHandler instead.
+- `ResettableInterface::reset()` now requires a void return type.
+- All properties have had types added, which may require you to do so as well if you extended
+ a Monolog class and declared the same property.
+
+New deprecations:
+
+- `Logger::DEBUG`, `Logger::ERROR`, etc. are now deprecated in favor of the `Monolog\Level` enum.
+ e.g. instead of `Logger::WARNING` use `Level::Warning` if you need to pass the enum case
+ to Monolog or one of its handlers, or `Level::Warning->value` if you need the integer
+ value equal to what `Logger::WARNING` was giving you.
+- `Logger::getLevelName()` is now deprecated.
+
### 2.10.0 (2024-11-12)
* Added `$fileOpenMode` to `StreamHandler` to define a custom fopen mode to open the log file (#1913)
diff --git a/lib/Google/vendor/monolog/monolog/README.md b/lib/Google/vendor/monolog/monolog/README.md
index bfcae0c00..0564f96f0 100644
--- a/lib/Google/vendor/monolog/monolog/README.md
+++ b/lib/Google/vendor/monolog/monolog/README.md
@@ -1,8 +1,12 @@
+
* $activationStrategy = new ChannelLevelActivationStrategy(
- * Logger::CRITICAL,
+ * Level::Critical,
* array(
- * 'request' => Logger::ALERT,
- * 'sensitive' => Logger::ERROR,
+ * 'request' => Level::Alert,
+ * 'sensitive' => Level::Error,
* )
* );
* $handler = new FingersCrossedHandler(new StreamHandler('php://stderr'), $activationStrategy);
*
*
* @author Mike Meessen - * - * @phpstan-import-type Record from \Monolog\Logger */ interface ProcessorInterface { /** - * @return array The processed record - * - * @phpstan-param Record $record - * @phpstan-return Record + * @return LogRecord The processed record */ - public function __invoke(array $record); + public function __invoke(LogRecord $record); } diff --git a/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php index e7c12176a..291361d2f 100644 --- a/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php +++ b/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php @@ -12,6 +12,7 @@ namespace Monolog\Processor; use Monolog\Utils; +use Monolog\LogRecord; /** * Processes a record's message according to PSR-3 rules @@ -24,11 +25,9 @@ class PsrLogMessageProcessor implements ProcessorInterface { public const SIMPLE_DATE = "Y-m-d\TH:i:s.uP"; - /** @var string|null */ - private $dateFormat; + private ?string $dateFormat; - /** @var bool */ - private $removeUsedContextFields; + private bool $removeUsedContextFields; /** * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format @@ -41,48 +40,48 @@ public function __construct(?string $dateFormat = null, bool $removeUsedContextF } /** - * {@inheritDoc} + * @inheritDoc */ - public function __invoke(array $record): array + public function __invoke(LogRecord $record): LogRecord { - if (false === strpos($record['message'], '{')) { + if (false === strpos($record->message, '{')) { return $record; } $replacements = []; - foreach ($record['context'] as $key => $val) { + $context = $record->context; + + foreach ($context as $key => $val) { $placeholder = '{' . $key . '}'; - if (strpos($record['message'], $placeholder) === false) { + if (strpos($record->message, $placeholder) === false) { continue; } - if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) { + if (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) { + if (null === $this->dateFormat && $val instanceof \Monolog\JsonSerializableDateTimeImmutable) { // 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); + $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)) { + } elseif (\is_object($val)) { $replacements[$placeholder] = '[object '.Utils::getClass($val).']'; - } elseif (is_array($val)) { + } elseif (\is_array($val)) { $replacements[$placeholder] = 'array'.Utils::jsonEncode($val, null, true); } else { - $replacements[$placeholder] = '['.gettype($val).']'; + $replacements[$placeholder] = '['.\gettype($val).']'; } if ($this->removeUsedContextFields) { - unset($record['context'][$key]); + unset($context[$key]); } } - $record['message'] = strtr($record['message'], $replacements); - - return $record; + return $record->with(message: strtr($record->message, $replacements), context: $context); } } diff --git a/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php index 80f18747a..f4e41ce20 100644 --- a/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php +++ b/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php @@ -11,6 +11,8 @@ namespace Monolog\Processor; +use Monolog\LogRecord; + /** * Adds a tags array into record * @@ -19,7 +21,7 @@ class TagProcessor implements ProcessorInterface { /** @var string[] */ - private $tags; + private array $tags; /** * @param string[] $tags @@ -30,7 +32,8 @@ public function __construct(array $tags = []) } /** - * @param string[] $tags + * @param string[] $tags + * @return $this */ public function addTags(array $tags = []): self { @@ -40,7 +43,8 @@ public function addTags(array $tags = []): self } /** - * @param string[] $tags + * @param string[] $tags + * @return $this */ public function setTags(array $tags = []): self { @@ -50,11 +54,11 @@ public function setTags(array $tags = []): self } /** - * {@inheritDoc} + * @inheritDoc */ - public function __invoke(array $record): array + public function __invoke(LogRecord $record): LogRecord { - $record['extra']['tags'] = $this->tags; + $record->extra['tags'] = $this->tags; return $record; } diff --git a/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php index a27b74dbf..261e65389 100644 --- a/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php +++ b/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php @@ -12,6 +12,7 @@ namespace Monolog\Processor; use Monolog\ResettableInterface; +use Monolog\LogRecord; /** * Adds a unique identifier into records @@ -20,9 +21,12 @@ */ class UidProcessor implements ProcessorInterface, ResettableInterface { - /** @var string */ - private $uid; + /** @var non-empty-string */ + private string $uid; + /** + * @param int<1, 32> $length + */ public function __construct(int $length = 7) { if ($length > 32 || $length < 1) { @@ -33,11 +37,11 @@ public function __construct(int $length = 7) } /** - * {@inheritDoc} + * @inheritDoc */ - public function __invoke(array $record): array + public function __invoke(LogRecord $record): LogRecord { - $record['extra']['uid'] = $this->uid; + $record->extra['uid'] = $this->uid; return $record; } @@ -47,11 +51,15 @@ public function getUid(): string return $this->uid; } - public function reset() + public function reset(): void { - $this->uid = $this->generateUid(strlen($this->uid)); + $this->uid = $this->generateUid(\strlen($this->uid)); } + /** + * @param positive-int $length + * @return non-empty-string + */ private function generateUid(int $length): string { return substr(bin2hex(random_bytes((int) ceil($length / 2))), 0, $length); diff --git a/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php index 887f4d396..b78385e0c 100644 --- a/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php +++ b/lib/Google/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php @@ -11,6 +11,9 @@ namespace Monolog\Processor; +use ArrayAccess; +use Monolog\LogRecord; + /** * Injects url/method and remote IP of the current web request in all records * @@ -19,9 +22,9 @@ class WebProcessor implements ProcessorInterface { /** - * @var array