Releases: NxtLvLSoftware/setup-pmmp-phpstan-env-action
v1.0.2
Fix potential problems with GitHub authentication & remove non-essential files from the release build that aren't required for the action to run.
v1.0.1
Include all files output by https://github.com/vercel/ncc builds in dist.
v1.0.0
GitHub action for downloading PocketMine-MP sources and providing default configs for PHPStan analysis.
pocketmine.phpstan.neon.dist
Installed to pocketmine/phpstan/pocketmine.phpstan.neon.dist
by default.
This the most basic configuration that simply includes PocketMine's autoloader so classes and types are defined when running
the analysis. You could do this yourself but if using the default installation path simply include this file in your phpstan.neon
file.
phpstan.neon.dist
Installed to pocketmine/phpstan/phpstan.neon.dist
by default.
This the most useful configuration and as such, is used by default. It includes the pocketmine.phpstan.neon
file and sets
up PocketMines custom rules to ensure code uses custom types and API's correctly.
strict.phpstan.neon.dist
Installed to pocketmine/phpstan/strict.phpstan.neon.dist
by default.
This simply adds phpstan-strict-rules on-top of the phpstan.neon.dist
configuration. If you don't want to use all the rules, it is possible to selectively enable them as described in the projects README.
Make sure the autoload script in vendor/autoload.php
is passed to phpstan via the CLI option, and all the rule classes will
be available (you cannot load the rules via a .neon config as phpstan internally resolves the rules for its container BEFORE the bootstrapFiles
options are loaded.)
How to use:
Downloads a PocketMine-MP.phar to the install-path
and copy the provided default PHPStan configs:
name: My Workflow
on: [push]
jobs:
setup-pmmp-phpstan:
name: Setup PHPStan
runs-on: ubuntu-latest
steps:
- uses: nxtlvlsoftware/setup-pmmp-phpstan-env-action@v1
with:
pmmp-version: latest
License
nxtlvlsoftware/setup-pmmp-phpstan-env-action
is open-sourced software licensed under the MIT license.