Skip to content

Commit

Permalink
Bump Guzzle support to include v7
Browse files Browse the repository at this point in the history
Upgrade performed by looking at OpenAPITools/openapi-generator#10585. Omitting the catch-and-rethrow on ConnectException included in that PR as downstream can just catch a TransferException if necessary, leaving just the composer.json update and switching removed namedspaced functions to their static-method equivalents.
  • Loading branch information
iansltx committed Jun 20, 2023
1 parent 257c705 commit c52874f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"require": {
"php": ">=7.4",
"guzzlehttp/guzzle": "~6.0"
"guzzlehttp/guzzle": "~6.0 || ^7"
},
"require-dev": {
"roave/security-advisories": "dev-master",
Expand Down
4 changes: 2 additions & 2 deletions src/Api/CustomizationApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ protected function apiV2ProfilesGetProfilesGetRequest($requested_client_id = nul

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -408,7 +408,7 @@ protected function apiV2ProfilesGetProfilesGetRequest($requested_client_id = nul
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down
4 changes: 2 additions & 2 deletions src/Api/HealthCheckApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ protected function apiV2HealthCheckGetRequest()

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -312,7 +312,7 @@ protected function apiV2HealthCheckGetRequest()
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down
22 changes: 11 additions & 11 deletions src/Api/JurisdictionDeterminationApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ protected function apiV2AfcPCodePostRequest($p_code_lookup_request = null)

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -368,7 +368,7 @@ protected function apiV2AfcPCodePostRequest($p_code_lookup_request = null)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'POST',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down Expand Up @@ -625,7 +625,7 @@ protected function apiV2GeoBatchLogProcessIdGetRequest($process_id)

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -641,7 +641,7 @@ protected function apiV2GeoBatchLogProcessIdGetRequest($process_id)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down Expand Up @@ -898,7 +898,7 @@ protected function apiV2GeoBatchStatusProcessIdGetRequest($process_id)

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -914,7 +914,7 @@ protected function apiV2GeoBatchStatusProcessIdGetRequest($process_id)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down Expand Up @@ -1121,7 +1121,7 @@ protected function apiV2GeoBatchUploadPostRequest($geo_batch_file = null)
// form params
if ($geo_batch_file !== null) {
$multipart = true;
$formParams['geoBatchFile'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($geo_batch_file), 'rb');
$formParams['geoBatchFile'] = \GuzzleHttp\Psr7\Utils::tryFopen(ObjectSerializer::toFormValue($geo_batch_file), 'rb');
}
// body params
$_tempBody = null;
Expand Down Expand Up @@ -1162,7 +1162,7 @@ protected function apiV2GeoBatchUploadPostRequest($geo_batch_file = null)

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -1178,7 +1178,7 @@ protected function apiV2GeoBatchUploadPostRequest($geo_batch_file = null)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'POST',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down Expand Up @@ -1424,7 +1424,7 @@ protected function apiV2GeoGeocodePostRequest($geocode_request = null)

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -1440,7 +1440,7 @@ protected function apiV2GeoGeocodePostRequest($geocode_request = null)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'POST',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down
20 changes: 10 additions & 10 deletions src/Api/LookupsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ protected function apiV2AfcLocationPCodeGetRequest($p_code)

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -379,7 +379,7 @@ protected function apiV2AfcLocationPCodeGetRequest($p_code)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down Expand Up @@ -636,7 +636,7 @@ protected function apiV2AfcPrimaryPCodeGetRequest($p_code)

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -652,7 +652,7 @@ protected function apiV2AfcPrimaryPCodeGetRequest($p_code)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down Expand Up @@ -890,7 +890,7 @@ protected function apiV2AfcServiceinfoGetRequest()

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -906,7 +906,7 @@ protected function apiV2AfcServiceinfoGetRequest()
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down Expand Up @@ -1163,7 +1163,7 @@ protected function apiV2AfcTaxtypeTaxTypeGetRequest($tax_type)

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -1179,7 +1179,7 @@ protected function apiV2AfcTaxtypeTaxTypeGetRequest($tax_type)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down Expand Up @@ -1417,7 +1417,7 @@ protected function apiV2AfcTspairsGetRequest()

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -1433,7 +1433,7 @@ protected function apiV2AfcTspairsGetRequest()
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down
8 changes: 4 additions & 4 deletions src/Api/TaxCalculationApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ protected function apiV2AfcCalcTaxesPostRequest($calc_taxes_request = null)

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -368,7 +368,7 @@ protected function apiV2AfcCalcTaxesPostRequest($calc_taxes_request = null)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'POST',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down Expand Up @@ -614,7 +614,7 @@ protected function apiV2AfcCommitPostRequest($commit_request = null)

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -630,7 +630,7 @@ protected function apiV2AfcCommitPostRequest($commit_request = null)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'POST',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down

0 comments on commit c52874f

Please sign in to comment.