-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcomposer.json
45 lines (45 loc) · 1.39 KB
/
composer.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"name": "company/plugin",
"type": "wordpress-plugin",
"description": "Starter plugin from Viktor",
"license": "MIT",
"require": {
"php": "~7.4.0 || ~8.0.0",
"composer-runtime-api": "^2.2"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"php-stubs/wp-cli-stubs": "^2.4",
"phpcompatibility/php-compatibility": "^9.3",
"szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.11",
"szepeviktor/phpstan-wordpress": "^1.0",
"phpstan/phpstan-strict-rules": "^1.0"
},
"config": {
"classmap-authoritative": true,
"preferred-install": {
"*": "dist"
},
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"autoload": {
"psr-4": {
"Company\\WordPress\\PluginName\\": "src/"
}
},
"scripts": {
"cs": "phpcs -s --parallel=4 --runtime-set php_version 70000 plugin-name.php src/",
"generate-pot": "wp i18n make-pot . languages/plugin-slug.pot --slug='plugin-slug' --package-name='Plugin Name' --file-comment=''",
"phpcompat": "phpcs --standard=PHPCompatibility --runtime-set testVersion 7.0 plugin-name.php src/",
"phpstan": "phpstan analyze --no-progress -v src/",
"syntax": "find ./ -type f -not -path './vendor/*' -name '*.php' -print0|xargs -0 -L1 -P4 -- php -l",
"test": [
"@syntax",
"@phpcompat",
"@phpstan",
"@cs"
]
}
}