Skip to content

Commit e44bca6

Browse files
release: version 1.1.6
### Bug Fixes - **Fix Notice Error**: Fixed an issue with the Notice causing an error when visiting the Editor.
2 parents 34198ec + 046c34d commit e44bca6

File tree

7 files changed

+25
-18
lines changed

7 files changed

+25
-18
lines changed

.github/workflows/test-php.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Setup PHP version
4848
uses: shivammathur/setup-php@v2
4949
with:
50-
php-version: '7.1'
50+
php-version: '7.2'
5151
extensions: simplexml, mysql
5252
tools: phpunit-polyfills
5353
- name: Checkout source code
@@ -69,4 +69,4 @@ jobs:
6969
- name: Install composer
7070
run: composer install --prefer-dist --no-progress --no-suggest
7171
- name: Run phpunit
72-
run: phpunit
72+
run: composer run-script phpunit

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ assets/js/build
1212

1313
languages/raft.pot
1414

15-
.DS_Store
15+
.DS_Store
16+
.phpunit.result.cache

assets/js/src/design-pack-notice.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import { createRoot } from '@wordpress/element';
22

33
import DesignPackNotice from './components/DesignPackNotice';
44

5-
const container = document.getElementById( 'raft-design-pack-notice' );
5+
const container = document.createElement( 'div' );
6+
container.id = 'raft-design-pack-notice';
7+
document.body.appendChild( container );
68

79
if ( container ) {
810
createRoot( container ).render( <DesignPackNotice /> );

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"format": "phpcbf --standard=phpcs.xml --report-summary --report-source -s --runtime-set testVersion 7.0- ",
5252
"phpcs": "phpcs --standard=phpcs.xml -s --runtime-set testVersion 7.0-",
5353
"lint": "composer run-script phpcs",
54-
"phpcs-i": "phpcs -i"
54+
"phpcs-i": "phpcs -i",
55+
"phpunit": "phpunit"
5556
}
5657
}

composer.lock

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inc/Admin.php

-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ public function add_fse_design_pack_notice() {
7373
),
7474
'designPackNoticeData'
7575
);
76-
77-
echo '<div id="raft-design-pack-notice"></div>';
7876
}
7977

8078
/**

tests/bootstrap.php

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
define( 'RAFT_IGNORE_SOURCE_CHECK', true );
99

1010
$_tests_dir = getenv( 'WP_TESTS_DIR' );
11+
12+
if ( class_exists( '\Yoast\PHPUnitPolyfills\Autoload' ) === false ) {
13+
require_once dirname( dirname( __FILE__ ) ) . '/vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php';
14+
}
15+
1116
if ( ! $_tests_dir ) {
1217
$_tests_dir = '/tmp/wordpress-tests-lib';
1318
}

0 commit comments

Comments
 (0)