|
1 | 1 | { |
2 | | - "name": "conductionnl/softwarecatalog", |
3 | | - "description": "Quickly build data registers based on schema.json", |
4 | | - "license": "EUPL-1.2", |
5 | | - "authors": [ |
6 | | - { |
7 | | - "name": "Conduction b.v.", |
8 | | - "email": "info@conduction.nl", |
9 | | - "homepage": "https://conduction.nl" |
10 | | - } |
11 | | - ], |
12 | | - "autoload": { |
13 | | - "psr-4": { |
14 | | - "OCA\\SoftwareCatalog\\": "lib/" |
15 | | - } |
16 | | - }, |
17 | | - "scripts": { |
18 | | - "post-install-cmd": [ |
19 | | - "@composer bin all install --ansi" |
20 | | - ], |
21 | | - "post-update-cmd": [ |
22 | | - "@composer bin all update --ansi" |
23 | | - ], |
24 | | - "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l", |
25 | | - "cs:check": "./vendor/bin/phpcs --standard=phpcs.xml", |
26 | | - "cs:fix": "./vendor/bin/phpcbf --standard=phpcs.xml", |
27 | | - "phpcs": "./vendor/bin/phpcs --standard=phpcs.xml", |
28 | | - "phpcs:fix": "./vendor/bin/phpcbf --standard=phpcs.xml", |
29 | | - "phpcs:output": "./vendor/bin/phpcs --standard=phpcs.xml --report=json lib/ 2>/dev/null | tail -1 > phpcs-output.json", |
30 | | - "phpmd": "E=0; ./vendor/bin/phpmd lib text phpmd.xml --baseline-file phpmd.baseline.xml || E=$?; ./vendor/bin/phpmd lib text phpmd-unusedparams.xml --baseline-file phpmd.baseline.xml || E=$?; exit $E", |
31 | | - "phpmetrics": "./vendor/bin/phpmetrics --report-html=phpmetrics lib/", |
32 | | - "phpmetrics:violations": "./vendor/bin/phpmetrics --violations-xml=phpmetrics/violations.xml lib/", |
33 | | - "psalm": "if [ -f vendor/bin/psalm ]; then ./vendor/bin/psalm --threads=1 --no-cache; else echo 'Psalm not installed, skipping...'; fi", |
34 | | - "phpstan": "if [ -f vendor/bin/phpstan ]; then ./vendor/bin/phpstan analyse --memory-limit=1G; else echo 'PHPStan not installed, skipping...'; fi", |
35 | | - "test:unit": "phpunit tests -c tests/phpunit.xml --colors=always --fail-on-warning --fail-on-risky", |
36 | | - "test:all": "if [ ! -f vendor/bin/phpunit ]; then echo 'SKIPPED: phpunit not installed - run composer install'; elif [ ! -f ../../lib/base.php ]; then echo 'SKIPPED: tests/bootstrap.php requires a Nextcloud server tree (../../lib/base.php not found) - run from inside a Nextcloud checkout or in CI'; else ./vendor/bin/phpunit --colors=always; fi", |
37 | | - "check": "E=0; for CMD in lint phpcs psalm test:unit; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E", |
38 | | - "check:full": "E=0; for CMD in lint phpcs psalm phpstan test:all; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E", |
39 | | - "check:strict": "E=0; for CMD in lint phpcs phpmd psalm phpstan test:all; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E", |
40 | | - "fix": [ |
41 | | - "@cs:fix" |
42 | | - ], |
43 | | - "openapi": "generate-spec", |
44 | | - "phpqa": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa", |
45 | | - "phpqa:full": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa --tools phpcs:0,phpmd:0,phploc:0,phpmetrics,phpcpd:0,parallel-lint:0", |
46 | | - "phpqa:ci": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa --tools phpcs,phpmd,phploc,phpmetrics,phpcpd,parallel-lint", |
47 | | - "qa:check": [ |
48 | | - "@phpqa" |
49 | | - ], |
50 | | - "qa:full": [ |
51 | | - "@phpqa:full" |
52 | | - ], |
53 | | - "test:coverage": "./vendor/bin/phpunit --coverage-html=coverage/html --coverage-clover=coverage/clover.xml --colors=always", |
54 | | - "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);\"", |
55 | | - "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;\"", |
56 | | - "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'", |
57 | | - "quality:psalm-score": "./vendor/bin/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'", |
58 | | - "quality:phpstan-score": "./vendor/bin/phpstan analyse --memory-limit=1G --error-format=json --no-progress | php -r \"\\$input = file_get_contents('php://stdin'); \\$json = json_decode(\\$input, true); \\$errors = \\$json['totals']['file_errors'] ?? 0; \\$score = 1000 - (\\$errors * 5); echo 'PHPStan Score: ' . \\$score . ' (Errors: ' . \\$errors . ')' . PHP_EOL;\" || echo 'PHPStan not available'", |
59 | | - "quality:score": [ |
60 | | - "@quality:phpcs-score", |
61 | | - "@quality:phpmd-score", |
62 | | - "@quality:psalm-score", |
63 | | - "@quality:phpstan-score" |
64 | | - ] |
65 | | - }, |
66 | | - "require": { |
67 | | - "php": "^8.3", |
68 | | - "adbario/php-dot-notation": "^3.3.0", |
69 | | - "bamarni/composer-bin-plugin": "^1.8", |
70 | | - "react/event-loop": "^1.5", |
71 | | - "react/promise": "^3.2", |
72 | | - "symfony/amazon-mailer": "^6.4", |
73 | | - "symfony/http-client": "^6.4", |
74 | | - "symfony/mailer": "^6.4", |
75 | | - "symfony/mailgun-mailer": "^6.4", |
76 | | - "symfony/mailjet-mailer": "^6.4", |
77 | | - "symfony/postmark-mailer": "^6.4", |
78 | | - "symfony/sendgrid-mailer": "^6.4", |
79 | | - "twig/twig": "^3.27.0" |
80 | | - }, |
81 | | - "require-dev": { |
82 | | - "cyclonedx/cyclonedx-php-composer": "^6.2", |
83 | | - "edgedesign/phpqa": "^1.27", |
84 | | - "guzzlehttp/guzzle": "^7.8", |
85 | | - "nextcloud/coding-standard": "^1.4", |
86 | | - "nextcloud/ocp": "^31.0", |
87 | | - "phpcsstandards/phpcsextra": "^1.4", |
88 | | - "phpmd/phpmd": "^2.15", |
89 | | - "phpmetrics/phpmetrics": "^2.8", |
90 | | - "phpstan/phpstan": "^1.10", |
91 | | - "phpunit/phpunit": "^10.5", |
92 | | - "roave/security-advisories": "dev-latest", |
93 | | - "squizlabs/php_codesniffer": "^3.9", |
94 | | - "vimeo/psalm": "^5.26" |
95 | | - }, |
96 | | - "config": { |
97 | | - "allow-plugins": { |
98 | | - "bamarni/composer-bin-plugin": true, |
99 | | - "php-http/discovery": true, |
100 | | - "dealerdirect/phpcodesniffer-composer-installer": true, |
101 | | - "cyclonedx/cyclonedx-php-composer": true |
102 | | - }, |
103 | | - "optimize-autoloader": true, |
104 | | - "sort-packages": true, |
105 | | - "platform": { |
106 | | - "php": "8.3" |
107 | | - } |
108 | | - } |
| 2 | + "name": "conductionnl/softwarecatalog", |
| 3 | + "description": "Quickly build data registers based on schema.json", |
| 4 | + "license": "EUPL-1.2", |
| 5 | + "authors": [ |
| 6 | + { |
| 7 | + "name": "Conduction b.v.", |
| 8 | + "email": "info@conduction.nl", |
| 9 | + "homepage": "https://conduction.nl" |
| 10 | + } |
| 11 | + ], |
| 12 | + "autoload": { |
| 13 | + "psr-4": { |
| 14 | + "OCA\\SoftwareCatalog\\": "lib/" |
| 15 | + } |
| 16 | + }, |
| 17 | + "scripts": { |
| 18 | + "post-install-cmd": [ |
| 19 | + "@composer bin all install --ansi" |
| 20 | + ], |
| 21 | + "post-update-cmd": [ |
| 22 | + "@composer bin all update --ansi" |
| 23 | + ], |
| 24 | + "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l", |
| 25 | + "cs:check": "php-cs-fixer fix --dry-run --diff", |
| 26 | + "cs:fix": "php-cs-fixer fix", |
| 27 | + "phpcs": "./vendor/bin/phpcs --standard=phpcs.xml", |
| 28 | + "phpcs:fix": "./vendor/bin/phpcbf --standard=phpcs.xml", |
| 29 | + "phpcs:output": "./vendor/bin/phpcs --standard=phpcs.xml --report=json lib/ 2>/dev/null | tail -1 > phpcs-output.json", |
| 30 | + "phpmd": "E=0; ./vendor/bin/phpmd lib text phpmd.xml --baseline-file phpmd.baseline.xml || E=$?; ./vendor/bin/phpmd lib text phpmd-unusedparams.xml --baseline-file phpmd.baseline.xml || E=$?; exit $E", |
| 31 | + "phpmetrics": "./vendor/bin/phpmetrics --report-html=phpmetrics lib/", |
| 32 | + "phpmetrics:violations": "./vendor/bin/phpmetrics --violations-xml=phpmetrics/violations.xml lib/", |
| 33 | + "psalm": "if [ -f vendor/bin/psalm ]; then ./vendor/bin/psalm --threads=1 --no-cache; else echo 'Psalm not installed, skipping...'; fi", |
| 34 | + "phpstan": "if [ -f vendor/bin/phpstan ]; then ./vendor/bin/phpstan analyse --memory-limit=1G; else echo 'PHPStan not installed, skipping...'; fi", |
| 35 | + "test:unit": "phpunit tests -c tests/phpunit.xml --colors=always --fail-on-warning --fail-on-risky", |
| 36 | + "test:all": "if [ ! -f vendor/bin/phpunit ]; then echo 'SKIPPED: phpunit not installed - run composer install'; elif [ ! -f ../../lib/base.php ]; then echo 'SKIPPED: tests/bootstrap.php requires a Nextcloud server tree (../../lib/base.php not found) - run from inside a Nextcloud checkout or in CI'; else ./vendor/bin/phpunit --colors=always; fi", |
| 37 | + "check": "E=0; for CMD in lint phpcs psalm test:unit; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E", |
| 38 | + "check:full": "E=0; for CMD in lint phpcs psalm phpstan test:all; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E", |
| 39 | + "check:strict": "E=0; for CMD in lint phpcs phpmd psalm phpstan test:all; do echo; echo \"=== $CMD ===\"; composer $CMD || E=1; done; echo; if [ $E -eq 0 ]; then echo \"ALL CHECKS PASSED\"; else echo \"SOME CHECKS FAILED (see above)\"; fi; exit $E", |
| 40 | + "fix": [ |
| 41 | + "@cs:fix" |
| 42 | + ], |
| 43 | + "openapi": "generate-spec", |
| 44 | + "phpqa": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa", |
| 45 | + "phpqa:full": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa --tools phpcs:0,phpmd:0,phploc:0,phpmetrics,phpcpd:0,parallel-lint:0", |
| 46 | + "phpqa:ci": "./vendor/bin/phpqa --report --analyzedDirs lib --buildDir phpqa --tools phpcs,phpmd,phploc,phpmetrics,phpcpd,parallel-lint", |
| 47 | + "qa:check": [ |
| 48 | + "@phpqa" |
| 49 | + ], |
| 50 | + "qa:full": [ |
| 51 | + "@phpqa:full" |
| 52 | + ], |
| 53 | + "test:coverage": "./vendor/bin/phpunit --coverage-html=coverage/html --coverage-clover=coverage/clover.xml --colors=always", |
| 54 | + "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);\"", |
| 55 | + "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;\"", |
| 56 | + "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'", |
| 57 | + "quality:psalm-score": "./vendor/bin/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'", |
| 58 | + "quality:phpstan-score": "./vendor/bin/phpstan analyse --memory-limit=1G --error-format=json --no-progress | php -r \"\\$input = file_get_contents('php://stdin'); \\$json = json_decode(\\$input, true); \\$errors = \\$json['totals']['file_errors'] ?? 0; \\$score = 1000 - (\\$errors * 5); echo 'PHPStan Score: ' . \\$score . ' (Errors: ' . \\$errors . ')' . PHP_EOL;\" || echo 'PHPStan not available'", |
| 59 | + "quality:score": [ |
| 60 | + "@quality:phpcs-score", |
| 61 | + "@quality:phpmd-score", |
| 62 | + "@quality:psalm-score", |
| 63 | + "@quality:phpstan-score" |
| 64 | + ] |
| 65 | + }, |
| 66 | + "require": { |
| 67 | + "php": "^8.3", |
| 68 | + "adbario/php-dot-notation": "^3.3.0", |
| 69 | + "bamarni/composer-bin-plugin": "^1.8", |
| 70 | + "react/event-loop": "^1.5", |
| 71 | + "react/promise": "^3.2", |
| 72 | + "symfony/amazon-mailer": "^6.4", |
| 73 | + "symfony/http-client": "^6.4", |
| 74 | + "symfony/mailer": "^6.4", |
| 75 | + "symfony/mailgun-mailer": "^6.4", |
| 76 | + "symfony/mailjet-mailer": "^6.4", |
| 77 | + "symfony/postmark-mailer": "^6.4", |
| 78 | + "symfony/sendgrid-mailer": "^6.4", |
| 79 | + "twig/twig": "^3.27.0" |
| 80 | + }, |
| 81 | + "require-dev": { |
| 82 | + "conduction/coding-standard": "^1.0", |
| 83 | + "conduction/hydra-gates": "^1.0", |
| 84 | + "cyclonedx/cyclonedx-php-composer": "^6.2", |
| 85 | + "edgedesign/phpqa": "^1.27", |
| 86 | + "guzzlehttp/guzzle": "^7.8", |
| 87 | + "nextcloud/ocp": "^34.0", |
| 88 | + "phpcsstandards/phpcsextra": "^1.4", |
| 89 | + "phpmd/phpmd": "^2.15", |
| 90 | + "phpmetrics/phpmetrics": "^2.8", |
| 91 | + "phpstan/phpstan": "^1.10", |
| 92 | + "phpunit/phpunit": "^10.5", |
| 93 | + "roave/security-advisories": "dev-latest", |
| 94 | + "squizlabs/php_codesniffer": "^3.9", |
| 95 | + "vimeo/psalm": "^5.26" |
| 96 | + }, |
| 97 | + "config": { |
| 98 | + "allow-plugins": { |
| 99 | + "bamarni/composer-bin-plugin": true, |
| 100 | + "php-http/discovery": true, |
| 101 | + "dealerdirect/phpcodesniffer-composer-installer": true, |
| 102 | + "cyclonedx/cyclonedx-php-composer": true |
| 103 | + }, |
| 104 | + "optimize-autoloader": true, |
| 105 | + "sort-packages": true, |
| 106 | + "platform": { |
| 107 | + "php": "8.3" |
| 108 | + } |
| 109 | + } |
109 | 110 | } |
0 commit comments