Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/1.0.0-beta3'
Browse files Browse the repository at this point in the history
  • Loading branch information
stevegrunwell committed Jan 24, 2018
2 parents d50e67d + 56e0ea9 commit 1c79a68
Show file tree
Hide file tree
Showing 34 changed files with 3,141 additions and 1,010 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[{package.json,*.yml}]
[{*.json,*.yml}]
indent_style = space
indent_size = 2

Expand Down
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/.* export-ignore
composer.* export-ignore
CONTRIBUTING.md export-ignore
phpcs.* export-ignore
phpunit.* export-ignore
tests export-ignore
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/vendor
composer.lock
tests/coverage
vendor
73 changes: 32 additions & 41 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,55 @@
language: php
sudo: false
dist: trusty

language: php

notifications:
email:
on_success: never
on_failure: change

branches:
only:
- master
email: false

cache:
directories:
- $HOME/.composer/cache

matrix:
fast_finish: true
include:
- php: 7.2
env: WP_VERSION=trunk WP_MULTISITE=0 WC_VERSION=latest RUN_PHPCS=1
- php: 7.2
env: WP_VERSION=trunk WP_MULTISITE=1 WC_VERSION=latest
- php: 7.1
env: WP_VERSION=latest
env: WP_VERSION=latest WP_MULTISITE=0 WC_VERSION=latest
- php: 7.1
env: WP_VERSION=latest WP_MULTISITE=0 WC_VERSION=3.2.6
- php: 7.0
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=trunk
- php: 5.6
env: WP_TRAVISCI=phpcs
- php: 5.3
env: WP_VERSION=latest
dist: precise
env: WP_VERSION=latest WP_MULTISITE=0 WC_VERSION=latest

# The following WooCommerce core test currently fails in multisite, with or without this
# plugin being active:
#
# PHP 7.2, WP_VERSION=trunk WP_MULTISITE=1 WC_VERSION=latest
# - WC_Tests_Setup_Functions::test_wizard_in_cart_payment_gateways()
#
# PHP 7.1, WP_VERSION=latest WP_MULTISITE=0 WC_VERSION=3.2.6
# - WC_Tests_CRUD_Orders::test_get_billing_email
allow_failures:
- php: 7.2
env: WP_VERSION=trunk WP_MULTISITE=1 WC_VERSION=latest


before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- phpenv config-rm xdebug.ini
- |
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
- |
if [[ ! -z "$WP_VERSION" ]] ; then
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
composer global require "phpunit/phpunit=4.8.*|5.7.*"
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
composer global require wp-coding-standards/wpcs
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
if [[ ${GITHUB_AUTH_TOKEN} != '' ]]; then
composer config -g github-oauth.github.com $GITHUB_AUTH_TOKEN
fi
- bash tests/bin/install-wp-tests.sh woocommerce_test root '' localhost $WP_VERSION
- bash tests/bin/set-woocommerce-version.sh $WC_VERSION
- composer install --prefer-source

script:
- phpunit
- |
if [[ ! -z "$WP_VERSION" ]] ; then
phpunit
WP_MULTISITE=1 phpunit
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
phpcs
if [[ ${RUN_PHPCS} == 1 ]]; then
./vendor/bin/phpcs
fi
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Version 1.0.0 (Beta 3)] - 2018-01-23

* Plugin test suite now extends the WooCommerce core test suite, ensuring WooCommerce behaves as expected when the plugin is active ([#26]).
* The custom data store now extends the `WC_Order_Data_Store_CPT` class, eliminating a lot of code duplication in the process ([#28]).
- Includes areas that were previously missing, including reporting.
- Plugin should now have 100% compatibility with default WooCommerce functionality.
* Removed the dependency on a Composer-generated autoloader ([#36]).
* Revert database columns to use `VARCHAR` types for compatibility with WordPress post meta tables.
* Add table indexes on the `order_key`, `customer_id`, and `order_total` columns in the orders table ([#15]).
* Refactor the WP-CLI command, including some changes to accepted arguments ([#35])
* Normalize the plugin name around "WooCommerce Custom Orders Table" ([#38])
* Added changelog and contributing documents ([#12]).
* Massive improvements to test coverage and general WooCommerce compatibility.

## [Version 1.0.0 (Beta 2)] - 2017-12-22

* Clean up codebase to adhere to the [WordPress coding standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/), and introduce an `.editorconfig` to make this kind of change less likely in the future ([#8])
* Introduced automated unit tests via the WordPress core test suite ([#9])
* Fixed bug where custom database table was not being created upon plugin activation ([#5], [#9])
* General documentation updates ([#2])

## [Version 1.0.0 (Beta 1)] - 2017-10-02

* Initial public release of the plugin in a beta state.


[Unreleased]: https://github.com/liquidweb/woocommerce-order-tables/compare/master...develop
[Version 1.0.0 (Beta 3)]: https://github.com/liquidweb/woocommerce-order-tables/releases/tag/v1.0.0-beta.3
[Version 1.0.0 (Beta 2)]: https://github.com/liquidweb/woocommerce-order-tables/releases/tag/v1.0.0-beta.2
[Version 1.0.0 (Beta 1)]: https://github.com/liquidweb/woocommerce-order-tables/releases/tag/v1.0.0-beta.1
[#2]: https://github.com/liquidweb/woocommerce-order-tables/pull/2
[#5]: https://github.com/liquidweb/woocommerce-order-tables/pull/5
[#8]: https://github.com/liquidweb/woocommerce-order-tables/pull/8
[#9]: https://github.com/liquidweb/woocommerce-order-tables/pull/9
[#12]: https://github.com/liquidweb/woocommerce-order-tables/pull/12
[#15]: https://github.com/liquidweb/woocommerce-order-tables/pull/15
[#26]: https://github.com/liquidweb/woocommerce-order-tables/pull/26
[#28]: https://github.com/liquidweb/woocommerce-order-tables/pull/28
[#35]: https://github.com/liquidweb/woocommerce-order-tables/pull/35
[#36]: https://github.com/liquidweb/woocommerce-order-tables/pull/36
[#38]: https://github.com/liquidweb/woocommerce-order-tables/pull/38
65 changes: 65 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Contributing to WooCommerce Custom Orders Table

Thank you for your interest in contributing to the WooCommerce Custom Orders Table plugin!


## Reporting bugs and/or suggesting new features

We welcome input from the community on new features for the plugin, as well as reports of anything that doesn't seem to be working properly.

To make a suggestion or report a bug, please [create a new issue within the GitHub repository](https://github.com/liquidweb/woocommerce-order-tables/issues/new) with a descriptive title and as much pertinent information as possible.

When reporting a bug, please include the following information:

* Steps to reproduce (what steps would someone need to take to see the bug in action?)
* The expected behavior (what _should_ happen?)
* The observed behavior (what _is_ happening?)
* Information about your WooCommerce instance — this can easily be obtained via the WooCommerce › Status screen, via the "Get system report" button at the top of that page.


## Contributing code

If you're interested in contributing to the plugin by way of code and/or documentation, please read the following details about the structure of the project:


### Coding conventions

This project adheres to the [WordPress coding standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/), and [an `.editorconfig` file](http://editorconfig.org/) is included in the repository to help most <abbr title="Integrated Development Environment">IDE</abbr>s adjust accordingly. The repository also ships with [the WooCommerce git hooks](https://github.com/woocommerce/woocommerce-git-hooks) to aid in development.

As a general rule, we strive to maintain 100% compatibility with [the latest stable release of WooCommerce](https://github.com/woocommerce/woocommerce/releases/latest):

[![GitHub release](https://img.shields.io/github/release/woocommerce/woocommerce.svg)](https://github.com/woocommerce/woocommerce/releases/latest)

As part of this commitment to compatibility, WooCommerce Custom Orders Table also targets PHP 5.2 as a minimum PHP version for the core plugin files (with the exception of the `WooCommerce_Custom_Orders_Table_CLI` class, which uses the WP-CLI minimum of PHP 5.3). The `tests/` directory, however, is accepting of modern (7.x) PHP.


### Branching strategy

This project uses [Gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) as a branching strategy:

* `develop` represents the current development version, whereas `master` represents the latest stable release.
* All work should be done in separate feature branches, which should be branched from `develop`.


#### Tagging a new release

When a new release is being prepared, a new `release/vX.X.X` branch will be created from `develop`, version numbers bumped and any last-minute release adjustments made, then the release branch will be merged (via non-fast-forward merge) into `master`.

Once master has been updated, the release should be tagged, then `master` should be merged into `develop`.


### Unit testing

WooCommerce Custom Orders Table extends WooCommerce's own test suite (which uses [the WordPress core testing suite](https://make.wordpress.org/core/handbook/testing/automated-testing/writing-phpunit-tests/)) to provide automated tests for its functionality.

When submitting pull requests, please include relevant tests for your new features and bug-fixes. This helps prevent regressions in future iterations of the plugin, and helps instill confidence in store owners using this to enhance their WooCommerce stores.

#### Test coverage

To generate a code coverage report (test coverage percentage as well as areas of untested or under-tested code that could pose risk), you run the following:

```sh
$ composer test-coverage
```

The report will be saved to `tests/coverage/`. Please note that XDebug must be enabled in order to generate code coverage reports!
Loading

0 comments on commit 1c79a68

Please sign in to comment.