diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..7a968a8 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: monthly diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c4a9f80..c709b30 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,25 +8,25 @@ on: jobs: build: name: PHPStan analysis - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: - php: - - "8.0.19" + php: ["8.1", "8.2"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup PHP - uses: pmmp/setup-php-action@247e08acd52c1465f8f144c162c88f079d8c1174 + uses: pmmp/setup-php-action@2.0.0 with: php-version: ${{ matrix.php }} install-path: "./bin" + pm-version-major: 4 - name: Restore Composer package cache id: composer-cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: "~/.cache/composer" key: "php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}" diff --git a/src/Main.php b/src/Main.php index 96b4260..409f829 100644 --- a/src/Main.php +++ b/src/Main.php @@ -29,7 +29,8 @@ public function onEnable() : void{ try{ $config = $this->loadConfig($configPath); }catch(PluginException $e){ - throw new DisablePluginException('Failed to load config file ' . $configPath . ': ' . $e->getMessage()); + $this->getLogger()->alert('Failed to load config file ' . $configPath . ': ' . $e->getMessage()); + throw new DisablePluginException(); } $this->getLogger()->info('Starting RCON on ' . $config->ip . ':' . $config->port);