Skip to content

Commit 582d3b1

Browse files
authored
Merge pull request #1 from wp-graphql/develop
Update latest
2 parents 47910a4 + 36e79d3 commit 582d3b1

File tree

75 files changed

+1581
-388
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1581
-388
lines changed

.github/CONTRIBUTING.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## Contribute to WPGraphQL WooCommerce
1+
## Contribute to WPGraphQL for WooCommerce
22

3-
WPGraphQL WooCommerce (WooGraphQL) welcomes community contributions, bug reports and other constructive feedback.
3+
WPGraphQL for WooCommerce (WooGraphQL) welcomes community contributions, bug reports and other constructive feedback.
44

55
When contributing please ensure you follow the guidelines below so that we can keep on top of things.
66

@@ -23,6 +23,37 @@ When contributing please ensure you follow the guidelines below so that we can k
2323
* If possible, and if applicable, please also add/update unit tests for your changes
2424
* Push the changes to your fork and submit a pull request to the 'develop' branch of this repository
2525

26+
### Setting up an environment to run the WPUnit tests
27+
28+
1. Create a `.env` file from the provided `.env.testing` and update the following section.
29+
30+
```env
31+
# WordPress database configurations
32+
DB_NAME=wordpress
33+
DB_HOST=app_db
34+
DB_PORT=3306
35+
DB_USER=wordpress
36+
DB_PASSWORD=password
37+
ROOT_PASSWORD=password
38+
WP_TABLE_PREFIX=wp_
39+
SKIP_DB_CREATE=true
40+
SKIP_WP_SETUP=true
41+
42+
```
43+
44+
The variable should be point to a local instance of MySQL and `SKIP_DB_CREATE` and `SKIP_WP_SETUP` should be set to `false`.
45+
2. Run `composer installTestEnv` from the terminal in the plugin root directory. This will run the setup script and install all the required dependencies.
46+
3. Run the tests by running `vendor/bin/codecept run wpunit` from the root directory. To learn about the libraries used to write the tests see [Codeception](https://codeception.com/), [WPBrowser](https://wpbrowser.wptestkit.dev/modules/WPBrowser/), and [WPGraphQL TestCase](https://github.com/wp-graphql/wp-graphql-testcase)
47+
48+
### Setting up a Docker environment to run the E2E tests
49+
50+
1. Run `composer installTestEnv` from the terminal in the plugin root directory to install all the required dependencies.
51+
2. Next run `composer dRunApp`. This will build and start the docker network at http://localhost:8080 based off the configuration found in the `docker-compose.yml` in the project root.
52+
3. Last run the test by running `composer dRunTest`. This runs the test suite by utilizing the `docker exec` command to run `vendor/bin/codecept run` from the project root within the docker container for wordpress site. You can pass further parameter to this comment by using the `FILTER` environment variable like so `FILTER="acceptance NewCustomerCheckingOutCept --debug" composer dRunTest`.
53+
54+
> **NOTE:** If you have no interest in the generated docker environment outside of automated test you can simply the process by just running the `dRunTestStandalone` command after the `installTestEnv` command combining steps 2 & 3, `composer dRunTestStandalone`. The command also reads the `FILTER` variables as well to so filter is possible `FILTER="acceptance NewCustomerCheckingOutCept --debug" composer dRunTestStandalone`.
55+
56+
2657
## Code Documentation
2758
2859
* We strive for full doc coverage and follow the standards set by phpDoc

.github/workflows/continous-integration.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
php: ['8.1', '8.0', '7.4']
26-
wordpress: ['6.3', '6.2', '6.1', '6.0']
25+
php: ['8.3', '8.2', '8.1', '7.4']
26+
wordpress: ['6.7', '6.3', '6.1']
2727
composer_version: ['v2']
2828
include:
29-
- php: '7.4'
30-
wordpress: '6.2'
29+
- php: '8.3'
30+
wordpress: '6.7'
3131
coverage: '--coverage --coverage-xml'
3232
xdebug: 1
3333
- php: '8.1'
3434
wordpress: '6.1'
3535
debug: '--debug'
36-
- wordpress: '6.2'
36+
- wordpress: '6.3'
3737
hpos: 1
3838

3939
fail-fast: false

.github/workflows/lint-code.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
- name: Setup PHP
2424
uses: shivammathur/setup-php@v2
2525
with:
26-
php-version: 8.0
26+
php-version: 8.1
2727
extensions: mbstring, intl
28-
tools: composer
28+
tools: composer:v2
2929

3030
- name: Get Composer Cache Directory
3131
id: composer-cache

.github/workflows/package-for-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
mkdir plugin-build
2626
composer archive -vvv --format=zip --file="plugin-build/wp-graphql-woocommerce"
2727
- name: Upload artifact
28-
uses: actions/upload-artifact@v2
28+
uses: actions/upload-artifact@v4
2929
with:
3030
name: wp-graphql-woocommerce
3131
path: plugin-build/wp-graphql-woocommerce.zip

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
## [v0.21.1](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.21.1) (2024-11-12)
4+
5+
[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.21.0...v0.21.1)
6+
7+
**Fixed:**
8+
9+
- fix: Products query "where.search" param patched [\#903](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/903) ([kidunot89](https://github.com/kidunot89))
10+
- fix: ID resolution made consistent across all edit and delete node mu… [\#902](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/902) ([kidunot89](https://github.com/kidunot89))
11+
- fix: "Product" interfaces shared fields fix [\#901](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/901) ([kidunot89](https://github.com/kidunot89))
12+
- chore: General "createOrder" cleanup [\#899](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/899) ([kidunot89](https://github.com/kidunot89))
13+
- Fix: Correct number formatting by removing unnecessary price separators [\#888](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/888) ([ZZiane](https://github.com/ZZiane))
14+
15+
**Other Changes:**
16+
17+
- devops: composer-git-hooks added. CONTRIBUTING.md updated. [\#904](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/904) ([kidunot89](https://github.com/kidunot89))
18+
- devops: Name officially changed to "WPGraphQL for WooCommerce" [\#900](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/900) ([kidunot89](https://github.com/kidunot89))
19+
- chore: Minor documentation issues resolved [\#884](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/884) ([kidunot89](https://github.com/kidunot89))
20+
321
## [v0.21.0](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.21.0) (2024-08-07)
422

523
[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.20.0...v0.21.0)

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
ARG PHP_VERSION
22
FROM wordpress:php${PHP_VERSION}-apache
33

4-
ARG XDEBUG_VERSION=2.9.6
5-
64
RUN apt-get update; \
75
apt-get install -y --no-install-recommends \
86
# WP-CLI dependencies.
@@ -13,14 +11,15 @@ RUN apt-get update; \
1311
wget;
1412

1513
# Setup xdebug. The latest version supported by PHP 5.6 is 2.5.5.
16-
RUN pecl install "xdebug-${XDEBUG_VERSION}"; \
14+
RUN pecl install xdebug; \
1715
docker-php-ext-enable xdebug; \
1816
echo "xdebug.default_enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \
1917
echo "xdebug.remote_autostart = 0" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \
2018
echo "xdebug.remote_connect_back = 0" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \
2119
echo "xdebug.remote_enable = 1" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \
2220
echo "xdebug.remote_port = 9000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \
23-
echo "xdebug.remote_log = /var/www/html/xdebug.log" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini;
21+
echo "xdebug.remote_log = /var/www/html/xdebug.log" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini; \
22+
echo "xdebug.mode = coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini;
2423

2524
# Install PDO MySQL driver.
2625
RUN docker-php-ext-install pdo_mysql

0 commit comments

Comments
 (0)