Update WooCommerce Blocks package to 11.5.3 (#41269)

* Bump version in composer.json

* Update lock files

* changelog

* ensure the properties exist before accessing them

* add changelog file

* skip a test that is waiting for a fix from WooCommerce Blocks

* appease the linter

* remove commented out code

* use `empty` instead of `property_exists`

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>

* Update WooCommerce Blocks package to 11.5.1

* Update WooCommerce Blocks package to 11.5.2

* Undo test removal

* bump to woocommerce blocks 11.5.3

---------

Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
Co-authored-by: Leif Singer <git@singer.sh>
Co-authored-by: Leif Singer <leif@automattic.com>
Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
Co-authored-by: Luigi <gigitux@gmail.com>
This commit is contained in:
Mike Jolley 2023-11-08 23:19:21 +00:00 committed by GitHub
parent 3befeb4b2d
commit e0a4ee82c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 60 additions and 52 deletions

View File

@ -1072,16 +1072,16 @@
},
{
"name": "symfony/string",
"version": "v5.4.26",
"version": "v5.4.29",
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "1181fe9270e373537475e826873b5867b863883c"
"reference": "e41bdc93def20eaf3bfc1537c4e0a2b0680a152d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/1181fe9270e373537475e826873b5867b863883c",
"reference": "1181fe9270e373537475e826873b5867b863883c",
"url": "https://api.github.com/repos/symfony/string/zipball/e41bdc93def20eaf3bfc1537c4e0a2b0680a152d",
"reference": "e41bdc93def20eaf3bfc1537c4e0a2b0680a152d",
"shasum": ""
},
"require": {
@ -1138,7 +1138,7 @@
"utf8"
],
"support": {
"source": "https://github.com/symfony/string/tree/v5.4.26"
"source": "https://github.com/symfony/string/tree/v5.4.29"
},
"funding": [
{
@ -1154,7 +1154,7 @@
"type": "tidelift"
}
],
"time": "2023-06-28T12:46:07+00:00"
"time": "2023-09-13T11:47:41+00:00"
}
],
"aliases": [],
@ -1169,5 +1169,5 @@
"platform-overrides": {
"php": "7.3"
},
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.6.0"
}

View File

@ -258,16 +258,16 @@
},
{
"name": "sirbrillig/phpcs-changed",
"version": "v2.11.3",
"version": "v2.11.4",
"source": {
"type": "git",
"url": "https://github.com/sirbrillig/phpcs-changed.git",
"reference": "9fc94ed9adee571b7e30da4467b1d41073a9dd1c"
"reference": "acc946731ec65053e49cb0d3185c8ffe74895f93"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sirbrillig/phpcs-changed/zipball/9fc94ed9adee571b7e30da4467b1d41073a9dd1c",
"reference": "9fc94ed9adee571b7e30da4467b1d41073a9dd1c",
"url": "https://api.github.com/repos/sirbrillig/phpcs-changed/zipball/acc946731ec65053e49cb0d3185c8ffe74895f93",
"reference": "acc946731ec65053e49cb0d3185c8ffe74895f93",
"shasum": ""
},
"require": {
@ -306,9 +306,9 @@
"description": "Run phpcs on files, but only report warnings/errors from lines which were changed.",
"support": {
"issues": "https://github.com/sirbrillig/phpcs-changed/issues",
"source": "https://github.com/sirbrillig/phpcs-changed/tree/v2.11.3"
"source": "https://github.com/sirbrillig/phpcs-changed/tree/v2.11.4"
},
"time": "2023-08-24T23:27:01+00:00"
"time": "2023-09-29T21:27:51+00:00"
},
{
"name": "squizlabs/php_codesniffer",
@ -473,5 +473,5 @@
"platform-overrides": {
"php": "7.2"
},
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.6.0"
}

View File

@ -1711,5 +1711,5 @@
"platform-overrides": {
"php": "7.0"
},
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.6.0"
}

View File

@ -492,16 +492,16 @@
},
{
"name": "wp-cli/php-cli-tools",
"version": "v0.11.20",
"version": "v0.11.21",
"source": {
"type": "git",
"url": "https://github.com/wp-cli/php-cli-tools.git",
"reference": "d788a2c79e02f2f735fbb2b9a53db94d0e1bca4f"
"reference": "b3457a8d60cd0b1c48cab76ad95df136d266f0b6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wp-cli/php-cli-tools/zipball/d788a2c79e02f2f735fbb2b9a53db94d0e1bca4f",
"reference": "d788a2c79e02f2f735fbb2b9a53db94d0e1bca4f",
"url": "https://api.github.com/repos/wp-cli/php-cli-tools/zipball/b3457a8d60cd0b1c48cab76ad95df136d266f0b6",
"reference": "b3457a8d60cd0b1c48cab76ad95df136d266f0b6",
"shasum": ""
},
"require": {
@ -549,22 +549,22 @@
],
"support": {
"issues": "https://github.com/wp-cli/php-cli-tools/issues",
"source": "https://github.com/wp-cli/php-cli-tools/tree/v0.11.20"
"source": "https://github.com/wp-cli/php-cli-tools/tree/v0.11.21"
},
"time": "2023-09-01T12:21:35+00:00"
"time": "2023-09-29T15:28:10+00:00"
},
{
"name": "wp-cli/wp-cli",
"version": "v2.8.1",
"version": "v2.9.0",
"source": {
"type": "git",
"url": "https://github.com/wp-cli/wp-cli.git",
"reference": "5dd2340b9a01c3cfdbaf5e93a140759fdd190eee"
"reference": "8a3befba2d947fbf5cc6d1941edf2dd99da4d4b7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/5dd2340b9a01c3cfdbaf5e93a140759fdd190eee",
"reference": "5dd2340b9a01c3cfdbaf5e93a140759fdd190eee",
"url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/8a3befba2d947fbf5cc6d1941edf2dd99da4d4b7",
"reference": "8a3befba2d947fbf5cc6d1941edf2dd99da4d4b7",
"shasum": ""
},
"require": {
@ -581,7 +581,7 @@
"wp-cli/entity-command": "^1.2 || ^2",
"wp-cli/extension-command": "^1.1 || ^2",
"wp-cli/package-command": "^1 || ^2",
"wp-cli/wp-cli-tests": "^3.1.6"
"wp-cli/wp-cli-tests": "^4.0.1"
},
"suggest": {
"ext-readline": "Include for a better --prompt implementation",
@ -621,7 +621,7 @@
"issues": "https://github.com/wp-cli/wp-cli/issues",
"source": "https://github.com/wp-cli/wp-cli"
},
"time": "2023-06-05T06:55:55+00:00"
"time": "2023-10-25T09:06:37+00:00"
}
],
"aliases": [],
@ -634,5 +634,5 @@
"platform-overrides": {
"php": "7.0"
},
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.6.0"
}

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Ensure some wpdb properties exist before accessing them.

View File

@ -0,0 +1,4 @@
Significance: minor
Type: update
Update WooCommerce Blocks to 11.5.3

View File

@ -23,7 +23,7 @@
"maxmind-db/reader": "^1.11",
"pelago/emogrifier": "^6.0",
"woocommerce/action-scheduler": "3.6.4",
"woocommerce/woocommerce-blocks": "11.4.3"
"woocommerce/woocommerce-blocks": "11.5.3"
},
"require-dev": {
"automattic/jetpack-changelogger": "^3.3.0",

View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "6a5e201fcdc16a409789b0d63336db64",
"content-hash": "80d3e18e8cb8badab9416cc82d074b37",
"packages": [
{
"name": "automattic/jetpack-a8c-mc-stats",
@ -1004,16 +1004,16 @@
},
{
"name": "woocommerce/woocommerce-blocks",
"version": "11.4.3",
"version": "11.5.3",
"source": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce-blocks.git",
"reference": "6a1848b9ba5277135327024262c080130641d5f0"
"reference": "21e398e5e53d38e7a8bb464192160d3b103b2004"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/woocommerce/woocommerce-blocks/zipball/6a1848b9ba5277135327024262c080130641d5f0",
"reference": "6a1848b9ba5277135327024262c080130641d5f0",
"url": "https://api.github.com/repos/woocommerce/woocommerce-blocks/zipball/21e398e5e53d38e7a8bb464192160d3b103b2004",
"reference": "21e398e5e53d38e7a8bb464192160d3b103b2004",
"shasum": ""
},
"require": {
@ -1029,7 +1029,7 @@
"nikic/php-parser": "4.16.0 as 1.0.0",
"phpdocumentor/reflection": "3.0.1",
"phpunit/php-code-coverage": "9.2.29",
"phpunit/phpunit": "9.6.10",
"phpunit/phpunit": "9.6.13",
"woocommerce/woocommerce-sniffs": "0.1.3",
"wp-hooks/generator": "0.9.0",
"yoast/phpunit-polyfills": "2.0.0"
@ -1064,9 +1064,9 @@
],
"support": {
"issues": "https://github.com/woocommerce/woocommerce-blocks/issues",
"source": "https://github.com/woocommerce/woocommerce-blocks/tree/v11.4.3"
"source": "https://github.com/woocommerce/woocommerce-blocks/tree/v11.5.3"
},
"time": "2023-10-31T15:11:22+00:00"
"time": "2023-11-08T21:48:50+00:00"
}
],
"packages-dev": [
@ -3949,5 +3949,5 @@
"platform-overrides": {
"php": "7.4"
},
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.6.0"
}

View File

@ -2532,7 +2532,7 @@ function wc_selected( $value, $options ) {
function wc_get_server_database_version() {
global $wpdb;
if ( empty( $wpdb->is_mysql ) || ! $wpdb->use_mysqli ) {
if ( empty( $wpdb->is_mysql ) || empty( $wpdb->use_mysqli ) ) {
return array(
'string' => '',
'number' => '',

View File

@ -21,7 +21,7 @@ class BlockTemplatesControllerTest extends WC_REST_Unit_Test_Case {
*/
protected $block_template_registry;
/**
/**
* Block templates controller.
*
* @var BlockTemplatesController
@ -32,19 +32,19 @@ class BlockTemplatesControllerTest extends WC_REST_Unit_Test_Case {
* Runs before suite initialization.
*/
public static function setUpBeforeClass(): void {
parent::setUpBeforeClass();
parent::setUpBeforeClass();
wc_get_container()->get( BlockTemplatesController::class );
$block_template_registry = wc_get_container()->get( BlockTemplateRegistry::class );
$block_template_registry->register( new CustomBlockTemplate() );
}
/**
/**
* Runs before each test.
*/
public function setUp(): void {
parent::setUp();
parent::setUp();
$admin_user = wp_insert_user(
$admin_user = wp_insert_user(
array(
'user_login' => uniqid(),
'role' => 'administrator',
@ -59,7 +59,7 @@ class BlockTemplatesControllerTest extends WC_REST_Unit_Test_Case {
*/
public function test_get_template_by_area() {
$request = new \WP_REST_Request( 'GET', '/wp/v2/templates' );
$request->set_param( 'area', 'test-area' );
$request->set_param( 'area', 'test-area' );
$response = $this->server->dispatch( $request );
$data = $response->get_data();
@ -68,7 +68,7 @@ class BlockTemplatesControllerTest extends WC_REST_Unit_Test_Case {
$this->assertEquals( 'custom-block-template', $data[0]['id'] );
}
/**
/**
* Test that getting default templates works as expected and does not show the custom templates.
*/
public function test_get_template_without_area() {
@ -76,12 +76,12 @@ class BlockTemplatesControllerTest extends WC_REST_Unit_Test_Case {
$response = $this->server->dispatch( $request );
$data = $response->get_data();
$found_registery_template = false;
foreach ( $data as $template ) {
if ( $template['id'] === 'custom-block-template' ) {
$found_registery_template = true;
}
}
$found_registery_template = false;
foreach ( $data as $template ) {
if ( 'custom-block-template' === $template['id'] ) {
$found_registery_template = true;
}
}
$this->assertEquals( 200, $response->get_status() );
$this->assertFalse( $found_registery_template );