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

Commit 1c79a68

Browse files
committed
Merge branch 'release/1.0.0-beta3'
2 parents d50e67d + 56e0ea9 commit 1c79a68

34 files changed

+3141
-1010
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ insert_final_newline = true
1313
trim_trailing_whitespace = true
1414
indent_style = tab
1515

16-
[{package.json,*.yml}]
16+
[{*.json,*.yml}]
1717
indent_style = space
1818
indent_size = 2
1919

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/.* export-ignore
2+
composer.* export-ignore
3+
CONTRIBUTING.md export-ignore
4+
phpcs.* export-ignore
5+
phpunit.* export-ignore
6+
tests export-ignore

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/vendor
2-
composer.lock
1+
tests/coverage
2+
vendor

.travis.yml

Lines changed: 32 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,55 @@
1+
language: php
12
sudo: false
23
dist: trusty
34

4-
language: php
5-
65
notifications:
7-
email:
8-
on_success: never
9-
on_failure: change
10-
11-
branches:
12-
only:
13-
- master
6+
email: false
147

158
cache:
169
directories:
1710
- $HOME/.composer/cache
1811

1912
matrix:
13+
fast_finish: true
2014
include:
15+
- php: 7.2
16+
env: WP_VERSION=trunk WP_MULTISITE=0 WC_VERSION=latest RUN_PHPCS=1
17+
- php: 7.2
18+
env: WP_VERSION=trunk WP_MULTISITE=1 WC_VERSION=latest
2119
- php: 7.1
22-
env: WP_VERSION=latest
20+
env: WP_VERSION=latest WP_MULTISITE=0 WC_VERSION=latest
21+
- php: 7.1
22+
env: WP_VERSION=latest WP_MULTISITE=0 WC_VERSION=3.2.6
2323
- php: 7.0
24-
env: WP_VERSION=latest
25-
- php: 5.6
26-
env: WP_VERSION=latest
27-
- php: 5.6
28-
env: WP_VERSION=trunk
29-
- php: 5.6
30-
env: WP_TRAVISCI=phpcs
31-
- php: 5.3
32-
env: WP_VERSION=latest
33-
dist: precise
24+
env: WP_VERSION=latest WP_MULTISITE=0 WC_VERSION=latest
25+
26+
# The following WooCommerce core test currently fails in multisite, with or without this
27+
# plugin being active:
28+
#
29+
# PHP 7.2, WP_VERSION=trunk WP_MULTISITE=1 WC_VERSION=latest
30+
# - WC_Tests_Setup_Functions::test_wizard_in_cart_payment_gateways()
31+
#
32+
# PHP 7.1, WP_VERSION=latest WP_MULTISITE=0 WC_VERSION=3.2.6
33+
# - WC_Tests_CRUD_Orders::test_get_billing_email
34+
allow_failures:
35+
- php: 7.2
36+
env: WP_VERSION=trunk WP_MULTISITE=1 WC_VERSION=latest
37+
3438

3539
before_script:
3640
- export PATH="$HOME/.composer/vendor/bin:$PATH"
41+
- phpenv config-rm xdebug.ini
3742
- |
38-
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
39-
phpenv config-rm xdebug.ini
40-
else
41-
echo "xdebug.ini does not exist"
42-
fi
43-
- |
44-
if [[ ! -z "$WP_VERSION" ]] ; then
45-
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
46-
composer global require "phpunit/phpunit=4.8.*|5.7.*"
47-
fi
48-
- |
49-
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
50-
composer global require wp-coding-standards/wpcs
51-
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
43+
if [[ ${GITHUB_AUTH_TOKEN} != '' ]]; then
44+
composer config -g github-oauth.github.com $GITHUB_AUTH_TOKEN
5245
fi
46+
- bash tests/bin/install-wp-tests.sh woocommerce_test root '' localhost $WP_VERSION
47+
- bash tests/bin/set-woocommerce-version.sh $WC_VERSION
5348
- composer install --prefer-source
5449

5550
script:
51+
- phpunit
5652
- |
57-
if [[ ! -z "$WP_VERSION" ]] ; then
58-
phpunit
59-
WP_MULTISITE=1 phpunit
60-
fi
61-
- |
62-
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
63-
phpcs
53+
if [[ ${RUN_PHPCS} == 1 ]]; then
54+
./vendor/bin/phpcs
6455
fi

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7+
8+
## [Version 1.0.0 (Beta 3)] - 2018-01-23
9+
10+
* Plugin test suite now extends the WooCommerce core test suite, ensuring WooCommerce behaves as expected when the plugin is active ([#26]).
11+
* The custom data store now extends the `WC_Order_Data_Store_CPT` class, eliminating a lot of code duplication in the process ([#28]).
12+
- Includes areas that were previously missing, including reporting.
13+
- Plugin should now have 100% compatibility with default WooCommerce functionality.
14+
* Removed the dependency on a Composer-generated autoloader ([#36]).
15+
* Revert database columns to use `VARCHAR` types for compatibility with WordPress post meta tables.
16+
* Add table indexes on the `order_key`, `customer_id`, and `order_total` columns in the orders table ([#15]).
17+
* Refactor the WP-CLI command, including some changes to accepted arguments ([#35])
18+
* Normalize the plugin name around "WooCommerce Custom Orders Table" ([#38])
19+
* Added changelog and contributing documents ([#12]).
20+
* Massive improvements to test coverage and general WooCommerce compatibility.
21+
22+
## [Version 1.0.0 (Beta 2)] - 2017-12-22
23+
24+
* 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])
25+
* Introduced automated unit tests via the WordPress core test suite ([#9])
26+
* Fixed bug where custom database table was not being created upon plugin activation ([#5], [#9])
27+
* General documentation updates ([#2])
28+
29+
## [Version 1.0.0 (Beta 1)] - 2017-10-02
30+
31+
* Initial public release of the plugin in a beta state.
32+
33+
34+
[Unreleased]: https://github.com/liquidweb/woocommerce-order-tables/compare/master...develop
35+
[Version 1.0.0 (Beta 3)]: https://github.com/liquidweb/woocommerce-order-tables/releases/tag/v1.0.0-beta.3
36+
[Version 1.0.0 (Beta 2)]: https://github.com/liquidweb/woocommerce-order-tables/releases/tag/v1.0.0-beta.2
37+
[Version 1.0.0 (Beta 1)]: https://github.com/liquidweb/woocommerce-order-tables/releases/tag/v1.0.0-beta.1
38+
[#2]: https://github.com/liquidweb/woocommerce-order-tables/pull/2
39+
[#5]: https://github.com/liquidweb/woocommerce-order-tables/pull/5
40+
[#8]: https://github.com/liquidweb/woocommerce-order-tables/pull/8
41+
[#9]: https://github.com/liquidweb/woocommerce-order-tables/pull/9
42+
[#12]: https://github.com/liquidweb/woocommerce-order-tables/pull/12
43+
[#15]: https://github.com/liquidweb/woocommerce-order-tables/pull/15
44+
[#26]: https://github.com/liquidweb/woocommerce-order-tables/pull/26
45+
[#28]: https://github.com/liquidweb/woocommerce-order-tables/pull/28
46+
[#35]: https://github.com/liquidweb/woocommerce-order-tables/pull/35
47+
[#36]: https://github.com/liquidweb/woocommerce-order-tables/pull/36
48+
[#38]: https://github.com/liquidweb/woocommerce-order-tables/pull/38

CONTRIBUTING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Contributing to WooCommerce Custom Orders Table
2+
3+
Thank you for your interest in contributing to the WooCommerce Custom Orders Table plugin!
4+
5+
6+
## Reporting bugs and/or suggesting new features
7+
8+
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.
9+
10+
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.
11+
12+
When reporting a bug, please include the following information:
13+
14+
* Steps to reproduce (what steps would someone need to take to see the bug in action?)
15+
* The expected behavior (what _should_ happen?)
16+
* The observed behavior (what _is_ happening?)
17+
* 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.
18+
19+
20+
## Contributing code
21+
22+
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:
23+
24+
25+
### Coding conventions
26+
27+
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.
28+
29+
As a general rule, we strive to maintain 100% compatibility with [the latest stable release of WooCommerce](https://github.com/woocommerce/woocommerce/releases/latest):
30+
31+
[![GitHub release](https://img.shields.io/github/release/woocommerce/woocommerce.svg)](https://github.com/woocommerce/woocommerce/releases/latest)
32+
33+
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.
34+
35+
36+
### Branching strategy
37+
38+
This project uses [Gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) as a branching strategy:
39+
40+
* `develop` represents the current development version, whereas `master` represents the latest stable release.
41+
* All work should be done in separate feature branches, which should be branched from `develop`.
42+
43+
44+
#### Tagging a new release
45+
46+
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`.
47+
48+
Once master has been updated, the release should be tagged, then `master` should be merged into `develop`.
49+
50+
51+
### Unit testing
52+
53+
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.
54+
55+
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.
56+
57+
#### Test coverage
58+
59+
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:
60+
61+
```sh
62+
$ composer test-coverage
63+
```
64+
65+
The report will be saved to `tests/coverage/`. Please note that XDebug must be enabled in order to generate code coverage reports!

0 commit comments

Comments
 (0)