From 8ba19c2d1fe132a860999f1dd51481e13d3d4526 Mon Sep 17 00:00:00 2001 From: Konstantinos Gkaravelos Date: Sat, 13 Sep 2025 23:58:57 +0200 Subject: [PATCH] Made it a bit more explanatory and easy to understand --- composer.json | 148 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 119 insertions(+), 29 deletions(-) diff --git a/composer.json b/composer.json index dbfc7eb99..fd42c7edb 100644 --- a/composer.json +++ b/composer.json @@ -1,66 +1,156 @@ { "name": "pfefferle/wordpress-activitypub", - "description": "The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.", + "description": "A WordPress implementation of the ActivityPub protocol, enabling decentralized social networking using the ActivityStreams 2.0 data format.", "type": "wordpress-plugin", + "keywords": [ + "wordpress", + "activitypub", + "fediverse", + "decentralized", + "social-network" + ], + "homepage": "https://github.com/pfefferle/wordpress-activitypub", + "license": "MIT", + "authors": [ + { + "name": "Matthias Pfefferle", + "email": "pfefferle@gmail.com", + "homepage": "https://notiz.blog", + "role": "Lead Developer" + } + ], + "support": { + "issues": "https://github.com/pfefferle/wordpress-activitypub/issues", + "source": "https://github.com/pfefferle/wordpress-activitypub", + "docs": "https://github.com/pfefferle/wordpress-activitypub/wiki" + }, "require": { - "php": ">=7.2", - "composer/installers": "^1.0 || ^2.0" + "php": ">=7.4", + "composer/installers": "^1.0 || ^2.0", + "ext-json": "*" }, "require-dev": { - "automattic/jetpack-changelogger": "6.0.0", - "phpunit/phpunit": "^8 || ^9", + "php": ">=7.4", + "automattic/jetpack-changelogger": "^6.0", + "phpunit/phpunit": "^9.5", "phpcompatibility/php-compatibility": "*", "phpcompatibility/phpcompatibility-wp": "*", - "squizlabs/php_codesniffer": "3.*", - "wp-coding-standards/wpcs": "dev-develop", + "squizlabs/php_codesniffer": "^3.7", + "wp-coding-standards/wpcs": "^2.3", "yoast/phpunit-polyfills": "^4.0", - "dealerdirect/phpcodesniffer-composer-installer": "^1.0.0", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", "sirbrillig/phpcs-variable-analysis": "^2.11", - "phpcsstandards/phpcsextra": "^1.1.0", - "dms/phpunit-arraysubset-asserts": "^0.5.0" + "phpcsstandards/phpcsextra": "^1.1", + "dms/phpunit-arraysubset-asserts": "^0.5", + "mockery/mockery": "^1.5", + "wp-cli/wp-cli-bundle": "^2.8", + "@wordpress/env": "^5.12" + }, + "suggest": { + "ext-curl": "For improved HTTP request handling", + "ext-mbstring": "For proper multibyte string handling" }, "config": { - "allow-plugins": true + "allow-plugins": { + "composer/installers": true, + "dealerdirect/phpcodesniffer-composer-installer": true + }, + "optimize-autoloader": true, + "preferred-install": "dist", + "sort-packages": true, + "platform-check": true }, - "allow-plugins": { - "composer/installers": true + "autoload": { + "psr-4": { + "ActivityPub\\": "includes/" + }, + "files": [ + "includes/functions.php" + ] }, - "license": "MIT", - "authors": [ - { - "name": "Matthias Pfefferle", - "email": "pfefferle@gmail.com" + "autoload-dev": { + "psr-4": { + "ActivityPub\\Tests\\": "tests/" } - ], + }, "extra": { "installer-name": "activitypub", "changelogger": { - "changes-dir": ".github/changelog/", - "link-template": "https://github.com/Automattic/wordpress-activitypub/compare/${old}...${new}" + "changes-dir": ".changelog/", + "link-template": "https://github.com/pfefferle/wordpress-activitypub/compare/${old}...${new}" } }, "scripts": { + "pre-autoload-dump": [ + "rm -rf vendor/", + "rm -rf composer.lock" + ], + "post-install-cmd": [ + "@php -r \"if (file_exists('includes/activation.php')) { include 'includes/activation.php'; }\"" + ], + "post-update-cmd": [ + "@php -r \"if (file_exists('includes/update.php')) { include 'includes/update.php'; }\"" + ], "test": [ - "composer install", - "bin/install-wp-tests.sh activitypub-test root activitypub-test test-db latest true", - "vendor/bin/phpunit" + "Composer\\Config::disableProcessTimeout", + "composer install --optimize-autoloader --no-interaction", + "bin/install-wp-tests.sh activitypub-test root '' test-db latest true", + "vendor/bin/phpunit --configuration phpunit.xml.dist" + ], + "test:coverage": [ + "Composer\\Config::disableProcessTimeout", + "composer install --optimize-autoloader --no-interaction", + "bin/install-wp-tests.sh activitypub-test root '' test-db latest true", + "vendor/bin/phpunit --configuration phpunit.xml.dist --coverage-html coverage" ], "test:wp-env": [ - "wp-env run tests-cli --env-cwd=\"wp-content/plugins/activitypub\" vendor/bin/phpunit" + "wp-env run tests-cli --env-cwd=\"wp-content/plugins/activitypub\" vendor/bin/phpunit --configuration phpunit.xml.dist" + ], + "test:quick": [ + "vendor/bin/phpunit --configuration phpunit.xml.dist --exclude-group slow" ], "lint": [ - "vendor/bin/phpcs" + "vendor/bin/phpcs --standard=phpcs.xml.dist -s" ], "lint:fix": [ - "vendor/bin/phpcbf" + "vendor/bin/phpcbf --standard=phpcs.xml.dist" + ], + "lint:ci": [ + "vendor/bin/phpcs --standard=phpcs.xml.dist --report=checkstyle --report-file=phpcs-report.xml" ], "changelog:add": [ - "composer install", "vendor/bin/changelogger add" ], "changelog:write": [ - "composer install", "vendor/bin/changelogger write --add-pr-num" + ], + "setup": [ + "composer install --optimize-autoloader", + "@lint:fix" + ], + "env:start": [ + "wp-env start" + ], + "env:stop": [ + "wp-env stop" + ], + "env:clean": [ + "wp-env destroy" ] + }, + "scripts-descriptions": { + "test": "Run the full test suite", + "test:coverage": "Run tests with code coverage report", + "test:wp-env": "Run tests using WordPress environment", + "test:quick": "Run quick tests (excluding slow ones)", + "lint": "Check code style", + "lint:fix": "Fix code style issues", + "lint:ci": "Generate code style report for CI", + "changelog:add": "Add a changelog entry", + "changelog:write": "Write the changelog", + "setup": "Set up the development environment", + "env:start": "Start the WordPress environment", + "env:stop": "Stop the WordPress environment", + "env:clean": "Destroy the WordPress environment" } }