File tree Expand file tree Collapse file tree 2 files changed +864
-1
lines changed
src/Common/EnvConfig/Client
tests/Unit/Common/EnvConfig/Client Expand file tree Collapse file tree 2 files changed +864
-1
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ final class ConfigProfile
5050 */
5151 public readonly array $ grpcMeta ;
5252
53+ public readonly ?ConfigTls $ tlsConfig ;
54+
5355 /**
5456 * Construct a new configuration profile.
5557 *
@@ -69,14 +71,16 @@ public function __construct(
6971 ?string $ address ,
7072 ?string $ namespace ,
7173 null |string |\Stringable $ apiKey ,
72- public readonly ?ConfigTls $ tlsConfig = null ,
74+ ?ConfigTls $ tlsConfig = null ,
7375 array $ grpcMeta = [],
7476 public readonly ?ConfigCodec $ codecConfig = null ,
7577 ) {
7678 // Normalize empty strings to null
7779 $ this ->address = $ address === '' ? null : $ address ;
7880 $ this ->namespace = $ namespace === '' ? null : $ namespace ;
7981 $ this ->apiKey = $ apiKey === '' ? null : $ apiKey ;
82+ // If TLS config not provided, create default if API key is set
83+ $ this ->tlsConfig = $ tlsConfig ?? ($ this ->apiKey === null ? null : new ConfigTls ());
8084
8185 // Normalize gRPC metadata keys to lowercase per gRPC spec
8286 $ meta = [];
You can’t perform that action at this time.
0 commit comments