diff --git a/.github/workflows/test-php.yml b/.github/workflows/test-php.yml
index bba75f0..e465cd8 100644
--- a/.github/workflows/test-php.yml
+++ b/.github/workflows/test-php.yml
@@ -47,7 +47,7 @@ jobs:
- name: Setup PHP version
uses: shivammathur/setup-php@v2
with:
- php-version: '7.1'
+ php-version: '7.2'
extensions: simplexml, mysql
tools: phpunit-polyfills
- name: Checkout source code
@@ -69,4 +69,4 @@ jobs:
- name: Install composer
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run phpunit
- run: phpunit
\ No newline at end of file
+ run: composer run-script phpunit
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index b29633a..992a030 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@ assets/js/build
languages/riverbank.pot
.DS_Store
+.phpunit.result.cache
\ No newline at end of file
diff --git a/assets/js/src/design-pack-notice.js b/assets/js/src/design-pack-notice.js
index 386d59e..bca5088 100644
--- a/assets/js/src/design-pack-notice.js
+++ b/assets/js/src/design-pack-notice.js
@@ -2,7 +2,9 @@ import { createRoot } from '@wordpress/element';
import DesignPackNotice from './components/DesignPackNotice';
-const container = document.getElementById( 'riverbank-design-pack-notice' );
+const container = document.createElement( 'div' );
+container.id = 'riverbank-design-pack-notice';
+document.body.appendChild( container );
if ( container ) {
createRoot( container ).render( );
diff --git a/composer.json b/composer.json
index af8d5e6..4d1823c 100644
--- a/composer.json
+++ b/composer.json
@@ -51,6 +51,7 @@
"format": "phpcbf --standard=phpcs.xml --report-summary --report-source -s --runtime-set testVersion 7.0- ",
"phpcs": "phpcs --standard=phpcs.xml -s --runtime-set testVersion 7.0-",
"lint": "composer run-script phpcs",
- "phpcs-i": "phpcs -i"
+ "phpcs-i": "phpcs -i",
+ "phpunit": "phpunit"
}
}
diff --git a/composer.lock b/composer.lock
index 3039e62..8d6fbc7 100644
--- a/composer.lock
+++ b/composer.lock
@@ -8,16 +8,16 @@
"packages": [
{
"name": "codeinwp/themeisle-sdk",
- "version": "3.3.14",
+ "version": "3.3.29",
"source": {
"type": "git",
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
- "reference": "662952078c57b12e4d3af9bc98ef847ea3500206"
+ "reference": "4d63bc81ec0357c8675dac1e35511fd81104605d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/662952078c57b12e4d3af9bc98ef847ea3500206",
- "reference": "662952078c57b12e4d3af9bc98ef847ea3500206",
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/4d63bc81ec0357c8675dac1e35511fd81104605d",
+ "reference": "4d63bc81ec0357c8675dac1e35511fd81104605d",
"shasum": ""
},
"require-dev": {
@@ -42,9 +42,9 @@
],
"support": {
"issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
- "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.14"
+ "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.29"
},
- "time": "2024-02-27T17:30:04+00:00"
+ "time": "2024-08-21T08:03:45+00:00"
}
],
"packages-dev": [
@@ -1271,16 +1271,16 @@
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "1.0.2",
+ "version": "1.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619"
+ "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619",
- "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54",
+ "reference": "92a1a52e86d34cde6caa54f1b5ffa9fda18e5d54",
"shasum": ""
},
"require": {
@@ -1314,7 +1314,7 @@
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
- "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2"
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.3"
},
"funding": [
{
@@ -1322,7 +1322,7 @@
"type": "github"
}
],
- "time": "2020-11-30T08:15:22+00:00"
+ "time": "2024-03-01T13:45:45+00:00"
},
{
"name": "sebastian/comparator",
@@ -1636,16 +1636,16 @@
},
{
"name": "sebastian/object-enumerator",
- "version": "3.0.4",
+ "version": "3.0.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2"
+ "reference": "ac5b293dba925751b808e02923399fb44ff0d541"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
- "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/ac5b293dba925751b808e02923399fb44ff0d541",
+ "reference": "ac5b293dba925751b808e02923399fb44ff0d541",
"shasum": ""
},
"require": {
@@ -1681,7 +1681,7 @@
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
- "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4"
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.5"
},
"funding": [
{
@@ -1689,20 +1689,20 @@
"type": "github"
}
],
- "time": "2020-11-30T07:40:27+00:00"
+ "time": "2024-03-01T13:54:02+00:00"
},
{
"name": "sebastian/object-reflector",
- "version": "1.1.2",
+ "version": "1.1.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d"
+ "reference": "1d439c229e61f244ff1f211e5c99737f90c67def"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
- "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/1d439c229e61f244ff1f211e5c99737f90c67def",
+ "reference": "1d439c229e61f244ff1f211e5c99737f90c67def",
"shasum": ""
},
"require": {
@@ -1736,7 +1736,7 @@
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-reflector/issues",
- "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2"
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.3"
},
"funding": [
{
@@ -1744,20 +1744,20 @@
"type": "github"
}
],
- "time": "2020-11-30T07:37:18+00:00"
+ "time": "2024-03-01T13:56:04+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "3.0.1",
+ "version": "3.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb"
+ "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb",
- "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/9bfd3c6f1f08c026f542032dfb42813544f7d64c",
+ "reference": "9bfd3c6f1f08c026f542032dfb42813544f7d64c",
"shasum": ""
},
"require": {
@@ -1799,7 +1799,7 @@
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
- "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1"
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.2"
},
"funding": [
{
@@ -1807,7 +1807,7 @@
"type": "github"
}
],
- "time": "2020-11-30T07:34:24+00:00"
+ "time": "2024-03-01T14:07:30+00:00"
},
{
"name": "sebastian/resource-operations",
@@ -1962,16 +1962,16 @@
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.9.0",
+ "version": "3.10.2",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
- "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b"
+ "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/d63cee4890a8afaf86a22e51ad4d97c91dd4579b",
- "reference": "d63cee4890a8afaf86a22e51ad4d97c91dd4579b",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017",
+ "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017",
"shasum": ""
},
"require": {
@@ -2038,7 +2038,7 @@
"type": "open_collective"
}
],
- "time": "2024-02-16T15:06:51+00:00"
+ "time": "2024-07-21T23:26:44+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -2343,16 +2343,16 @@
},
{
"name": "yoast/phpunit-polyfills",
- "version": "2.0.0",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/Yoast/PHPUnit-Polyfills.git",
- "reference": "c758753e8f9dac251fed396a73c8305af3f17922"
+ "reference": "4a088f125c970d6d6ea52c927f96fe39b330d0f1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/c758753e8f9dac251fed396a73c8305af3f17922",
- "reference": "c758753e8f9dac251fed396a73c8305af3f17922",
+ "url": "https://api.github.com/repos/Yoast/PHPUnit-Polyfills/zipball/4a088f125c970d6d6ea52c927f96fe39b330d0f1",
+ "reference": "4a088f125c970d6d6ea52c927f96fe39b330d0f1",
"shasum": ""
},
"require": {
@@ -2360,7 +2360,9 @@
"phpunit/phpunit": "^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0"
},
"require-dev": {
- "yoast/yoastcs": "^2.3.0"
+ "php-parallel-lint/php-console-highlighter": "^1.0.0",
+ "php-parallel-lint/php-parallel-lint": "^1.4.0",
+ "yoast/yoastcs": "^3.1.0"
},
"type": "library",
"extra": {
@@ -2397,9 +2399,10 @@
],
"support": {
"issues": "https://github.com/Yoast/PHPUnit-Polyfills/issues",
+ "security": "https://github.com/Yoast/PHPUnit-Polyfills/security/policy",
"source": "https://github.com/Yoast/PHPUnit-Polyfills"
},
- "time": "2023-06-06T20:28:24+00:00"
+ "time": "2024-04-05T16:36:44+00:00"
}
],
"aliases": [],
diff --git a/inc/Admin.php b/inc/Admin.php
index f39d1b6..7b503a6 100644
--- a/inc/Admin.php
+++ b/inc/Admin.php
@@ -72,9 +72,6 @@ public function add_fse_design_pack_notice() {
),
'designPackNoticeData'
);
-
-
- echo '
';
}
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 565f696..5ab92d0 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -8,6 +8,11 @@
define( 'RIVERBANK_IGNORE_SOURCE_CHECK', true );
$_tests_dir = getenv( 'WP_TESTS_DIR' );
+
+if ( class_exists( '\Yoast\PHPUnitPolyfills\Autoload' ) === false ) {
+ require_once dirname( dirname( __FILE__ ) ) . '/vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php';
+}
+
if ( ! $_tests_dir ) {
$_tests_dir = '/tmp/wordpress-tests-lib';
}