From cbc0afb39bccc1bfea91695a847b4589cd6e223c Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Tue, 3 May 2022 15:51:42 -0700 Subject: [PATCH] Tests: Add `PHPUnit-Polyfills` to fix broken tests in GH workflow. e.g., https://github.com/WordPress/five-for-the-future/runs/5605920046?check_suite_focus=true --- composer.json | 3 ++- composer.lock | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 64 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 22a65e1..ba72415 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,8 @@ "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", "wp-coding-standards/wpcs": "2.3.*", "phpunit/phpunit": "^7", - "spatie/phpunit-watcher": "^1.23" + "spatie/phpunit-watcher": "^1.23", + "yoast/phpunit-polyfills": "^1.0" }, "scripts": { "lint": [ diff --git a/composer.lock b/composer.lock index 2126eb1..73199e1 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": "6e8a87c0d26c0783ada5f055bd60cc35", + "content-hash": "dcf7600c4c50a0a97630aa5f6b59e29d", "packages": [], "packages-dev": [ { @@ -3093,6 +3093,67 @@ }, "time": "2020-05-13T23:57:56+00:00" }, + { + "name": "yoast/phpunit-polyfills", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/Yoast/PHPUnit-Polyfills.git", + "reference": "5ea3536428944955f969bc764bbe09738e151ada" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/5ea3536428944955f969bc764bbe09738e151ada", + "reference": "5ea3536428944955f969bc764bbe09738e151ada", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + }, + "require-dev": { + "yoast/yoastcs": "^2.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev", + "dev-develop": "1.x-dev" + } + }, + "autoload": { + "files": [ + "phpunitpolyfills-autoload.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Team Yoast", + "email": "support@yoast.com", + "homepage": "https://yoast.com" + }, + { + "name": "Contributors", + "homepage": "https://github.com/Yoast/PHPUnit-Polyfills/graphs/contributors" + } + ], + "description": "Set of polyfills for changed PHPUnit functionality to allow for creating PHPUnit cross-version compatible tests", + "homepage": "https://github.com/Yoast/PHPUnit-Polyfills", + "keywords": [ + "phpunit", + "polyfill", + "testing" + ], + "support": { + "issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues", + "source": "https://github.com/Yoast/PHPUnit-Polyfills" + }, + "time": "2021-11-23T01:37:03+00:00" + }, { "name": "yosymfony/resource-watcher", "version": "v2.0.1",