Skip to content

Commit 9edf4c8

Browse files
committed
Switch to check URL v2 first
1 parent 5e19a5e commit 9edf4c8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Package_Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,14 +866,14 @@ private function get_package_by_shortened_identifier( $package_name, $insecure =
866866
* Gets the correct packagist URL.
867867
*/
868868
private function get_packagist_url( $package_name, $options ) {
869-
$url = "https://repo.packagist.org/p/{$package_name}.json";
869+
$url = "https://repo.packagist.org/p2/{$package_name}.json";
870870
$response = Utils\http_request( 'GET', $url, null, [], $options );
871871

872872
if ( 20 === (int) substr( $response->status_code, 0, 2 ) ) {
873873
return $url;
874874
}
875875

876-
return "https://repo.packagist.org/p2/{$package_name}.json";
876+
return "https://repo.packagist.org/p/{$package_name}.json";
877877
}
878878

879879
/**

0 commit comments

Comments
 (0)