2525 "php-stubs/wordpress-stubs" : " ^6" ,
2626 "wp-coding-standards/wpcs" : " ^3" ,
2727 "dealerdirect/phpcodesniffer-composer-installer" : " ^1" ,
28- "phpcompatibility/phpcompatibility-wp" : " ^2" ,
2928 "yoast/phpunit-polyfills" : " ^3" ,
30- "phpunit/phpunit" : " ^9.0 || ^10.0 || ^11.0 "
29+ "phpunit/phpunit" : " ^9 || ^10 || ^11 || ^12 "
3130 },
3231 "config" : {
3332 "allow-plugins" : {
3433 "phpstan/extension-installer" : true ,
3534 "dealerdirect/phpcodesniffer-composer-installer" : true
3635 }
3736 },
37+ "minimum-stability" : " dev" ,
38+ "prefer-stable" : true ,
3839 "scripts" : {
39- "phpcbf" : [
40- " vendor/bin/phpcbf -p -v -s --standard=phpcs.xml.dist $(find . -name '*.php')"
40+ "build:vendor" : " composer install --no-dev --optimize-autoloader --classmap-authoritative" ,
41+ "phpstan" : " vendor/bin/phpstan analyse --memory-limit=2048M" ,
42+ "phpstan-baseline" : " vendor/bin/phpstan analyse --memory-limit=2048M --generate-baseline" ,
43+ "phpcs" : " vendor/bin/phpcs -p -v -s --standard=phpcs.xml.dist $(find . -name '*.php')" ,
44+ "phpcbf" : " vendor/bin/phpcbf -p -v -s --standard=phpcs.xml.dist $(find . -name '*.php')" ,
45+ "phpcompat:setup" : [
46+ " @php -r \" if (!is_dir('phpcompat-tools')) { mkdir('phpcompat-tools'); }\" " ,
47+ " @composer config --working-dir=phpcompat-tools allow-plugins.dealerdirect/phpcodesniffer-composer-installer true 2>/dev/null || true" ,
48+ " @composer require --working-dir=phpcompat-tools --dev --quiet --no-interaction squizlabs/php_codesniffer:^4.0 phpcompatibility/php-compatibility:dev-develop dealerdirect/phpcodesniffer-composer-installer:^1.0 2>/dev/null || true"
4149 ],
42- "phpcs" : [
43- " vendor/bin/phpcs -p -v -s --standard=phpcs.xml.dist $(find . -name '*.php')"
50+ "phpcompat" : [
51+ " @phpcompat:setup" ,
52+ " phpcompat-tools/vendor/bin/phpcs -p --standard=PHPCompatibility --runtime-set testVersion 7.4-8.5 --extensions=php --ignore=*/vendor/*,*/node_modules/*,*/tests/*,*/phpunit/*,*/freemius/*,*/phpcompat-tools/* ."
4453 ],
45- "phpstan" : [
46- " vendor/bin/phpstan analyse --memory-limit=2048M"
54+ "phpcompat:clean" : " rm -rf phpcompat-tools" ,
55+ "test" : [
56+ " @phpcs" ,
57+ " @phpcompat" ,
58+ " @phpstan"
4759 ],
48- "phpstan-baseline" : [
49- " vendor/bin/phpstan analyse --memory-limit=2048M --generate-baseline"
50- ]
60+ "zip" : " mkdir -p build && zip -X -r build/$(basename $(pwd)).zip . -x '*.git*' 'node_modules/*' '.*' '*/.git*' '*/.DS_Store' 'vendor/**/.DS_Store' 'vendor/bin/*' 'CODE_OF_CONDUCT.md' 'CONTRIBUTING.md' 'ISSUE_TEMPLATE.md' 'PULL_REQUEST_TEMPLATE.md' '*.dist' '*.yml' '*.neon' 'composer.*' 'package.json' 'package-lock.json' 'dev-helpers**' 'build**' 'wporg-assets**' 'test-tools**' 'docs/*' 'phpunit**' 'phpstan-bootstrap.php' 'phpcompat-tools**'"
5161 }
5262}
0 commit comments