From da4fcea6681de3a3eaa89851889c7362d7b09c5f Mon Sep 17 00:00:00 2001 From: DaPigGuy Date: Wed, 29 Jan 2020 15:56:33 -0800 Subject: [PATCH] PHPStan Level 8 --- .github/CONTRIBUTING.md | 20 ++++++++++++++++++++ .github/ISSUE_TEMPLATE.md | 27 +++++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 24 ++++++++++++++++++++++++ .github/workflows/main.yml | 24 ++++++++++++++++++++++++ phpstan.neon.dist | 13 +++++++++++++ 5 files changed, 108 insertions(+) create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/main.yml create mode 100644 phpstan.neon.dist diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..d3c2c4c --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,20 @@ +# PiggyBackpacks + +## Contribution Guidelines + +### Issues +If you are submitting an issue ticket, you must: +* Must be PMMP w/o vanilla patching plugins (i.e. TeaSpoon) +* Issue must have not been reported previously +* Must be on latest version of PMMP & PiggyBackpacks +* Have a detailed title. +* If possible, provide crashdumps/errors related to the issue. + +### Pull Requests +If you are submitting a pull request, you must: +* Use same formatting +* Changes must have been tested on PMMP. +* Unless it is a minor code modification, you must use an IDE. +* Have a detailed title. + +Last updated: January 29, 2020. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..3ea0b04 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,27 @@ + +Please make sure your issue complies with these guidelines: +- * [ ] Server Software must be the official PMMP w/o vanilla patching plugins (i.e. TeaSpoon) +- * [ ] Issue must have not been reported previously +- * [ ] Make sure you are on the latest version of PMMP & PiggyBackpacks +- * [ ] Have a detailed title. +- * [ ] If possible, provide crashdumps/errors related to the issue. + +#### **General** + + +#### **Version:** + +- PiggyBackpacks: + +- PMMP: + +- OS: + +#### **Steps to Reproduce the Issue** + +1. + +#### **Extra Information** + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..19d4b7c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,24 @@ + +Please make sure your pull request complies with these guidelines: +- * [ ] Use same formatting +- * [ ] Changes must have been tested on PMMP. +- * [ ] Unless it is a minor code modification, you must use an IDE. +- * [ ] Have a detailed title. + +#### **What does the PR change?** + + +#### **Testing Environment** + +- PHP: +- PMMP: +- OS: + +#### **Extra Information** + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..30809bf --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,24 @@ +name: PHPStan + +on: [push, pull_request] + +jobs: + phpstan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + - name: Create Vendor Directory + run: | + echo Making directory... + mkdir vendor + echo Directory made. + - name: wget virions, InvMenu + uses: wei/wget@v1 + with: + args: -O vendor/InvMenu.phar https://poggit.pmmp.io/r/73860/InvMenu_dev-84.phar + - name: Run PHPStan + uses: nxtlvlsoftware/pmmp-phpstan-action@3 + with: + phpstan-config: phpstan.neon.dist \ No newline at end of file diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000..5a34709 --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,13 @@ +parameters: + paths: + - /source/src + level: 8 + autoload_files: + - phar:///pocketmine/PocketMine-MP.phar/vendor/autoload.php + autoload_directories: + - /source/src + - phar:///source/vendor/InvMenu.phar/src/ + excludes_analyse: + - source/vendor + reportUnmatchedIgnoredErrors: false + checkMissingIterableValueType: false \ No newline at end of file