Skip to content

Commit 5e7cf1c

Browse files
authored
By default should use static configuration class instance, otherwise new instance is created every time (#19775)
1 parent ad6c2dd commit 5e7cf1c

File tree

28 files changed

+50
-50
lines changed

28 files changed

+50
-50
lines changed

modules/openapi-generator/src/main/resources/php-nextgen/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ use {{invokerPackage}}\ObjectSerializer;
8282
int $hostIndex = 0
8383
) {
8484
$this->client = $client ?: new Client();
85-
$this->config = $config ?: new Configuration();
85+
$this->config = $config ?: Configuration::getDefaultConfiguration();
8686
$this->headerSelector = $selector ?: new HeaderSelector();
8787
$this->hostIndex = $hostIndex;
8888
}

modules/openapi-generator/src/main/resources/php/api.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ use {{invokerPackage}}\ObjectSerializer;
8282
$hostIndex = 0
8383
) {
8484
$this->client = $client ?: new Client();
85-
$this->config = $config ?: new Configuration();
85+
$this->config = $config ?: Configuration::getDefaultConfiguration();
8686
$this->headerSelector = $selector ?: new HeaderSelector();
8787
$this->hostIndex = $hostIndex;
8888
}

samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function __construct(
9393
int $hostIndex = 0
9494
) {
9595
$this->client = $client ?: new Client();
96-
$this->config = $config ?: new Configuration();
96+
$this->config = $config ?: Configuration::getDefaultConfiguration();
9797
$this->headerSelector = $selector ?: new HeaderSelector();
9898
$this->hostIndex = $hostIndex;
9999
}

samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function __construct(
117117
int $hostIndex = 0
118118
) {
119119
$this->client = $client ?: new Client();
120-
$this->config = $config ?: new Configuration();
120+
$this->config = $config ?: Configuration::getDefaultConfiguration();
121121
$this->headerSelector = $selector ?: new HeaderSelector();
122122
$this->hostIndex = $hostIndex;
123123
}

samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function __construct(
9696
int $hostIndex = 0
9797
) {
9898
$this->client = $client ?: new Client();
99-
$this->config = $config ?: new Configuration();
99+
$this->config = $config ?: Configuration::getDefaultConfiguration();
100100
$this->headerSelector = $selector ?: new HeaderSelector();
101101
$this->hostIndex = $hostIndex;
102102
}

samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function __construct(
9090
int $hostIndex = 0
9191
) {
9292
$this->client = $client ?: new Client();
93-
$this->config = $config ?: new Configuration();
93+
$this->config = $config ?: Configuration::getDefaultConfiguration();
9494
$this->headerSelector = $selector ?: new HeaderSelector();
9595
$this->hostIndex = $hostIndex;
9696
}

samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function __construct(
9090
int $hostIndex = 0
9191
) {
9292
$this->client = $client ?: new Client();
93-
$this->config = $config ?: new Configuration();
93+
$this->config = $config ?: Configuration::getDefaultConfiguration();
9494
$this->headerSelector = $selector ?: new HeaderSelector();
9595
$this->hostIndex = $hostIndex;
9696
}

samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function __construct(
117117
int $hostIndex = 0
118118
) {
119119
$this->client = $client ?: new Client();
120-
$this->config = $config ?: new Configuration();
120+
$this->config = $config ?: Configuration::getDefaultConfiguration();
121121
$this->headerSelector = $selector ?: new HeaderSelector();
122122
$this->hostIndex = $hostIndex;
123123
}

samples/client/echo_api/php-nextgen/src/Api/AuthApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function __construct(
9393
int $hostIndex = 0
9494
) {
9595
$this->client = $client ?: new Client();
96-
$this->config = $config ?: new Configuration();
96+
$this->config = $config ?: Configuration::getDefaultConfiguration();
9797
$this->headerSelector = $selector ?: new HeaderSelector();
9898
$this->hostIndex = $hostIndex;
9999
}

samples/client/echo_api/php-nextgen/src/Api/BodyApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function __construct(
117117
int $hostIndex = 0
118118
) {
119119
$this->client = $client ?: new Client();
120-
$this->config = $config ?: new Configuration();
120+
$this->config = $config ?: Configuration::getDefaultConfiguration();
121121
$this->headerSelector = $selector ?: new HeaderSelector();
122122
$this->hostIndex = $hostIndex;
123123
}

0 commit comments

Comments
 (0)