-
Notifications
You must be signed in to change notification settings - Fork 306
Update php client features #1256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
zhaohai666
wants to merge
138
commits into
apache:master
Choose a base branch
from
zhaohai666:Update_PHP_client_features_local
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
138 commits
Select commit
Hold shift + click to select a range
5c842d2
Regenerate gRPC code with PHP language constant support
zhaohai666 f68d869
Add test for gRPC constants verification
zhaohai666 ed4516d
Add test for gRPC 1.80.2dev Telemetry Session
zhaohai666 75618a6
fix grpc
zhaohai666 3dd673a
fix TelemetrySession.php
zhaohai666 a1ed93e
update php
zhaohai666 04ef72a
Merge branch 'master' into Update_PHP_client_features_local
zhaohai666 f1304b2
add SessionCredentials
zhaohai666 d908f24
update annotation
zhaohai666 84a0a3b
fix Permission
zhaohai666 6d97a2c
fix QueryRouteRequest namespace
zhaohai666 ce101dd
add RpcClientManager
zhaohai666 b358c55
add RpcClientManager
zhaohai666 ae0950a
add RpcClientManager
zhaohai666 e25edcb
add SwooleCompat
zhaohai666 7afd91f
update SimpleConsumer.php
zhaohai666 859cbac
add PublishingLoadBalancer
zhaohai666 23f401c
add PublishingLoadBalancer
zhaohai666 c780cbf
fix grpcTimeoutMicroseconds
zhaohai666 8f8c896
fix establishAndSyncSettings
zhaohai666 76c9193
fix SwooleCompat::inCoroutine
zhaohai666 e58f229
fix grpc-timeout
zhaohai666 414f3c4
fix grpc-timeout
zhaohai666 1c3a9f9
fix grpc-timeout
zhaohai666 18294e4
fix namespace
zhaohai666 5425fc3
fix hmacSha1
zhaohai666 a705309
Merge branch 'master' into Update_PHP_client_features_local
zhaohai666 300cb24
fix doHeartbeat
zhaohai666 43d9d70
fix lite push consumer
zhaohai666 6e0ecf7
fix protected
zhaohai666 e742911
fix getClientType
zhaohai666 59b1260
fix start
zhaohai666 d33a522
fix lite ack
zhaohai666 220a89a
update example
zhaohai666 a674c03
update test
zhaohai666 355088d
update composer.json
zhaohai666 6ea0fe3
fix Heartbeat
zhaohai666 2702af8
fix extractTopic
zhaohai666 25ba756
fix extractTopic
zhaohai666 961d463
fix extractTopic
zhaohai666 c44d64d
fix refreshRouteCache
zhaohai666 a1f3635
add executeNackInterceptor
zhaohai666 7937b6b
fix extractTopic
zhaohai666 4234567
fix wrapHeartbeatRequest
zhaohai666 42eca3d
fix fetchMessages
zhaohai666 28609b9
fix retry
zhaohai666 0241b3c
fix scanAssignments
zhaohai666 a354703
fix createStreamAndSync
zhaohai666 4007a6e
fix test
zhaohai666 003d2c3
add tls
zhaohai666 7ccc890
fix aLo
zhaohai666 2d00683
fix aLo
zhaohai666 fa60bd9
remove lite simple
zhaohai666 f28b0a0
fix getCallOptions
zhaohai666 0cd8113
fix getCallOptions
zhaohai666 fd66ba0
fix test
zhaohai666 5bce404
remove code
zhaohai666 a05bcaa
fix usleep
zhaohai666 5a546aa
fix test
zhaohai666 5239f5b
fix producer
zhaohai666 6a636ca
Merge remote-tracking branch 'origin/Update_PHP_client_features_localβ¦
zhaohai666 2630185
remove code
zhaohai666 49f0977
fix usleep
zhaohai666 80e7a5a
fix snapshot shard state ti prevent race condition in swoole coroutinβ¦
zhaohai666 1193c8a
fix test
zhaohai666 e05322b
fix instanceTimestamps
zhaohai666 a36a91e
docs: add design spec for PHP integration tests and gRPC mock framework
zhaohai666 64d350d
docs: add implementation plan for PHP integration tests and gRPC mockβ¦
zhaohai666 3cfba0b
feat: add mock registry to RpcClientManager for gRPC integration testing
zhaohai666 85d9a09
feat: add GrpcMockHelper for creating gRPC call mocks
zhaohai666 0f219a1
feat: add IntegrationTestCase base class with singleton cleanup
zhaohai666 5631e09
feat: add integration test suite to phpunit.xml
zhaohai666 fe07ca4
fix protobuf version
zhaohai666 0a38035
test: add RpcClientManager mock registry integration tests
zhaohai666 ea76b58
test: add SimpleConsumer integration tests and fix related bugs
zhaohai666 41344cc
fix executeDLQInterceptor
zhaohai666 b34dc1e
test: add Producer integration tests with gRPC mocks
zhaohai666 7e39927
test: add heartbeat, load balancer, and retry error integration tests
zhaohai666 4d68251
docs: fix PHPDoc inaccuracies across all modified PHP files
zhaohai666 b21a701
test: add PushConsumer, ProcessQueue, Transaction, and TelemetrySessiβ¦
zhaohai666 baaa8ae
docs: add comprehensive PHPDoc to all methods across entire PHP codebase
zhaohai666 5e6e067
fix test
zhaohai666 24d7158
fix test
zhaohai666 8b70a16
add gRPC mocks
zhaohai666 cd8ebd0
update awaitDuration
zhaohai666 716c897
fix deadline
zhaohai666 c19e53f
update example
zhaohai666 d83b715
update grpc-timeout
zhaohai666 e0f4761
update SwooleCompat.php
zhaohai666 0aab85f
update receiveFromAllQueues
zhaohai666 a8eeb3c
feat: add graceful shutdown to consumer examples and modernize with Pβ¦
zhaohai666 b4391a2
fix test
zhaohai666 b59465a
update match
zhaohai666 d4f2738
refactor: extract PublishingRouteManager from Producer, decouple Hearβ¦
zhaohai666 4f8e078
fix protected
zhaohai666 58f6a14
update php version
zhaohai666 2c27eb4
update warning
zhaohai666 0ca264d
update name
zhaohai666 6ed96c3
fix workflow test
zhaohai666 55cbc79
fix Logger.php
zhaohai666 7873f91
fix beStrictAboutOutputDuringTests
zhaohai666 36a93aa
fix: suppress gRPC C-core stderr noise in CI test runs via bootstrap
zhaohai666 b87e854
ci: set GRPC_VERBOSITY at OS level in PHP build workflow
zhaohai666 d49a2bf
feat: support sslEnabled toggle to disable TLS for dev/CI environments
zhaohai666 ddabd44
add ssl enable
zhaohai666 6161288
fix log
zhaohai666 05df586
fix: update getChannelArgs to accept targetHost, fix GRPC_TRACE value
zhaohai666 b18cac1
fix windows
zhaohai666 235cb4c
fix test
zhaohai666 191f33c
fix test
zhaohai666 6c97826
add test
zhaohai666 d40a718
add interface
zhaohai666 b8de247
remove method_exists
zhaohai666 850d9db
remove method_exists
zhaohai666 dc2c9b7
remove method_exists
zhaohai666 20db93f
remove lock
zhaohai666 367f6e7
update doc
zhaohai666 6efe46d
Optimization type
zhaohai666 49056ec
Delete unused dependencies
zhaohai666 649eea4
Fix compatibility and loose comparison
zhaohai666 cc6d57d
Fix inheritance compatibility
zhaohai666 a5a2862
Fix inheritance compatibility
zhaohai666 3e9b5c0
Fix TypeError
zhaohai666 f05b930
Fix TypeError
zhaohai666 04f57e6
Fix TypeError
zhaohai666 14581f6
Fix $parsedEndpoints
zhaohai666 533ffdc
add getMessageBrokerKey
zhaohai666 18593b4
update php doc
zhaohai666 5cc3f6d
update php doc
zhaohai666 15da757
remove require_once
zhaohai666 df9bb4f
fix test
zhaohai666 3017d33
fix test
zhaohai666 895e95c
remove doc
zhaohai666 bcca7df
Merge branch 'master' into Update_PHP_client_features_local
zhaohai666 624845d
fix LiteTopicQuotaExceededException
zhaohai666 3576eda
fix waitForSettingsConfirmation
zhaohai666 d43bdc0
fix(php): correctness fixes for FIFO hashing, TLS caching, startup, rβ¦
zhaohai666 735d946
fix(ci): recognize PHPUnit skipped-tests success in Windows gRPC shutβ¦
zhaohai666 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,6 @@ | |
| src | ||
| vendor | ||
| composer.lock | ||
| coverage | ||
| .phpunit.result.cache | ||
| phpunit.xsd | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,168 @@ | ||
| <?php | ||
| /** | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| namespace Apache\Rocketmq; | ||
|
|
||
| /** | ||
| * ClientConfiguration - Immutable configuration value object. | ||
| * Created exclusively by ClientConfigurationBuilder::build(). | ||
| * Referencing Java ClientConfiguration.java | ||
| */ | ||
| class ClientConfiguration | ||
| { | ||
| private readonly string $endpoints; | ||
| private readonly ?SessionCredentials $sessionCredentialsProvider; | ||
| private readonly int $requestTimeoutMs; | ||
| private readonly bool $sslEnabled; | ||
| private readonly string $namespace; | ||
| private readonly int $maxStartupAttempts; | ||
| private readonly ?TlsCredentials $tlsCredentials; | ||
|
|
||
| /** | ||
| * Private constructor - instantiated only via ClientConfiguration::create(). | ||
| * | ||
| * @param string $endpoints Target endpoint addresses. | ||
| * @param SessionCredentials|null $sessionCredentialsProvider Session credentials provider for authentication. | ||
| * @param int $requestTimeoutMs RPC request timeout in milliseconds. | ||
| * @param bool $sslEnabled Whether SSL is enabled. | ||
| * @param string $namespace Namespace for the client. | ||
| * @param int $maxStartupAttempts Maximum number of startup retry attempts. | ||
| * @param TlsCredentials|null $tlsCredentials TLS credentials for secure connections. | ||
| */ | ||
| private function __construct( | ||
| string $endpoints, | ||
| ?SessionCredentials $sessionCredentialsProvider, | ||
| int $requestTimeoutMs, | ||
| bool $sslEnabled, | ||
| string $namespace, | ||
| int $maxStartupAttempts, | ||
| ?TlsCredentials $tlsCredentials = null | ||
| ) { | ||
| $this->endpoints = $endpoints; | ||
| $this->sessionCredentialsProvider = $sessionCredentialsProvider; | ||
| $this->requestTimeoutMs = $requestTimeoutMs; | ||
| $this->sslEnabled = $sslEnabled; | ||
| $this->namespace = $namespace; | ||
| $this->maxStartupAttempts = $maxStartupAttempts; | ||
| $this->tlsCredentials = $tlsCredentials; | ||
| } | ||
|
|
||
| /** | ||
| * Factory method - only callable from ClientConfigurationBuilder. | ||
| * | ||
| * @param string $endpoints Target endpoint addresses. | ||
| * @param SessionCredentials|null $sessionCredentialsProvider Session credentials provider for authentication. | ||
| * @param int $requestTimeoutMs RPC request timeout in milliseconds. | ||
| * @param bool $sslEnabled Whether SSL is enabled. | ||
| * @param string $namespace Namespace for the client. | ||
| * @param int $maxStartupAttempts Maximum number of startup retry attempts. | ||
| * @param TlsCredentials|null $tlsCredentials TLS credentials for secure connections. | ||
| * @return ClientConfiguration New immutable configuration instance. | ||
| * | ||
| * @internal | ||
| */ | ||
| public static function create( | ||
| string $endpoints, | ||
| ?SessionCredentials $sessionCredentialsProvider, | ||
| int $requestTimeoutMs, | ||
| bool $sslEnabled, | ||
| string $namespace, | ||
| int $maxStartupAttempts, | ||
| ?TlsCredentials $tlsCredentials = null | ||
| ): ClientConfiguration { | ||
| return new self( | ||
| $endpoints, | ||
| $sessionCredentialsProvider, | ||
| $requestTimeoutMs, | ||
| $sslEnabled, | ||
| $namespace, | ||
| $maxStartupAttempts, | ||
| $tlsCredentials | ||
| ); | ||
| } | ||
|
|
||
| /** | ||
| * Get the target endpoints address. | ||
| * | ||
| * @return string Target endpoint addresses. | ||
| */ | ||
| public function getEndpoints(): string | ||
| { | ||
| return $this->endpoints; | ||
| } | ||
|
|
||
| /** | ||
| * Get the session credentials provider. | ||
| * | ||
| * @return SessionCredentials|null Session credentials provider, or null if not set. | ||
| */ | ||
| public function getSessionCredentialsProvider(): ?SessionCredentials | ||
| { | ||
| return $this->sessionCredentialsProvider; | ||
| } | ||
|
|
||
| /** | ||
| * Get the RPC request timeout in milliseconds. | ||
| * | ||
| * @return int RPC request timeout in milliseconds. | ||
| */ | ||
| public function getRequestTimeoutMs(): int | ||
| { | ||
| return $this->requestTimeoutMs; | ||
| } | ||
|
|
||
| /** | ||
| * Check whether SSL is enabled. | ||
| * | ||
| * @return bool True if SSL is enabled, false otherwise. | ||
| */ | ||
| public function isSslEnabled(): bool | ||
| { | ||
| return $this->sslEnabled; | ||
| } | ||
|
|
||
| /** | ||
| * Get the namespace. | ||
| * | ||
| * @return string Namespace for the client. | ||
| */ | ||
| public function getNamespace(): string | ||
| { | ||
| return $this->namespace; | ||
| } | ||
|
|
||
| /** | ||
| * Get the maximum number of startup retry attempts. | ||
| * | ||
| * @return int Maximum number of startup retry attempts. | ||
| */ | ||
| public function getMaxStartupAttempts(): int | ||
| { | ||
| return $this->maxStartupAttempts; | ||
| } | ||
|
|
||
| /** | ||
| * Get the TLS credentials for gRPC connections. | ||
| * | ||
| * @return TlsCredentials|null TLS credentials, or null if not set. | ||
| */ | ||
| public function getTlsCredentials(): ?TlsCredentials | ||
| { | ||
| return $this->tlsCredentials; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This named suite explicitly excludes
tests/integration, and the workflow never invokesRocketMQ PHP Integration Tests. The current telemetry timeout integration test already disagrees with the updated implementation, but CI cannot detect that regression. Please add a separate integration-test step/job (or run both suites) rather than reporting only the unit suite as the PHP build result.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed