Laravel 10.x Shift (#14995)

* Apply code style

* Remove explicit call to register policies

* Shift core files

* Shift config files

* Default config files

In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them and merged your true customizations -
where ENV variables may not be used.

* Bump Laravel dependencies

* Add type hints for Laravel 10

* Shift cleanup

* wip

* wip

* sync translation

* Sync back config

* Public Path Binding

* QueryException

* monolog

* db::raw

* monolog

* db::raw

* fix larastan collections

* fix phpstan bug looping forever

* larastan errors

* larastan: fix column type

* styleci

* initialize array

* fixes

* fixes

---------

Co-authored-by: Shift <shift@laravelshift.com>
This commit is contained in:
Jellyfrog
2023-05-24 22:21:54 +02:00
committed by GitHub
parent dd3ed41319
commit 2b3575a5e9
437 changed files with 1904 additions and 1913 deletions

View File

@@ -46,7 +46,7 @@ class DatastoreTest extends TestCase
]);
}
public function testDefaultInitialization()
public function testDefaultInitialization(): void
{
$ds = $this->app->make('Datastore');
$stores = $ds->getStores();
@@ -55,7 +55,7 @@ class DatastoreTest extends TestCase
$this->assertEquals('LibreNMS\Data\Store\Rrd', get_class($stores[0]), 'The default enabled store should be Rrd');
}
public function testInitialization()
public function testInitialization(): void
{
Config::set('rrd.enable', false);
Config::set('graphite.enable', true);

View File

@@ -52,7 +52,7 @@ class GraphiteStoreTest extends TestCase
parent::tearDown();
}
public function testSocketConnectError()
public function testSocketConnectError(): void
{
$mockFactory = \Mockery::mock(\Socket\Raw\Factory::class);
@@ -62,7 +62,7 @@ class GraphiteStoreTest extends TestCase
new Graphite($mockFactory);
}
public function testSocketWriteError()
public function testSocketWriteError(): void
{
$mockSocket = \Mockery::mock(\Socket\Raw\Socket::class);
$graphite = $this->mockGraphite($mockSocket);
@@ -73,7 +73,7 @@ class GraphiteStoreTest extends TestCase
$graphite->put(['hostname' => 'test'], 'fake', ['rrd_name' => 'name'], ['one' => 1]);
}
public function testSimpleWrite()
public function testSimpleWrite(): void
{
$mockSocket = \Mockery::mock(\Socket\Raw\Socket::class);
$graphite = $this->mockGraphite($mockSocket);

View File

@@ -34,7 +34,7 @@ use LibreNMS\Tests\TestCase;
*/
class InfluxDBStoreTest extends TestCase
{
public function testBadSettings()
public function testBadSettings(): void
{
Config::set('influxdb.host', '');
Config::set('influxdb.port', 'abc');
@@ -45,7 +45,7 @@ class InfluxDBStoreTest extends TestCase
$influx->put(['hostname' => 'test'], 'fake', [], ['one' => 1]);
}
public function testSimpleWrite()
public function testSimpleWrite(): void
{
// Create a mock of the Random Interface
$mock = \Mockery::mock(\InfluxDB\Database::class);

View File

@@ -52,7 +52,7 @@ class OpenTSDBStoreTest extends TestCase
parent::tearDown();
}
public function testSocketConnectError()
public function testSocketConnectError(): void
{
$mockFactory = \Mockery::mock(\Socket\Raw\Factory::class);
@@ -62,7 +62,7 @@ class OpenTSDBStoreTest extends TestCase
new OpenTSDB($mockFactory);
}
public function testSocketWriteError()
public function testSocketWriteError(): void
{
$mockSocket = \Mockery::mock(\Socket\Raw\Socket::class);
$opentsdb = $this->mockOpenTSDB($mockSocket);
@@ -73,7 +73,7 @@ class OpenTSDBStoreTest extends TestCase
$opentsdb->put(['hostname' => 'test'], 'fake', [], ['one' => 1]);
}
public function testSimpleWrite()
public function testSimpleWrite(): void
{
$mockSocket = \Mockery::mock(\Socket\Raw\Socket::class);
$opentsdb = $this->mockOpenTSDB($mockSocket);
@@ -90,7 +90,7 @@ class OpenTSDBStoreTest extends TestCase
$opentsdb->put($device, $measurement, $tags, $fields);
}
public function testPortWrite()
public function testPortWrite(): void
{
$mockSocket = \Mockery::mock(\Socket\Raw\Socket::class);
$opentsdb = $this->mockOpenTSDB($mockSocket);