Skip to content

Commit

Permalink
Use http_request() helper instead of Requests directly
Browse files Browse the repository at this point in the history
  • Loading branch information
schlessera committed May 31, 2023
1 parent 6d0ee4f commit 4bacfe2
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 4bacfe2

Please sign in to comment.