Merge pull request #22009 from woocommerce/php73-wp-nightly
Prepare WooCommerce for PHP 7.3
This commit is contained in:
commit
ebd6ecb95f
|
@ -13,7 +13,6 @@ php:
|
|||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.3
|
||||
|
||||
env:
|
||||
- WP_VERSION=latest WP_MULTISITE=0
|
||||
|
@ -31,9 +30,11 @@ matrix:
|
|||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_PHPCS=1 RUN_E2E=1
|
||||
- php: 7.1
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
|
||||
allow_failures:
|
||||
- env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
|
||||
- php: 7.3
|
||||
env: WP_VERSION=5.0-beta5 WP_MULTISITE=0
|
||||
allow_failures:
|
||||
- php: 7.1
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
|
||||
|
||||
before_script:
|
||||
- |
|
||||
|
|
|
@ -129,7 +129,7 @@ class WC_Admin_Report {
|
|||
$get_key = "order_items.{$key}";
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( $value['function'] ) {
|
||||
|
|
|
@ -162,15 +162,15 @@ class Emogrifier
|
|||
// type and attribute exact value
|
||||
'/(\\w)\\[(\\w+)\\=[\'"]?([\\w\\s]+)[\'"]?\\]/' => '\\1[@\\2="\\3"]',
|
||||
// type and attribute value with ~ (one word within a whitespace-separated list of words)
|
||||
'/([\\w\\*]+)\\[(\\w+)[\\s]*\\~\\=[\\s]*[\'"]?([\\w-_\\/]+)[\'"]?\\]/'
|
||||
'/([\\w\\*]+)\\[(\\w+)[\\s]*\\~\\=[\\s]*[\'"]?([\\w\\-_\\/]+)[\'"]?\\]/'
|
||||
=> '\\1[contains(concat(" ", @\\2, " "), concat(" ", "\\3", " "))]',
|
||||
// type and attribute value with | (either exact value match or prefix followed by a hyphen)
|
||||
'/([\\w\\*]+)\\[(\\w+)[\\s]*\\|\\=[\\s]*[\'"]?([\\w-_\\s\\/]+)[\'"]?\\]/'
|
||||
'/([\\w\\*]+)\\[(\\w+)[\\s]*\\|\\=[\\s]*[\'"]?([\\w\\-_\\s\\/]+)[\'"]?\\]/'
|
||||
=> '\\1[@\\2="\\3" or starts-with(@\\2, concat("\\3", "-"))]',
|
||||
// type and attribute value with ^ (prefix match)
|
||||
'/([\\w\\*]+)\\[(\\w+)[\\s]*\\^\\=[\\s]*[\'"]?([\\w-_\\/]+)[\'"]?\\]/' => '\\1[starts-with(@\\2, "\\3")]',
|
||||
'/([\\w\\*]+)\\[(\\w+)[\\s]*\\^\\=[\\s]*[\'"]?([\\w\\-_\\/]+)[\'"]?\\]/' => '\\1[starts-with(@\\2, "\\3")]',
|
||||
// type and attribute value with * (substring match)
|
||||
'/([\\w\\*]+)\\[(\\w+)[\\s]*\\*\\=[\\s]*[\'"]?([\\w-_\\s\\/:;]+)[\'"]?\\]/' => '\\1[contains(@\\2, "\\3")]',
|
||||
'/([\\w\\*]+)\\[(\\w+)[\\s]*\\*\\=[\\s]*[\'"]?([\\w\\-_\\s\\/:;]+)[\'"]?\\]/' => '\\1[contains(@\\2, "\\3")]',
|
||||
// adjacent sibling
|
||||
'/\\s+\\+\\s+/' => '/following-sibling::*[1]/self::',
|
||||
// child
|
||||
|
@ -185,7 +185,7 @@ class Emogrifier
|
|||
// The following matcher will break things if it is placed before the adjacent matcher.
|
||||
// So one of the matchers matches either too much or not enough.
|
||||
// type and attribute value with $ (suffix match)
|
||||
'/([\\w\\*]+)\\[(\\w+)[\\s]*\\$\\=[\\s]*[\'"]?([\\w-_\\s\\/]+)[\'"]?\\]/'
|
||||
'/([\\w\\*]+)\\[(\\w+)[\\s]*\\$\\=[\\s]*[\'"]?([\\w\\-_\\s\\/]+)[\'"]?\\]/'
|
||||
=> '\\1[substring(@\\2, string-length(@\\2) - string-length("\\3") + 1) = "\\3"]',
|
||||
];
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ download() {
|
|||
fi
|
||||
}
|
||||
|
||||
if [[ $WP_VERSION =~ [0-9]+\.[0-9]+(\.[0-9]+)? ]]; then
|
||||
if [[ $WP_VERSION =~ [0-9]+\.[0-9]+(\.[0-9]+)?(^-) ]]; then
|
||||
WP_TESTS_TAG="tags/$WP_VERSION"
|
||||
elif [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
|
||||
WP_TESTS_TAG="trunk"
|
||||
|
|
Loading…
Reference in New Issue