Skip to content

Commit 5c96965

Browse files
committed
Merge branch 'release-v6'
2 parents 1aaa633 + 9bdce99 commit 5c96965

File tree

15 files changed

+781
-716
lines changed

15 files changed

+781
-716
lines changed

.idea/IXP-Manager.iml

+33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

+86-77
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/Console/Commands/InManrs.php

+10-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*/
2525
use Illuminate\Support\Facades\DB;
2626

27+
use Illuminate\Support\Facades\Http;
2728
use IXP\Models\Customer;
2829
/**
2930
* Artisan command to update the in_peeringdb flag of members
@@ -59,12 +60,18 @@ class InManrs extends Command
5960
public function handle(): int
6061
{
6162
// get list of peeringdb networks:
62-
if( !( $json = file_get_contents( 'https://www.manrs.org/wp-json/manrs/v1/asn' ) ) ) {
63-
$this->error( 'Could not load ASNs via MANRS\'s API' );
63+
try {
64+
$resp = Http::withHeaders( [
65+
'X-Request-Client' => 'IXP Manager',
66+
'X-Request-Client-Version' => APPLICATION_VERSION,
67+
] )->throw()->acceptJson()
68+
->get( 'https://api.manrs.org/asns' );
69+
} catch(\Exception $e) {
70+
$this->error( 'Could not load ASNs via MANRS\'s API: ' . $e->getMessage() );
6471
return 1;
6572
}
6673

67-
$asns = json_decode( $json, true );
74+
$asns = $resp['asns'];
6875

6976
if( !is_array( $asns ) || !count( $asns ) ) {
7077
$this->error( 'Empty or no ASNs returned from MANRS\'s API' );

artisan

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ require __DIR__.'/vendor/autoload.php';
2121

2222
$app = require_once __DIR__.'/bootstrap/app.php';
2323

24+
require_once base_path() . '/version.php';
25+
2426
/*
2527
|--------------------------------------------------------------------------
2628
| Run The Artisan Application

composer.lock

+53-53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/logging.php

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
],
7777

7878
'deprecations' => [
79+
'driver' => 'null',
7980
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
8081
'trace' => false,
8182
],

0 commit comments

Comments
 (0)