-
Notifications
You must be signed in to change notification settings - Fork 1
/
composer.json
228 lines (228 loc) · 10.2 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
{
"name": "bheisig/idoitcli",
"description": "Access your CMDB on the command line interface",
"type": "project",
"keywords": ["i-doit", "cmdb", "it documentation", "cli", "api", "json-rpc"],
"homepage": "https://github.com/bheisig/i-doit-cli",
"license": "AGPL-3.0+",
"authors": [
{
"name": "Benjamin Heisig",
"email": "[email protected]",
"homepage": "https://benjamin.heisig.name/",
"role": "Developer"
}
],
"support": {
"issues": "https://github.com/bheisig/i-doit-cli/issues",
"source": "https://github.com/bheisig/i-doit-cli"
},
"require": {
"php": ">=7.1.0",
"ext-Phar": "*",
"ext-zlib": "*",
"bheisig/cli": "@dev",
"bheisig/idoitapi": "@dev"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
"j13k/yaml-lint": "^1.1",
"jakub-onderka/php-parallel-lint": "^1.0",
"macfja/phar-builder": "^0.2.6",
"phpcompatibility/php-compatibility": "*",
"phploc/phploc": "^4.0",
"phpmd/phpmd" : "@stable",
"phpstan/phpstan": "^0.11.6",
"phpunit/phpunit": "^7",
"povils/phpmnd": "^2",
"roave/security-advisories": "dev-master",
"sclable/xml-lint": "^0.2.4",
"sebastian/phpcpd": "^4.1.0",
"seld/jsonlint": "^1.7",
"sensiolabs/security-checker": "^5",
"sllh/composer-lint": "^1.0",
"squizlabs/php_codesniffer": "*"
},
"suggest": {
"ext-xdebug": "Needed for code coverage with phpunit"
},
"prefer-stable" : false,
"autoload": {
"psr-4": {
"bheisig\\idoitcli\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"bheisig\\idoitcli\\tests\\": "tests/"
}
},
"bin": ["bin/idoitcli"],
"config": {
"process-timeout": 86400,
"sllh-composer-lint": {
"php": false,
"type": true,
"minimum-stability": true,
"version-constraints": true
},
"sort-packages": true
},
"scripts": {
"ci": [
"@composer system-check",
"@composer lint",
"@composer find-forbidden",
"@composer security-checker",
"@composer phpcompatibility",
"@composer phpcpd",
"@composer phpcs",
"@composer phpstan",
"@composer build",
"@composer test",
"@composer dist",
"@composer clean"
],
"clean": [
"rm -f `composer config extra.name`",
"rm -rf *.tar.gz ./`composer config extra.name`-`composer config extra.version`/",
"rm -f `composer config extra.name`.phar `composer config extra.name`.phar.asc"
],
"build": [
"@composer dump-autoload --classmap-authoritative",
"php -d phar.readonly=0 ./vendor/bin/phar-builder package --quiet composer.json",
"mv `composer config extra.name`.phar `composer config extra.name`",
"chmod +x `composer config extra.name`",
"@composer dump-autoload"
],
"deb": [
"@composer is-built",
"touch .dummy",
"rm -f `composer config extra.name`_`composer config extra.version`_all.deb",
"fpm -s dir -t deb -n `composer config extra.name` -v `composer config extra.version` -a all --license \"`composer config license`\" -m \"Benjamin Heisig <[email protected]>\" --vendor \"Benjamin Heisig <[email protected]>\" --description \"`composer config description`\" --url \"`composer config homepage`\" -d php -d php-cli -d php-common -d php-bz2 -d php-curl -d php-json `composer config extra.name`=/usr/bin/`composer config extra.name` .dummy=/etc/`composer config extra.name`",
"rm .dummy",
"lintian `composer config extra.name`_`composer config extra.version`_all.deb"
],
"dist": [
"@composer is-built",
"rm -rf ./`composer config extra.name`-`composer config extra.version`/",
"mkdir ./`composer config extra.name`-`composer config extra.version`/",
"cp -r `composer config extra.name` ./`composer config extra.name`-`composer config extra.version`/",
"cp -r CHANGELOG.md ./`composer config extra.name`-`composer config extra.version`/",
"cp -r CONTRIBUTING.md ./`composer config extra.name`-`composer config extra.version`/",
"cp -r LICENSE ./`composer config extra.name`-`composer config extra.version`/",
"cp -r README.md ./`composer config extra.name`-`composer config extra.version`/",
"tar czf `composer config extra.name`-`composer config extra.version`.tar.gz ./`composer config extra.name`-`composer config extra.version`/",
"rm -r ./`composer config extra.name`-`composer config extra.version`/"
],
"find-forbidden": [
"! grep -rEn \"(var_dump|die|exit)\\(\" src/*"
],
"gitstats": "gitstats -c project_name=`composer config extra.name` . gitstats",
"gource": "gource -1280x720 --seconds-per-day 3 --auto-skip-seconds 1 --title `composer config extra.name`",
"is-built": "test -x `composer config extra.name` || ( echo 'Run \"composer build\" first' && exit 1 )",
"lint": [
"@composer lint-php",
"@composer lint-json",
"@composer lint-xml",
"@composer lint-yaml"
],
"lint-json": "./vendor/bin/jsonlint composer.json config/default.json config/schema.json config/template.json",
"lint-php": "./vendor/bin/parallel-lint --exclude vendor --blame .",
"lint-xml": "./vendor/bin/xmllint --recursive --exclude=vendor --skip-xsd --verbose .",
"lint-yaml": [
"./vendor/bin/yaml-lint .travis.yml",
"./vendor/bin/yaml-lint appveyor.yml"
],
"phive": [
"@composer is-built",
"cp `composer config extra.name` `composer config extra.name`.phar",
"gpg --detach-sign --output `composer config extra.name`.phar.asc `composer config extra.name`.phar"
],
"phpcompatibility": "./vendor/bin/phpcs -p --colors --extensions=php --standard=PHPCompatibility --runtime-set testVersion 7.1 src/",
"phpcpd": "./vendor/bin/phpcpd src/",
"phpcs": "./vendor/bin/phpcs --extensions=php --standard=PSR1,PSR2 --exclude=PSR2.Classes.ClassDeclaration,Squiz.Functions.MultiLineFunctionDeclaration bin/ src/",
"phploc": "./vendor/bin/phploc --exclude=vendor --exclude=docs .",
"phpmd": "./vendor/bin/phpmd src text cleancode,codesize,controversial,design,naming,unusedcode",
"phpmnd": "./vendor/bin/phpmnd . --non-zero-exit-on-violation --exclude=vendor",
"phpstan": "./vendor/bin/phpstan analyze -l max src",
"phpunit": "./vendor/bin/phpunit --configuration ./phpunit.xml --testdox",
"security-checker": "./vendor/bin/security-checker security:check ./composer.lock",
"system-check": [
"php --version",
"php -m",
"php --info | grep -E \"(max_execution_time|memory_limit)\"",
"@composer --version",
"@composer validate",
"@composer diagnose || echo \"Ignore warnings\"",
"@composer check-platform-reqs",
"@composer config extra.version"
],
"test": [
"@composer is-built",
"./`composer config extra.name` --help",
"./`composer config extra.name` --version",
"for command in $(./`composer config extra.name` list 2> /dev/null | awk '{print $1}'); do echo Run \"./`composer config extra.name` $command --help\" ; ./`composer config extra.name` \"$command\" --help > /dev/null || echo \"Command $command failed with non-zero exit code\"; done"
],
"win-ci": [
"@composer win-system-check",
"@composer win-build"
],
"win-build": [
"@composer dump-autoload --classmap-authoritative",
".\\vendor\\bin\\phar-builder.bat package composer.json",
"powershell mv \"$(composer config extra.name).phar\" \"$(composer config extra.name)\"",
"@composer dump-autoload"
],
"win-system-check": [
"php --version",
"php -m",
"@composer --version",
"@composer validate",
"@composer diagnose & exit 0",
"@composer check-platform-reqs",
"@composer config extra.version"
]
},
"scripts-descriptions": {
"ci": "Perform continuous integration tasks",
"clean": "Cleanup project directory",
"build": "Create a binary",
"deb": "Create a Debian GNU/Linux package",
"dist": "Create a distribution tarball",
"find-forbidden": "Find forbidden words in source code",
"gitstats": "Create Git statistics",
"gource": "Visualize Git history",
"is-built": "Test whether binary is already built",
"lint": "Perform all lint checks",
"lint-php": "Check syntax of PHP files",
"lint-json": "Check syntax of JSON files",
"lint-xml": "Check syntax of XML files",
"lint-yaml": "Check syntax of YAML files",
"phive": "Build PHIVE files",
"phpcompatibility": "Run PHP compatibility checks",
"phpcpd": "Detect copy/paste in source code",
"phpcs": "Detect violations of defined coding standards",
"phploc": "Print source code statistics",
"phpmd": "Detect mess in source code",
"phpmnd": "Detect magic numbers in source code",
"phpstan": "Analyze source code",
"phpunit": "Perform unit tests",
"security-checker": "Look for dependencies with known security vulnerabilities",
"system-check": "Run some system checks",
"test": "Perform some tests with the built binary"
},
"extra": {
"name": "idoitcli",
"version": "0.9",
"phar-builder": {
"skip-shebang": false,
"include-dev": false,
"entry-point": "bin/idoitcli.php",
"compression": "GZip",
"name": "idoitcli.phar",
"output-dir": "./",
"include": ["config"]
}
}
}