|
15 | 15 | "require": { |
16 | 16 | "php": "^8.3 || ^8.4", |
17 | 17 | "lcobucci/jwt": "^5.5", |
18 | | - "lcobucci/clock": "^3.3" |
19 | | - |
| 18 | + "lcobucci/clock": "^3.3" |
20 | 19 | }, |
21 | 20 | "require-dev": { |
| 21 | + "brainmaestro/composer-git-hooks": "^3.0", |
| 22 | + "friendsofphp/php-cs-fixer": "^3.75", |
22 | 23 | "phpseclib/phpseclib": "^2.0", |
23 | 24 | "phpunit/phpunit": "^9.0" |
24 | 25 | }, |
25 | 26 | "autoload": { |
26 | 27 | "psr-4": { |
27 | | - "Staffbase\\plugins\\sdk\\": "src", |
28 | | - "Staffbase\\plugins\\test\\": "test" |
| 28 | + "Staffbase\\plugins\\sdk\\": "src/" |
29 | 29 | } |
30 | 30 | }, |
| 31 | + "autoload-dev": { |
| 32 | + "psr-4": { |
| 33 | + "Staffbase\\plugins\\test\\": "test/" |
| 34 | + } |
| 35 | + }, |
| 36 | + "config": { |
| 37 | + "sort-packages": true |
| 38 | + }, |
31 | 39 | "scripts": { |
32 | | - "test": "phpunit --colors='always' --debug $PHPUNIT_ARGS", |
33 | | - "lint": "phpcs --standard=PSR2 --extensions=php --ignore=*/vendor/* src test", |
34 | | - "fix": "phpcbf --standard=PSR2 --extensions=php --ignore=*/vendor/* src test" |
| 40 | + "check": ["@cs-fixer:check", "@phpstan", "@test:coverage"], |
| 41 | + "lint": ["@cs-fixer:check", "@phpstan"], |
| 42 | + "fix": ["@cs-fixer:fix"], |
| 43 | + "cs-fixer:check": "php-cs-fixer fix --dry-run --diff -v", |
| 44 | + "cs-fixer:fix": "php-cs-fixer fix --diff -v", |
| 45 | + "phpstan": "phpstan analyse --memory-limit=1G", |
| 46 | + "test": "phpunit", |
| 47 | + "test:coverage": "phpunit --coverage-text --coverage-clover=clover.xml", |
| 48 | + "post-install-cmd": "cghooks add --ignore-lock", |
| 49 | + "post-update-cmd": "cghooks update" |
| 50 | + }, |
| 51 | + "extra": { |
| 52 | + "hooks": { |
| 53 | + "pre-commit": [ |
| 54 | + "composer -d packages/php fix", |
| 55 | + "composer -d packages/php phpstan" |
| 56 | + ] |
| 57 | + } |
35 | 58 | } |
36 | 59 | } |
0 commit comments