Skip to content

Commit

Permalink
Merge pull request #71 from dkarlovi/phpstan-extensions
Browse files Browse the repository at this point in the history
feature: ship additional PHPStan extensions by default
  • Loading branch information
jakzal authored Jul 5, 2018
2 parents 8d95146 + 9ccae22 commit 403343b
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 2 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ Nightly builds: https://hub.docker.com/r/jakzal/phpqa-nightly/
* phpmnd - [Helps to detect magic numbers](https://github.com/povils/phpmnd)
* phpspec - [SpecBDD Framework](http://www.phpspec.net/)
* phpstan - [Static Analysis Tool](https://github.com/phpstan/phpstan)
* phpstan-deprecation-rules - [PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits](https://github.com/phpstan/phpstan-deprecation-rules)
* phpstan-strict-rules - [Extra strict and opinionated rules for PHPStan](https://github.com/phpstan/phpstan-strict-rules)
* phpstan-doctrine - [Doctrine extensions for PHPStan](https://github.com/phpstan/phpstan-doctrine)
* phpstan-phpunit - [PHPUnit extensions and rules for PHPStan](https://github.com/phpstan/phpstan-phpunit)
* phpstan-symfony - [Symfony extension for PHPStan](https://github.com/phpstan/phpstan-symfony)
* phpstan-beberlei-assert - [PHPStan extension for beberlei/assert](https://github.com/phpstan/phpstan-beberlei-assert)
* phpstan-webmozart-assert - [PHPStan extension for webmozart/assert](https://github.com/phpstan/phpstan-webmozart-assert)
* phpstan-exception-rules - [PHPStan rules for checked and unchecked exceptions](https://github.com/pepakriz/phpstan-exception-rules)
* phpunit - [The PHP testing framework](https://phpunit.de/)
* psalm - [Finds errors in PHP applications](https://getpsalm.org/)
* psecio-parse - [Parse scanner is a static scanning tool to review your PHP code for potential security-related issues](https://github.com/psecio/parse)
Expand Down Expand Up @@ -132,7 +140,14 @@ docker run --init -it --rm -v $(pwd):/project -w /project foo/phpqa phpmetrics .

### Adding PHPStan extensions

Use the composer-bin-plugin to install any PHPStan extensions in the `phpstan` namespace:
A number of PHPStan extensions is available on the image in `/root/.composer/vendor-bin/phpstan/vendor` out of the box.
You can find them with the command below:

```
phpqa find /root/.composer/vendor-bin/phpstan/vendor/ -iname 'rules.neon' -or -iname 'extension.neon'
```

Use the composer-bin-plugin to install any additional PHPStan extensions in the `phpstan` namespace:

```
FROM jakzal/phpqa:alpine
Expand Down
98 changes: 97 additions & 1 deletion tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"command": {
"composer-bin-plugin": {
"package": "akeneo/php-coupling-detector",
"namespace": "tools"
"namespace": "php-coupling-detector"
}
},
"test": "php-coupling-detector list"
Expand Down Expand Up @@ -417,6 +417,102 @@
},
"test": "phpstan --version"
},
{
"name": "phpstan-deprecation-rules",
"summary": "PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits",
"website": "https://github.com/phpstan/phpstan-deprecation-rules",
"command": {
"composer-bin-plugin": {
"package": "phpstan/phpstan-deprecation-rules",
"namespace": "phpstan"
}
},
"test": "true"
},
{
"name": "phpstan-strict-rules",
"summary": "Extra strict and opinionated rules for PHPStan",
"website": "https://github.com/phpstan/phpstan-strict-rules",
"command": {
"composer-bin-plugin": {
"package": "phpstan/phpstan-strict-rules",
"namespace": "phpstan"
}
},
"test": "true"
},
{
"name": "phpstan-doctrine",
"summary": "Doctrine extensions for PHPStan",
"website": "https://github.com/phpstan/phpstan-doctrine",
"command": {
"composer-bin-plugin": {
"package": "phpstan/phpstan-doctrine",
"namespace": "phpstan"
}
},
"test": "true"
},
{
"name": "phpstan-phpunit",
"summary": "PHPUnit extensions and rules for PHPStan",
"website": "https://github.com/phpstan/phpstan-phpunit",
"command": {
"composer-bin-plugin": {
"package": "phpstan/phpstan-phpunit",
"namespace": "phpstan"
}
},
"test": "true"
},
{
"name": "phpstan-symfony",
"summary": "Symfony extension for PHPStan",
"website": "https://github.com/phpstan/phpstan-symfony",
"command": {
"composer-bin-plugin": {
"package": "phpstan/phpstan-symfony",
"namespace": "phpstan"
}
},
"test": "true"
},
{
"name": "phpstan-beberlei-assert",
"summary": "PHPStan extension for beberlei/assert",
"website": "https://github.com/phpstan/phpstan-beberlei-assert",
"command": {
"composer-bin-plugin": {
"package": "phpstan/phpstan-beberlei-assert",
"namespace": "phpstan"
}
},
"test": "true"
},
{
"name": "phpstan-webmozart-assert",
"summary": "PHPStan extension for webmozart/assert",
"website": "https://github.com/phpstan/phpstan-webmozart-assert",
"command": {
"composer-bin-plugin": {
"package": "phpstan/phpstan-webmozart-assert",
"namespace": "phpstan"
}
},
"test": "true"
},
{
"name": "phpstan-exception-rules",
"summary": "PHPStan rules for checked and unchecked exceptions",
"website": "https://github.com/pepakriz/phpstan-exception-rules",
"command": {
"composer-bin-plugin": {
"package": "pepakriz/phpstan-exception-rules",
"namespace": "phpstan"
}
},
"test": "true"
},
{
"name": "phpunit",
"summary": "The PHP testing framework",
Expand Down

0 comments on commit 403343b

Please sign in to comment.