Implements automatic creation of required plugin pages (Community Login, Trainer Registration, Trainer Dashboard) upon plugin activation. This addresses E2E test failures caused by missing pages in the test environment. - Adds activation hook in `hvac-community-events.php` to call `hvac_ce_create_required_pages`. - The callback function checks for existing pages by slug and creates them using `wp_insert_post` if missing. Includes debug logging. Also fixes issues identified during E2E test debugging: - Corrects fatal error in `includes/community/class-login-handler.php` by replacing undefined constant `HVAC_COMMUNITY_EVENTS_PATH` with `HVAC_CE_PLUGIN_DIR`. - Updates `tests/e2e/tests/login.spec.ts` to use the correct selector `#wp-submit` for the login form submit button instead of `button[type="submit"]`. Documentation updates: - Adds `docs/automatic-page-creation-plan.md`. - Updates `README.md` regarding automatic page creation. - Updates Memory Bank files (`decisionLog.md`, `progress.md`, `activeContext.md`). Note: Activation hook logging did not appear during WP-CLI activation, requiring further investigation if page creation issues persist. E2E test confirmation pending.
104 lines
4.2 KiB
JSON
104 lines
4.2 KiB
JSON
{
|
|
"name": "yoast/phpunit-polyfills",
|
|
"description": "Set of polyfills for changed PHPUnit functionality to allow for creating PHPUnit cross-version compatible tests",
|
|
"license": "BSD-3-Clause",
|
|
"type": "library",
|
|
"keywords": [
|
|
"phpunit",
|
|
"polyfill",
|
|
"testing"
|
|
],
|
|
"authors": [
|
|
{
|
|
"name": "Team Yoast",
|
|
"email": "support@yoast.com",
|
|
"homepage": "https://yoast.com"
|
|
},
|
|
{
|
|
"name": "Contributors",
|
|
"homepage": "https://github.com/Yoast/PHPUnit-Polyfills/graphs/contributors"
|
|
}
|
|
],
|
|
"homepage": "https://github.com/Yoast/PHPUnit-Polyfills",
|
|
"support": {
|
|
"issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues",
|
|
"source": "https://github.com/Yoast/PHPUnit-Polyfills",
|
|
"security": "https://github.com/Yoast/PHPUnit-Polyfills/security/policy"
|
|
},
|
|
"require": {
|
|
"php": ">=5.4",
|
|
"phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
|
|
},
|
|
"require-dev": {
|
|
"php-parallel-lint/php-console-highlighter": "^1.0.0",
|
|
"php-parallel-lint/php-parallel-lint": "^1.4.0",
|
|
"yoast/yoastcs": "^3.1.0"
|
|
},
|
|
"minimum-stability": "dev",
|
|
"prefer-stable": true,
|
|
"autoload": {
|
|
"files": [
|
|
"phpunitpolyfills-autoload.php"
|
|
]
|
|
},
|
|
"autoload-dev": {
|
|
"psr-4": {
|
|
"Yoast\\PHPUnitPolyfills\\Tests\\": "tests/"
|
|
}
|
|
},
|
|
"config": {
|
|
"allow-plugins": {
|
|
"dealerdirect/phpcodesniffer-composer-installer": true
|
|
},
|
|
"lock": false
|
|
},
|
|
"extra": {
|
|
"branch-alias": {
|
|
"dev-main": "4.x-dev"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"lint7": [
|
|
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git --exclude src/Exceptions/Error.php --exclude src/Exceptions/TypeError.php --exclude tests/Polyfills/Fixtures/ValueObjectUnion.php --exclude tests/Polyfills/Fixtures/ValueObjectUnionNoReturnType.php"
|
|
],
|
|
"lint70": [
|
|
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git --exclude src/Exceptions/Error.php --exclude src/Exceptions/TypeError.php --exclude tests/Polyfills/Fixtures/ValueObjectParamNotRequired.php --exclude tests/Polyfills/Fixtures/ValueObjectUnion.php --exclude tests/Polyfills/Fixtures/ValueObjectUnionNoReturnType.php"
|
|
],
|
|
"lint-lt70": [
|
|
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git --exclude src/TestCases/TestCasePHPUnitGte8.php --exclude src/TestListeners/TestListenerDefaultImplementationPHPUnitGte7.php --exclude tests/Polyfills/Fixtures/ChildValueObject.php --exclude tests/Polyfills/Fixtures/ValueObject.php --exclude tests/Polyfills/Fixtures/ValueObjectParamNotRequired.php --exclude tests/Polyfills/Fixtures/ValueObjectUnion.php --exclude tests/Polyfills/Fixtures/ValueObjectUnionNoReturnType.php"
|
|
],
|
|
"lint-gte80": [
|
|
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git"
|
|
],
|
|
"lint-gte84": [
|
|
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude .git --exclude tests/Polyfills/Fixtures/ValueObjectNoReturnType.php"
|
|
],
|
|
"check-cs": [
|
|
"@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 5.4-"
|
|
],
|
|
"fix-cs": [
|
|
"@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf"
|
|
],
|
|
"test": [
|
|
"@php ./vendor/phpunit/phpunit/phpunit --no-coverage"
|
|
],
|
|
"coverage": [
|
|
"@php ./vendor/phpunit/phpunit/phpunit"
|
|
],
|
|
"coverage-local": [
|
|
"@php ./vendor/phpunit/phpunit/phpunit --coverage-html ./build/coverage-html"
|
|
]
|
|
},
|
|
"scripts-descriptions": {
|
|
"lint7": "Check the PHP files for parse errors. (PHP 7.1 - 7.4)",
|
|
"lint70": "Check the PHP files for parse errors. (PHP 7.0)",
|
|
"lint-lt70": "Check the PHP files for parse errors. (PHP < 7.0)",
|
|
"lint-gte80": "Check the PHP files for parse errors. (PHP 8.0 - 8.3)",
|
|
"lint-gte84": "Check the PHP files for parse errors. (PHP 8.4+)",
|
|
"check-cs": "Check the PHP files for code style violations and best practices.",
|
|
"fix-cs": "Auto-fix code style violations in the PHP files.",
|
|
"test": "Run the unit tests without code coverage.",
|
|
"coverage": "Run the unit tests with code coverage.",
|
|
"coverage-local": "Run the unit tests with code coverage writing an HTML coverage report to a \"/build/coverage-html\" directory."
|
|
}
|
|
}
|