Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmmp/exampleplugin
Example PocketMine-MP plugin, showing some basic features of the API
https://github.com/pmmp/exampleplugin
phpstan-l8 phpstan-strict pocketmine-example-code pocketmine-mp-4 pocketmine-plugin
Last synced: 3 months ago
JSON representation
Example PocketMine-MP plugin, showing some basic features of the API
- Host: GitHub
- URL: https://github.com/pmmp/exampleplugin
- Owner: pmmp
- Fork: true (PocketMine/ExamplePlugin)
- Created: 2018-06-09T11:29:23.000Z (over 6 years ago)
- Default Branch: stable
- Last Pushed: 2024-04-18T12:46:38.000Z (8 months ago)
- Last Synced: 2024-09-26T09:43:25.438Z (3 months ago)
- Topics: phpstan-l8, phpstan-strict, pocketmine-example-code, pocketmine-mp-4, pocketmine-plugin
- Language: PHP
- Homepage:
- Size: 60.5 KB
- Stars: 35
- Watchers: 9
- Forks: 23
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ExamplePlugin
This repository contains a basic example of a modern PocketMine-MP plugin, and a handful of the API features.
## PHPStan analysis
This repository shows an example setup for standalone local analysis of a plugin using [PHPStan](https://phpstan.org).It uses [Composer](https://getcomposer.org) for autoloading, allowing you to install PHPStan extensions such as [phpstan-strict-rules](https://github.com/phpstan/phpstan-strict-rules). The configuration for this can be seen in [`phpstan/composer.json`](/phpstan/composer.json).
### Setting up PHPStan
Assuming you have Composer and a compatible PHP binary available in your PATH, run:
```
cd phpstan
composer install
```Then you can run PHPStan exactly as you would with any other project:
```
vendor/bin/phpstan analyze
```### Updating the dependencies
```
composer update
```### GitHub Actions
You can find a workflow suitable for analysing most plugins using this system in [`.github/workflows/main.yml`](/.github/workflows/main.yml).