-
Notifications
You must be signed in to change notification settings - Fork 0
/
composer.json
113 lines (113 loc) · 4.22 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
{
"name": "dreadlabs/media-type-decoding",
"description": "Simple API for Media type inference.",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Thomas Juhnke",
"email": "dev@van-tomas.de"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
},
"require-dev": {
"behat/behat": "~3.4.3@stable",
"phpunit/phpunit": "~6.5.8@stable",
"sami/sami": "~4.0.16@stable",
"phpunit/phpcov": "~4.0.5@stable"
},
"autoload": {
"psr-4": {
"DreadLabs\\MediaTypeDecoding\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"DreadLabs\\MediaTypeDecoding\\Tests\\": "tests/"
}
},
"repositories": [
{
"type": "path",
"url": "../../packages/*"
}
],
"scripts": {
"prepare:build-dir": [
"mkdir -p ./build/analyses",
"mkdir -p ./build/coverage/html",
"mkdir -p ./build/docs/api",
"mkdir -p ./build/metrics"
],
"lint:php": [
"find src/ tests/ -name \"*.php\" -print0 | xargs -0 -n1 php -l"
],
"analyze:dependencies": [
"@prepare:build-dir",
"deptrac analyze --formatter-graphviz-dump-image=./build/analyses/dependencies.png"
],
"analyze:static": [
"@prepare:build-dir",
"phploc --names=\"*.php\" --count-tests --exclude=\"vendor\" --log-csv=\"./build/analyses/phploc.csv\" --log-xml=\"./build/analyses/phploc.xml\" ./src ./tests",
"phpcpd --names=\"*.php\" --log-pmd=\"./build/analyses/phpcpd.xml\" --progress ./src/",
"phpmd ./src/ xml cleancode,codesize,controversial,design,naming,unusedcode --reportfile ./build/analyses/phpmd.xml --minimumpriority 5 || true",
"phpcs -np --report=checkstyle --report-checkstyle=./build/analyses/checkstyle.xml --standard=PSR2 --ignore=**/vendor/**,**/tests/** --extensions=php ./src ./tests || true"
],
"analyze:metrics": [
"@prepare:build-dir",
"[ -f ./build/coverage/clover.xml ] || (echo 'Run composer test:coverage:merge first!' && exit 1)",
"pdepend --coverage-report=./build/coverage/clover.xml --summary-xml=./build/metrics/summary.xml --jdepend-xml=./build/metrics/report.xml --jdepend-chart=./build/metrics/chart.svg --overview-pyramid=./build/metrics/pyramid.svg --suffix=php --ignore=**/vendor/**,**/tests/** ./src/"
],
"test:unit": [
"phpunit --testsuite Unit --verbose --testdox --no-coverage"
],
"test:unit:with-coverage": [
"@prepare:build-dir",
"phpdbg -qrr vendor/bin/phpunit --coverage-php ./build/coverage/unit.cov --colors=never -d memory_limit=512M"
],
"test:integration": [
"phpunit --testsuite Integration --verbose --testdox --no-coverage"
],
"test:integration:with-coverage": [
"@prepare:build-dir",
"phpdbg -qrr vendor/bin/phpunit --coverage-php ./build/coverage/integration.cov --colors=never -d memory_limit=512M"
],
"test:coverage:merge": [
"@prepare:build-dir",
"phpcov merge ./build/coverage --clover ./build/coverage/clover.xml --html ./build/coverage/html"
],
"test:acceptance:fail-fast": [
"behat -v --stop-on-failure"
],
"test:acceptance": [
"@prepare:build-dir",
"behat -v --format progress"
],
"test:all": [
"@lint",
"@analyze:dependencies",
"@analyze:static",
"@test:unit:with-coverage",
"@test:integration:with-coverage",
"@test:coverage:merge",
"@test:acceptance",
"@analyze:metrics"
],
"fix:codestyle:dry": [
"php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation"
],
"fix:codestyle": [
"php-cs-fixer fix --config=.php_cs.dist -v"
],
"docs:all": [
"@docs:api"
],
"docs:api": [
"@prepare:build-dir",
"sami.php update --force .sami.php"
]
}
}