Skip to content

Feature/#93 add phpstan extension installer #94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circleci tests would fail if this is run inside this package without Drupal. Before only one rule was included the below phpstan.neon but now phpstan/extension-installer was icluding also this.

]
}
}
}
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'