From 8960b9bff1bd65ae5ca159433c082388e549944e Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 1 Apr 2022 10:29:24 -0700 Subject: [PATCH] Merge pull request #7020 from ampproject/upgrade/amp-toolbox-php-0110 Upgrade amp-toolbox-php to 0.11.0 --- composer.json | 2 +- composer.lock | 18 +++++++++--------- .../php/test-class-amp-core-block-handler.php | 3 +++ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 47110089b55..4d8112acf14 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "ext-json": "*", "ext-libxml": "*", "ext-spl": "*", - "ampproject/amp-toolbox": "0.10.0", + "ampproject/amp-toolbox": "0.11.0", "cweagans/composer-patches": "~1.0", "fasterimage/fasterimage": "1.5.0", "sabberworm/php-css-parser": "8.4.0" diff --git a/composer.lock b/composer.lock index 8cb23d1f551..70ca9364fc0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "dba2f76a32254a32db4d3b55c26e8707", + "content-hash": "165b806e11f4e286cf8de7408bbc9844", "packages": [ { "name": "ampproject/amp-toolbox", - "version": "0.10.0", + "version": "0.11.0", "source": { "type": "git", "url": "https://github.com/ampproject/amp-toolbox-php.git", - "reference": "be395b7ecee168318a6f5048e875a4c0d1eb52bf" + "reference": "26efcaa5350b8998433d63bc6770dc6818971fd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ampproject/amp-toolbox-php/zipball/be395b7ecee168318a6f5048e875a4c0d1eb52bf", - "reference": "be395b7ecee168318a6f5048e875a4c0d1eb52bf", + "url": "https://api.github.com/repos/ampproject/amp-toolbox-php/zipball/26efcaa5350b8998433d63bc6770dc6818971fd2", + "reference": "26efcaa5350b8998433d63bc6770dc6818971fd2", "shasum": "" }, "require": { @@ -30,14 +30,14 @@ }, "require-dev": { "civicrm/composer-downloads-plugin": "^2.1 || ^3.0", - "dealerdirect/phpcodesniffer-composer-installer": "0.7.1", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", "ext-zip": "*", "mikey179/vfsstream": "^1.6", "php-parallel-lint/php-parallel-lint": "^1.2", "phpcompatibility/php-compatibility": "^9", "phpunit/phpunit": "^5 || ^6 || ^7 || ^8 || ^9", "roave/security-advisories": "dev-master", - "sirbrillig/phpcs-variable-analysis": "2.11.2", + "sirbrillig/phpcs-variable-analysis": "^2.11.2", "squizlabs/php_codesniffer": "^3", "wp-coding-standards/wpcs": "^2.3", "yoast/phpunit-polyfills": "^0.2.0 || ^1.0.0" @@ -76,9 +76,9 @@ "description": "A collection of AMP tools making it easier to publish and host AMP pages with PHP.", "support": { "issues": "https://github.com/ampproject/amp-toolbox-php/issues", - "source": "https://github.com/ampproject/amp-toolbox-php/tree/0.10.0" + "source": "https://github.com/ampproject/amp-toolbox-php/tree/0.11.0" }, - "time": "2022-01-07T17:03:36+00:00" + "time": "2022-04-01T07:16:35+00:00" }, { "name": "cweagans/composer-patches", diff --git a/tests/php/test-class-amp-core-block-handler.php b/tests/php/test-class-amp-core-block-handler.php index 0e99c4f0eab..3da340b2ece 100644 --- a/tests/php/test-class-amp-core-block-handler.php +++ b/tests/php/test-class-amp-core-block-handler.php @@ -351,6 +351,9 @@ public function test_ampify_gallery_block( $original_block_content, $expected_bl $expected = preg_replace( '/ data-id="\d+"/', '', $expected ); $actual = preg_replace( '/ data-id="\d+"/', '', $actual ); + // Remove classes added in Gutenberg 12.9. + $actual = preg_replace( '/wp-container-\w+ wp-block-gallery-\w+ /', '', $actual ); + $this->assertEqualMarkup( $expected, $actual ); }