Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.2.1 #114

Merged
merged 65 commits into from
Aug 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
70f10dc
fixed bug concerning guest sessions.
kidunot89 Jul 15, 2019
f3c23a2
docker script added for e2e testing support
kidunot89 Jul 18, 2019
e38c178
"QLSessionHandlerCest" added.
kidunot89 Jul 18, 2019
1074ced
initial commit
kidunot89 Jul 18, 2019
747eb9c
README.md and project version updated.
kidunot89 Jul 18, 2019
94f0481
variable substitution fixed.
kidunot89 Jul 18, 2019
a61e678
php-coveralls added to docker test environment.
kidunot89 Jul 18, 2019
fb3b893
Problematic if statement removed.
kidunot89 Jul 18, 2019
f948f22
Problematic database upgrade statement removed.
kidunot89 Jul 18, 2019
b217745
Removed Xdebug disable code.
kidunot89 Jul 18, 2019
453d72d
Fixes ARG declaration.
kidunot89 Jul 18, 2019
d7948b2
dependency required versions updated
kidunot89 Jul 18, 2019
963599a
Install xdebug
kidunot89 Jul 18, 2019
c7c2db5
xdebug replaced with pcov
kidunot89 Jul 18, 2019
b16a195
Docker configuration refactor. Debugging needed.
kidunot89 Jul 23, 2019
0865b03
More docker refactoring
kidunot89 Jul 24, 2019
b8c7b10
Codeception configuration heavily refactored
kidunot89 Jul 25, 2019
c5996eb
job matrix updated.
kidunot89 Jul 25, 2019
4407699
package.json updated
kidunot89 Jul 25, 2019
aae33f8
php5.6 xdebug installation patched.
kidunot89 Jul 25, 2019
da77dcb
fixed Dockerfile.
kidunot89 Jul 25, 2019
7c7d20c
fixed variable substitution.
kidunot89 Jul 25, 2019
07239f9
--no-cache flag added to composer install statement.
kidunot89 Jul 25, 2019
8af4aa7
--no-cache flag removed.
kidunot89 Jul 25, 2019
1d9f1b6
.travis.yml updated.
kidunot89 Jul 25, 2019
2bbe110
php5.6 test compatibility fixed.
kidunot89 Jul 25, 2019
c9e9ad6
.travis.yml updated.
kidunot89 Jul 25, 2019
1ed5323
Merge pull request #115 from kidunot89/feature/update-travis-to-use-d…
kidunot89 Jul 25, 2019
cc842e9
.coveralls.yml updated.
kidunot89 Jul 25, 2019
4d19e10
Coveralls.io client config updated.
kidunot89 Jul 27, 2019
835b2f4
Unnecessary code removed..
kidunot89 Jul 27, 2019
a91475f
-r flag set for coverall client execution.
kidunot89 Jul 27, 2019
09b21cf
testing-entrypoint.sh updated.
kidunot89 Jul 27, 2019
698c87e
Typo fixed.
kidunot89 Jul 27, 2019
0a98ab6
Codecoverage config modified.
kidunot89 Jul 27, 2019
f8ee0be
Coveralls.io client bug fixed.
kidunot89 Jul 28, 2019
d8de2d3
Bugfix related to Travis-CI.
kidunot89 Jul 28, 2019
18f6780
Dockerfile updated for PHP5.6 test compatibility.
kidunot89 Jul 29, 2019
3a564c3
Bug fixed concerning code coverage output.
kidunot89 Jul 29, 2019
cd2fa59
Bug fixed concerning tests output directory.
kidunot89 Jul 29, 2019
df92511
PaymentGateway implemented and tested.
kidunot89 Jul 29, 2019
7d5740c
Payment gateway description fixed.
kidunot89 Jul 29, 2019
dac2547
Merge pull request #118 from kidunot89/feature/payment-gateways
kidunot89 Jul 30, 2019
142c482
fixed "Inflect" class collision
kidunot89 Aug 13, 2019
f93b590
initial commit
kidunot89 Aug 19, 2019
fa73610
CartItem field "extraData" implemented and tested.
kidunot89 Aug 21, 2019
8025de7
"MetaData" type and queries implemented and tested.
kidunot89 Aug 21, 2019
16834b5
Merge pull request #123 from kidunot89/new-type/metadata
kidunot89 Aug 21, 2019
04f6812
Problematic code removed.
kidunot89 Aug 21, 2019
5e8b638
Merge pull request #124 from kidunot89/bugfix/post-object-connection-…
kidunot89 Aug 21, 2019
8a68cf9
Bug related to resolving product connections by taxonomies fixed.
kidunot89 Aug 22, 2019
0224c05
Merge pull request #125 from kidunot89/bugfix/product-connection-wher…
kidunot89 Aug 22, 2019
0501914
Product connection field "taxonomyFilter" where arg implemented and t…
kidunot89 Aug 22, 2019
f5237b3
Merge pull request #126 from kidunot89/feature/new-product-connection…
kidunot89 Aug 22, 2019
1f291d8
Add contributor
ranaaterning Aug 24, 2019
3d55864
Merge pull request #131 from ranaaterning/patch-3
kidunot89 Aug 26, 2019
2520858
"NewCustomerCheckingOutCept" written.
kidunot89 Aug 26, 2019
b7f52e2
Checkout mutation output fields updated.
kidunot89 Aug 26, 2019
afeac37
NewCustomerCheckingOutCept updated.
kidunot89 Aug 27, 2019
a6bc2d3
Typehinting removed
kidunot89 Aug 27, 2019
1772464
README.md updated.
kidunot89 Aug 27, 2019
6436ea8
Merge branch 'release-v0.2.1' of github.com:wp-graphql/wp-graphql-woo…
kidunot89 Aug 27, 2019
dcbd241
3rd party default value hook added.
kidunot89 Aug 27, 2019
e7bd5bf
Merge pull request #132 from kidunot89/bugfix/checkout-mutation
kidunot89 Aug 27, 2019
45298e4
CHANGELOG.md updated.
kidunot89 Aug 27, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
service_name: travis-ci
coverage_clover: tests/_output/coverage.xml
coverage_clover: tests/_output/coverage.xml
json_path: tests/_output/coverage.json
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.env
.github_changelog_generator
.travis.yml
44 changes: 26 additions & 18 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
TEST_DB_NAME="wpgraphql_woocommerce_test"
TEST_DB_HOST="127.0.0.1"
TEST_DB_USER="root"
TEST_DB_PASSWORD=""
WP_VERSION=latest
DB_NAME=wordpress
DB_HOST=app_db
DB_USER=wordpress
DB_PASSWORD=wordpress
WP_TABLE_PREFIX=wp_
WP_URL=http://localhost
WP_DOMAIN=localhost
[email protected]
ADMIN_USERNAME=admin
ADMIN_PASSWORD=password
ADMIN_PATH=/wp-admin

TEST_DB_NAME=woographql_tests
TEST_DB_HOST=127.0.0.1
TEST_DB_USER=wordpress
TEST_DB_PASSWORD=wordpress
TEST_WP_TABLE_PREFIX=wp_

SKIP_DB_CREATE=false
WP_ROOT_FOLDER="/tmp/wordpress"
TEST_SITE_WP_ADMIN_PATH="/wp-admin"
TEST_SITE_DB_NAME="wpgraphql_woocommerce_test"
TEST_SITE_DB_HOST="127.0.0.1"
TEST_SITE_DB_USER="root"
TEST_SITE_DB_PASSWORD=""
TEST_SITE_TABLE_PREFIX="wp_"
TEST_TABLE_PREFIX="wp_"
TEST_SITE_WP_URL="http://wp.test"
TEST_SITE_WP_DOMAIN="wp.test"
TEST_SITE_ADMIN_EMAIL="[email protected]"
TEST_SITE_ADMIN_USERNAME="admin"
TEST_SITE_ADMIN_PASSWORD="password"
TEST_WP_ROOT_FOLDER=/tmp/wordpress
[email protected]

TESTS_DIR=tests
TESTS_OUTPUT=tests/_output
TESTS_DATA=tests/_data
TESTS_SUPPORT=tests/_support
TESTS_ENVS=tests/_envs
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ node_modules/
*.tar.gz
*.zip
.env
.env.*
!.env.dist
.idea
.vscode
.github_changelog_generator
Expand All @@ -17,11 +19,15 @@ vendor/*
!vendor/composer
vendor/composer/installed.json
vendor/composer/*/
!/tests
/tests/*.suite.yml
!tests
tests/*.suite.yml
build/
coverage/*
schema.graphql
phpunit.xml
docker-output
composer.lock
c3.php
.log/
php-coveralls.phar
codeception.yml
95 changes: 57 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ dist: trusty

language: php

services:
- docker

notifications:
email:
on_success: never
Expand All @@ -11,39 +14,52 @@ notifications:
branches:
only:
- develop
- release-v0.1.1
- master
- release-v0.1.2
- release-v0.2.0
- release-v0.2.1

cache:
apt: true
directories:
- vendor
- $HOME/.composer/cache

# Set the global environment variables
env:
global:
- WP_CORE_DIR: /tmp/wordpress
- COVERAGE: false
- DEBUG: false

matrix:
include:
- php: 7.3
env: PHP_VERSION=7.3 WP_VERSION=5.2 COVERAGE=1
- php: 7.3
env: PHP_VERSION=7.3 PHPCS=1
- php: 7.2
env: WP_VERSION=latest COVERAGE=1
env: PHP_VERSION=7.2 WP_VERSION=5.2
- php: 7.2
env: PHPCS=1
env: PHP_VERSION=7.2 WP_VERSION=4.9
- php: 7.1
env: PHP_VERSION=7.1 WP_VERSION=5.2
- php: 7.1
env: WP_VERSION=latest
env: PHP_VERSION=7.1 WP_VERSION=4.9
- php: 7.0
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=4.5
env: PHP_VERSION=7.0 WP_VERSION=5.0
- php: 7.0
env: PHP_VERSION=7.0 WP_VERSION=4.9
- php: 5.6
env: WP_VERSION=latest DEBUG=1
env: PHP_VERSION=5.6 WP_VERSION=5.0 DEBUG=1
- php: 5.6
env: WP_VERSION=trunk
env: PHP_VERSION=5.6 WP_VERSION=4.9 DEBUG=1

before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- |
# Remove Xdebug for a huge performance increase:
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi

install:
- |
Expand All @@ -55,45 +71,48 @@ install:
before_script:
- |
if [ ! -z "$WP_VERSION" ]; then
# Install and config Codeception
cp .env.dist .env
composer install-wp-tests
COMPOSER_MEMORY_LIMIT=-1 travis_retry composer install --prefer-source --no-interaction
if [ "$COVERAGE" == "1" ]; then
# Install Coveralls
mkdir -p build/logs
COMPOSER_MEMORY_LIMIT=-1 travis_retry composer require php-coveralls/php-coveralls
fi
ls -al
# Build images.
docker-compose build \
--build-arg DESIRED_PHP_VERSION=${PHP_VERSION} \
--build-arg DESIRED_WP_VERSION=${WP_VERSION} \
testing
fi
# Install PHP CodeSniffer and WPCS.
- |
if [ "$PHPCS" == "1" ]; then
COMPOSER_MEMORY_LIMIT=-1 travis_retry composer require squizlabs/php_codesniffer phpcompatibility/phpcompatibility-wp wp-coding-standards/wpcs dealerdirect/phpcodesniffer-composer-installer
COMPOSER_MEMORY_LIMIT=-1 travis_retry composer require \
squizlabs/php_codesniffer \
phpcompatibility/phpcompatibility-wp wp-coding-standards/wpcs \
dealerdirect/phpcodesniffer-composer-installer
COMPOSER_MEMORY_LIMIT=-1 travis_retry composer install --no-dev
ls -al
fi

script:
# Execute unit tests with coverage if specified, otherwise without coverage
- |
if [ ! -z "$WP_VERSION" ]; then
if [ "$COVERAGE" == "1" ]; then
vendor/bin/codecept run wpunit --coverage --coverage-xml
elif [ "$DEBUG" == "1" ]; then
vendor/bin/codecept run wpunit --debug
else
vendor/bin/codecept run wpunit
fi
docker-compose run --rm \
-e SUITES='acceptance;functional;wpunit' \
-e COVERAGE=${COVERAGE:-0} \
-e DEBUG=${DEBUG:-0} \
testing --scale app=0
fi
- |
if [ "$PHPCS" == "1" ]; then
vendor/bin/phpcs wp-graphql-woocommerce.php access-functions.php class-inflect.php includes/*.php --standard=WordPress
vendor/bin/phpcs \
wp-graphql-woocommerce.php \
access-functions.php \
class-inflect.php \
includes/*.php --standard=WordPress
fi
after_success:
# Runs Coveralls.io client
# Download and run Coveralls.io client
- |
if [ "$COVERAGE" == "1" ]; then
travis_retry php vendor/bin/php-coveralls -v
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
chmod +x php-coveralls.phar

sed -i 's/\/var\/www\/html\/wp-content\/plugins\/wp-graphql-woocommerce\///g' tests/_output/coverage.xml
travis_retry php php-coveralls.phar -v
fi

41 changes: 26 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,34 @@
# Change Log

## [v0.2.0-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.0-beta) (2019-07-11)
[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.1.2-beta...v0.2.0-beta)
## [v0.2.1-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.1-beta) (2019-08-27)
[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.2.0-beta...v0.2.1-beta)

**Implemented enhancements:**

- Release v0.2.0 code cleanup [\#107](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/107) ([kidunot89](https://github.com/kidunot89))
- updateItemQuantities mutation [\#106](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/106) ([kidunot89](https://github.com/kidunot89))
- deleteOrderItems mutation [\#104](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/104) ([kidunot89](https://github.com/kidunot89))
- Adds NO\_QL\_SESSION\_HANDLER flag [\#103](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/103) ([kidunot89](https://github.com/kidunot89))
- Adds product category image to schema. [\#102](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/102) ([kidunot89](https://github.com/kidunot89))
- Query products by slug and sku [\#101](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/101) ([kidunot89](https://github.com/kidunot89))
- Hooks for mutations [\#108](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/108)
- productBy query should support querying by slug [\#95](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/95)
- Support update of multiple quantities in cart in a single mutation [\#94](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/94)
- Other mutations [\#19](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/19)
- Order mutations [\#16](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/16)
- Checkout mutation bugfix/enhancements [\#132](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/132) ([kidunot89](https://github.com/kidunot89))
- Adds "taxonomyFilter" to product connections [\#126](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/126) ([kidunot89](https://github.com/kidunot89))
- MetaData type and queries [\#123](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/123) ([kidunot89](https://github.com/kidunot89))
- PaymentGateway type. [\#118](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/118) ([kidunot89](https://github.com/kidunot89))
- CI upgrade [\#115](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/115) ([kidunot89](https://github.com/kidunot89))

**Fixed bugs:**

- customerRegister mutation resolves wrong object for `viewer` field [\#111](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/111)
- I cant see the category thumbnail [\#93](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/93)

**Merged pull requests:**

- Add contributor [\#131](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/131) ([ranaaterning](https://github.com/ranaaterning))
- Bug related to resolving product connections by taxonomies fixed. [\#125](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/125) ([kidunot89](https://github.com/kidunot89))
- PostObject hierarchy bugfix [\#124](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/124) ([kidunot89](https://github.com/kidunot89))

## [v0.2.0-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.0-beta) (2019-07-11)
[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.1.2-beta...v0.2.0-beta)

**Fixed bugs:**

Expand All @@ -20,13 +38,6 @@

- Customer id doesn't match user id [\#90](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/90)

**Merged pull requests:**

- checkout mutation [\#100](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/100) ([kidunot89](https://github.com/kidunot89))
- deleteOrder mutation [\#99](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/99) ([kidunot89](https://github.com/kidunot89))
- updateOrder mutation [\#98](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/98) ([kidunot89](https://github.com/kidunot89))
- createOrder mutation [\#97](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/97) ([kidunot89](https://github.com/kidunot89))

## [v0.1.2-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.1.2-beta) (2019-06-23)
[Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.1.1-beta...v0.1.2-beta)

Expand Down
49 changes: 49 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
############################################################################
# Container for running Codeception tests on a WooGraphQL Docker instance. #
############################################################################

# Using the 'DESIRED_' prefix to avoid confusion with environment variables of the same name.
ARG DESIRED_WP_VERSION
ARG DESIRED_PHP_VERSION

FROM kidunot89/woographql-app:wp${DESIRED_WP_VERSION}-php${DESIRED_PHP_VERSION}


LABEL author=kidunot89
LABEL author_uri=https://github.com/kidunot89

SHELL [ "/bin/bash", "-c" ]

ARG DESIRED_WP_VERSION
ARG DESIRED_PHP_VERSION

# Install php extensions
RUN docker-php-ext-install pdo_mysql

# Install Xdebug
RUN if [ "$DESIRED_PHP_VERSION" == "5.6" ]; then yes | pecl install xdebug-2.5.5; else yes | pecl install xdebug; fi \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini

# Install composer
ENV COMPOSER_ALLOW_SUPERUSER=1

RUN curl -sS https://getcomposer.org/installer | php -- \
--filename=composer \
--install-dir=/usr/local/bin

# Add composer global binaries to PATH
ENV PATH "$PATH:~/.composer/vendor/bin"

# Configure php
RUN echo "date.timezone = UTC" >> /usr/local/etc/php/php.ini

# Remove exec statement from base entrypoint script.
RUN sed -i '$d' /usr/local/bin/app-entrypoint.sh

# Set up entrypoint
WORKDIR /var/www/html/wp-content/plugins/wp-graphql-woocommerce
COPY bin/testing-entrypoint.sh /usr/local/bin/testing-entrypoint.sh
RUN chmod 755 /usr/local/bin/testing-entrypoint.sh
ENTRYPOINT ["testing-entrypoint.sh"]
Loading