From 493f72d969eacc5de9e312b32e4d1bf64d3abff5 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 6 Jul 2023 09:05:53 +0200 Subject: [PATCH 01/11] Bump WP version requirement to 6.1 --- .github/workflows/tests-unit-php.yml | 2 +- phpcs.xml.dist | 2 +- readme.txt | 2 +- web-stories.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests-unit-php.yml b/.github/workflows/tests-unit-php.yml index 6505ddedd4b0..57d972299823 100644 --- a/.github/workflows/tests-unit-php.yml +++ b/.github/workflows/tests-unit-php.yml @@ -66,7 +66,7 @@ jobs: experimental: false - php: '7.4' - wp: '6.0' + wp: '6.1' experimental: false - php: '8.0' diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 3a2caf9f8eeb..0e6193b89444 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -1,6 +1,6 @@ - + error diff --git a/readme.txt b/readme.txt index bc09b4eab8ce..6f64f952bff6 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: google Tested up to: 6.2 -Requires at least: 6.0 +Requires at least: 6.1 Stable tag: V.V.V License: Apache-2.0 License URI: https://www.apache.org/licenses/LICENSE-2.0 diff --git a/web-stories.php b/web-stories.php index 8a5affeffa13..0d4fd6fcc434 100644 --- a/web-stories.php +++ b/web-stories.php @@ -10,7 +10,7 @@ * Author: Google * Author URI: https://opensource.google.com/ * Version: 1.34.0-alpha.0 - * Requires at least: 6.0 + * Requires at least: 6.1 * Requires PHP: 7.4 * Text Domain: web-stories * License: Apache License 2.0 From fcfd8f3cb32ad41c26c1ca5c88786a8c91218d8f Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 6 Jul 2023 09:10:38 +0200 Subject: [PATCH 02/11] Remove now obsolete custom cache priming --- includes/REST_API/Font_Controller.php | 6 ++-- .../REST_API/Publisher_Logos_Controller.php | 6 ++-- includes/REST_API/Stories_Controller.php | 28 ++------------- includes/REST_API/Stories_Lock_Controller.php | 5 +-- .../REST_API/Stories_Media_Controller.php | 36 ------------------- 5 files changed, 11 insertions(+), 70 deletions(-) diff --git a/includes/REST_API/Font_Controller.php b/includes/REST_API/Font_Controller.php index 06c08b2d874c..41c56d9aa18a 100644 --- a/includes/REST_API/Font_Controller.php +++ b/includes/REST_API/Font_Controller.php @@ -313,9 +313,9 @@ public function prepare_item_for_response( $item, $request ): WP_REST_Response { */ $response = rest_ensure_response( $data ); - // Make preparing links optional after WP 6.1 is min version. See https://github.com/WordPress/wordpress-develop/commit/b7bae6936a9ad54f85bad7e5a73a9d110190d927. - $links = $this->prepare_links( $post ); - $response->add_links( $links ); + if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { + $response->add_links( $this->prepare_links( $post ) ); + } if ( ! empty( $links['self']['href'] ) ) { $actions = $this->get_available_actions( $post, $request ); diff --git a/includes/REST_API/Publisher_Logos_Controller.php b/includes/REST_API/Publisher_Logos_Controller.php index 2a384909c4cb..baba323b308a 100644 --- a/includes/REST_API/Publisher_Logos_Controller.php +++ b/includes/REST_API/Publisher_Logos_Controller.php @@ -426,9 +426,9 @@ public function prepare_item_for_response( $post, $request ): WP_REST_Response { */ $response = rest_ensure_response( $data ); - // Make preparing links optional after WP 6.1 is min version. See https://github.com/WordPress/wordpress-develop/commit/b7bae6936a9ad54f85bad7e5a73a9d110190d927. - $links = $this->prepare_links( $post ); - $response->add_links( $links ); + if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { + $response->add_links( $this->prepare_links( $post ) ); + } return $response; } diff --git a/includes/REST_API/Stories_Controller.php b/includes/REST_API/Stories_Controller.php index 422291d62b80..d96bc3b92982 100644 --- a/includes/REST_API/Stories_Controller.php +++ b/includes/REST_API/Stories_Controller.php @@ -320,16 +320,11 @@ public function filter_posts_clauses( $clauses, WP_Query $query ): array { * @param WP_Post[] $posts Array of post objects. * @return WP_Post[] Array of posts. */ - public function prime_post_caches( $posts ): array { + public function prime_post_caches( array $posts ): array { $post_ids = $this->get_attached_post_ids( $posts ); if ( ! empty( $post_ids ) ) { _prime_post_caches( $post_ids ); } - // Should not be need once WP 6.1 is min required version. https://github.com/WordPress/wordpress-develop/commit/aff6a79b27d529b92e499018433d01d695457b09. - $user_ids = $this->get_attached_user_ids( $posts ); - if ( ! empty( $user_ids ) ) { - cache_users( $user_ids ); - } return $posts; } @@ -420,21 +415,6 @@ public function get_collection_params(): array { return $query_params; } - /** - * Get an array of attached post objects. - * - * @since 1.22.0 - * - * @param WP_Post[] $posts Array of post objects. - * @return int[] Array of post ids. - */ - protected function get_attached_user_ids( array $posts ): array { - $author_ids = wp_list_pluck( $posts, 'post_author' ); - $author_ids = array_map( 'absint', $author_ids ); - - return array_unique( array_filter( $author_ids ) ); - } - /** * Get an array of attached post objects. * @@ -444,11 +424,7 @@ protected function get_attached_user_ids( array $posts ): array { * @return int[] Array of post ids. */ protected function get_attached_post_ids( array $posts ): array { - // Post thumbnail should not be needed be primed once WP 6.1 is min version. See https://github.com/WordPress/wordpress-develop/commit/c2de42b9adec84397b4c3e5895809f01880a241a. - $thumb_ids = array_filter( array_map( 'get_post_thumbnail_id', $posts ) ); - $publisher_ids = array_filter( array_map( [ $this, 'get_publisher_logo_id' ], $posts ) ); - - return array_unique( [ ...$thumb_ids, ...$publisher_ids ] ); + return array_unique( array_filter( array_map( [ $this, 'get_publisher_logo_id' ], $posts ) ) ); } /** diff --git a/includes/REST_API/Stories_Lock_Controller.php b/includes/REST_API/Stories_Lock_Controller.php index fdd1c802f035..692af751bafd 100644 --- a/includes/REST_API/Stories_Lock_Controller.php +++ b/includes/REST_API/Stories_Lock_Controller.php @@ -344,8 +344,9 @@ public function prepare_item_for_response( $item, $request ) { */ $post_id = $request['id']; - // Make preparing links optional after WP 6.1 is min version. See https://github.com/WordPress/wordpress-develop/commit/b7bae6936a9ad54f85bad7e5a73a9d110190d927. - $response->add_links( $this->prepare_links( $item, $post_id ) ); + if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { + $response->add_links( $this->prepare_links( $item, $post_id ) ); + } $post_type = $this->story_post_type->get_slug(); diff --git a/includes/REST_API/Stories_Media_Controller.php b/includes/REST_API/Stories_Media_Controller.php index ea0a2ce5c9f6..c45da099254c 100644 --- a/includes/REST_API/Stories_Media_Controller.php +++ b/includes/REST_API/Stories_Media_Controller.php @@ -115,9 +115,7 @@ public static function get_registration_action_priority(): int { * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure. */ public function get_items( $request ) { - add_filter( 'posts_results', [ $this, 'prime_post_caches' ] ); $response = parent::get_items( $request ); - remove_filter( 'posts_results', [ $this, 'prime_post_caches' ] ); if ( $request['_web_stories_envelope'] && ! is_wp_error( $response ) ) { /** @@ -194,23 +192,6 @@ public function create_item( $request ) { return $response; } - /** - * Prime post caches for attachments and parents. - * - * @since 1.20.0 - * - * @param WP_Post[] $posts Array of post objects. - * @return mixed Array of posts. - */ - public function prime_post_caches( $posts ) { - $post_ids = $this->get_attached_post_ids( $posts ); - if ( ! empty( $post_ids ) ) { - _prime_post_caches( $post_ids ); - } - - return $posts; - } - /** * Retrieves the query params for the posts collection. * @@ -374,23 +355,6 @@ protected function process_post( $post_id, $parent_post, $original_id ) { return $this->get_post( $attachment_id ); } - /** - * Get an array of attached post objects. - * - * @since 1.20.0 - * - * @param WP_Post[] $posts Array of post objects. - * @return int[] Array of post ids. - */ - protected function get_attached_post_ids( array $posts ): array { - // Post thumbnail should not be need to be primed once WP 6.1 is min version. See https://github.com/WordPress/wordpress-develop/commit/c2de42b9adec84397b4c3e5895809f01880a241a. - $thumb_ids = array_filter( array_map( 'get_post_thumbnail_id', $posts ) ); - // Post parent should not be need to be primed once WP 6.1 is min version. See https://github.com/WordPress/wordpress-develop/commit/9a488568a027b3b84fbac7b4d25cf43f86dd7a13. - $parent_ids = array_filter( wp_list_pluck( $posts, 'post_parent' ) ); - - return array_unique( [ ...$thumb_ids, ...$parent_ids ] ); - } - /** * Filter request by allowed mime types. * From 235202ae5080843bdbc3be8b4f72ddd80949c0c5 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 6 Jul 2023 09:14:06 +0200 Subject: [PATCH 03/11] Remove tests --- .../REST_API/Stories_Media_Controller.php | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/tests/phpunit/integration/tests/REST_API/Stories_Media_Controller.php b/tests/phpunit/integration/tests/REST_API/Stories_Media_Controller.php index 961d46aad8f0..9d164a6f930a 100644 --- a/tests/phpunit/integration/tests/REST_API/Stories_Media_Controller.php +++ b/tests/phpunit/integration/tests/REST_API/Stories_Media_Controller.php @@ -188,44 +188,6 @@ public function test_get_items_filter_video(): void { $this->assertContains( 'video/mp4', $mime_type ); } - /** - * @covers ::get_attached_post_ids - */ - public function test_get_attached_post_ids(): void { - $posts = [ get_post( self::$mov_attachment_id ), get_post( self::$mp4_attachment_id ) ]; - - $result = $this->call_private_method( [ $this->controller, 'get_attached_post_ids' ], [ $posts ] ); - $this->assertEqualSets( [ self::$post_id, self::$poster_attachment_id ], $result ); - } - - /** - * @covers ::get_attached_post_ids - */ - public function test_get_attached_post_ids_empty(): void { - $posts = []; - - $result = $this->call_private_method( [ $this->controller, 'get_attached_post_ids' ], [ $posts ] ); - $this->assertEqualSets( [], $result ); - } - - /** - * @covers ::get_attached_post_ids - */ - public function test_get_attached_post_ids_on_parent(): void { - $poster_object = self::factory()->attachment->create_and_get( - [ - 'file' => DIR_TESTDATA . '/images/canola.jpg', - 'post_parent' => 0, - 'post_mime_type' => 'image/jpeg', - 'post_title' => 'Test Image', - ] - ); - $posts = [ $poster_object ]; - - $result = $this->call_private_method( [ $this->controller, 'get_attached_post_ids' ], [ $posts ] ); - $this->assertEqualSets( [], $result ); - } - /** * @covers ::create_item * @covers ::process_post From 3b44b512c2ce6888955c8def987a76cd8e15d59f Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 6 Jul 2023 09:16:21 +0200 Subject: [PATCH 04/11] Remove now unneeded `__experimentalGetSettings` usage --- packages/stories-block/src/block/components/storyCard.js | 9 +-------- .../src/block/components/storyPicker/storyPreview.js | 8 +------- .../stories-block/src/block/components/test/storyCard.js | 5 ----- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/packages/stories-block/src/block/components/storyCard.js b/packages/stories-block/src/block/components/storyCard.js index 638b6208742f..89e998a7bb60 100644 --- a/packages/stories-block/src/block/components/storyCard.js +++ b/packages/stories-block/src/block/components/storyCard.js @@ -25,12 +25,7 @@ import classNames from 'classnames'; */ import { RawHTML } from '@wordpress/element'; import { __, sprintf } from '@wordpress/i18n'; -import { - dateI18n, - format, - __experimentalGetSettings, - getSettings as __getSettings, -} from '@wordpress/date'; +import { dateI18n, format, getSettings } from '@wordpress/date'; function StoryCard({ title, @@ -49,8 +44,6 @@ function StoryCard({ }); const hasContentOverlay = isShowingTitle || isShowingAuthor || isShowingDate; - // @todo Remove this workaround when WP 6.1 is made minimum supported version. - const getSettings = __getSettings ? __getSettings : __experimentalGetSettings; const dateFormat = getSettings().formats.date; return ( diff --git a/packages/stories-block/src/block/components/storyPicker/storyPreview.js b/packages/stories-block/src/block/components/storyPicker/storyPreview.js index 409aa4b0633a..872989aa68ba 100644 --- a/packages/stories-block/src/block/components/storyPicker/storyPreview.js +++ b/packages/stories-block/src/block/components/storyPicker/storyPreview.js @@ -23,11 +23,7 @@ import PropTypes from 'prop-types'; * WordPress dependencies */ import { __, sprintf } from '@wordpress/i18n'; -import { - dateI18n, - __experimentalGetSettings, - getSettings as __getSettings, -} from '@wordpress/date'; +import { dateI18n, getSettings } from '@wordpress/date'; import { RawHTML, useMemo } from '@wordpress/element'; /** @@ -44,8 +40,6 @@ function StoryPreview({ removeSelectedStory = noop, isSelectable = true, }) { - // @todo Remove this workaround when WP 6.1 is made minimum supported version. - const getSettings = __getSettings ? __getSettings : __experimentalGetSettings; const dateFormat = getSettings().formats.date; const displayDate = dateI18n(dateFormat, story.created); const displayDateText = useMemo(() => { diff --git a/packages/stories-block/src/block/components/test/storyCard.js b/packages/stories-block/src/block/components/test/storyCard.js index 70e652d376c1..b6292ee7817c 100644 --- a/packages/stories-block/src/block/components/test/storyCard.js +++ b/packages/stories-block/src/block/components/test/storyCard.js @@ -28,11 +28,6 @@ jest.mock('@wordpress/date', () => ({ /* eslint-disable no-unused-vars */ format: (format, dateTo) => date, dateI18n: (format, dateTo) => 'November 18, 2020', - __experimentalGetSettings: () => ({ - formats: { - date: 'F j, Y', - }, - }), getSettings: () => ({ formats: { date: 'F j, Y', From 8f9428f5dc14b46314a4fba167a5b9d937cd3e6c Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 6 Jul 2023 09:17:22 +0200 Subject: [PATCH 05/11] Simplify `visitBlockWidgetScreen` helper --- .../src/visitBlockWidgetScreen.js | 39 ++++--------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/packages/e2e-test-utils/src/visitBlockWidgetScreen.js b/packages/e2e-test-utils/src/visitBlockWidgetScreen.js index cfbe774a33cd..44593b8b56dc 100644 --- a/packages/e2e-test-utils/src/visitBlockWidgetScreen.js +++ b/packages/e2e-test-utils/src/visitBlockWidgetScreen.js @@ -28,41 +28,18 @@ async function visitBlockWidgetScreen() { // Disable welcome guide if it is enabled. const isWelcomeGuideActive = await page.evaluate(() => { - // WordPress 6.0 - if (wp.data.select('core/preferences')) { - return Boolean( - wp.data - .select('core/preferences') - .get('core/edit-widgets', 'welcomeGuide') - ); - } - - // WordPress 5.9 - if (wp.data.select('core/interface')) { - return wp.data - .select('core/interface') - ?.isFeatureActive?.('core/edit-widgets', 'welcomeGuide'); - } - - return false; + return Boolean( + wp.data + .select('core/preferences') + .get('core/edit-widgets', 'welcomeGuide') + ); }); if (isWelcomeGuideActive) { await page.evaluate(() => { - // WordPress 6.0 - if (wp.data.select('core/preferences')) { - wp.data - .dispatch('core/preferences') - .toggle('core/edit-widgets', 'welcomeGuide'); - return; - } - - // WordPress 5.9 - if (wp.data.dispatch('core/interface')) { - wp.data - .dispatch('core/interface') - ?.toggleFeature?.('core/edit-widgets', 'welcomeGuide'); - } + wp.data + .dispatch('core/preferences') + .toggle('core/edit-widgets', 'welcomeGuide'); }); } } From d9a7e4727fee8b65e12a802e582a10e598423d95 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 6 Jul 2023 09:27:39 +0200 Subject: [PATCH 06/11] Fix tests --- .../tests/REST_API/Stories_Controller.php | 36 +------------------ 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/tests/phpunit/integration/tests/REST_API/Stories_Controller.php b/tests/phpunit/integration/tests/REST_API/Stories_Controller.php index 5901ee2adf70..4aab0ec6b1db 100644 --- a/tests/phpunit/integration/tests/REST_API/Stories_Controller.php +++ b/tests/phpunit/integration/tests/REST_API/Stories_Controller.php @@ -839,19 +839,16 @@ public function test_get_attached_post_ids(): void { ] ); - $attachment_id = self::factory()->attachment->create_upload_object( WEB_STORIES_TEST_DATA_DIR . '/attachment.jpg' ); $publisher_logo_id = self::factory()->attachment->create_upload_object( WEB_STORIES_TEST_DATA_DIR . '/attachment.jpg' ); - $this->assertNotWPError( $attachment_id ); $this->assertNotWPError( $publisher_logo_id ); - set_post_thumbnail( $original_id, $attachment_id ); update_post_meta( $original_id, Story_Post_Type::PUBLISHER_LOGO_META_KEY, $publisher_logo_id ); $posts = [ get_post( $original_id ) ]; $result = $this->call_private_method( [ $this->controller, 'get_attached_post_ids' ], [ $posts ] ); - $this->assertEqualSets( [ $attachment_id, $publisher_logo_id ], $result ); + $this->assertEqualSets( [ $publisher_logo_id ], $result ); } /** @@ -864,37 +861,6 @@ public function test_get_attached_post_ids_empty(): void { $this->assertEqualSets( [], $result ); } - - /** - * @covers ::get_attached_user_ids - */ - public function test_get_attached_user_ids(): void { - $original_id = self::factory()->post->create( - [ - 'post_type' => Story_Post_Type::POST_TYPE_SLUG, - 'post_title' => 'Example title', - 'post_excerpt' => 'Example excerpt', - 'post_author' => self::$user_id, - 'post_status' => 'private', - ] - ); - - $posts = [ get_post( $original_id ) ]; - - $result = $this->call_private_method( [ $this->controller, 'get_attached_user_ids' ], [ $posts ] ); - $this->assertEqualSets( [ self::$user_id ], $result ); - } - - /** - * @covers ::get_attached_user_ids - */ - public function test_get_attached_user_ids_empty(): void { - $posts = []; - - $result = $this->call_private_method( [ $this->controller, 'get_attached_post_ids' ], [ $posts ] ); - $this->assertEqualSets( [], $result ); - } - /** * @covers ::filter_posts_clauses */ From 7c45d5a885b7f9293cb82bb56c80a1f36641171e Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 6 Jul 2023 09:33:17 +0200 Subject: [PATCH 07/11] Code fixes --- includes/REST_API/Font_Controller.php | 16 +++++++++------- includes/REST_API/Stories_Lock_Controller.php | 3 +++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/includes/REST_API/Font_Controller.php b/includes/REST_API/Font_Controller.php index 41c56d9aa18a..8fab03893b19 100644 --- a/includes/REST_API/Font_Controller.php +++ b/includes/REST_API/Font_Controller.php @@ -314,19 +314,21 @@ public function prepare_item_for_response( $item, $request ): WP_REST_Response { $response = rest_ensure_response( $data ); if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) { - $response->add_links( $this->prepare_links( $post ) ); - } + $links = $this->prepare_links( $post ); + $response->add_links( $links ); - if ( ! empty( $links['self']['href'] ) ) { - $actions = $this->get_available_actions( $post, $request ); + if ( ! empty( $links['self']['href'] ) ) { + $actions = $this->get_available_actions( $post, $request ); - $self = $links['self']['href']; + $self = $links['self']['href']; - foreach ( $actions as $rel ) { - $response->add_link( $rel, $self ); + foreach ( $actions as $rel ) { + $response->add_link( $rel, $self ); + } } } + return $response; } diff --git a/includes/REST_API/Stories_Lock_Controller.php b/includes/REST_API/Stories_Lock_Controller.php index 692af751bafd..f2a4444e1029 100644 --- a/includes/REST_API/Stories_Lock_Controller.php +++ b/includes/REST_API/Stories_Lock_Controller.php @@ -261,6 +261,9 @@ public function delete_item_permissions_check( $request ) { /** * Prepares a single lock output for response. * + * @SuppressWarnings(PHPMD.NPathComplexity) + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * * @since 1.6.0 * * @param array{time?: int, user?: int}|false $item Lock value, default to false is not set. From aa779d3adbcc48086a050b83469188e027597006 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 6 Jul 2023 09:33:24 +0200 Subject: [PATCH 08/11] Composer update --- composer.lock | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/composer.lock b/composer.lock index 62e03820e72c..84c57cf905f7 100644 --- a/composer.lock +++ b/composer.lock @@ -2202,16 +2202,16 @@ }, { "name": "php-stubs/woocommerce-stubs", - "version": "v7.8.1", + "version": "v7.8.2", "source": { "type": "git", "url": "https://github.com/php-stubs/woocommerce-stubs.git", - "reference": "3873da8a5634404a83756017b70675dadfd07783" + "reference": "185d4281e97aa37d193334e5b8da007652f9d391" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-stubs/woocommerce-stubs/zipball/3873da8a5634404a83756017b70675dadfd07783", - "reference": "3873da8a5634404a83756017b70675dadfd07783", + "url": "https://api.github.com/repos/php-stubs/woocommerce-stubs/zipball/185d4281e97aa37d193334e5b8da007652f9d391", + "reference": "185d4281e97aa37d193334e5b8da007652f9d391", "shasum": "" }, "require": { @@ -2240,9 +2240,9 @@ ], "support": { "issues": "https://github.com/php-stubs/woocommerce-stubs/issues", - "source": "https://github.com/php-stubs/woocommerce-stubs/tree/v7.8.1" + "source": "https://github.com/php-stubs/woocommerce-stubs/tree/v7.8.2" }, - "time": "2023-06-27T20:03:06+00:00" + "time": "2023-07-03T21:07:37+00:00" }, { "name": "php-stubs/wordpress-stubs", @@ -3414,17 +3414,17 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "237f1821ece806de66072813d8cbe5bdbc8f3117" + "reference": "6ea60363203786a5dd5617c28e933280bb61f78b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/237f1821ece806de66072813d8cbe5bdbc8f3117", - "reference": "237f1821ece806de66072813d8cbe5bdbc8f3117", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/6ea60363203786a5dd5617c28e933280bb61f78b", + "reference": "6ea60363203786a5dd5617c28e933280bb61f78b", "shasum": "" }, "conflict": { "3f/pygmentize": "<1.2", - "admidio/admidio": "<4.2.8", + "admidio/admidio": "<4.2.9", "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", "aheinze/cockpit": "<=2.2.1", "akaunting/akaunting": "<2.1.13", @@ -3458,7 +3458,7 @@ "baserproject/basercms": "<4.7.5", "bassjobsen/bootstrap-3-typeahead": ">4.0.2", "bigfork/silverstripe-form-capture": ">=3,<3.1.1", - "billz/raspap-webgui": "<=2.6.6", + "billz/raspap-webgui": "<2.8.9", "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", "bmarshall511/wordpress_zero_spam": "<5.2.13", "bolt/bolt": "<3.7.2", @@ -3673,7 +3673,7 @@ "marcwillmann/turn": "<0.3.3", "matyhtf/framework": "<3.0.6", "mautic/core": "<4.3|= 2.13.1", - "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", + "mediawiki/core": "<=1.39.3", "mediawiki/matomo": "<2.4.3", "melisplatform/melis-asset-manager": "<5.0.1", "melisplatform/melis-cms": "<5.0.1", @@ -3687,7 +3687,7 @@ "modx/revolution": "<= 2.8.3-pl|<2.8", "mojo42/jirafeau": "<4.4", "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<4.2-rc.2|= 3.11", + "moodle/moodle": "<4.2-rc.2|= 4.2.0|= 3.11", "mustache/mustache": ">=2,<2.14.1", "namshi/jose": "<2.2", "neoan3-apps/template": "<1.1.1", @@ -3717,6 +3717,7 @@ "opencart/opencart": "<=3.0.3.7", "openid/php-openid": "<2.3", "openmage/magento-lts": "<19.4.22|>=20,<20.0.19", + "opensource-workshop/connect-cms": "<1.7.2|>=2,<2.3.2", "orchid/platform": ">=9,<9.4.4", "oro/commerce": ">=4.1,<5.0.6", "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", @@ -3795,7 +3796,7 @@ "shopware/core": "<=6.4.20", "shopware/platform": "<=6.4.20", "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<=5.7.14", + "shopware/shopware": "<=5.7.17", "shopware/storefront": "<=6.4.8.1", "shopxo/shopxo": "<2.2.6", "showdoc/showdoc": "<2.10.4", @@ -3891,7 +3892,7 @@ "thelia/thelia": ">=2.1-beta.1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", "thinkcmf/thinkcmf": "<=5.1.7", - "thorsten/phpmyfaq": "<3.2-beta", + "thorsten/phpmyfaq": "<3.2-beta.2", "tinymce/tinymce": "<5.10.7|>=6,<6.3.1", "tinymighty/wiki-seo": "<1.2.2", "titon/framework": ">=0,<9.9.99", @@ -3937,7 +3938,7 @@ "wintercms/winter": "<1.0.475|>=1.1,<1.1.10|>=1.2,<1.2.1", "woocommerce/woocommerce": "<6.6", "wp-cli/wp-cli": "<2.5", - "wp-graphql/wp-graphql": "<0.3.5", + "wp-graphql/wp-graphql": "<=1.14.5", "wpanel/wpanel4-cms": "<=4.3.1", "wpcloud/wp-stateless": "<3.2", "wwbn/avideo": "<=12.4", @@ -4022,7 +4023,7 @@ "type": "tidelift" } ], - "time": "2023-06-22T20:04:46+00:00" + "time": "2023-07-05T23:04:23+00:00" }, { "name": "sebastian/cli-parser", From 613c68c4386884d15bc976483f66802ae536f3d2 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 6 Jul 2023 09:37:00 +0200 Subject: [PATCH 09/11] PHPCS fix --- includes/REST_API/Stories_Lock_Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/REST_API/Stories_Lock_Controller.php b/includes/REST_API/Stories_Lock_Controller.php index f2a4444e1029..6a6de0c61782 100644 --- a/includes/REST_API/Stories_Lock_Controller.php +++ b/includes/REST_API/Stories_Lock_Controller.php @@ -270,7 +270,7 @@ public function delete_item_permissions_check( $request ) { * @param WP_REST_Request $request Request object. * @return WP_REST_Response|WP_Error Response object. */ - public function prepare_item_for_response( $item, $request ) { + public function prepare_item_for_response( $item, $request ) { // phpcs:ignore SlevomatCodingStandard.Complexity.Cognitive.ComplexityTooHigh $fields = $this->get_fields_for_response( $request ); $schema = $this->get_item_schema(); From 4c39c1c08d6b5a7974d4d22dfcd6b6bf2447eb6a Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Thu, 6 Jul 2023 09:40:37 +0200 Subject: [PATCH 10/11] Suppress warning --- includes/REST_API/Font_Controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/REST_API/Font_Controller.php b/includes/REST_API/Font_Controller.php index 8fab03893b19..66a3b49ee1dd 100644 --- a/includes/REST_API/Font_Controller.php +++ b/includes/REST_API/Font_Controller.php @@ -253,6 +253,8 @@ public function delete_item( $request ) { /** * Prepares a single post output for response. * + * @SuppressWarnings(PHPMD.NPathComplexity) + * * @since 1.16.0 * * @param WP_Post $item Post object. From 37a04b285479bee9f4aba9e4b2df07dc14b34d1a Mon Sep 17 00:00:00 2001 From: Anurag Vasanwala <75766877+AnuragVasanwala@users.noreply.github.com> Date: Wed, 12 Jul 2023 17:52:25 +0530 Subject: [PATCH 11/11] =?UTF-8?q?=F0=9F=8F=97=20Update=20`PHP`=20and=20`WP?= =?UTF-8?q?`=20version=20constants=20with=20latest=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/phpstan/bootstrap.php | 4 ++-- web-stories.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpstan/bootstrap.php b/tests/phpstan/bootstrap.php index a40e141e5c75..867431978411 100644 --- a/tests/phpstan/bootstrap.php +++ b/tests/phpstan/bootstrap.php @@ -10,8 +10,8 @@ define( 'WEBSTORIES_PLUGIN_DIR_PATH', dirname( WEBSTORIES_PLUGIN_FILE ) ); define( 'WEBSTORIES_PLUGIN_DIR_URL', 'https://example.com/wp-content/plugins/web-stories/' ); define( 'WEBSTORIES_CDN_URL', 'https://wp.stories.google/static/main/' ); -define( 'WEBSTORIES_MINIMUM_PHP_VERSION', '5.6' ); -define( 'WEBSTORIES_MINIMUM_WP_VERSION', '5.3' ); +define( 'WEBSTORIES_MINIMUM_PHP_VERSION', '7.4' ); +define( 'WEBSTORIES_MINIMUM_WP_VERSION', '6.1' ); define( 'WEBSTORIES_DEV_MODE', true ); define( 'WPCOM_IS_VIP_ENV', true ); diff --git a/web-stories.php b/web-stories.php index 0d4fd6fcc434..652bfd7975ea 100644 --- a/web-stories.php +++ b/web-stories.php @@ -47,7 +47,7 @@ define( 'WEBSTORIES_PLUGIN_DIR_PATH', plugin_dir_path( WEBSTORIES_PLUGIN_FILE ) ); define( 'WEBSTORIES_PLUGIN_DIR_URL', plugin_dir_url( WEBSTORIES_PLUGIN_FILE ) ); define( 'WEBSTORIES_MINIMUM_PHP_VERSION', '7.4' ); -define( 'WEBSTORIES_MINIMUM_WP_VERSION', '6.0' ); +define( 'WEBSTORIES_MINIMUM_WP_VERSION', '6.1' ); define( 'WEBSTORIES_CDN_URL', 'https://wp.stories.google/static/main' ); if ( ! defined( 'WEBSTORIES_DEV_MODE' ) ) {