Skip to content

Commit 3e38ee6

Browse files
committed
Move polyfills to extra and load as mu-plugin
1 parent b4f03f2 commit 3e38ee6

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

features/bootstrap/FeatureContext.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,9 +782,12 @@ public function download_wp( $subdir = '' ) {
782782

783783
self::copy_dir( self::$cache_dir, $dest_dir );
784784

785-
// disable emailing
785+
// Disable emailing.
786786
mkdir( $dest_dir . '/wp-content/mu-plugins' );
787787
copy( __DIR__ . '/../extra/no-mail.php', $dest_dir . '/wp-content/mu-plugins/no-mail.php' );
788+
789+
// Add polyfills.
790+
copy( __DIR__ . '/../extra/polyfills.php', $dest_dir . '/wp-content/mu-plugins/polyfills.php' );
788791
}
789792

790793
public function create_config( $subdir = '', $extra_php = false ) {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
22
/**
33
* Polyfills used by Behat to support multiple versions of WP.
4+
*
5+
* This file will get installed as a must-use plugin in WP installs that are run
6+
* by the functional tests.
47
*/
58

69
/*

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@
7676
<!-- This is a procedural stand-alone file that is adding polyfills when
7777
applicable only. -->
7878
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
79-
<exclude-pattern>*/features/bootstrap/polyfills\.php$</exclude-pattern>
79+
<exclude-pattern>*/extra/polyfills\.php$</exclude-pattern>
8080
</rule>
8181
</ruleset>

0 commit comments

Comments
 (0)