|
11 | 11 | ], |
12 | 12 | "config": { |
13 | 13 | "sort-packages": true, |
14 | | - "preferred-install": "dist" |
| 14 | + "preferred-install": "dist", |
| 15 | + "allow-plugins": { |
| 16 | + "cweagans/composer-patches": true, |
| 17 | + "dealerdirect/phpcodesniffer-composer-installer": true, |
| 18 | + "roots/wordpress-core-installer": true |
| 19 | + } |
15 | 20 | }, |
16 | 21 | "extra": { |
| 22 | + "branch-alias": { |
| 23 | + "dev-develop": "5.0-dev" |
| 24 | + }, |
| 25 | + "patches": { |
| 26 | + "lucatume/wp-browser": { |
| 27 | + "https://github.com/lucatume/wp-browser/issues/554": "tests/patches/wp-browser-554.patch" |
| 28 | + } |
| 29 | + }, |
17 | 30 | "wordpress-install-dir": "tests/wordpress" |
18 | 31 | }, |
19 | 32 | "require": { |
20 | | - "php": "^7 | ^8" |
| 33 | + "php": ">= 7.4.0", |
| 34 | + "johnbillion/args": "^0.9.0" |
21 | 35 | }, |
22 | 36 | "require-dev": { |
23 | | - "automattic/phpcs-neutron-standard": "1.6.0", |
| 37 | + "automattic/phpcs-neutron-standard": "1.7.0", |
| 38 | + "cweagans/composer-patches": "^1.7", |
24 | 39 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7", |
25 | | - "johnbillion/falsey-assertequals-detector": "^2", |
| 40 | + "johnbillion/falsey-assertequals-detector": "*", |
| 41 | + "lucatume/wp-browser": "^3.0", |
26 | 42 | "phpcompatibility/phpcompatibility-wp": "^2", |
27 | | - "phpunit/phpunit": "^6", |
28 | | - "roots/wordpress": "*", |
| 43 | + "phpstan/phpstan": "^1.0", |
| 44 | + "phpstan/phpstan-phpunit": "^1.0", |
| 45 | + "phpunit/phpunit": "^9", |
| 46 | + "roots/wordpress": "^5.8.0", |
| 47 | + "szepeviktor/phpstan-wordpress": "^1.0", |
29 | 48 | "vlucas/phpdotenv": "^3", |
30 | | - "wp-cli/db-command": "^2.0", |
31 | | - "wp-coding-standards/wpcs": "2.3.0", |
32 | | - "wp-phpunit/wp-phpunit": "*" |
| 49 | + "wp-cli/core-command": "^2", |
| 50 | + "wp-cli/db-command": "^2", |
| 51 | + "wp-coding-standards/wpcs": "2.3.0" |
33 | 52 | }, |
34 | 53 | "scripts": { |
35 | 54 | "post-update-cmd": [ |
36 | 55 | "@php -r \"! file_exists( 'tests/.env' ) && copy( 'tests/.env.dist', 'tests/.env' );\"" |
37 | 56 | ], |
38 | 57 | "test:cs": [ |
39 | | - "vendor/bin/phpcs -nps --colors --report-code --report-summary --report-width=80 --cache=tests/cache/phpcs ." |
| 58 | + "phpcs -nps --colors --report-code --report-summary --report-width=80 --cache=tests/cache/phpcs --basepath='./' ." |
| 59 | + ], |
| 60 | + "test:analyze": [ |
| 61 | + "phpstan analyze" |
40 | 62 | ], |
41 | | - "test:ut": [ |
42 | | - "vendor/bin/wp db reset --yes --path=tests/wordpress #", |
43 | | - "export WP_MULTISITE=0 && vendor/bin/phpunit --verbose --colors=always --exclude-group=ms-required", |
44 | | - "export WP_MULTISITE=1 && vendor/bin/phpunit --verbose --colors=always --exclude-group=ms-excluded" |
| 63 | + "test:integration": [ |
| 64 | + "codecept run integration" |
45 | 65 | ], |
46 | 66 | "test": [ |
47 | 67 | "@test:cs", |
48 | | - "@test:ut" |
| 68 | + "@test:analyze", |
| 69 | + "@test:integration" |
49 | 70 | ] |
50 | 71 | }, |
51 | 72 | "autoload": { |
52 | 73 | "psr-4": { |
53 | | - "ExtCPTs\\Tests\\": "tests/phpunit" |
| 74 | + "ExtCPTs\\": "src", |
| 75 | + "ExtCPTs\\Tests\\": "tests/integration" |
54 | 76 | }, |
55 | 77 | "files": [ |
56 | | - "extended-cpts.php" |
| 78 | + "functions.php" |
57 | 79 | ] |
58 | 80 | }, |
59 | 81 | "suggest": { |
|
0 commit comments