From 630925b1047b4f7c40611762553a7615cfd560df Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Thu, 5 Dec 2024 10:57:42 -0600 Subject: [PATCH 1/5] bump WordPress "tested up to" version 6.7 Co-Authored-By: Sumit Bagthariya <67687255+qasumitbagthariya@users.noreply.github.com> --- .github/workflows/cypress.yml | 4 ++-- README.md | 4 ++-- distributor.php | 6 +++--- phpcs.xml | 2 +- readme.txt | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 2ab03c5d0..6aac18581 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -47,11 +47,11 @@ jobs: - {name: 'PHP Default', version: null} core: - {name: 'WP stable', version: 'latest'} - - {name: 'WP 6.4', version: 'WordPress/WordPress#6.4'} + - {name: 'WP minimum', version: 'WordPress/WordPress#6.5'} - {name: 'WP trunk', version: 'WordPress/WordPress#master'} include: - php: {name: 'PHP 7.4', version: '7.4'} - core: {name: 'WP 6.4', version: 'WordPress/WordPress#6.4'} + core: {name: 'WP minimum', version: 'WordPress/WordPress#6.5'} - php: {name: 'PHP 8.1', version: '8.1'} core: {name: 'WP stable', version: 'latest'} steps: diff --git a/README.md b/README.md index 83670847e..7ee53b8f4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Distributor](https://github.com/10up/distributor/blob/develop/assets/img/banner-1544x500.png) -[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/distributor.svg)](https://github.com/10up/distributor/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v6.6%20tested-success.svg) [![License](https://img.shields.io/github/license/10up/distributor.svg)](https://github.com/10up/distributor/blob/develop/LICENSE.md) [![Dependency Review](https://github.com/10up/distributor/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/dependency-review.yml) [![WordPress Playground Demo](https://img.shields.io/badge/Playground_Demo-8A2BE2?logo=wordpress&logoColor=FFFFFF&labelColor=3858E9&color=3858E9)](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/10up/distributor/refs/heads/develop/docs/blueprint.json) +[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/distributor.svg)](https://github.com/10up/distributor/releases/latest) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v6.7%20tested-success.svg) [![License](https://img.shields.io/github/license/10up/distributor.svg)](https://github.com/10up/distributor/blob/develop/LICENSE.md) [![Dependency Review](https://github.com/10up/distributor/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/dependency-review.yml) [![WordPress Playground Demo](https://img.shields.io/badge/Playground_Demo-8A2BE2?logo=wordpress&logoColor=FFFFFF&labelColor=3858E9&color=3858E9)](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/10up/distributor/refs/heads/develop/docs/blueprint.json) [![E2E Tests](https://github.com/10up/distributor/actions/workflows/cypress.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/cypress.yml) [![PHPUnit Tests](https://github.com/10up/distributor/actions/workflows/test.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/test.yml) [![Linting](https://github.com/10up/distributor/actions/workflows/lint.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/lint.yml) [![Code scanning](https://github.com/10up/distributor/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/10up/distributor/actions/workflows/codeql-analysis.yml) > Distributor is a WordPress plugin that makes it easy to distribute and reuse content across your websites — whether in a single multisite or across the web. @@ -38,7 +38,7 @@ Distributor is built with the same extensible approach as WordPress itself, with ## Requirements * PHP 7.4+ -* [WordPress](http://wordpress.org) 6.4+ +* [WordPress](http://wordpress.org) 6.5+ * External connections require HTTP Basic Authentication or [WordPress.com OAuth2](https://developer.wordpress.com/docs/oauth2/) (must be on [WordPress VIP](https://wpvip.com/)) be set up on the remote website. For Basic Auth, we recommend using [Application Passwords](https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/#Getting-Credentials) built in to WordPress. * For external connections, Distributor needs to be installed on BOTH sides of the connection. * Version 2.0.0 of Distributor requires version 2.0.0 on BOTH sides of all connections. For other version 2.0.0 specific changes, please see our [migration guide](https://10up.github.io/distributor/tutorial-migration-guide-version-1-to-version-2.html). diff --git a/distributor.php b/distributor.php index c26713484..040035f98 100644 --- a/distributor.php +++ b/distributor.php @@ -5,7 +5,7 @@ * Update URI: https://distributorplugin.com * Description: Makes it easy to distribute and reuse content across your websites, whether inside of a multisite or across the web. * Version: 2.0.6 - * Requires at least: 6.4 + * Requires at least: 6.5 * Requires PHP: 7.4 * Author: 10up Inc. * Author URI: https://distributorplugin.com @@ -50,7 +50,7 @@ * @return string Minimum version required. */ function minimum_wp_requirement() { - return '6.4'; + return '6.5'; } /** @@ -88,7 +88,7 @@ function site_meets_php_requirements() { } /** - * Require PHP 7.4+, WP 6.4+ - throw an error if the plugin is activated on an older version. + * Require PHP 7.4+, WP 6.5+ - throw an error if the plugin is activated on an older version. */ register_activation_hook( __FILE__, diff --git a/phpcs.xml b/phpcs.xml index 2e60d642b..ec41310a3 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -28,7 +28,7 @@ - + /vendor/* diff --git a/readme.txt b/readme.txt index c268ccf68..91d385055 100644 --- a/readme.txt +++ b/readme.txt @@ -1,7 +1,7 @@ === Distributor === Contributors: 10up Tags: content, distribution, syndication, management -Tested up to: 6.6 +Tested up to: 6.7 Stable tag: 2.0.6 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html From 40b4459567384050983cbfeb8278107d711826ad Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Mon, 20 Jan 2025 16:23:26 +0530 Subject: [PATCH 2/5] Fix composer install. --- .github/workflows/cypress.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 6aac18581..d00ee6b21 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -78,6 +78,26 @@ jobs: - name: Install dependencies run: npm install + - name: Get composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + + - name: Cache dependencies + id: cache-composer + uses: actions/cache@v4 + env: + cache-name: cache-composer + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }} + + - name: Set PHP version + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php.version }} + coverage: none + tools: composer:v2 + - name: Composer install run: composer install From 62332e5275bce915a848e1937d0877250dfe1051 Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Mon, 20 Jan 2025 17:15:47 +0530 Subject: [PATCH 3/5] Update phpunit version to fix composer install in PHP 8.3 --- composer.json | 2 +- composer.lock | 303 ++------------------------------------------------ 2 files changed, 8 insertions(+), 297 deletions(-) diff --git a/composer.json b/composer.json index f371bd3cf..879431d63 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "require-dev": { "10up/phpcs-composer": "dev-master", "10up/wp_mock": "~0.4", - "phpunit/phpunit": ">=7.0 <9.0", + "phpunit/phpunit": "^8.5", "yoast/phpunit-polyfills": "^1.0", "automattic/vipwpcs": "^2.3" }, diff --git a/composer.lock b/composer.lock index 3a19644d9..4a9a70b9e 100644 --- a/composer.lock +++ b/composer.lock @@ -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": "9b7761af5ca3d71ef2395537f531b6ab", + "content-hash": "78b19f568772d5aec5a2a316aa1e4551", "packages": [ { "name": "yahnis-elsts/plugin-update-checker", @@ -849,233 +849,6 @@ }, "time": "2022-10-24T09:00:36+00:00" }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "time": "2022-03-15T21:29:03+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, { "name": "phpunit/php-code-coverage", "version": "7.0.15", @@ -1371,16 +1144,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.26", + "version": "8.5.29", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ef117c59fc4c54a979021b26d08a3373e386606d" + "reference": "e8c563c47a9a303662955518ca532b022b337f4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ef117c59fc4c54a979021b26d08a3373e386606d", - "reference": "ef117c59fc4c54a979021b26d08a3373e386606d", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/e8c563c47a9a303662955518ca532b022b337f4d", + "reference": "e8c563c47a9a303662955518ca532b022b337f4d", "shasum": "" }, "require": { @@ -1395,7 +1168,6 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.2", - "phpspec/prophecy": "^1.10.3", "phpunit/php-code-coverage": "^7.0.12", "phpunit/php-file-iterator": "^2.0.4", "phpunit/php-text-template": "^1.2.1", @@ -1410,9 +1182,6 @@ "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "require-dev": { - "ext-pdo": "*" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", @@ -1452,7 +1221,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.26" + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.29" }, "funding": [ { @@ -1464,7 +1233,7 @@ "type": "github" } ], - "time": "2022-04-01T12:34:39+00:00" + "time": "2022-08-22T13:59:39+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -2350,64 +2119,6 @@ ], "time": "2021-07-28T10:34:58+00:00" }, - { - "name": "webmozart/assert", - "version": "1.11.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", - "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "php": "^7.2 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.11.0" - }, - "time": "2022-06-03T18:03:27+00:00" - }, { "name": "wp-coding-standards/wpcs", "version": "2.3.0", From f1861adb33f07414513fa3cfa2cb7c423ea42e9d Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Mon, 20 Jan 2025 18:04:37 +0530 Subject: [PATCH 4/5] E2E: Fix embed block url field locator. --- tests/cypress/support/commands.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/support/commands.js b/tests/cypress/support/commands.js index 75633839f..25611b0b8 100644 --- a/tests/cypress/support/commands.js +++ b/tests/cypress/support/commands.js @@ -277,7 +277,7 @@ Cypress.Commands.add( 'createTweetOEmbedPost', ( tweetUrl ) => { beforeSave: () => { cy.insertBlock( 'core/embed/twitter', 'Twitter' ).then( ( id ) => { cy.getBlockEditor() - .find( `#${ id } input[aria-label="Twitter URL"]` ) + .find( `#${ id } input[type="url"]` ) .click() .type( tweetUrl ); cy.getBlockEditor() From 4e0f9e86c2d606a471ede77610e05b4d0925bc0c Mon Sep 17 00:00:00 2001 From: Dharmesh Patel Date: Mon, 20 Jan 2025 19:19:07 +0530 Subject: [PATCH 5/5] E2E: Add retry to temporary deal with flaky test. --- tests/cypress/config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/cypress/config.js b/tests/cypress/config.js index 1d34e7abf..51d8aed0d 100644 --- a/tests/cypress/config.js +++ b/tests/cypress/config.js @@ -17,6 +17,10 @@ module.exports = defineConfig( { html: false, json: true, }, + retries: { + runMode: 2, + openMode: 0, + }, e2e: { setupNodeEvents( on, config ) { return setBaseUrl( on, config );