-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcomposer.json
More file actions
116 lines (116 loc) · 5.31 KB
/
composer.json
File metadata and controls
116 lines (116 loc) · 5.31 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
{
"name": "conductionnl/openregister",
"description": "Quickly build data registers based on schema.json",
"license": "AGPL-3.0-or-later",
"authors": [
{
"name": "Conduction b.v.",
"email": "info@conduction.nl",
"homepage": "https://conduction.nl"
}
],
"autoload": {
"psr-4": {
"OCA\\OpenRegister\\": "lib/"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/theodo-group/LLPhant"
}
],
"scripts": {
"post-install-cmd": [
"@composer bin all install --ansi"
],
"post-update-cmd": [
"@composer bin all update --ansi"
],
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l",
"cs:check": "./vendor/bin/phpcs --standard=phpcs.xml",
"cs:fix": "./vendor/bin/phpcbf --standard=phpcs.xml",
"phpcs": "./vendor/bin/phpcs --standard=phpcs.xml",
"phpcs:fix": "./vendor/bin/phpcbf --standard=phpcs.xml",
"psalm": "psalm --threads=1 --no-cache || echo 'Psalm not installed, skipping...'",
"phpmd": "phpmd lib text phpmd.xml || echo 'PHPMD not installed, skipping...'",
"test:unit": "./vendor/bin/phpunit --testsuite=\"Unit Tests\" --colors=always || echo 'Tests require Nextcloud environment, skipping...'",
"test:integration": "./vendor/bin/phpunit --testsuite=\"Integration Tests\" --colors=always || echo 'Tests require Nextcloud environment, skipping...'",
"test:db": "./vendor/bin/phpunit --testsuite=\"Database Tests\" --colors=always || echo 'Tests require Nextcloud environment, skipping...'",
"test:service": "./vendor/bin/phpunit --testsuite=\"Service Tests\" --colors=always || echo 'Tests require Nextcloud environment, skipping...'",
"test:all": "./vendor/bin/phpunit --colors=always || echo 'Tests require Nextcloud environment, skipping...'",
"test:docker": "docker exec -u 33 master-nextcloud-1 bash -c 'cd /var/www/html/apps-extra/openregister && ./vendor/bin/phpunit --colors=always'",
"test:api": "docker exec -u 33 master-nextcloud-1 bash -c 'cd /var/www/html/apps-extra/openregister && ./vendor/bin/phpunit --testsuite=\"Integration Tests\" --colors=always'",
"test:coverage": "./vendor/bin/phpunit --coverage-html=coverage/html --coverage-clover=coverage/clover.xml --colors=always",
"test:coverage-docker": "docker exec -u 33 master-nextcloud-1 bash -c 'cd /var/www/html/apps-extra/openregister && ./vendor/bin/phpunit --coverage-html=coverage/html --coverage-clover=coverage/clover.xml --colors=always'",
"coverage:check": "php -r \"\\$xml = simplexml_load_file('coverage/clover.xml'); \\$metrics = \\$xml->project->metrics; \\$statements = (int)\\$metrics['statements']; \\$covered = (int)\\$metrics['coveredstatements']; \\$percentage = \\$statements > 0 ? round((\\$covered / \\$statements) * 100, 2) : 0; echo 'Coverage: ' . \\$percentage . '%' . PHP_EOL; exit(\\$percentage < 75 ? 1 : 0);\"",
"quality:phpcs-score": "./vendor/bin/phpcs --standard=phpcs.xml --report=json lib/ | php -r \"\\$json = json_decode(file_get_contents('php://stdin'), true); \\$errors = \\$json['totals']['errors'] ?? 0; \\$warnings = \\$json['totals']['warnings'] ?? 0; \\$score = 1000 - \\$errors - (\\$warnings / 2); echo 'PHPCS Score: ' . \\$score . ' (Errors: ' . \\$errors . ', Warnings: ' . \\$warnings . ')' . PHP_EOL;\"",
"quality:phpmd-score": "phpmd lib/ json phpmd.xml | php -r \"\\$input = file_get_contents('php://stdin'); \\$json = json_decode(\\$input, true); \\$violations = count(\\$json['files'] ?? []); \\$score = 1000 - (\\$violations * 10); echo 'PHPMD Score: ' . \\$score . ' (Violations: ' . \\$violations . ')' . PHP_EOL;\" || echo 'PHPMD not available'",
"quality:psalm-score": "psalm --output-format=json --no-cache | php -r \"\\$input = file_get_contents('php://stdin'); \\$json = json_decode(\\$input, true); \\$errors = count(\\$json ?? []); \\$score = 1000 - (\\$errors * 5); echo 'Psalm Score: ' . \\$score . ' (Errors: ' . \\$errors . ')' . PHP_EOL;\" || echo 'Psalm not available'",
"quality:score": [
"@quality:phpcs-score",
"@quality:phpmd-score",
"@quality:psalm-score"
],
"quality:baseline": "php scripts/quality-baseline.php",
"openapi": "generate-spec",
"check": [
"@lint",
"@psalm",
"@test:unit"
],
"check:full": [
"@lint",
"@psalm",
"@test:all"
],
"check:strict": [
"@lint",
"@phpcs",
"@phpmd",
"@psalm",
"@test:all"
],
"fix": [
"@cs:fix"
]
},
"require": {
"php": "^8.3",
"adbario/php-dot-notation": "^3.3.0",
"bamarni/composer-bin-plugin": "^1.8",
"elasticsearch/elasticsearch": "^v8.14.0",
"guzzlehttp/guzzle": "^7.0",
"opis/json-schema": "^2.3",
"phpoffice/phpspreadsheet": "^4.2",
"phpoffice/phpword": "^1.2",
"react/async": "^4.3",
"react/event-loop": "^1.5",
"react/promise": "^3.2",
"smalot/pdfparser": "^2.9",
"symfony/uid": "^6.4",
"symfony/yaml": "^6.4",
"theodo-group/llphant": "^0.9.3",
"twig/twig": "^3.18"
},
"require-dev": {
"phpcsstandards/phpcsextra": "^1.4",
"phpmd/phpmd": "^2.15",
"phpunit/phpunit": "^10.5",
"roave/security-advisories": "dev-latest",
"squizlabs/php_codesniffer": "^3.9",
"vimeo/psalm": "^6"
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true,
"php-http/discovery": true,
"dealerdirect/phpcodesniffer-composer-installer": true
},
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "8.3"
}
}
}