File tree Expand file tree Collapse file tree 2 files changed +863
-1
lines changed
src/Common/EnvConfig/Client
tests/Unit/Common/EnvConfig/Client Expand file tree Collapse file tree 2 files changed +863
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ final class ConfigProfile
4949 * @var array<non-empty-lowercase-string, list<string>>
5050 */
5151 public readonly array $ grpcMeta ;
52+ public readonly ?ConfigTls $ tlsConfig ;
5253
5354 /**
5455 * Construct a new configuration profile.
@@ -69,14 +70,16 @@ public function __construct(
6970 ?string $ address ,
7071 ?string $ namespace ,
7172 null |string |\Stringable $ apiKey ,
72- public readonly ?ConfigTls $ tlsConfig = null ,
73+ ?ConfigTls $ tlsConfig = null ,
7374 array $ grpcMeta = [],
7475 public readonly ?ConfigCodec $ codecConfig = null ,
7576 ) {
7677 // Normalize empty strings to null
7778 $ this ->address = $ address === '' ? null : $ address ;
7879 $ this ->namespace = $ namespace === '' ? null : $ namespace ;
7980 $ this ->apiKey = $ apiKey === '' ? null : $ apiKey ;
81+ // If TLS config not provided, create default if API key is set
82+ $ this ->tlsConfig = $ tlsConfig ?? ($ this ->apiKey === null ? null : new ConfigTls ());
8083
8184 // Normalize gRPC metadata keys to lowercase per gRPC spec
8285 $ meta = [];
You can’t perform that action at this time.
0 commit comments