Skip to content

Commit

Permalink
Merge pull request #171 from wp-cli/fix/use-http-request-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
schlessera authored May 31, 2023
2 parents 6d0ee4f + 4bacfe2 commit 58ef38d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Context/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
use Behat\Testwork\Hook\Scope\AfterSuiteScope;
use Behat\Testwork\Hook\Scope\BeforeSuiteScope;
use Requests;
use RuntimeException;
use WP_CLI\Process;
use WP_CLI\Utils;
Expand Down Expand Up @@ -617,7 +616,7 @@ private function replace_wp_versions( $str ) {
if ( null === $wp_versions ) {
$wp_versions = [];

$response = Requests::get( 'https://api.wordpress.org/core/version-check/1.7/', null, [ 'timeout' => 30 ] );
$response = Utils\http_request( 'GET', 'https://api.wordpress.org/core/version-check/1.7/', null, [], [ 'timeout' => 30 ] );
if ( 200 === $response->status_code ) {
$body = json_decode( $response->body );
if ( is_object( $body ) && isset( $body->offers ) && is_array( $body->offers ) ) {
Expand Down

0 comments on commit 58ef38d

Please sign in to comment.