forked from coenjacobs/mozart
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathcomposer.json
More file actions
149 lines (149 loc) · 7.14 KB
/
composer.json
File metadata and controls
149 lines (149 loc) · 7.14 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
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
{
"name": "brianhenryie/strauss",
"description": "Prefixes dependencies namespaces so they are unique to your plugin",
"authors": [
{
"name": "Brian Henry",
"email": "BrianHenryIE@gmail.com"
},
{
"name": "Coen Jacobs",
"email": "coenjacobs@gmail.com"
}
],
"bin": ["bin/strauss"],
"minimum-stability": "dev",
"prefer-stable": true,
"license": "MIT",
"require": {
"ext-json": "*",
"brianhenryie/simple-php-code-parser": "^0.15.3",
"composer-runtime-api": "^2.0",
"composer/class-map-generator": "^1.6.0",
"composer/composer": "^2.6.0",
"elazar/flystream": "^0.5.0|^1",
"json-mapper/json-mapper": "^2.0.0",
"league/flysystem": "^2.1|^3.0",
"league/flysystem-memory": "*",
"monolog/monolog": "^2.10",
"nikic/php-parser": "^5.4.0",
"symfony/console": "^4|^5|^6|^7",
"symfony/finder": "^4|^5|^6|^7"
},
"autoload": {
"psr-4": {
"BrianHenryIE\\Strauss\\": "src/"
},
"files": [
"bootstrap.php"
]
},
"autoload-dev": {
"psr-4": {
"BrianHenryIE\\Strauss\\Tests\\": "tests/",
"BrianHenryIE\\Strauss\\": [
"tests/",
"tests/Integration",
"tests/Unit"
]
},
"classmap": [
"tests"
]
},
"require-dev": {
"php": "^7.4|^8.0",
"brianhenryie/color-logger": "*",
"brianhenryie/php-codecoverage-markdown": "^0.1.0",
"clue/phar-composer": "^1.4",
"jaschilz/php-coverage-badger": "^2.0",
"mockery/mockery": "^1.6",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-mockery": "^1.1",
"phpunit/phpcov": "*",
"phpunit/phpunit": "^9|^10",
"squizlabs/php_codesniffer": "^3.5"
},
"conflict": {
"json-mapper/json-mapper": "2.23.0 | 2.24.0"
},
"scripts": {
"post-install-cmd": [
],
"post-update-cmd": [
],
"analyze": [
"phpstan analyse --memory-limit=-1 --verbose"
],
"analyze-changes": [
"updated_files=$(echo $(git diff --name-only `git merge-base origin/master HEAD` | grep php | tr '\\n' '\\0' | xargs -0 ls -1df 2>/dev/null)); if [ -n \"$updated_files\" ]; then phpstan analyse --memory-limit=-1 $updated_files --verbose || true; else echo \"No modified php files for phpstan.\"; fi;"
],
"analyze-changes-strict": [
"updated_files=$(echo $(git diff --name-only `git merge-base origin/master HEAD` | grep php | tr '\\n' '\\0' | xargs -0 ls -1df 2>/dev/null)); if [ -n \"$updated_files\" ]; then echo \"Found: $updated_files\"; phpstan analyse --memory-limit=-1 $updated_files --level max --verbose || true; else echo \"No modified php files for phpstan.\"; fi;"
],
"cs": [
"phpcs || true",
"@analyze"
],
"cs-fix": [
"phpcbf || true",
"phpcs || true",
"@analyze"
],
"cs-changes": [
"updated_files=$(echo $(git diff --name-only `git merge-base origin/master HEAD` | grep php | tr '\\n' '\\0' | xargs -0 ls -1df 2>/dev/null)); if [ -n \"$updated_files\" ]; then phpcbf $updated_files || true; phpcs $updated_files || true; else echo \"No modified php files.\"; fi;",
"@analyze-changes"
],
"cs-changes-strict": [
"updated_files=$(echo $(git diff --name-only `git merge-base origin/master HEAD` | grep php | tr '\\n' '\\0' | xargs -0 ls -1df 2>/dev/null)); if [ -n \"$updated_files\" ]; then phpcbf $updated_files || true; phpcs $updated_files || true; else echo \"No modified php files.\"; fi;",
"@analyze-changes-strict"
],
"install-phive-dependencies": [
"if [ -z \"$(command -v phive)\" ]; then echo \"Phive is not installed. Run 'brew install gpg phive' or see https://phar.io/.\"; exit 1; fi;",
"phive install"
],
"test": [
"Composer\\Config::disableProcessTimeout",
"phpunit --stop-on-failure --order-by=random"
],
"test-changes": [
"if [ -z \"$(command -v ./tools/php-diff-test)\" ]; then echo \"Please install 'php-diff-test' with 'phive install'.\"; exit 1; fi;",
"if [ \"$XDEBUG_MODE\" != \"coverage\" ]; then echo 'Run with XDEBUG_MODE=coverage composer test-changes'; exit 1; fi;",
"phpunit --filter=\"$(./tools/php-diff-test filter --input-files tests/_reports/php.cov --granularity=line)\" --coverage-text;"
],
"test-changes-report": [
"if [ -z \"$(command -v ./tools/php-diff-test)\" ]; then echo \"Please install 'php-diff-test' with 'phive install'.\"; exit 1; fi;",
"if [ -z \"$(command -v ./tools/phpcov)\" ]; then echo \"Please install 'phpcov' with 'phive install'.\"; exit 1; fi;",
"if [ \"$XDEBUG_MODE\" != \"coverage\" ]; then echo 'Run with XDEBUG_MODE=coverage composer test-changes-report'; exit 1; fi;",
"if [ -d \"tests/_reports/diff\" ]; then rm -rf tests/_reports/diff; fi;",
"phpunit --filter=\"$(./tools/php-diff-test filter --input-files tests/_reports/php.cov --granularity file)\" --coverage-text --coverage-php tests/_reports/diff/php.cov -d memory_limit=-1;",
"./tools/php-diff-test coverage --input-files tests/_reports/diff/php.cov --output-file tests/_reports/diff/php.cov;",
"./tools/phpcov merge tests/_reports/diff --html tests/_reports/diff/html;",
"open tests/_reports/diff/html/index.html"
],
"test-coverage": [
"Composer\\Config::disableProcessTimeout",
"if [ \"$XDEBUG_MODE\" != \"coverage\" ]; then echo \"Run with 'XDEBUG_MODE=coverage composer test-coverage'\"; exit 1; fi;",
"phpunit ./tests/Unit --coverage-text --coverage-clover tests/_reports/partial/unitclover.xml --coverage-php tests/_reports/partial/unitphp.cov -d memory_limit=-1 --order-by=random",
"phpcov merge --clover tests/_reports/clover.xml --html tests/_reports/html tests/_reports/partial;",
"php-coverage-badger tests/_reports/clover.xml .github/coverage.svg",
"if [ $(command -v ./tools/phpcov) ]; then git diff master...head > /tmp/master.diff; ./tools/phpcov patch-coverage --path-prefix $(pwd) ./tests/_reports/php.cov /tmp/master.diff || true; fi;",
"# Run 'open ./tests/_reports/html/index.html' to view report."
]
},
"scripts-descriptions": {
"test-changes": "Run PHPUnit only on lines that have changed in master...HEAD",
"test-changes-report": "Run PHPUnit only on files that have changed in master...HEAD and display the HTML report.",
"test-coverage": "Run PHPUnit tests with coverage. Use 'XDEBUG_MODE=coverage composer test-coverage' to run, 'open ./tests/_reports/html/index.html' to view."
},
"replace":{
"coenjacobs/mozart": "*"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"phpstan/extension-installer": true
}
}
}