Files
Geoff TaylorandGitHub 088d337ef5 fix: address WordPress.org plugin review (rename + prefixing + headers) (#1019)
* fix: address WordPress.org plugin review feedback

- Prefix the session transaction queue transient with the plugin's
  graphql_woocommerce_ namespace instead of the generic "woo_" word, to
  avoid collisions (Plugin Directory: prefix data storage).
- Declare the WooCommerce dependency via the "Requires Plugins: woocommerce"
  plugin header.
- Bump README.txt "Tested up to" to 7.0.
- Ship composer.json in the distributed plugin (drop it, and composer.lock,
  from composer archive excludes) so the build is reproducible/reviewable.

* chore: rename plugin to "GraphQL for eCommerce" for trademark compliance

The WordPress.org plugin review flagged the display name/slug for beginning
with the "WPGraphQL" trademark (and the "WooGraphQL" portmanteau of the
WooCommerce mark), which can imply official affiliation.

- Display name (plugin header + readme title) -> "GraphQL for eCommerce".
- Slug/text domain -> "graphql-for-ecommerce" (header, all i18n string
  literals, and the PHPCS WordPress.WP.I18n text_domain config).
- Update user-facing notices/errors that named the old plugin.

"WooGraphQL" remains the project's informal nickname (repo, docs, community),
just not in the WordPress.org directory's official name/slug. Internal file
names and GitHub URLs are unchanged.

* fix: keep test-only dev deps out of the committed composer.json

The committed manifest mirrors develop (lint/stan dev deps only); CI adds the
test suite deps at runtime via `composer installTestEnv`. A previous commit
captured the installTestEnv-modified composer.json, desyncing it from
composer.lock and breaking `composer install` in CI.

* chore: regenerate composer.lock (refresh dev dependencies)

Regenerate the lock from the manifest so it is in sync (fixes the CI
`composer install` failure) and refresh dependencies in the process —
firebase/php-jwt v7.0.4 -> v7.1.0 plus 11 others, with vendor-prefixed
re-strauss'd to match. Full wpunit suite passes against the updated deps
(305 tests, 835 assertions).

* chore: rename text domain in createdVia/attribution strings from #1018

#1018 (createdVia + order attribution) merged into develop after the rename
commit was authored, so its new i18n strings still used the old
'wp-graphql-woocommerce' text domain. Update them to 'graphql-for-ecommerce'
to match the rename.
2026-06-30 10:16:21 -04:00

143 lines
4.8 KiB
JSON

{
"name": "wp-graphql/wp-graphql-woocommerce",
"description": "WooCommerce bindings for WPGraphQL",
"type": "wordpress-plugin",
"keywords": [
"wordpress",
"woocommerce",
"graphql",
"wp-graphql",
"wp-graphql-extension",
"woocommerce-extension",
"api",
"woographql"
],
"license": "GPL-3.0-or-later",
"authors": [
{
"name": "Geoff Taylor",
"email": "kidunot89@gmail.com",
"role": "Lead developer"
}
],
"require": {
"php": ">=7.3",
"firebase/php-jwt": "^7.0.0"
},
"require-dev": {
"axepress/wp-graphql-cs": "^2.0.0-beta",
"axepress/wp-graphql-stubs": "^1.27.1",
"brainmaestro/composer-git-hooks": "^2.8.5",
"php-stubs/woocommerce-stubs": "9.1.0",
"phpstan/extension-installer": "^1.3",
"phpstan/phpdoc-parser": "^1.22.0",
"phpstan/phpstan": "^1.10",
"szepeviktor/phpstan-wordpress": "^1.3"
},
"config": {
"optimize-autoloader": true,
"process-timeout": 0,
"sort-packages": true,
"allow-plugins": {
"johnpbloch/wordpress-core-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpstan/extension-installer": true
}
},
"autoload": {
"classmap": [
"vendor-prefixed/"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\WPGraphQL\\WooCommerce\\": "tests/_support/"
}
},
"scripts": {
"installTestEnv": "bash bin/install-test-env.local.sh",
"runPreCommitCleanup": "bash bin/cleanup.local.sh",
"runWPUnitTest": "vendor/bin/codecept run wpunit",
"dBuild": "env $(sed -e '/^#/d' .env.testing) docker compose build",
"dRunApp": "env $(sed -e '/^#/d' .env.testing) docker compose up testable_app app_db mailhog",
"dRunTestingDb": "if [ ! \"$(docker ps -a | grep testing_db)\" ]; then env $(sed -e '/^#/d' .env.testing) docker compose up -d testing_db; fi",
"dSetMainDb": "docker compose exec testable_app ./setup-database.sh main",
"dSetTestingDb": "docker compose exec testable_app wait-for-it -s -t 300 testing_db:3306 -- ./setup-database.sh testing",
"dRunTest": [
"@dRunTestingDb",
"@dSetTestingDb",
"docker compose exec testable_app wait-for-it -s -t 300 testing_db:3306 -- codecept run $FILTER"
],
"dRunTestStandalone": "env $(sed -e '/^#/d' .env.testing) docker compose run --rm run_tests",
"dDestroy": "docker compose down -v",
"lint": "vendor/bin/phpcs -vp .",
"fix": "vendor/bin/phpcbf -vp .",
"stan": "phpstan analyze --ansi --memory-limit=4G",
"strauss": [
"test -f ./bin/strauss.phar || curl -o bin/strauss.phar -L -C - https://github.com/BrianHenryIE/strauss/releases/download/0.14.0/strauss.phar",
"env -u COMPOSER_AUTH COMPOSER_HOME=$(mktemp -d) php bin/strauss.phar",
"composer dump-autoload --optimize"
],
"cghooks": [
"echo 'Installing git hooks'",
"vendor/bin/cghooks"
],
"post-install-cmd": [
"@strauss",
"[ $COMPOSER_DEV_MODE -eq 0 ] || composer cghooks add -i"
],
"post-update-cmd": [
"@strauss",
"[ $COMPOSER_DEV_MODE -eq 0 ] || composer cghooks update"
]
},
"support": {
"issues": "https://github.com/wp-graphql/wp-graphql-woocommerce/issues",
"source": "https://github.com/wp-graphql/wp-graphql-woocommerce"
},
"archive": {
"name": "wp-graphql-wooocommerce",
"exclude": [
"/.*",
"/bin",
"/docs",
"/local",
"/plugin-build",
"/phpstan",
"/tests",
"/codeception.dist.yml",
"/codeception.yml",
"/codeclimate.yml",
"/docker-compose.yml",
"/Dockerfile",
"/netlify.toml",
"/README.md",
"/phpstan.neon.dist"
]
},
"extra": {
"strauss" : {
"target_directory": "vendor-prefixed",
"namespace_prefix": "WPGraphQL\\WooCommerce\\Vendor\\",
"classmap_prefix": "WP_GraphQL_WooCommerce_Vendor",
"constant_prefix": "WPGRAPHQL_WOOCOMMERCE_VENDOR",
"delete_vendor_files": true,
"include_modified_date": false,
"packages" : [
"firebase/php-jwt"
],
"exclude_from_prefix": {
"file_patterns": []
}
},
"hooks": {
"pre-commit": [
"composer runPreCommitCleanup"
],
"post-merge": [
"composer install"
]
}
}
}