Skip to content

Commit

Permalink
Merge pull request #94 from wunderio/feature/93-add-phpstan-extension…
Browse files Browse the repository at this point in the history
…-installer

Feature/#93 add phpstan extension installer
  • Loading branch information
hkirsman authored May 4, 2023
2 parents a4c53f1 + 10565cc commit ada3510
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ config:
php: '8.1'
xdebug: true

services:
appserver:
build:
- composer install

tooling:
phpunit:
service: appserver
description: Run Drupal PHPUnit tests. Run 'lando phpunit --help' for more information.
cmd:
- "/app/.lando/tooling-phpunit.sh"
grumphp:
service: appserver
description: Runs grumphp commands
cmd: /app/.lando/tooling-grumphp.sh
11 changes: 11 additions & 0 deletions .lando/tooling-grumphp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

#
# Helper script to run GrumPHP.
#

set -exuo pipefail
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/app/vendor/bin

cd /app
./vendor/bin/grumphp "$@"
11 changes: 10 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"squizlabs/php_codesniffer": "^3.4",
"dealerdirect/phpcodesniffer-composer-installer": "*",
"mglaman/phpstan-drupal": "^1.1",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"vimeo/psalm": "^4",
"nette/finder": "^2.5",
Expand All @@ -59,7 +60,15 @@
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpro/grumphp": true
"phpro/grumphp": true,
"phpstan/extension-installer": true
}
},
"extra": {
"phpstan/extension-installer": {
"ignore": [
"mglaman/phpstan-drupal"
]
}
}
}
3 changes: 0 additions & 3 deletions config/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ parameters:
- '#Plugin definitions cannot be altered.#'
- '#Missing cache backend declaration for performance.#'
- '#Plugin manager has cache backend specified but does not declare cache tags.#'
includes:
- %currentWorkingDirectory%/vendor/mglaman/phpstan-drupal/extension.neon
- %currentWorkingDirectory%/vendor/phpstan/phpstan-deprecation-rules/rules.neon
2 changes: 0 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ parameters:
- '#Plugin definitions cannot be altered.#'
- '#Missing cache backend declaration for performance.#'
- '#Plugin manager has cache backend specified but does not declare cache tags.#'
includes:
- 'vendor/phpstan/phpstan-deprecation-rules/rules.neon'

0 comments on commit ada3510

Please sign in to comment.