Skip to content

Commit ada3510

Browse files
authored
Merge pull request #94 from wunderio/feature/93-add-phpstan-extension-installer
Feature/#93 add phpstan extension installer
2 parents a4c53f1 + 10565cc commit ada3510

File tree

5 files changed

+30
-6
lines changed

5 files changed

+30
-6
lines changed

.lando.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,18 @@ config:
44
php: '8.1'
55
xdebug: true
66

7+
services:
8+
appserver:
9+
build:
10+
- composer install
11+
712
tooling:
813
phpunit:
914
service: appserver
1015
description: Run Drupal PHPUnit tests. Run 'lando phpunit --help' for more information.
1116
cmd:
1217
- "/app/.lando/tooling-phpunit.sh"
18+
grumphp:
19+
service: appserver
20+
description: Runs grumphp commands
21+
cmd: /app/.lando/tooling-grumphp.sh

.lando/tooling-grumphp.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
#
4+
# Helper script to run GrumPHP.
5+
#
6+
7+
set -exuo pipefail
8+
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/app/vendor/bin
9+
10+
cd /app
11+
./vendor/bin/grumphp "$@"

composer.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"squizlabs/php_codesniffer": "^3.4",
4444
"dealerdirect/phpcodesniffer-composer-installer": "*",
4545
"mglaman/phpstan-drupal": "^1.1",
46+
"phpstan/extension-installer": "^1.1",
4647
"phpstan/phpstan-deprecation-rules": "^1.0",
4748
"vimeo/psalm": "^4",
4849
"nette/finder": "^2.5",
@@ -59,7 +60,15 @@
5960
"config": {
6061
"allow-plugins": {
6162
"dealerdirect/phpcodesniffer-composer-installer": true,
62-
"phpro/grumphp": true
63+
"phpro/grumphp": true,
64+
"phpstan/extension-installer": true
65+
}
66+
},
67+
"extra": {
68+
"phpstan/extension-installer": {
69+
"ignore": [
70+
"mglaman/phpstan-drupal"
71+
]
6372
}
6473
}
6574
}

config/phpstan.neon

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,3 @@ parameters:
77
- '#Plugin definitions cannot be altered.#'
88
- '#Missing cache backend declaration for performance.#'
99
- '#Plugin manager has cache backend specified but does not declare cache tags.#'
10-
includes:
11-
- %currentWorkingDirectory%/vendor/mglaman/phpstan-drupal/extension.neon
12-
- %currentWorkingDirectory%/vendor/phpstan/phpstan-deprecation-rules/rules.neon

phpstan.neon

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ parameters:
77
- '#Plugin definitions cannot be altered.#'
88
- '#Missing cache backend declaration for performance.#'
99
- '#Plugin manager has cache backend specified but does not declare cache tags.#'
10-
includes:
11-
- 'vendor/phpstan/phpstan-deprecation-rules/rules.neon'

0 commit comments

Comments
 (0)