Repository navigation
Expand file tree
/
Copy pathcomposer.json
More file actions
62 lines (62 loc) · 2.22 KB
/
Copy pathcomposer.json
File metadata and controls
62 lines (62 loc) · 2.22 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
"name": "woocommerce/action-scheduler",
"description": "Action Scheduler for WordPress and WooCommerce",
"homepage": "https://actionscheduler.org/",
"type": "wordpress-plugin",
"license": "GPL-3.0-or-later",
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"php": ">=7.2"
},
"require-dev": {
"phpunit/phpunit": "^8.5",
"wp-cli/wp-cli": "~2.5.0",
"woocommerce/woocommerce-sniffs": "^1.0.1",
"sirbrillig/phpcs-changed": "^2.11",
"yoast/phpunit-polyfills": "^2.0"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"platform": {
"php": "7.2"
}
},
"archive": {
"exclude": [
"node_modules"
]
},
"scripts": {
"test": [
"./vendor/bin/phpunit tests -c tests/phpunit.xml.dist"
],
"phpcs": [
"phpcs -s -p"
],
"phpcbf": [
"phpcbf -p"
],
"lint": [
"changed=$(git diff --relative --name-only --diff-filter=d -- '*.php'); if [ -z \"$changed\" ]; then echo 'No unstaged PHP changes detected.'; exit 0; fi; phpcs-changed -s --git --git-unstaged $changed"
],
"lint-staged": [
"changed=$(git diff --cached --relative --name-only --diff-filter=d -- '*.php'); if [ -z \"$changed\" ]; then echo 'No staged PHP changes detected.'; exit 0; fi; phpcs-changed -s --git $changed"
],
"lint-branch": [
"sh -c 'base=\"${1:-origin/trunk}\"; mergeBase=$(git merge-base HEAD \"$base\") || exit 1; changed=$(git diff \"$mergeBase\" --relative --name-only --diff-filter=d -- \"*.php\"); if [ -z \"$changed\" ]; then echo \"No changed PHP files detected.\"; exit 0; fi; phpcs-changed -s --git --git-base \"$base\" $changed' lint-branch"
]
},
"extra": {
"scripts-description": {
"test": "Run unit tests",
"phpcs": "Analyze code against the WordPress coding standards with PHP_CodeSniffer",
"phpcbf": "Fix coding standards warnings/errors automatically with PHP Code Beautifier",
"lint": "Run phpcs against PHP files with unstaged changes",
"lint-staged": "Run phpcs against PHP files with staged changes",
"lint-branch": "Run phpcs against PHP files changed on the current branch compared to its base branch"
}
}
}