<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[50602] branches/5.6: Build/Test Tools: Backport GitHub Action and build improvements to the 5.6 branch.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/50602">50602</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/50602","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>desrosj</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-03-26 17:21:35 +0000 (Fri, 26 Mar 2021)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Build/Test Tools: Backport GitHub Action and build improvements to the 5.6 branch.
This backports several build and test tool improvements to the 5.6 branch. Most notably, this includes:
- The changes required to allow each workflow to be triggered by the `workflow_dispatch` event so that tests can be run on a schedule <a href="https://core.trac.wordpress.org/changeset/50590">[50590]</a>.
- The ability to run PHPUnit tests from `src` instead of `build` [50441-50443].
- Splitting single site and multisite tests into parallel jobs <a href="https://core.trac.wordpress.org/changeset/50379">[50379]</a>.
- Split slow tests into separate, parallel jobs for PHP 5.6 <a href="https://core.trac.wordpress.org/changeset/50444">[50444]</a>.
- Better branch and path scoping for GitHub Action workflows when running on `pull_request` [50432,50479].
- Several `devDependency` updates.
Merges [50267,50299,50379,50387,50413,50416,50432,50435-50436,50441-50444,50446,50473-50474,50476,50479,50485-50487,50545,50579,50590,50592,50598] to the 5.6 branch.
See <a href="https://core.trac.wordpress.org/ticket/50401">#50401</a>, <a href="https://core.trac.wordpress.org/ticket/51734">#51734</a>, <a href="https://core.trac.wordpress.org/ticket/51801">#51801</a>, <a href="https://core.trac.wordpress.org/ticket/51802">#51802</a>, <a href="https://core.trac.wordpress.org/ticket/52548">#52548</a>, <a href="https://core.trac.wordpress.org/ticket/52608">#52608</a>, <a href="https://core.trac.wordpress.org/ticket/52612">#52612</a>, <a href="https://core.trac.wordpress.org/ticket/52623">#52623</a>, <a href="https://core.trac.wordpress.org/ticket/52624">#52624</a>, <a href="https://core.trac.wordpress.org/ticket/52625">#52625</a>, <a href="https://core.trac.wordpress.org/ticket/52645">#52645</a>, <a href="https://core.trac.wordpress.org/ticket/52653">#52653</a>, <a href="https://core.trac.wordpress.org/ticket/52658">#52658</a>, <a href="https://core.trac.wordpress.org/ticket/52660">#52660</a>, <a href="https://core.trac.wordpress.org/ticket/52667">#
52667</a>, <a href="https://core.trac.wordpress.org/ticket/52786">#52786</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branches56githubworkflowscodingstandardsyml">branches/5.6/.github/workflows/coding-standards.yml</a></li>
<li><a href="#branches56githubworkflowsjavascripttestsyml">branches/5.6/.github/workflows/javascript-tests.yml</a></li>
<li><a href="#branches56githubworkflowsphpcompatibilityyml">branches/5.6/.github/workflows/php-compatibility.yml</a></li>
<li><a href="#branches56githubworkflowsphpunittestsyml">branches/5.6/.github/workflows/phpunit-tests.yml</a></li>
<li><a href="#branches56githubworkflowswelcomenewcontributorsyml">branches/5.6/.github/workflows/welcome-new-contributors.yml</a></li>
<li><a href="#branches56Gruntfilejs">branches/5.6/Gruntfile.js</a></li>
<li><a href="#branches56READMEmd">branches/5.6/README.md</a></li>
<li><a href="#branches56packagelockjson">branches/5.6/package-lock.json</a></li>
<li><a href="#branches56packagejson">branches/5.6/package.json</a></li>
<li><a href="#branches56phpunitxmldist">branches/5.6/phpunit.xml.dist</a></li>
<li><a href="#branches56testsphpunitincludesabstracttestcasephp">branches/5.6/tests/phpunit/includes/abstract-testcase.php</a></li>
<li><a href="#branches56testsphpunittestsadminincludesPluginphp">branches/5.6/tests/phpunit/tests/admin/includesPlugin.php</a></li>
<li><a href="#branches56testsphpunittestsdependenciesjqueryphp">branches/5.6/tests/phpunit/tests/dependencies/jquery.php</a></li>
<li><a href="#branches56testsphpunittestsdependenciesscriptsphp">branches/5.6/tests/phpunit/tests/dependencies/scripts.php</a></li>
<li><a href="#branches56testsphpunittestsformattingEmojiphp">branches/5.6/tests/phpunit/tests/formatting/Emoji.php</a></li>
<li><a href="#branches56testsphpunittestsoembedcontrollerphp">branches/5.6/tests/phpunit/tests/oembed/controller.php</a></li>
<li><a href="#branches56testsphpunittestsoembedgetResponseDataphp">branches/5.6/tests/phpunit/tests/oembed/getResponseData.php</a></li>
<li><a href="#branches56testsphpunittestsoembedtemplatephp">branches/5.6/tests/phpunit/tests/oembed/template.php</a></li>
<li><a href="#branches56testsphpunittestsoembedwpOembedphp">branches/5.6/tests/phpunit/tests/oembed/wpOembed.php</a></li>
<li><a href="#branches56testsphpunittestsshortcodephp">branches/5.6/tests/phpunit/tests/shortcode.php</a></li>
<li><a href="#branches56testsqunitindexhtml">branches/5.6/tests/qunit/index.html</a></li>
<li><a href="#branches56wptestsconfigsamplephp">branches/5.6/wp-tests-config-sample.php</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branches56githubworkflowstestnpmyml">branches/5.6/.github/workflows/test-npm.yml</a></li>
<li><a href="#branches56githubworkflowstestoldbranchesyml">branches/5.6/.github/workflows/test-old-branches.yml</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#branches56githubworkflowsverifynpmonwindowsyml">branches/5.6/.github/workflows/verify-npm-on-windows.yml</a></li>
<li><a href="#branches56testsphpunittestsadminincludesUpdateCorephp">branches/5.6/tests/phpunit/tests/admin/includesUpdateCore.php</a></li>
<li><a href="#branches56testsphpunittestsdependenciesmediaelementjsphp">branches/5.6/tests/phpunit/tests/dependencies/mediaelementjs.php</a></li>
</ul>
<h3>Property Changed</h3>
<ul>
<li><a href="#branches56">branches/5.6/</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<span class="cx" style="display: block; padding: 0 10px">Index: branches/5.6
</span><span class="cx" style="display: block; padding: 0 10px">===================================================================
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">--- branches/5.6 2021-03-26 16:07:38 UTC (rev 50601)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+++ branches/5.6 2021-03-26 17:21:35 UTC (rev 50602)
</ins><a id="branches56"></a>
<div class="propset"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Property changes: branches/5.6</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: svn:mergeinfo</h4></div>
<span class="cx" style="display: block; padding: 0 10px"> /branches/4.9:43557,43622
</span><span class="cx" style="display: block; padding: 0 10px"> /branches/5.0:43681-43682,43684-43688,43719-43720,43723,43726-43727,43729-43731,43734-43744,43747,43751-43754,43758,43760-43765,43767-43770,43772,43774-43781,43783,43785,43790-43806,43808-43821,43825,43828,43830-43834,43836-43843,43846-43863,43867-43889,43891-43894,43897-43905,43908-43909,43911-43929,43931-43942,43946-43947,43949-43956,43959-43964,43967-43969,43988,43994,44014,44017,44047,44183,44185,44187-44206,44208-44213,44231-44232,44235,44248,44284,44287-44288
</span><span class="cx" style="display: block; padding: 0 10px"> /branches/5.5:49373-49379,49381
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/trunk:49645,49649-49651,49668,49673-49674,49677,49681,49685,49691,49702-49705,49708-49710,49713,49716,49718,49720,49722,49725-49726,49731,49736-49737,49739,49741,49744,49746,49751-49752,49759,49761-49764,49770,49772,49774,49779,49781-49784,49786,49791,49793-49795,49798-49801,49803-49805,49807,49823,49825-49826,49836,49838,49854,49860,49864-49866,49870,49872-49873,49876,49911,49913,49917,49919-49922,49938,49951-49952,49979,50003,50006,50035,50037,50039,50041,50049,50051,50053,50055,50058,50126,50176,50185,50192,50232,50268,50285,50298,50355,50445
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/trunk:49645,49649-49651,49668,49673-49674,49677,49681,49685,49691,49702-49705,49708-49710,49713,49716,49718,49720,49722,49725-49726,49731,49736-49737,49739,49741,49744,49746,49751-49752,49759,49761-49764,49770,49772,49774,49779,49781-49784,49786,49791,49793-49795,49798-49801,49803-49805,49807,49823,49825-49826,49836,49838,49854,49860,49864-49866,49870,49872-49873,49876,49911,49913,49917,49919-49922,49938,49951-49952,49979,50003,50006,50035,50037,50039,50041,50049,50051,50053,50055,50058,50126,50176,50185,50192,50232,50267-50268,50285,50298-50299,50355,50379,50387,50413,50416,50432,50435-50436,50441-50446,50473-50474,50476,50479,50485-50487,50545,50579,50590,50592,50598
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="branches56githubworkflowscodingstandardsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/.github/workflows/coding-standards.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/.github/workflows/coding-standards.yml 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/.github/workflows/coding-standards.yml 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,11 +1,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> name: Coding Standards
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> on:
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # JSHint was introduced in WordPress 3.8.
+ # PHPCS checking was introduced in WordPress 5.1.
</ins><span class="cx" style="display: block; padding: 0 10px"> push:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><span class="cx" style="display: block; padding: 0 10px"> - master
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # JSHint was introduced in WordPress 3.8.
- # PHPCS checking was introduced in WordPress 5.1.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - trunk
</ins><span class="cx" style="display: block; padding: 0 10px"> - '3.[89]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> tags:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12,6 +13,26 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - '3.[89]*'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]*'
</span><span class="cx" style="display: block; padding: 0 10px"> pull_request:
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ branches:
+ - master
+ - trunk
+ - '3.[89]'
+ - '[4-9].[0-9]'
+ paths:
+ # Any change to a PHP or JavaScript file should run checks.
+ - '**.js'
+ - '**.php'
+ # These files configure NPM. Changes could affect the outcome.
+ - 'package*.json'
+ # These files configure Composer. Changes could affect the outcome.
+ - 'composer.*'
+ # This file configures JSHint. Changes could affect the outcome.
+ - '.jshintrc'
+ # This file configures PHPCS. Changes could affect the outcome.
+ - 'phpcs.xml.dist'
+ # Changes to workflow files should always verify all workflows are successful.
+ - '.github/workflows/*.yml'
+ workflow_dispatch:
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><span class="cx" style="display: block; padding: 0 10px"> # Runs PHP coding standards checks.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -35,10 +56,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Checkout repository
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@v2
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Set up PHP
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: shivammathur/setup-php@v2
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: shivammathur/setup-php@afefcaf556d98dc7896cca380e181decb609ca44 # v2.10.0
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> php-version: '7.4'
</span><span class="cx" style="display: block; padding: 0 10px"> coverage: none
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -50,7 +71,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> composer --version
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install Composer dependencies
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: ramsey/composer-install@v1
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: ramsey/composer-install@92a7904348d4ad30236f3611e33b7f0c6f9edd70 # v1.1.0
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> composer-options: "--no-progress --no-ansi --no-interaction"
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -88,7 +109,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Checkout repository
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@v2
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Log debug information
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -98,12 +119,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> svn --version
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install NodeJS
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/setup-node@v1
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> node-version: 14
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Cache NodeJS modules
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/cache@v2
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
</ins><span class="cx" style="display: block; padding: 0 10px"> env:
</span><span class="cx" style="display: block; padding: 0 10px"> cache-name: cache-node-modules
</span><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -110,8 +131,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # npm cache files are stored in `~/.npm` on Linux/macOS
</span><span class="cx" style="display: block; padding: 0 10px"> path: ~/.npm
</span><span class="cx" style="display: block; padding: 0 10px"> key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- restore-keys: |
- ${{ runner.os }}-npm-
</del><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Log debug information
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -119,7 +138,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> node --version
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install Dependencies
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- run: npx install-changed --install-command="npm ci"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ run: npm ci
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Run JSHint
</span><span class="cx" style="display: block; padding: 0 10px"> run: npm run grunt jshint
</span></span></pre></div>
<a id="branches56githubworkflowsjavascripttestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/.github/workflows/javascript-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/.github/workflows/javascript-tests.yml 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/.github/workflows/javascript-tests.yml 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,10 +1,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> name: JavaScript Tests
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> on:
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # JavaScript testing was introduced in WordPress 3.8.
</ins><span class="cx" style="display: block; padding: 0 10px"> push:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><span class="cx" style="display: block; padding: 0 10px"> - master
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # JavaScript testing was introduced in WordPress 3.8.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - trunk
</ins><span class="cx" style="display: block; padding: 0 10px"> - '3.[89]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> tags:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -11,6 +12,25 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - '3.[89]*'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]*'
</span><span class="cx" style="display: block; padding: 0 10px"> pull_request:
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ branches:
+ - master
+ - trunk
+ - '3.[89]'
+ - '[4-9].[0-9]'
+ paths:
+ # Any change to a JavaScript file should run tests.
+ - '**.js'
+ # These files configure NPM. Changes could affect the outcome.
+ - 'package*.json'
+ # This file configures ESLint. Changes could affect the outcome.
+ - '.eslintignore'
+ # This file configures JSHint. Changes could affect the outcome.
+ - '.jshintrc'
+ # Any change to the QUnit directory should run tests.
+ - 'tests/qunit/**'
+ # Changes to workflow files should always verify all workflows are successful.
+ - '.github/workflows/*.yml'
+ workflow_dispatch:
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><span class="cx" style="display: block; padding: 0 10px"> # Runs the QUnit tests for WordPress.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,12 +53,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Cancel previous runs of this workflow (pull requests only)
</span><span class="cx" style="display: block; padding: 0 10px"> if: ${{ github.event_name == 'pull_request' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: styfle/cancel-workflow-action@0.5.0
- with:
- access_token: ${{ github.token }}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.0
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Checkout repository
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@v2
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Log debug information
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -48,12 +66,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> svn --version
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install NodeJS
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/setup-node@v1
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> node-version: 14
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Cache NodeJS modules
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/cache@v2
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
</ins><span class="cx" style="display: block; padding: 0 10px"> env:
</span><span class="cx" style="display: block; padding: 0 10px"> cache-name: cache-node-modules
</span><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,8 +78,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # npm cache files are stored in `~/.npm` on Linux/macOS
</span><span class="cx" style="display: block; padding: 0 10px"> path: ~/.npm
</span><span class="cx" style="display: block; padding: 0 10px"> key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- restore-keys: |
- ${{ runner.os }}-npm-
</del><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Log debug information
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -69,7 +85,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> node --version
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install Dependencies
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- run: npx install-changed --install-command="npm ci"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ run: npm ci
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Run QUnit tests
</span><span class="cx" style="display: block; padding: 0 10px"> run: npm run grunt qunit:compiled
</span></span></pre></div>
<a id="branches56githubworkflowsphpcompatibilityyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/.github/workflows/php-compatibility.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/.github/workflows/php-compatibility.yml 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/.github/workflows/php-compatibility.yml 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,10 +1,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> name: PHP Compatibility
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> on:
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # PHP compatibility testing was introduced in WordPress 5.5.
</ins><span class="cx" style="display: block; padding: 0 10px"> push:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><span class="cx" style="display: block; padding: 0 10px"> - master
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # The PHP compatibility testing was introduced in WordPress 5.5.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - trunk
</ins><span class="cx" style="display: block; padding: 0 10px"> - '5.[5-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[6-9].[0-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> tags:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -11,6 +12,21 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - '5.[5-9]*'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[6-9].[0-9]*'
</span><span class="cx" style="display: block; padding: 0 10px"> pull_request:
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ branches:
+ - master
+ - trunk
+ - '5.[5-9]'
+ - '[6-9].[0-9]'
+ paths:
+ # This workflow only scans PHP files.
+ - '**.php'
+ # These files configure Composer. Changes could affect the outcome.
+ - 'composer.*'
+ # This file configures PHP Compatibility scanning. Changes could affect the outcome.
+ - 'phpcompat.xml.dist'
+ # Changes to workflow files should always verify all workflows are successful.
+ - '.github/workflows/*.yml'
+ workflow_dispatch:
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,10 +50,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Checkout repository
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@v2
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Set up PHP
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: shivammathur/setup-php@v2
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: shivammathur/setup-php@afefcaf556d98dc7896cca380e181decb609ca44 # v2.10.0
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> php-version: '7.4'
</span><span class="cx" style="display: block; padding: 0 10px"> coverage: none
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -49,7 +65,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> composer --version
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install Composer dependencies
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: ramsey/composer-install@v1
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: ramsey/composer-install@92a7904348d4ad30236f3611e33b7f0c6f9edd70 # v1.1.0
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> composer-options: "--no-progress --no-ansi --no-interaction"
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="branches56githubworkflowsphpunittestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/.github/workflows/phpunit-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/.github/workflows/phpunit-tests.yml 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/.github/workflows/phpunit-tests.yml 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,6 +4,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> push:
</span><span class="cx" style="display: block; padding: 0 10px"> branches:
</span><span class="cx" style="display: block; padding: 0 10px"> - master
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - trunk
</ins><span class="cx" style="display: block; padding: 0 10px"> - '3.[7-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]'
</span><span class="cx" style="display: block; padding: 0 10px"> tags:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -10,33 +11,31 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - '3.[7-9]*'
</span><span class="cx" style="display: block; padding: 0 10px"> - '[4-9].[0-9]*'
</span><span class="cx" style="display: block; padding: 0 10px"> pull_request:
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ branches:
+ - master
+ - trunk
+ - '3.[7-9]'
+ - '[4-9].[0-9]'
+ workflow_dispatch:
</ins><span class="cx" style="display: block; padding: 0 10px"> # Once weekly On Sundays at 00:00 UTC.
</span><span class="cx" style="display: block; padding: 0 10px"> schedule:
</span><span class="cx" style="display: block; padding: 0 10px"> - cron: '0 0 * * 0'
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> env:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- LOCAL_DIR: build
</del><span class="cx" style="display: block; padding: 0 10px"> PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
</span><span class="cx" style="display: block; padding: 0 10px"> COMPOSER_INSTALL: ${{ false }}
</span><span class="cx" style="display: block; padding: 0 10px"> # Controls which NPM script to use for running PHPUnit tests. Options ar `php` and `php-composer`.
</span><span class="cx" style="display: block; padding: 0 10px"> PHPUNIT_SCRIPT: php
</span><span class="cx" style="display: block; padding: 0 10px"> LOCAL_PHP_MEMCACHED: ${{ false }}
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ SLOW_TESTS: 'external-http,media,restapi'
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> jobs:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # Sets up WordPress for testing or development use.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # Sets up the workflow for testing.
</ins><span class="cx" style="display: block; padding: 0 10px"> #
</span><span class="cx" style="display: block; padding: 0 10px"> # Performs the following steps:
</span><span class="cx" style="display: block; padding: 0 10px"> # - Cancels all previous workflow runs for pull requests that have not completed.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Checks out the repository.
- # - Logs debug information about the runner container.
- # - Installs NodeJS 14.
- # - Sets up caching for NPM.
- # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
- # - Builds WordPress to run from the `build` directory.
- # - Creates a ZIP file of compiled WordPress.
- # - Uploads ZIP file as an artifact.
- setup-wordpress:
- name: Setup WordPress
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ setup-workflow:
+ name: Setup Workflow
</ins><span class="cx" style="display: block; padding: 0 10px"> runs-on: ubuntu-latest
</span><span class="cx" style="display: block; padding: 0 10px"> if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -43,73 +42,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Cancel previous runs of this workflow (pull requests only)
</span><span class="cx" style="display: block; padding: 0 10px"> if: ${{ github.event_name == 'pull_request' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: styfle/cancel-workflow-action@0.5.0
- with:
- access_token: ${{ github.token }}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.0
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - name: Checkout repository
- uses: actions/checkout@v2
-
- - name: Log debug information
- run: |
- echo "$GITHUB_REF"
- echo "$GITHUB_EVENT_NAME"
- npm --version
- node --version
- curl --version
- git --version
- svn --version
- php --version
- php -i
- locale -a
-
- - name: Install NodeJS
- uses: actions/setup-node@v1
- with:
- node-version: 14
-
- - name: Cache NodeJS modules
- uses: actions/cache@v2
- env:
- cache-name: cache-node-modules
- with:
- # npm cache files are stored in `~/.npm` on Linux/macOS
- path: ~/.npm
- key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-npm-
-
- - name: Install Dependencies
- run: npx install-changed --install-command="npm ci"
-
- - name: Build WordPress
- run: npm run build
-
- - name: Create ZIP artifact
- uses: thedoctor0/zip-release@0.4.1
- with:
- filename: built-wp-${{ github.sha }}.zip
- exclusions: '*.git* /*node_modules/* packagehash.txt'
-
- - name: Upload build artifact
- uses: actions/upload-artifact@v2
- with:
- name: built-wp-${{ github.sha }}
- path: built-wp-${{ github.sha }}.zip
- if-no-files-found: error
-
</del><span class="cx" style="display: block; padding: 0 10px"> # Runs the PHPUnit tests for WordPress.
</span><span class="cx" style="display: block; padding: 0 10px"> #
</span><span class="cx" style="display: block; padding: 0 10px"> # Performs the following steps:
</span><span class="cx" style="display: block; padding: 0 10px"> # - Set environment variables.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Sets up the environment variables needed for testing with memcached (if desired).
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # - Downloads the built WordPress artifact from the previous job.
- # - Unzips the artifact.
</del><span class="cx" style="display: block; padding: 0 10px"> # - Installs NodeJS 14.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Sets up caching for NPM.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Installs NPM dependencies
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Configures caching for Composer.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # _ Installs Composer dependencies (if desired).
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # - Installs Composer dependencies (if desired).
</ins><span class="cx" style="display: block; padding: 0 10px"> # - Logs Docker debug information (about both the Docker installation within the runner).
</span><span class="cx" style="display: block; padding: 0 10px"> # - Starts the WordPress Docker container.
</span><span class="cx" style="display: block; padding: 0 10px"> # - Starts the memcached server after the Docker network has been created (if desired).
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -124,27 +68,47 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # - Submit the test results to the WordPress.org host test results.
</span><span class="cx" style="display: block; padding: 0 10px"> # - todo: Configure Slack notifications for failing tests.
</span><span class="cx" style="display: block; padding: 0 10px"> test-php:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- name: ${{ matrix.php }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }}
- needs: setup-wordpress
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }} ${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }}
</ins><span class="cx" style="display: block; padding: 0 10px"> runs-on: ${{ matrix.os }}
</span><span class="cx" style="display: block; padding: 0 10px"> strategy:
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ fail-fast: false
</ins><span class="cx" style="display: block; padding: 0 10px"> matrix:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- php: [ '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6.20' ]
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ php: [ '5.6.20', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0' ]
</ins><span class="cx" style="display: block; padding: 0 10px"> os: [ ubuntu-latest ]
</span><span class="cx" style="display: block; padding: 0 10px"> memcached: [ false ]
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ split_slow: [ false ]
+ multisite: [ false, true ]
</ins><span class="cx" style="display: block; padding: 0 10px"> include:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- # Include job for PHP 7.4 with memcached.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ # Additional "slow" jobs for PHP 5.6.
+ - php: '5.6.20'
+ os: ubuntu-latest
+ memcached: false
+ multisite: false
+ split_slow: true
+ - php: '5.6.20'
+ os: ubuntu-latest
+ memcached: false
+ multisite: true
+ split_slow: true
+ # Include jobs for PHP 7.4 with memcached.
</ins><span class="cx" style="display: block; padding: 0 10px"> - php: '7.4'
</span><span class="cx" style="display: block; padding: 0 10px"> os: ubuntu-latest
</span><span class="cx" style="display: block; padding: 0 10px"> memcached: true
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ multisite: false
+ - php: '7.4'
+ os: ubuntu-latest
+ memcached: true
+ multisite: true
</ins><span class="cx" style="display: block; padding: 0 10px"> # Report the results of the PHP 7.4 without memcached job.
</span><span class="cx" style="display: block; padding: 0 10px"> - php: '7.4'
</span><span class="cx" style="display: block; padding: 0 10px"> os: ubuntu-latest
</span><span class="cx" style="display: block; padding: 0 10px"> memcached: false
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ multisite: false
</ins><span class="cx" style="display: block; padding: 0 10px"> report: true
</span><span class="cx" style="display: block; padding: 0 10px"> env:
</span><span class="cx" style="display: block; padding: 0 10px"> LOCAL_PHP: ${{ matrix.php }}-fpm
</span><span class="cx" style="display: block; padding: 0 10px"> LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }}
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ PHPUNIT_CONFIG: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Configure environment variables
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -152,21 +116,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
</span><span class="cx" style="display: block; padding: 0 10px"> echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - name: Download the built WordPress artifact
- uses: actions/download-artifact@v2
- with:
- name: built-wp-${{ github.sha }}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - name: Checkout repository
+ uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - name: Unzip built artifact
- run: unzip built-wp-${{ github.sha }}.zip
-
</del><span class="cx" style="display: block; padding: 0 10px"> - name: Install NodeJS
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/setup-node@v1
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> node-version: 14
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Use cached Node modules
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/cache@v2
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
</ins><span class="cx" style="display: block; padding: 0 10px"> env:
</span><span class="cx" style="display: block; padding: 0 10px"> cache-name: cache-node-modules
</span><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -173,11 +132,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> # npm cache files are stored in `~/.npm` on Linux/macOS
</span><span class="cx" style="display: block; padding: 0 10px"> path: ~/.npm
</span><span class="cx" style="display: block; padding: 0 10px"> key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- restore-keys: |
- ${{ runner.os }}-npm-
</del><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install Dependencies
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- run: npx install-changed --install-command="npm ci"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ run: npm ci
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Get composer cache directory
</span><span class="cx" style="display: block; padding: 0 10px"> id: composer-cache
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -186,14 +143,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Cache Composer dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> if: ${{ env.COMPOSER_INSTALL == true || env.LOCAL_PHP == '8.0-fpm' }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/cache@v2
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
</ins><span class="cx" style="display: block; padding: 0 10px"> env:
</span><span class="cx" style="display: block; padding: 0 10px"> cache-name: cache-composer-dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> path: ${{ steps.composer-cache.outputs.dir }}
</span><span class="cx" style="display: block; padding: 0 10px"> key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- restore-keys: |
- ${{ runner.os }}-php-${{ matrix.php }}-composer-
</del><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install Composer dependencies
</span><span class="cx" style="display: block; padding: 0 10px"> if: ${{ env.COMPOSER_INSTALL == true || env.LOCAL_PHP == '8.0-fpm' }}
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -223,7 +178,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Start the Memcached server.
</span><span class="cx" style="display: block; padding: 0 10px"> if: ${{ matrix.memcached }}
</span><span class="cx" style="display: block; padding: 0 10px"> run: |
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- cp tests/phpunit/includes/object-cache.php build/wp-content/object-cache.php
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ cp tests/phpunit/includes/object-cache.php src/wp-content/object-cache.php
</ins><span class="cx" style="display: block; padding: 0 10px"> docker run --name memcached --net $(basename "$PWD")_wpdevnet -d memcached
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: General debug information
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -248,46 +203,46 @@
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Install WordPress
</span><span class="cx" style="display: block; padding: 0 10px"> run: npm run env:install
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - name: Run slow PHPUnit tests
+ if: ${{ matrix.split_slow }}
+ run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ${{ env.SLOW_TESTS }}
+
+ - name: Run PHPUnit tests for single site excluding slow tests
+ if: ${{ matrix.php < '7.0' && ! matrix.split_slow && ! matrix.multisite }}
+ run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-required
+
+ - name: Run PHPUnit tests for Multisite excluding slow tests
+ if: ${{ matrix.php < '7.0' && ! matrix.split_slow && matrix.multisite }}
+ run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-excluded,oembed-headers
+
</ins><span class="cx" style="display: block; padding: 0 10px"> - name: Run PHPUnit tests
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if: ${{ matrix.php >= '7.0' }}
+ run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }}
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Run AJAX tests
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group ajax
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if: ${{ ! matrix.split_slow && ! matrix.multisite }}
+ run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - name: Run tests as a multisite install
- run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml
-
</del><span class="cx" style="display: block; padding: 0 10px"> - name: Run ms-files tests as a multisite install
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if: ${{ matrix.multisite && ! matrix.split_slow }}
</ins><span class="cx" style="display: block; padding: 0 10px"> run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c tests/phpunit/multisite.xml --group ms-files
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Run external HTTP tests
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if: ${{ ! matrix.multisite && ! matrix.split_slow }}
</ins><span class="cx" style="display: block; padding: 0 10px"> run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group external-http
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - name: Run REST API tests
- run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group restapi-jsclient
-
- # Xdebug supports PHP 8 only from version 3.0, which is not released yet.
- # Once Xdebug 3.0 is released and included in the Docker image, the IF condition should be removed.
</del><span class="cx" style="display: block; padding: 0 10px"> # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Run (xDebug) tests
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if: ${{ env.LOCAL_PHP != '8.0-fpm' }}
- run: LOCAL_PHP_XDEBUG=true npm run test:php -- -v --group xdebug --exclude-group __fakegroup__
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if: ${{ ! matrix.split_slow }}
+ run: LOCAL_PHP_XDEBUG=true npm run test:${{ env.PHPUNIT_SCRIPT }} -- -v --group xdebug --exclude-group __fakegroup__
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> - name: Checkout the WordPress Test Reporter
</span><span class="cx" style="display: block; padding: 0 10px"> if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }}
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- uses: actions/checkout@v2
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> repository: 'WordPress/phpunit-test-runner'
</span><span class="cx" style="display: block; padding: 0 10px"> path: 'test-runner'
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - name: Set up the Git repository
- if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }}
- run: |
- git init
- git remote add origin https://github.com/WordPress/wordpress-develop.git
- git fetch
- git reset origin/master
-
</del><span class="cx" style="display: block; padding: 0 10px"> - name: Submit test results to the WordPress.org host test results
</span><span class="cx" style="display: block; padding: 0 10px"> if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }}
</span><span class="cx" style="display: block; padding: 0 10px"> env:
</span></span></pre></div>
<a id="branches56githubworkflowstestnpmyml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.6/.github/workflows/test-npm.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/.github/workflows/test-npm.yml (rev 0)
+++ branches/5.6/.github/workflows/test-npm.yml 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,175 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+name: Test NPM
+
+on:
+ push:
+ branches:
+ - master
+ - trunk
+ - '3.[7-9]'
+ - '[4-9].[0-9]'
+ pull_request:
+ branches:
+ - master
+ - trunk
+ - '3.[7-9]'
+ - '[4-9].[0-9]'
+ paths:
+ # These files configure NPM. Changes could affect the outcome.
+ - 'package*.json'
+ # JavaScript files are built using NPM.
+ - '**.js'
+ # CSS and SCSS files are built using NPM.
+ - '**.scss'
+ - '**.css'
+ # Changes to workflow files should always verify all workflows are successful.
+ - '.github/workflows/**.yml'
+ workflow_dispatch:
+
+env:
+ PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
+
+jobs:
+ # Prepares the workflow.
+ #
+ # Performs the following steps:
+ # - Cancels all previous workflow runs for pull requests that have not completed.
+ prepare-workflow:
+ name: Prepare the workflow
+ runs-on: ubuntu-latest
+ if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
+
+ steps:
+ - name: Cancel previous runs of this workflow (pull requests only)
+ if: ${{ github.event_name == 'pull_request' }}
+ uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.0
+
+ # Verifies that installing NPM dependencies and building WordPress works as expected.
+ #
+ # Performs the following steps:
+ # - Checks out the repository.
+ # - Logs debug information about the runner container.
+ # - Installs NodeJS 14.
+ # - Sets up caching for NPM.
+ # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
+ # - Builds WordPress to run from the `build` directory.
+ # - Cleans up after building WordPress to the `build` directory.
+ # - Builds WordPress to run from the `src` directory.
+ # - Cleans up after building WordPress to the `src` directory.
+ test-npm:
+ name: Test NPM on ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
+ needs: prepare-workflow
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ ubuntu-latest, windows-latest ]
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
+
+ - name: Log debug information
+ run: |
+ npm --version
+ node --version
+ curl --version
+ git --version
+ svn --version
+
+ - name: Install NodeJS
+ uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
+ with:
+ node-version: 14
+
+ - name: Cache NodeJS modules (Ubuntu & MacOS)
+ uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
+ if: ${{ matrix.os != 'windows-latest' }}
+ with:
+ path: ~/.npm
+ key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
+
+ - name: Get NPM cache directory (Windows only)
+ if: ${{ matrix.os == 'windows-latest' }}
+ id: npm-cache
+ run: echo "::set-output name=dir::$(npm config get cache)"
+
+ - name: Cache NodeJS modules (Windows only)
+ uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
+ if: ${{ matrix.os == 'windows-latest' }}
+ with:
+ path: ${{ steps.npm-cache.outputs.dir }}
+ key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
+
+ - name: Install Dependencies
+ run: npm ci
+
+ - name: Build WordPress
+ run: npm run build
+
+ - name: Clean after building
+ run: npm run grunt clean
+
+ - name: Build WordPress in /src
+ run: npm run build:dev
+
+ - name: Clean after building in /src
+ run: npm run grunt clean --dev
+
+ # Verifies that installing NPM dependencies and building WordPress works as expected on MacOS.
+ #
+ # This is a separate job in order to that more strict conditions can be used.
+ #
+ # Performs the following steps:
+ # - Checks out the repository.
+ # - Logs debug information about the runner container.
+ # - Installs NodeJS 14.
+ # - Sets up caching for NPM.
+ # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
+ # - Builds WordPress to run from the `build` directory.
+ # - Cleans up after building WordPress to the `build` directory.
+ # - Builds WordPress to run from the `src` directory.
+ # - Cleans up after building WordPress to the `src` directory.
+ test-npm-macos:
+ name: Test NPM on MacOS
+ runs-on: macos-latest
+ if: ${{ github.repository == 'WordPress/wordpress-develop' }}
+ needs: prepare-workflow
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
+
+ - name: Log debug information
+ run: |
+ npm --version
+ node --version
+ curl --version
+ git --version
+ svn --version
+
+ - name: Install NodeJS
+ uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
+ with:
+ node-version: 14
+
+ - name: Cache NodeJS modules
+ uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
+ if: ${{ matrix.os != 'windows-latest' }}
+ with:
+ path: ~/.npm
+ key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
+
+ - name: Install Dependencies
+ run: npm ci
+
+ - name: Build WordPress
+ run: npm run build
+
+ - name: Clean after building
+ run: npm run grunt clean
+
+ - name: Build WordPress in /src
+ run: npm run build:dev
+
+ - name: Clean after building in /src
+ run: npm run grunt clean --dev
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: branches/5.6/.github/workflows/test-npm.yml
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="branches56githubworkflowstestoldbranchesyml"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: branches/5.6/.github/workflows/test-old-branches.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/.github/workflows/test-old-branches.yml (rev 0)
+++ branches/5.6/.github/workflows/test-old-branches.yml 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,58 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+name: Test old branches
+
+on:
+ # Once weekly On Mondays at 00:00 UTC.
+ schedule:
+ - cron: '0 0 * * 1'
+
+jobs:
+ dispatch-workflows-for-old-branches:
+ name: ${{ matrix.workflow }} for ${{ matrix.branch }}
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ workflow: [
+ 'coding-standards.yml',
+ 'javascript-tests.yml',
+ 'phpunit-tests.yml',
+ 'test-npm.yml'
+ ]
+ branch: [
+ '5.7', '5.6', '5.5', '5.4', '5.3', '5.2', '5.1', '5.0',
+ '4.9', '4.8', '4.7', '4.6', '4.5', '4.4', '4.3', '4.2', '4.1', '4.0',
+ '3.9', '3.8', '3.7'
+ ]
+ include:
+ # PHP Compatibility testing was introduced in 5.5.
+ - branch: '5.7'
+ workflow: 'php-compatibility.yml'
+ - branch: '5.6'
+ workflow: 'php-compatibility.yml'
+ - branch: '5.5'
+ workflow: 'php-compatibility.yml'
+
+ # End to End testing was introduced in 5.3 but later removed as there were no meaningful assertions.
+ # Only the officially supported major branch runs E2E tests so that more assertions can be added, and the
+ # workflow does not continue to run needlessly on old branches.
+ - branch: '5.7'
+ workflow: 'end-to-end-tests.yml'
+ exclude:
+ # Coding standards and JavaScript testing did not take place in 3.7.
+ - branch: '3.7'
+ workflow: 'coding-standards.yml'
+ - branch: '3.7'
+ workflow: 'javascript-tests.yml'
+
+ steps:
+ - name: Dispatch workflow run
+ uses: actions/github-script@47f7cf65b5ced0830a325f705cad64f2f58dddf7 # v3.1.0
+ with:
+ github-token: ${{ secrets.GHA_OLD_BRANCH_DISPATCH }}
+ script: |
+ github.actions.createWorkflowDispatch({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ workflow_id: '${{ matrix.workflow }}',
+ ref: '${{ matrix.branch }}'
+ });
</ins><span class="cx" style="display: block; padding: 0 10px">Property changes on: branches/5.6/.github/workflows/test-old-branches.yml
</span><span class="cx" style="display: block; padding: 0 10px">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Added: svn:eol-style</h4></div>
<ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+native
</ins><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of property
</span><a id="branches56githubworkflowsverifynpmonwindowsyml"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: branches/5.6/.github/workflows/verify-npm-on-windows.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/.github/workflows/verify-npm-on-windows.yml 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/.github/workflows/verify-npm-on-windows.yml 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,71 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-name: Test NPM on Windows
-
-on:
- push:
- branches:
- - master
- - '3.[7-9]'
- - '[4-9].[0-9]'
- pull_request:
-
-env:
- PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
-
-jobs:
- # Verifies that installing NPM dependencies and building WordPress works on Windows.
- #
- # Performs the following steps:
- # - Cancels all previous workflow runs for pull requests that have not completed.
- # - Checks out the repository.
- # - Logs debug information about the runner container.
- # - Installs NodeJS 14.
- # - Sets up caching for NPM.
- # _ Installs NPM dependencies using install-changed to hash the `package.json` file.
- # - Builds WordPress to run from the `build` directory.
- test-npm:
- name: Tests NPM on Windows
- runs-on: windows-latest
- if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
-
- steps:
- - name: Cancel previous runs of this workflow (pull requests only)
- if: ${{ github.event_name == 'pull_request' }}
- uses: styfle/cancel-workflow-action@0.5.0
- with:
- access_token: ${{ github.token }}
-
- - name: Checkout repository
- uses: actions/checkout@v2
-
- - name: Log debug information
- run: |
- npm --version
- node --version
- curl --version
- git --version
- svn --version
-
- - name: Install NodeJS
- uses: actions/setup-node@v1
- with:
- node-version: 14
-
- - name: Get NPM cache directory
- id: npm-cache
- run: echo "::set-output name=dir::$(npm config get cache)"
-
- - name: Cache NodeJS modules
- uses: actions/cache@v2
- env:
- cache-name: cache-node-modules
- with:
- path: ${{ steps.npm-cache.outputs.dir }}
- key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
- restore-keys: |
- ${{ runner.os }}-npm-
-
- - name: Install Dependencies
- run: npx install-changed --install-command="npm ci"
-
- - name: Build WordPress
- run: npm run build
</del></span></pre></div>
<a id="branches56githubworkflowswelcomenewcontributorsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/.github/workflows/welcome-new-contributors.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/.github/workflows/welcome-new-contributors.yml 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/.github/workflows/welcome-new-contributors.yml 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -11,7 +11,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if: ${{ github.repository == 'WordPress/wordpress-develop' }}
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> steps:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- - uses: bubkoo/welcome-action@v1
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ - uses: bubkoo/welcome-action@8dbbac2540d155744c90e4e37da6b05ffc9c5e2c # v1.0.3
</ins><span class="cx" style="display: block; padding: 0 10px"> with:
</span><span class="cx" style="display: block; padding: 0 10px"> GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
</span><span class="cx" style="display: block; padding: 0 10px"> FIRST_PR_COMMENT: >
</span></span></pre></div>
<a id="branches56Gruntfilejs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/Gruntfile.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/Gruntfile.js 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/Gruntfile.js 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7,6 +7,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> module.exports = function(grunt) {
</span><span class="cx" style="display: block; padding: 0 10px"> var path = require('path'),
</span><span class="cx" style="display: block; padding: 0 10px"> fs = require( 'fs' ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ glob = require( 'glob' ),
+ assert = require( 'assert' ).strict,
</ins><span class="cx" style="display: block; padding: 0 10px"> spawn = require( 'child_process' ).spawnSync,
</span><span class="cx" style="display: block; padding: 0 10px"> SOURCE_DIR = 'src/',
</span><span class="cx" style="display: block; padding: 0 10px"> BUILD_DIR = 'build/',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1429,6 +1431,126 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'copy:version',
</span><span class="cx" style="display: block; padding: 0 10px"> ] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Build verification tasks.
+ */
+ grunt.registerTask( 'verify:build', [
+ 'verify:wp-embed',
+ 'verify:old-files',
+ 'verify:source-maps',
+ ] );
+
+ /**
+ * Build assertions for wp-embed.min.js.
+ *
+ * @ticket 34698
+ */
+ grunt.registerTask( 'verify:wp-embed', function() {
+ const file = `${ BUILD_DIR }/wp-includes/js/wp-embed.min.js`;
+
+ assert(
+ fs.existsSync( file ),
+ 'The build/wp-includes/js/wp-embed.min.js file does not exist.'
+ );
+
+ const contents = fs.readFileSync( file, {
+ encoding: 'utf8',
+ } );
+
+ assert(
+ contents.length > 0,
+ 'The build/wp-includes/js/wp-embed.min.js file must not be empty.'
+ );
+ assert(
+ false === contents.includes( '&' ),
+ 'The build/wp-includes/js/wp-embed.min.js file must not contain ampersands.'
+ );
+ } );
+
+ /**
+ * Build assertions to ensure no project files are inside `$_old_files` in the build directory.
+ *
+ * @ticket 36083
+ */
+ grunt.registerTask( 'verify:old-files', function() {
+ const file = `${ BUILD_DIR }wp-admin/includes/update-core.php`;
+
+ assert(
+ fs.existsSync( file ),
+ 'The build/wp-admin/includes/update-core.php file does not exist.'
+ );
+
+ const contents = fs.readFileSync( file, {
+ encoding: 'utf8',
+ } );
+
+ assert(
+ contents.length > 0,
+ 'The build/wp-admin/includes/update-core.php file must not be empty.'
+ );
+
+ const match = contents.match( /\$_old_files = array\(([^\)]+)\);/ );
+
+ assert(
+ match.length > 0,
+ 'The build/wp-admin/includes/update-core.php file does not include an `$_old_files` array.'
+ );
+
+ const files = match[1].split( '\n\t' ).filter( function( file ) {
+ // Filter out empty lines
+ if ( '' === file ) {
+ return false;
+ }
+
+ // Filter out commented out lines
+ if ( 0 === file.indexOf( '/' ) ) {
+ return false;
+ }
+
+ return true;
+ } ).map( function( file ) {
+ // Strip leading and trailing single quotes and commas
+ return file.replace( /^\'|\',$/g, '' );
+ } );
+
+ files.forEach(function( file ){
+ const search = `${ BUILD_DIR }${ file }`;
+ assert(
+ false === fs.existsSync( search ),
+ `${ search } should not be present in the $_old_files array.`
+ );
+ });
+ } );
+
+ /**
+ * Build assertions for the lack of source maps in JavaScript files.
+ *
+ * @ticket 24994
+ * @ticket 46218
+ */
+ grunt.registerTask( 'verify:source-maps', function() {
+ const path = `${ BUILD_DIR }**/*.js`;
+ const files = glob.sync( path );
+
+ assert(
+ files.length > 0,
+ 'No JavaScript files found in the build directory.'
+ );
+
+ files.forEach( function( file ) {
+ const contents = fs.readFileSync( file, {
+ encoding: 'utf8',
+ } );
+ // `data:` URLs are allowed:
+ const match = contents.match( /sourceMappingURL=((?!data:).)/ );
+
+ assert(
+ match === null,
+ `The ${ file } file must not contain a sourceMappingURL.`
+ );
+ } );
+ } );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> grunt.registerTask( 'build', function() {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( grunt.option( 'dev' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> grunt.task.run( [
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1442,7 +1564,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'build:css',
</span><span class="cx" style="display: block; padding: 0 10px"> 'includes:emoji',
</span><span class="cx" style="display: block; padding: 0 10px"> 'includes:embed',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'replace:emojiBannerText'
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'replace:emojiBannerText',
+ 'verify:build'
</ins><span class="cx" style="display: block; padding: 0 10px"> ] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } );
</span></span></pre></div>
<a id="branches56READMEmd"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/README.md</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/README.md 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/README.md 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -43,7 +43,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> If you're making changes to WordPress core files, you should start the file watcher in order to build or copy the files as necessary:
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> ```
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-npm run watch
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+npm run dev
</ins><span class="cx" style="display: block; padding: 0 10px"> ```
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> To stop the watcher, press `ctrl+c`.
</span></span></pre></div>
<a id="branches56packagelockjson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/package-lock.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/package-lock.json 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/package-lock.json 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7186,9 +7186,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "dev": true
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "check-node-version": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/check-node-version/-/check-node-version-4.0.3.tgz",
- "integrity": "sha512-kbnOaF7SE1uasWx3hqxzsU2yz7I+rkxSMuTW0eKoF39eUtSR/a0F4Sm35LwJNx4itOIARf9eLhWHOOh7rlZ5/g==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/check-node-version/-/check-node-version-4.1.0.tgz",
+ "integrity": "sha512-TSXGsyfW5/xY2QseuJn8/hleO2AU7HxVCdkc900jp1vcfzF840GkjvRT7CHl8sRtWn23n3X3k0cwH9RXeRwhfw==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "chalk": "^3.0.0",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7398,9 +7398,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "clean-css": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz",
- "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.1.2.tgz",
+ "integrity": "sha512-QcaGg9OuMo+0Ds933yLOY+gHPWbxhxqF0HDexmToPf8pczvmvZGYzd+QqWp9/mkucAOKViI+dSFOqoZIvXbeBw==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "source-map": "~0.6.0"
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12787,44 +12787,42 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "grunt-contrib-cssmin": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-3.0.0.tgz",
- "integrity": "sha512-eXpooYmVGKMs/xV7DzTLgJFPVOfMuawPD3x0JwhlH0mumq2NtH3xsxaHxp1Y3NKxp0j0tRhFS6kSBRsz6TuTGg==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-4.0.0.tgz",
+ "integrity": "sha512-jXU+Zlk8Q8XztOGNGpjYlD/BDQ0n95IHKrQKtFR7Gd8hZrzgqiG1Ra7cGYc8h2DD9vkSFGNlweb9Q00rBxOK2w==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "chalk": "^2.4.1",
- "clean-css": "~4.2.1",
- "maxmin": "^2.1.0"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "chalk": "^4.1.0",
+ "clean-css": "^5.0.1",
+ "maxmin": "^3.0.0"
</ins><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "dependencies": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "ansi-styles": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "figures": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
+ "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "color-convert": "^1.9.0"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "escape-string-regexp": "^1.0.5"
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "maxmin": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-3.0.0.tgz",
+ "integrity": "sha512-wcahMInmGtg/7c6a75fr21Ch/Ks1Tb+Jtoan5Ft4bAI0ZvJqyOw8kkM7e7p8hDSzY805vmxwHT50KcjGwKyJ0g==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "chalk": "^4.1.0",
+ "figures": "^3.2.0",
+ "gzip-size": "^5.1.1",
+ "pretty-bytes": "^5.3.0"
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "pretty-bytes": {
+ "version": "5.6.0",
+ "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",
+ "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==",
+ "dev": true
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -18317,9 +18315,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "dev": true
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "nise": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/nise/-/nise-4.0.4.tgz",
- "integrity": "sha512-bTTRUNlemx6deJa+ZyoCUTRvH3liK5+N6VQZ4NIw90AgDXY6iPnsqplNFf6STcj+ePk0H/xqxnP75Lr0J0Fq3A==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz",
+ "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@sinonjs/commons": "^1.7.0",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -20723,18 +20721,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "mime-db": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "1.45.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
- "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "1.46.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
+ "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "mime-types": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "2.1.28",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz",
- "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "2.1.29",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz",
+ "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "mime-db": "1.45.0"
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "mime-db": "1.46.0"
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "ms": {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -20802,12 +20800,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "dev": true
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "qunit": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "2.14.0",
- "resolved": "https://registry.npmjs.org/qunit/-/qunit-2.14.0.tgz",
- "integrity": "sha512-CYfenbgdpmhl2Ql2rDrrj0felY4h8k6lYhtWwGBCLL4qQC33YOj0psV8MWo85L1i0SIOmEDRXkFopWnGCLmf7g==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "2.14.1",
+ "resolved": "https://registry.npmjs.org/qunit/-/qunit-2.14.1.tgz",
+ "integrity": "sha512-jtFw8bf8+GjzY8UpnwbjqTOdK/rvrjcafUFTNpRc6/9N4q5dBwcwSMlcC76kAn5BRiSFj5Ssn2dfHtEYvtsXSw==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "commander": "6.2.0",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "commander": "7.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "js-reporters": "1.2.3",
</span><span class="cx" style="display: block; padding: 0 10px"> "node-watch": "0.7.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "tiny-glob": "0.2.8"
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -20814,9 +20812,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "dependencies": {
</span><span class="cx" style="display: block; padding: 0 10px"> "commander": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz",
- "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.1.0.tgz",
+ "integrity": "sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22169,9 +22167,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "sass": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "1.32.6",
- "resolved": "https://registry.npmjs.org/sass/-/sass-1.32.6.tgz",
- "integrity": "sha512-1bcDHDcSqeFtMr0JXI3xc/CXX6c4p0wHHivJdru8W7waM7a1WjKMm4m/Z5sY7CbVw4Whi2Chpcw6DFfSWwGLzQ==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "1.32.8",
+ "resolved": "https://registry.npmjs.org/sass/-/sass-1.32.8.tgz",
+ "integrity": "sha512-Sl6mIeGpzjIUZqvKnKETfMf0iDAswD9TNlv13A7aAF3XZlRPMq4VvJWBC2N2DXbp94MQVdNSFG6LfF/iOXrPHQ==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "chokidar": ">=2.0.0 <4.0.0"
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22768,9 +22766,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "sinon": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "9.2.4",
- "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz",
- "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/sinon/-/sinon-10.0.0.tgz",
+ "integrity": "sha512-XAn5DxtGVJBlBWYrcYKEhWCz7FLwZGdyvANRyK06419hyEpdT0dMc5A8Vcxg5SCGHc40CsqoKsc1bt1CbJPfNw==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true,
</span><span class="cx" style="display: block; padding: 0 10px"> "requires": {
</span><span class="cx" style="display: block; padding: 0 10px"> "@sinonjs/commons": "^1.8.1",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22777,7 +22775,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@sinonjs/fake-timers": "^6.0.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "@sinonjs/samsam": "^5.3.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "diff": "^4.0.2",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "nise": "^4.0.4",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "nise": "^4.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "supports-color": "^7.1.0"
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "dependencies": {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25454,9 +25452,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "dev": true
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "uglify-js": {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "version": "3.12.6",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.6.tgz",
- "integrity": "sha512-aqWHe3DfQmZUDGWBbabZ2eQnJlQd1fKlMUu7gV+MiTuDzdgDw31bI3wA2jLLsV/hNcDP26IfyEgSVoft5+0SVw==",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "version": "3.13.2",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.2.tgz",
+ "integrity": "sha512-SbMu4D2Vo95LMC/MetNaso1194M1htEA+JrqE9Hk+G2DhI+itfS9TRu9ZKeCahLDNa/J3n4MqUJ/fOHMzQpRWw==",
</ins><span class="cx" style="display: block; padding: 0 10px"> "dev": true
</span><span class="cx" style="display: block; padding: 0 10px"> },
</span><span class="cx" style="display: block; padding: 0 10px"> "uglify-to-browserify": {
</span></span></pre></div>
<a id="branches56packagejson"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/package.json</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/package.json 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/package.json 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -32,7 +32,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "@wordpress/scripts": "12.4.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "autoprefixer": "^9.8.6",
</span><span class="cx" style="display: block; padding: 0 10px"> "chalk": "4.1.0",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "check-node-version": "4.0.3",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "check-node-version": "4.1.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "copy-webpack-plugin": "^5.1.2",
</span><span class="cx" style="display: block; padding: 0 10px"> "cssnano": "4.1.10",
</span><span class="cx" style="display: block; padding: 0 10px"> "dotenv": "8.2.0",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -42,7 +42,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "grunt-contrib-clean": "~2.0.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "grunt-contrib-concat": "1.0.1",
</span><span class="cx" style="display: block; padding: 0 10px"> "grunt-contrib-copy": "~1.0.0",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "grunt-contrib-cssmin": "~3.0.0",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "grunt-contrib-cssmin": "~4.0.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "grunt-contrib-imagemin": "~4.0.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "grunt-contrib-jshint": "3.0.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "grunt-contrib-qunit": "^4.0.0",
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -62,14 +62,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> "ink-docstrap": "1.3.2",
</span><span class="cx" style="display: block; padding: 0 10px"> "install-changed": "1.1.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "matchdep": "~2.0.0",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "sass": "^1.32.6",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "sass": "^1.32.8",
</ins><span class="cx" style="display: block; padding: 0 10px"> "prettier": "npm:wp-prettier@2.0.5",
</span><span class="cx" style="display: block; padding: 0 10px"> "puppeteer": "npm:puppeteer-core@3.0.0",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "qunit": "~2.14.0",
- "sinon": "~9.2.4",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "qunit": "~2.14.1",
+ "sinon": "~10.0.0",
</ins><span class="cx" style="display: block; padding: 0 10px"> "sinon-test": "~3.0.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "source-map-loader": "^1.1.3",
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- "uglify-js": "^3.12.6",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ "uglify-js": "^3.13.2",
</ins><span class="cx" style="display: block; padding: 0 10px"> "uglifyjs-webpack-plugin": "2.2.0",
</span><span class="cx" style="display: block; padding: 0 10px"> "uuid": "8.3.2",
</span><span class="cx" style="display: block; padding: 0 10px"> "wait-on": "5.2.1",
</span></span></pre></div>
<a id="branches56phpunitxmldist"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/phpunit.xml.dist</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/phpunit.xml.dist 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/phpunit.xml.dist 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -42,38 +42,38 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </listeners>
</span><span class="cx" style="display: block; padding: 0 10px"> <filter>
</span><span class="cx" style="display: block; padding: 0 10px"> <whitelist addUncoveredFilesFromWhitelist="true">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <directory suffix=".php">build</directory>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <directory suffix=".php">src</directory>
</ins><span class="cx" style="display: block; padding: 0 10px"> <exclude>
</span><span class="cx" style="display: block; padding: 0 10px"> <!-- Third party library exclusions. -->
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <directory suffix=".php">build/wp-includes/ID3</directory>
- <directory suffix=".php">build/wp-includes/IXR</directory>
- <directory suffix=".php">build/wp-includes/random_compat</directory>
- <directory suffix=".php">build/wp-includes/PHPMailer</directory>
- <directory suffix=".php">build/wp-includes/Requests</directory>
- <directory suffix=".php">build/wp-includes/SimplePie</directory>
- <directory suffix=".php">build/wp-includes/sodium_compat</directory>
- <directory suffix=".php">build/wp-includes/Text</directory>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <directory suffix=".php">src/wp-includes/ID3</directory>
+ <directory suffix=".php">src/wp-includes/IXR</directory>
+ <directory suffix=".php">src/wp-includes/random_compat</directory>
+ <directory suffix=".php">src/wp-includes/PHPMailer</directory>
+ <directory suffix=".php">src/wp-includes/Requests</directory>
+ <directory suffix=".php">src/wp-includes/SimplePie</directory>
+ <directory suffix=".php">src/wp-includes/sodium_compat</directory>
+ <directory suffix=".php">src/wp-includes/Text</directory>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <!-- Plugins and themes. -->
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <directory suffix=".php">build/wp-content/</directory>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <directory suffix=".php">src/wp-content/</directory>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <file>build/wp-admin/includes/class-ftp*</file>
- <file>build/wp-admin/includes/class-pclzip.php</file>
- <file>build/wp-admin/includes/deprecated.php</file>
- <file>build/wp-admin/includes/ms-deprecated.php</file>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <file>src/wp-admin/includes/class-ftp*</file>
+ <file>src/wp-admin/includes/class-pclzip.php</file>
+ <file>src/wp-admin/includes/deprecated.php</file>
+ <file>src/wp-admin/includes/ms-deprecated.php</file>
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <file>build/wp-includes/atomlib.php</file>
- <file>build/wp-includes/class-IXR.php</file>
- <file>build/wp-includes/class-json.php</file>
- <file>build/wp-includes/class-phpass.php</file>
- <file>build/wp-includes/class-pop3.php</file>
- <file>build/wp-includes/class-requests.php</file>
- <file>build/wp-includes/class-simplepie.php</file>
- <file>build/wp-includes/class-snoopy.php</file>
- <file>build/wp-includes/deprecated.php</file>
- <file>build/wp-includes/ms-deprecated.php</file>
- <file>build/wp-includes/pluggable-deprecated.php</file>
- <file>build/wp-includes/rss.php</file>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <file>src/wp-includes/atomlib.php</file>
+ <file>src/wp-includes/class-IXR.php</file>
+ <file>src/wp-includes/class-json.php</file>
+ <file>src/wp-includes/class-phpass.php</file>
+ <file>src/wp-includes/class-pop3.php</file>
+ <file>src/wp-includes/class-requests.php</file>
+ <file>src/wp-includes/class-simplepie.php</file>
+ <file>src/wp-includes/class-snoopy.php</file>
+ <file>src/wp-includes/deprecated.php</file>
+ <file>src/wp-includes/ms-deprecated.php</file>
+ <file>src/wp-includes/pluggable-deprecated.php</file>
+ <file>src/wp-includes/rss.php</file>
</ins><span class="cx" style="display: block; padding: 0 10px"> </exclude>
</span><span class="cx" style="display: block; padding: 0 10px"> </whitelist>
</span><span class="cx" style="display: block; padding: 0 10px"> </filter>
</span></span></pre></div>
<a id="branches56testsphpunitincludesabstracttestcasephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/tests/phpunit/includes/abstract-testcase.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/phpunit/includes/abstract-testcase.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/phpunit/includes/abstract-testcase.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1293,4 +1293,26 @@
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ /**
+ * Touches the given file and its directory if it doesn't already exist.
+ *
+ * This can be used to ensure a file that is implictly relied on in a test exists
+ * without it having to be built.
+ *
+ * @param string $file The file name.
+ */
+ public static function touch( $file ) {
+ if ( file_exists( $file ) ) {
+ return;
+ }
+
+ $dir = dirname( $file );
+
+ if ( ! file_exists( $dir ) ) {
+ mkdir( $dir, 0777, true );
+ }
+
+ touch( $file );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="branches56testsphpunittestsadminincludesPluginphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/tests/phpunit/tests/admin/includesPlugin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/phpunit/tests/admin/includesPlugin.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/phpunit/tests/admin/includesPlugin.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,6 +4,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @group admin
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_Admin_includesPlugin extends WP_UnitTestCase {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public static function wpSetUpBeforeClass( $factory ) {
+ self::_back_up_mu_plugins();
+ }
+
+ public static function wpTearDownAfterClass() {
+ self::_restore_mu_plugins();
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> function test_get_plugin_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> $data = get_plugin_data( DIR_TESTDATA . '/plugins/hello.php' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -369,12 +377,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'list_files_test_plugin/list_files_test_plugin.php',
</span><span class="cx" style="display: block; padding: 0 10px"> 'list_files_test_plugin/subdir/subfile.php',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $expected, $plugin_files );
</del><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> unlink( $sub_dir . '/subfile.php' );
</span><span class="cx" style="display: block; padding: 0 10px"> unlink( $plugin[1] );
</span><span class="cx" style="display: block; padding: 0 10px"> rmdir( $sub_dir );
</span><span class="cx" style="display: block; padding: 0 10px"> rmdir( $plugin_dir );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ $this->assertSame( $expected, $plugin_files );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -381,22 +390,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers ::get_mu_plugins
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_mu_plugins_when_mu_plugins_exists_but_is_empty() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( is_dir( WPMU_PLUGIN_DIR ) ) {
- $exists = true;
- $this->_back_up_mu_plugins();
- } else {
- $exists = false;
- mkdir( WPMU_PLUGIN_DIR );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ mkdir( WPMU_PLUGIN_DIR );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( array(), get_mu_plugins() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $mu_plugins = get_mu_plugins();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Clean up.
- if ( $exists ) {
- $this->_restore_mu_plugins();
- } else {
- rmdir( WPMU_PLUGIN_DIR );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ rmdir( WPMU_PLUGIN_DIR );
+
+ $this->assertSame( array(), $mu_plugins );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -403,20 +403,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers ::get_mu_plugins
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_mu_plugins_when_mu_plugins_directory_does_not_exist() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $exists = false;
- if ( is_dir( WPMU_PLUGIN_DIR ) ) {
- $exists = true;
- $this->_back_up_mu_plugins();
- rmdir( WPMU_PLUGIN_DIR );
- }
-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertFileNotExists( WPMU_PLUGIN_DIR );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( array(), get_mu_plugins() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- // Clean up.
- if ( $exists ) {
- mkdir( WPMU_PLUGIN_DIR );
- $this->_restore_mu_plugins();
- }
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -423,24 +411,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers ::get_mu_plugins
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_mu_plugins_should_ignore_index_php_containing_silence_is_golden() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( is_dir( WPMU_PLUGIN_DIR ) ) {
- $exists = true;
- $this->_back_up_mu_plugins();
- } else {
- $exists = false;
- mkdir( WPMU_PLUGIN_DIR );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ mkdir( WPMU_PLUGIN_DIR );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_create_plugin( '<?php\n//Silence is golden.', 'index.php', WPMU_PLUGIN_DIR );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( array(), get_mu_plugins() );
</del><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Clean up.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $mu_plugins = get_mu_plugins();
+
</ins><span class="cx" style="display: block; padding: 0 10px"> unlink( WPMU_PLUGIN_DIR . '/index.php' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $exists ) {
- $this->_restore_mu_plugins();
- } else {
- rmdir( WPMU_PLUGIN_DIR );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ rmdir( WPMU_PLUGIN_DIR );
+
+ $this->assertSame( array(), $mu_plugins );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -447,25 +427,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers ::get_mu_plugins
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_mu_plugins_should_not_ignore_index_php_containing_something_other_than_silence_is_golden() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( is_dir( WPMU_PLUGIN_DIR ) ) {
- $exists = true;
- $this->_back_up_mu_plugins();
- } else {
- $exists = false;
- mkdir( WPMU_PLUGIN_DIR );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ mkdir( WPMU_PLUGIN_DIR );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_create_plugin( '<?php\n//Silence is not golden.', 'index.php', WPMU_PLUGIN_DIR );
</span><span class="cx" style="display: block; padding: 0 10px"> $found = get_mu_plugins();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( array( 'index.php' ), array_keys( $found ) );
</del><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Clean up.
</span><span class="cx" style="display: block; padding: 0 10px"> unlink( WPMU_PLUGIN_DIR . '/index.php' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $exists ) {
- $this->_restore_mu_plugins();
- } else {
- rmdir( WPMU_PLUGIN_DIR );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ rmdir( WPMU_PLUGIN_DIR );
+
+ $this->assertSame( array( 'index.php' ), array_keys( $found ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -472,27 +443,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers ::get_mu_plugins
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_mu_plugins_should_ignore_files_without_php_extensions() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( is_dir( WPMU_PLUGIN_DIR ) ) {
- $exists = true;
- $this->_back_up_mu_plugins();
- } else {
- $exists = false;
- mkdir( WPMU_PLUGIN_DIR );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ mkdir( WPMU_PLUGIN_DIR );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_create_plugin( '<?php\n//Test', 'foo.php', WPMU_PLUGIN_DIR );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_create_plugin( '<?php\n//Test 2', 'bar.txt', WPMU_PLUGIN_DIR );
</span><span class="cx" style="display: block; padding: 0 10px"> $found = get_mu_plugins();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( array( 'foo.php' ), array_keys( $found ) );
</del><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Clean up.
</span><span class="cx" style="display: block; padding: 0 10px"> unlink( WPMU_PLUGIN_DIR . '/foo.php' );
</span><span class="cx" style="display: block; padding: 0 10px"> unlink( WPMU_PLUGIN_DIR . '/bar.txt' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $exists ) {
- $this->_restore_mu_plugins();
- } else {
- rmdir( WPMU_PLUGIN_DIR );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ $this->assertSame( array( 'foo.php' ), array_keys( $found ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -651,34 +612,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Move existing mu-plugins to wp-content/mu-plugin/backup.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Move existing mu-plugins to wp-content/mu-plugin-backup.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.2.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @access private
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- private function _back_up_mu_plugins() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ private static function _back_up_mu_plugins() {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( is_dir( WPMU_PLUGIN_DIR ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $mu_bu_dir = WP_CONTENT_DIR . '/mu-plugin-backup';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! is_dir( $mu_bu_dir ) ) {
- mkdir( $mu_bu_dir );
- }
-
- $files_to_move = array();
- $mu_plugins = opendir( WPMU_PLUGIN_DIR );
- if ( $mu_plugins ) {
- while ( false !== $plugin = readdir( $mu_plugins ) ) {
- if ( 0 !== strpos( $plugin, '.' ) ) {
- $files_to_move[] = $plugin;
- }
- }
- }
-
- closedir( $mu_plugins );
-
- foreach ( $files_to_move as $file_to_move ) {
- $f = rename( WPMU_PLUGIN_DIR . '/' . $file_to_move, $mu_bu_dir . '/' . $file_to_move );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ rename( WPMU_PLUGIN_DIR, $mu_bu_dir );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -689,26 +632,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @access private
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- private function _restore_mu_plugins() {
- $mu_bu_dir = WP_CONTENT_DIR . '/mu-plugin-backup';
- $files_to_move = array();
- $mu_plugins = @opendir( $mu_bu_dir );
- if ( $mu_plugins ) {
- while ( false !== $plugin = readdir( $mu_plugins ) ) {
- if ( 0 !== strpos( $plugin, '.' ) ) {
- $files_to_move[] = $plugin;
- }
- }
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ private static function _restore_mu_plugins() {
+ $mu_bu_dir = WP_CONTENT_DIR . '/mu-plugin-backup';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- closedir( $mu_plugins );
-
- foreach ( $files_to_move as $file_to_move ) {
- rename( $mu_bu_dir . '/' . $file_to_move, WPMU_PLUGIN_DIR . '/' . $file_to_move );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( is_dir( WPMU_PLUGIN_DIR ) ) {
+ rmdir( WPMU_PLUGIN_DIR );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_dir( $mu_bu_dir ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- rmdir( $mu_bu_dir );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ rename( $mu_bu_dir, WPMU_PLUGIN_DIR );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="branches56testsphpunittestsadminincludesUpdateCorephp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: branches/5.6/tests/phpunit/tests/admin/includesUpdateCore.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/phpunit/tests/admin/includesUpdateCore.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/phpunit/tests/admin/includesUpdateCore.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,34 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-
-/**
- * @group admin
- * @group upgrade
- */
-class Tests_Admin_IncludesUpdateCore extends WP_UnitTestCase {
- public function data_old_files() {
- global $_old_files;
-
- require_once ABSPATH . 'wp-admin/includes/update-core.php';
-
- $files = $_old_files;
-
- foreach ( $files as &$file ) {
- $file = array( $file );
- }
-
- return $files;
- }
-
- /**
- * Ensure no project files are inside `$_old_files` in the build directory.
- *
- * @ticket 36083
- *
- * @dataProvider data_old_files
- *
- * @param string $file File name.
- */
- public function test_new_files_are_not_in_old_files_array_compiled( $file ) {
- $this->assertFileNotExists( dirname( ABSPATH ) . '/build/' . $file );
- }
-}
</del></span></pre></div>
<a id="branches56testsphpunittestsdependenciesjqueryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/tests/phpunit/tests/dependencies/jquery.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/phpunit/tests/dependencies/jquery.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/phpunit/tests/dependencies/jquery.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -36,13 +36,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- function test_presence_of_jquery_no_conflict() {
- $contents = trim( file_get_contents( ABSPATH . WPINC . '/js/jquery/jquery.js' ) );
- $noconflict = 'jQuery.noConflict();';
- $end = substr( $contents, - strlen( $noconflict ) );
- $this->assertSame( $noconflict, $end );
- }
-
</del><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 22896
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span></span></pre></div>
<a id="branches56testsphpunittestsdependenciesmediaelementjsphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: branches/5.6/tests/phpunit/tests/dependencies/mediaelementjs.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/phpunit/tests/dependencies/mediaelementjs.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/phpunit/tests/dependencies/mediaelementjs.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,36 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-
-/**
- * @group dependencies
- * @group scripts
- */
-class Tests_Dependencies_MediaElementjs extends WP_UnitTestCase {
- /**
- * Test if the MediaElement.js Flash fallbacks have been re-added.
- *
- * MediaElement's Flash fallbacks were removed in WordPress 4.9.2 due to limited use cases and
- * a history of security vulnerabilities. It's unlikely that there'll ever be a need to
- * restore them in the future, and doing so could introduce security vulnerabilities. If you
- * want to re-add them, please discuss that with the Security team first.
- *
- * @since 5.1.0
- *
- * @ticket 42720
- */
- function test_exclusion_of_flash() {
- $mejs_folder = ABSPATH . WPINC . '/js/mediaelement';
- $js_files = glob( $mejs_folder . '/*.js' );
-
- /*
- * The path in $mejs_folder is hardcoded, so this is just a sanity check to make sure the
- * correct directory is used, in case it gets renamed in the future.
- */
- $this->assertGreaterThan( 0, count( $js_files ) );
-
- $mejs_directory_iterator = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( $mejs_folder ) );
- $mejs_swf_iterator = new RegexIterator( $mejs_directory_iterator, '/\.swf$/i', RecursiveRegexIterator::GET_MATCH );
-
- // Make sure the Flash files haven't been re-added accidentally.
- $this->assertCount( 0, iterator_to_array( $mejs_swf_iterator ) );
- }
-}
</del></span></pre></div>
<a id="branches56testsphpunittestsdependenciesscriptsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/tests/phpunit/tests/dependencies/scripts.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/phpunit/tests/dependencies/scripts.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/phpunit/tests/dependencies/scripts.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1402,16 +1402,4 @@
</span><span class="cx" style="display: block; padding: 0 10px"> array_keys( $wp_enqueue_code_editor['htmlhint'] )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- function test_no_source_mapping() {
- $all_files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( dirname( ABSPATH ) . '/build/' ) );
- $js_files = new RegexIterator( $all_files, '/\.js$/' );
- foreach ( $js_files as $js_file ) {
- $contents = trim( file_get_contents( $js_file ) );
-
- // We allow data: URLs.
- $found = preg_match( '/sourceMappingURL=((?!data:).)/', $contents );
- $this->assertSame( $found, 0, "sourceMappingURL found in $js_file" );
- }
- }
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="branches56testsphpunittestsformattingEmojiphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/tests/phpunit/tests/formatting/Emoji.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/phpunit/tests/formatting/Emoji.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/phpunit/tests/formatting/Emoji.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,6 +13,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 36525
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_unfiltered_emoji_cdns() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // `_print_emoji_detection_script()` assumes `wp-includes/js/wp-emoji-loader.js` is present:
+ self::touch( ABSPATH . WPINC . '/js/wp-emoji-loader.js' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $output = get_echo( '_print_emoji_detection_script' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertContains( wp_json_encode( $this->png_cdn ), $output );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,6 +33,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'emoji_svg_url', array( $this, '_filtered_emoji_svn_cdn' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // `_print_emoji_detection_script()` assumes `wp-includes/js/wp-emoji-loader.js` is present:
+ self::touch( ABSPATH . WPINC . '/js/wp-emoji-loader.js' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $output = get_echo( '_print_emoji_detection_script' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertContains( wp_json_encode( $this->png_cdn ), $output );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -52,6 +56,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'emoji_url', array( $this, '_filtered_emoji_png_cdn' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // `_print_emoji_detection_script()` assumes `wp-includes/js/wp-emoji-loader.js` is present:
+ self::touch( ABSPATH . WPINC . '/js/wp-emoji-loader.js' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $output = get_echo( '_print_emoji_detection_script' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertContains( wp_json_encode( $filtered_png_cdn ), $output );
</span></span></pre></div>
<a id="branches56testsphpunittestsoembedcontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/tests/phpunit/tests/oembed/controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/phpunit/tests/oembed/controller.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/phpunit/tests/oembed/controller.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,6 +34,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'user_email' => 'administrator@example.com',
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ // `get_post_embed_html()` assumes `wp-includes/js/wp-embed.js` is present:
+ self::touch( ABSPATH . WPINC . '/js/wp-embed.js' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public static function wpTearDownAfterClass() {
</span></span></pre></div>
<a id="branches56testsphpunittestsoembedgetResponseDataphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/tests/phpunit/tests/oembed/getResponseData.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/phpunit/tests/oembed/getResponseData.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/phpunit/tests/oembed/getResponseData.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,6 +4,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @group oembed
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> class Tests_oEmbed_Response_Data extends WP_UnitTestCase {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function setUp() {
+ parent::setUp();
+
+ // `get_post_embed_html()` assumes `wp-includes/js/wp-embed.js` is present:
+ self::touch( ABSPATH . WPINC . '/js/wp-embed.js' );
+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> function test_get_oembed_response_data_non_existent_post() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( get_oembed_response_data( 0, 100 ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="branches56testsphpunittestsoembedtemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/tests/phpunit/tests/oembed/template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/phpunit/tests/oembed/template.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/phpunit/tests/oembed/template.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -23,6 +23,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertQueryTrue( 'is_single', 'is_singular', 'is_embed' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // `print_embed_scripts()` assumes `wp-includes/js/wp-embed-template.js` is present:
+ self::touch( ABSPATH . WPINC . '/js/wp-embed-template.js' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> ob_start();
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/theme-compat/embed.php';
</span><span class="cx" style="display: block; padding: 0 10px"> $actual = ob_get_clean();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -55,6 +58,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertQueryTrue( 'is_single', 'is_singular', 'is_embed' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // `print_embed_scripts()` assumes `wp-includes/js/wp-embed-template.js` is present:
+ self::touch( ABSPATH . WPINC . '/js/wp-embed-template.js' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> ob_start();
</span><span class="cx" style="display: block; padding: 0 10px"> require ABSPATH . WPINC . '/theme-compat/embed.php';
</span><span class="cx" style="display: block; padding: 0 10px"> $actual = ob_get_clean();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -290,50 +296,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Confirms that no ampersands exist in src/wp-includes/js/wp-embed.js.
+ *
+ * See also the `verify:wp-embed` Grunt task for verifying the built file.
+ *
</ins><span class="cx" style="display: block; padding: 0 10px"> * @ticket 34698
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_js_no_ampersands() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertNotContains( '&', file_get_contents( ABSPATH . WPINC . '/js/wp-embed.js' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- /**
- * @ticket 34698
- *
- * @depends test_js_no_ampersands
- *
- * The previous test confirms that no ampersands exist in src/wp-includes/js/wp-embed.js.
- * However, we must also confirm that UglifyJS does not add ampersands during its
- * optimizations (which we tweak to avoid, but indirectly -- understandably, there's
- * no "don't add ampersands to my JavaScript file" option).
- *
- * So this test checks for ampersands in build/wp-includes/js/wp-embed.min.js.
- * In many cases, this file will not exist; in those cases, we simply skip the test.
- *
- * So when would it be run? We have Travis CI run `npm run test` which then runs, in order,
- * `qunit:compiled` (which runs the build) and then `phpunit`. Thus, this test will at least be
- * run during continuous integration.
- *
- * However, we need to verify that `qunit:compiled` runs before `phpunit`. So this test also
- * does a cheap check for a registered Grunt task called `test` that contains both
- * `qunit:compiled` and `phpunit`, in that order.
- *
- * One final failsafe: The Gruntfile.js assertion takes place before checking for the existence
- * of wp-embed.min.js. If the Grunt tasks are significantly refactored later, it could indicate
- * that wp-embed.min.js doesn't exist anymore. We wouldn't want the test to silently become one
- * that is always skipped, and thus useless.
- */
- function test_js_no_ampersands_in_compiled() {
- $gruntfile = file_get_contents( dirname( ABSPATH ) . '/Gruntfile.js' );
-
- // Confirm this file *should* exist, otherwise this test will always be skipped.
- $test = '/grunt.registerTask\(\s*\'test\',.*\'qunit:compiled\'.*\'phpunit\'/';
- $this->assertTrue( (bool) preg_match( $test, $gruntfile ) );
-
- $file = dirname( ABSPATH ) . '/build/' . WPINC . '/js/wp-embed.min.js';
- if ( ! file_exists( $file ) ) {
- return;
- }
- $this->assertNotContains( '&', file_get_contents( $file ) );
- }
-
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="branches56testsphpunittestsoembedwpOembedphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/tests/phpunit/tests/oembed/wpOembed.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/phpunit/tests/oembed/wpOembed.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/phpunit/tests/oembed/wpOembed.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -18,6 +18,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->oembed = _wp_oembed_get_object();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->pre_oembed_result_filtered = false;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ // `get_post_embed_html()` assumes `wp-includes/js/wp-embed.js` is present:
+ self::touch( ABSPATH . WPINC . '/js/wp-embed.js' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function _filter_pre_oembed_result( $result ) {
</span></span></pre></div>
<a id="branches56testsphpunittestsshortcodephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/tests/phpunit/tests/shortcode.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/phpunit/tests/shortcode.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/phpunit/tests/shortcode.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -746,7 +746,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> function test_php_and_js_shortcode_attribute_regexes_match() {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $file = file_get_contents( ABSPATH . WPINC . '/js/shortcode.js' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $file = file_get_contents( ABSPATH . 'js/_enqueues/wp/shortcode.js' );
</ins><span class="cx" style="display: block; padding: 0 10px"> $matched = preg_match( '|\s+pattern = (\/.+\/)g;|', $file, $matches );
</span><span class="cx" style="display: block; padding: 0 10px"> $php = get_shortcode_atts_regex();
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="branches56testsqunitindexhtml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/tests/qunit/index.html</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/tests/qunit/index.html 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/tests/qunit/index.html 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -151,6 +151,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <script src="wp-admin/js/dashboard.js"></script>
</span><span class="cx" style="display: block; padding: 0 10px"> <script src="wp-includes/js/shortcode.js"></script>
</span><span class="cx" style="display: block; padding: 0 10px"> <script src="wp-includes/js/api-request.js"></script>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <script src="wp-includes/js/jquery.js"></script>
</ins><span class="cx" style="display: block; padding: 0 10px"> <script src="wp-includes/js/wp-api.js"></script>
</span><span class="cx" style="display: block; padding: 0 10px"> <script src="wp-admin/js/customize-controls.js"></script>
</span><span class="cx" style="display: block; padding: 0 10px"> <script src="wp-admin/js/customize-controls-utils.js"></script>
</span></span></pre></div>
<a id="branches56wptestsconfigsamplephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: branches/5.6/wp-tests-config-sample.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- branches/5.6/wp-tests-config-sample.php 2021-03-26 16:07:38 UTC (rev 50601)
+++ branches/5.6/wp-tests-config-sample.php 2021-03-26 17:21:35 UTC (rev 50602)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,11 +1,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /* Path to the WordPress codebase you'd like to test. Add a forward slash in the end. */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) {
- define( 'ABSPATH', dirname( __FILE__ ) . '/build/' );
-} else {
- define( 'ABSPATH', dirname( __FILE__ ) . '/src/' );
-}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+define( 'ABSPATH', dirname( __FILE__ ) . '/src/' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px"> * Path to the theme to test with.
</span></span></pre>
</div>
</div>
</body>
</html>