Add extension template with PHPStan, PHPUnit and phpcs

This commit is contained in:
Jens Schuppe 2024-03-25 14:51:55 +01:00
parent b4c6581d4f
commit 8cd928caa9
22 changed files with 825 additions and 1 deletions

11
tools/phpcs/composer.json Normal file
View file

@ -0,0 +1,11 @@
{
"repositories": [
{
"type": "git",
"url": "https://github.com/civicrm/coder.git"
}
],
"require": {
"drupal/coder": "dev-8.x-2.x-civi"
}
}

View file

@ -0,0 +1,18 @@
{
"require": {
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.7",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.1",
"phpstan/phpstan-strict-rules": "^1.2",
"phpstan/phpstan-webmozart-assert": "^1.2",
"thecodingmachine/phpstan-strict-rules": "^1.0",
"voku/phpstan-rules": "^3.0"
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true
},
"sort-packages": true
}
}

View file

@ -0,0 +1,13 @@
{
"require": {
"symfony/phpunit-bridge": "^6.1"
},
"scripts": {
"post-install-cmd": [
"@php vendor/bin/simple-phpunit install"
],
"post-update-cmd": [
"@php vendor/bin/simple-phpunit install"
]
}
}