Update PHP dependencies (#11377)

* Update composer dependencies
Fix PSR-4 violations

* Actually support PHP 7.1 :D

* all trap tests should extend SnmpTrapTestCase
This commit is contained in:
Tony Murray
2020-04-03 17:13:18 -05:00
committed by GitHub
parent 4335607a8d
commit f0d68a1ad8
27 changed files with 1066 additions and 553 deletions

View File

@@ -6,7 +6,7 @@ use LibreNMS\Interfaces\Discovery\Sensors\WirelessClientsDiscovery;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessApCountDiscovery;
use LibreNMS\OS;
class FortiWlc extends OS implements
class Fortiwlc extends OS implements
WirelessClientsDiscovery,
WirelessApCountDiscovery
{

View File

@@ -59,12 +59,11 @@
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"jakub-onderka/php-console-highlighter": "*",
"jakub-onderka/php-parallel-lint": "*",
"justinrainbow/json-schema": "^5.2",
"laravel/dusk": "^5.0",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"php-parallel-lint/php-parallel-lint": "^1.1",
"phpunit/phpunit": "^7.5",
"squizlabs/php_codesniffer": "^3.5",
"staudenmeir/dusk-updater": "^1.1"
@@ -79,7 +78,7 @@
"exclude-from-classmap": [
"/vendor/laravel/laravel/database/",
"/vendor/laravel/laravel/app/",
"/vendor/jakub-onderka/php-parallel-lint/src/JsonSerializable.php"
"/html/plugins"
],
"classmap": [
"database/seeds",

1545
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,7 @@ use RecursiveIteratorIterator;
use RecursiveRegexIterator;
use RegexIterator;
class AlertTest extends TestCase
class AlertingTest extends TestCase
{
public function testJsonAlertCollection()
{

View File

@@ -1,6 +1,6 @@
<?php
/**
* DocTest.php
* DocsTest.php
*
* Tests for Docs.
*
@@ -27,7 +27,7 @@ namespace LibreNMS\Tests;
use Symfony\Component\Yaml\Yaml;
class DocTest extends TestCase
class DocsTest extends TestCase
{
private $hidden_pages = [
'API/API-Docs.md',

View File

@@ -1,6 +1,6 @@
<?php
/**
* AdvaDyingGaspTest.php
* AdvaDyingGaspTrapTest.php
*
* -Description-
*
@@ -29,7 +29,7 @@ use App\Models\Device;
use LibreNMS\Snmptrap\Dispatcher;
use LibreNMS\Snmptrap\Trap;
class AdvaSnmpDyingGaspTest extends SnmpTrapTestCase
class AdvaDyingGaspTrapTest extends SnmpTrapTestCase
{
public function testDyingGasp()
{

View File

@@ -29,7 +29,7 @@ use App\Models\Device;
use LibreNMS\Snmptrap\Dispatcher;
use LibreNMS\Snmptrap\Trap;
class AdvaNetworkElementAlmTest extends SnmpTrapTestCase
class AdvaNetworkElementAlmTrapTest extends SnmpTrapTestCase
{
public function testElementAlarmCleared()
{

View File

@@ -30,10 +30,8 @@ use LibreNMS\Snmptrap\Dispatcher;
use LibreNMS\Snmptrap\Trap;
use LibreNMS\Tests\DBTestCase;
class ApcPduOutletTest extends DBTestCase
class ApcPduOutletTest extends SnmpTrapTestCase
{
use DatabaseTransactions;
public function testOutletOff()
{
$device = factory(Device::class)->create();

View File

@@ -32,10 +32,8 @@ use LibreNMS\Snmptrap\Dispatcher;
use LibreNMS\Snmptrap\Trap;
use LibreNMS\Tests\DBTestCase;
class BgpTrapTest extends DBTestCase
class BgpTrapTest extends SnmpTrapTestCase
{
use DatabaseTransactions;
public function testBgpUp()
{
$device = factory(Device::class)->create();

View File

@@ -23,21 +23,18 @@
* @author Tony Murray <murraytony@gmail.com>
*/
namespace LibreNMS\Tests;
namespace LibreNMS\Tests\Feature\SnmpTraps;
use App\Models\Device;
use App\Models\Eventlog;
use App\Models\Ipv4Address;
use App\Models\Port;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use LibreNMS\Snmptrap\Dispatcher;
use LibreNMS\Snmptrap\Trap;
use Log;
class CommonTrapTest extends DBTestCase
class CommonTrapTest extends SnmpTrapTestCase
{
use DatabaseTransactions;
public function testGarbage()
{
$trapText = "Garbage\n";

View File

@@ -31,10 +31,8 @@ use LibreNMS\Snmptrap\Dispatcher;
use LibreNMS\Snmptrap\Trap;
use LibreNMS\Tests\DBTestCase;
class FgTrapAvOversizeTest extends DBTestCase
class FgTrapAvOversizeTest extends SnmpTrapTestCase
{
use DatabaseTransactions;
public function testAvOversize()
{
$device = factory(Device::class)->create();

View File

@@ -32,10 +32,8 @@ use LibreNMS\Snmptrap\Dispatcher;
use LibreNMS\Snmptrap\Trap;
use LibreNMS\Tests\DBTestCase;
class FgTrapIpsTest extends DBTestCase
class FgTrapIpsTest extends SnmpTrapTestCase
{
use DatabaseTransactions;
public function testIpsAnomaly()
{
$device = factory(Device::class)->create();

View File

@@ -32,10 +32,8 @@ use LibreNMS\Snmptrap\Dispatcher;
use LibreNMS\Snmptrap\Trap;
use LibreNMS\Tests\DBTestCase;
class FgTrapVpnTunTest extends DBTestCase
class FgTrapVpnTunTest extends SnmpTrapTestCase
{
use DatabaseTransactions;
public function testVpnTunDown()
{
$device = factory(Device::class)->create();

View File

@@ -31,10 +31,8 @@ use LibreNMS\Snmptrap\Dispatcher;
use LibreNMS\Snmptrap\Trap;
use LibreNMS\Tests\DBTestCase;
class FgTrapLogRateThresholdTest extends DBTestCase
class FmTrapLogRateThresholdTest extends SnmpTrapTestCase
{
use DatabaseTransactions;
public function testAvOversize()
{
$device = factory(Device::class)->create();

View File

@@ -25,7 +25,7 @@
* @author Heath Barnhart <hbarnhart@kanren.net>
*/
namespace LibreNMS\Tests;
namespace LibreNMS\Tests\Feature\SnmpTraps;
use App\Models\BgpPeer;
use App\Models\Device;

View File

@@ -25,7 +25,7 @@
* @author Heath Barnhart <hbarnhart@kanren.net>
*/
namespace LibreNMS\Tests;
namespace LibreNMS\Tests\Feature\SnmpTraps;
use App\Models\Device;
use LibreNMS\Snmptrap\Dispatcher;

View File

@@ -25,7 +25,7 @@
* @author Heath Barnhart <hbarnhart@kanren.net>
*/
namespace LibreNMS\Tests;
namespace LibreNMS\Tests\Feature\SnmpTraps;
use App\Models\Device;
use App\Models\Port;

View File

@@ -25,7 +25,7 @@
* @author Heath Barnhart <hbarnhart@kanren.net>
*/
namespace LibreNMS\Tests;
namespace LibreNMS\Tests\Feature\SnmpTraps;
use App\Models\Device;
use App\Models\Port;

View File

@@ -25,7 +25,7 @@
* @author Heath Barnhart <hbarnhart@kanren.net>
*/
namespace LibreNMS\Tests;
namespace LibreNMS\Tests\Feature\SnmpTraps;
use App\Models\Device;
use App\Models\Ipv4Address;

View File

@@ -25,7 +25,7 @@
* @author Heath Barnhart <hbarnhart@kanren.net>
*/
namespace LibreNMS\Tests;
namespace LibreNMS\Tests\Feature\SnmpTraps;
use App\Models\Device;
use App\Models\Port;

View File

@@ -25,7 +25,7 @@
* @author Heath Barnhart <hbarnhart@kanren.net>
*/
namespace LibreNMS\Tests;
namespace LibreNMS\Tests\Feature\SnmpTraps;
use App\Models\Device;
use LibreNMS\Snmptrap\Dispatcher;

View File

@@ -26,7 +26,7 @@
* @author Heath Barnhart <hbarnhart@kanren.net>
*/
namespace LibreNMS\Tests;
namespace LibreNMS\Tests\Feature\SnmpTraps;
use App\Models\Device;
use App\Models\Port;

View File

@@ -26,7 +26,7 @@
* @author Heath Barnhart <hbarnhart@kanren.net>
*/
namespace LibreNMS\Tests;
namespace LibreNMS\Tests\Feature\SnmpTraps;
use App\Models\Device;
use App\Models\Port;

View File

@@ -31,7 +31,7 @@ use App\Models\Device;
use LibreNMS\Snmptrap\Dispatcher;
use LibreNMS\Snmptrap\Trap;
class RuckusEventTrap extends SnmpTrapTestCase
class RuckusEventTest extends SnmpTrapTestCase
{
public function testRuckusAssocTrap()
{

View File

@@ -25,7 +25,7 @@
* @author Heath Barnhart <hbarnhart@kanren.net>
*/
namespace LibreNMS\Tests;
namespace LibreNMS\Tests\Feature\SnmpTraps;
use App\Models\Device;
use LibreNMS\Snmptrap\Dispatcher;

View File

@@ -25,7 +25,7 @@
* @author Heath Barnhart <hbarnhart@kanren.net>
*/
namespace LibreNMS\Tests;
namespace LibreNMS\Tests\Feature\SnmpTraps;
use App\Models\Device;
use App\Models\Vminfo;