<!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>[51968] trunk/tests/phpunit/tests: Build/Test Tools: Ignore "null to nullable" deprecations for select tests.</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/51968">51968</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/51968","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>hellofromTonya</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-11-01 22:22:49 +0000 (Mon, 01 Nov 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: Ignore "null to nullable" deprecations for select tests.

Adds an expectation for PHP 8.1 "passing null to non-nullable" deprecation notice to select tests where the deprecation is generated by one of the functions in the `wp-includes/formatting.php` file, either via a filter hook callback or by a direct call.

Instead of haphazardly fixing these issues exposed by the tests, a more structural and all-encompassing solution for input validation should be architected and implemented as otherwise, we'll keep running into similar issues time and again with each new PHP version.

To discourage people from "fixing" these issues now anyway, this commit "hides" nearly all of these issues from the test runs.

Once a more structural solution is designed, these tests and the underlying functions causing the deprecation notices should be revisited and the structural solution put in place.

Includes a few minor other tweaks to select tests:
* Removing a stray `return` (twice) from assertion statements.
* Removing calls to `ob_*()` functions in favour of letting PHPUnit manage the output catching. This prevents warnings along the lines of `Test code or tested code did not (only) close its own output buffers`.

Props jrf, hellofromTonya.
See <a href="https://core.trac.wordpress.org/ticket/53635">#53635</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestsadminincludesListTablephp">trunk/tests/phpunit/tests/admin/includesListTable.php</a></li>
<li><a href="#trunktestsphpunittestsadminincludesPostphp">trunk/tests/phpunit/tests/admin/includesPost.php</a></li>
<li><a href="#trunktestsphpunittestscommentsubmissionphp">trunk/tests/phpunit/tests/comment-submission.php</a></li>
<li><a href="#trunktestsphpunittestsdatexmlrpcphp">trunk/tests/phpunit/tests/date/xmlrpc.php</a></li>
<li><a href="#trunktestsphpunittestsdependenciesscriptsphp">trunk/tests/phpunit/tests/dependencies/scripts.php</a></li>
<li><a href="#trunktestsphpunittestsformattingwpRelNofollowphp">trunk/tests/phpunit/tests/formatting/wpRelNofollow.php</a></li>
<li><a href="#trunktestsphpunittestsformattingwpRelUgcphp">trunk/tests/phpunit/tests/formatting/wpRelUgc.php</a></li>
<li><a href="#trunktestsphpunittestsformattingwpTrimExcerptphp">trunk/tests/phpunit/tests/formatting/wpTrimExcerpt.php</a></li>
<li><a href="#trunktestsphpunitteststermwpGenerateTagCloudphp">trunk/tests/phpunit/tests/term/wpGenerateTagCloud.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcmweditPostphp">trunk/tests/phpunit/tests/xmlrpc/mw/editPost.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcmwnewPostphp">trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcwpeditPostphp">trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcwpgetRevisionsphp">trunk/tests/phpunit/tests/xmlrpc/wp/getRevisions.php</a></li>
<li><a href="#trunktestsphpunittestsxmlrpcwpnewPostphp">trunk/tests/phpunit/tests/xmlrpc/wp/newPost.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestsadminincludesListTablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/admin/includesListTable.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/admin/includesListTable.php     2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/admin/includesListTable.php       2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -185,6 +185,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @param array $expected_ids Expected IDs of pages returned.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        protected function _test_list_hierarchical_page( array $args, array $expected_ids ) {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $matches = array();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $_REQUEST['paged']   = $args['paged'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -205,12 +215,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $args['posts_per_archive_page'] = -1;
</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">+                // Effectively ignore the output until retrieving it later via `getActualOutput()`.
+               $this->expectOutputRegex( '`.`' );
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $pages = new WP_Query( $args );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                ob_start();
</del><span class="cx" style="display: block; padding: 0 10px">                 $this->table->set_hierarchical_display( true );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->table->display_rows( $pages->posts );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $output = ob_get_clean();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $output = $this->getActualOutput();
</ins><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">                unset( $_REQUEST['paged'] );
</span></span></pre></div>
<a id="trunktestsphpunittestsadminincludesPostphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/admin/includesPost.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/admin/includesPost.php  2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/admin/includesPost.php    2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -876,6 +876,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 37406
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_post_exists_should_support_post_type() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $title     = 'Foo Bar';
</span><span class="cx" style="display: block; padding: 0 10px">                $post_type = 'page';
</span><span class="cx" style="display: block; padding: 0 10px">                $post_id   = self::factory()->post->create(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -893,6 +903,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 37406
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_post_exists_should_not_match_a_page_for_post() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $title     = 'Foo Bar';
</span><span class="cx" style="display: block; padding: 0 10px">                $post_type = 'page';
</span><span class="cx" style="display: block; padding: 0 10px">                $post_id   = self::factory()->post->create(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -910,6 +930,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 34012
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_post_exists_should_support_post_status() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $title       = 'Foo Bar';
</span><span class="cx" style="display: block; padding: 0 10px">                $post_type   = 'post';
</span><span class="cx" style="display: block; padding: 0 10px">                $post_status = 'publish';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -930,6 +960,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 34012
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_post_exists_should_support_post_type_status_combined() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $title       = 'Foo Bar';
</span><span class="cx" style="display: block; padding: 0 10px">                $post_type   = 'post';
</span><span class="cx" style="display: block; padding: 0 10px">                $post_status = 'publish';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -949,6 +989,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 34012
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_post_exists_should_only_match_correct_post_status() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $title       = 'Foo Bar';
</span><span class="cx" style="display: block; padding: 0 10px">                $post_type   = 'post';
</span><span class="cx" style="display: block; padding: 0 10px">                $post_status = 'draft';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -968,6 +1018,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 34012
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_post_exists_should_not_match_invalid_post_type_and_status_combined() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $title       = 'Foo Bar';
</span><span class="cx" style="display: block; padding: 0 10px">                $post_type   = 'post';
</span><span class="cx" style="display: block; padding: 0 10px">                $post_status = 'publish';
</span></span></pre></div>
<a id="trunktestsphpunittestscommentsubmissionphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/comment-submission.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/comment-submission.php  2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/comment-submission.php    2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -200,6 +200,15 @@
</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">        public function test_submitting_comment_to_password_protected_post_succeeds() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $password = 'password';
</span><span class="cx" style="display: block; padding: 0 10px">                $hasher   = new PasswordHash( 8, true );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -282,6 +291,15 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @group slashes
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_submitting_comment_handles_slashes_correctly_handles_slashes() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $data    = array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_post_ID' => self::$post->ID,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -429,6 +447,15 @@
</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">        public function test_anonymous_user_cannot_comment_unfiltered_html() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $data    = array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_post_ID' => self::$post->ID,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -719,6 +746,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 49236
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_submitting_comment_with_empty_type_results_in_correct_type() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $data    = array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_post_ID' => self::$post->ID,
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment'         => 'Comment',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -802,6 +839,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 36901
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_submitting_duplicate_comments() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $data           = array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_post_ID' => self::$post->ID,
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment'         => 'Did I say that?',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -818,6 +865,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 36901
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_comments_flood() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $data          = array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment_post_ID' => self::$post->ID,
</span><span class="cx" style="display: block; padding: 0 10px">                        'comment'         => 'Did I say that?',
</span></span></pre></div>
<a id="trunktestsphpunittestsdatexmlrpcphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/date/xmlrpc.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/date/xmlrpc.php 2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/date/xmlrpc.php   2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,6 +14,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @covers wp_xmlrpc_server::mw_newPost
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_date_new_post() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $timezone = 'Europe/Kiev';
</span><span class="cx" style="display: block; padding: 0 10px">                update_option( 'timezone_string', $timezone );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsdependenciesscriptsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/dependencies/scripts.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/dependencies/scripts.php        2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/dependencies/scripts.php  2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -721,6 +721,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_scripts->base_url  = '';
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_scripts->do_concat = true;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $ver       = get_bloginfo( 'version' );
</span><span class="cx" style="display: block; padding: 0 10px">                $suffix    = wp_scripts_get_suffix();
</span><span class="cx" style="display: block; padding: 0 10px">                $expected  = "<script type='text/javascript' src='/wp-admin/load-scripts.php?c=0&amp;load%5Bchunk_0%5D=jquery-core,jquery-migrate,regenerator-runtime,wp-polyfill,wp-dom-ready,wp-hooks&amp;ver={$ver}'></script>\n";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -746,9 +756,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                wp_enqueue_script( 'test-example2', 'http://example2.com', array( 'wp-a11y' ), null );
</span><span class="cx" style="display: block; padding: 0 10px">                wp_add_inline_script( 'test-example2', 'console.log("after");', 'after' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $print_scripts  = get_echo( 'wp_print_scripts' );
-               $print_scripts .= get_echo( '_print_scripts' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // Effectively ignore the output until retrieving it later via `getActualOutput()`.
+               $this->expectOutputRegex( '`.`' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                wp_print_scripts();
+               _print_scripts();
+               $print_scripts = $this->getActualOutput();
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 /*
</span><span class="cx" style="display: block; padding: 0 10px">                 * We've replaced wp-a11y.js with @wordpress/a11y package (see #45066),
</span><span class="cx" style="display: block; padding: 0 10px">                 * and `wp-polyfill` is now a dependency of the packaged wp-a11y.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -776,6 +790,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_scripts->base_url  = '';
</span><span class="cx" style="display: block; padding: 0 10px">                $wp_scripts->do_concat = true;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $expected_tail  = "<script type='text/javascript' src='/customize-dependency.js' id='customize-dependency-js'></script>\n";
</span><span class="cx" style="display: block; padding: 0 10px">                $expected_tail .= "<script type='text/javascript' id='customize-dependency-js-after'>\n";
</span><span class="cx" style="display: block; padding: 0 10px">                $expected_tail .= "tryCustomizeDependency()\n";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -785,9 +809,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                wp_enqueue_script( $handle, '/customize-dependency.js', array( 'customize-controls' ), null );
</span><span class="cx" style="display: block; padding: 0 10px">                wp_add_inline_script( $handle, 'tryCustomizeDependency()' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $print_scripts  = get_echo( 'wp_print_scripts' );
-               $print_scripts .= get_echo( '_print_scripts' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // Effectively ignore the output until retrieving it later via `getActualOutput()`.
+               $this->expectOutputRegex( '`.`' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                wp_print_scripts();
+               _print_scripts();
+               $print_scripts = $this->getActualOutput();
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $tail = substr( $print_scripts, strrpos( $print_scripts, "<script type='text/javascript' src='/customize-dependency.js' id='customize-dependency-js'>" ) );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $expected_tail, $tail );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre></div>
<a id="trunktestsphpunittestsformattingwpRelNofollowphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/formatting/wpRelNofollow.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/formatting/wpRelNofollow.php    2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/formatting/wpRelNofollow.php      2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,6 +9,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 9959
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_add_no_follow() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $content  = '<p>This is some cool <a href="/">Code</a></p>';
</span><span class="cx" style="display: block; padding: 0 10px">                $expected = '<p>This is some cool <a href=\"/\" rel=\"nofollow\">Code</a></p>';
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $expected, wp_rel_nofollow( $content ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -18,6 +28,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 9959
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_convert_no_follow() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $content  = '<p>This is some cool <a href="/" rel="weird">Code</a></p>';
</span><span class="cx" style="display: block; padding: 0 10px">                $expected = '<p>This is some cool <a href=\"/\" rel=\"weird nofollow\">Code</a></p>';
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $expected, wp_rel_nofollow( $content ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,8 +47,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 11360
</span><span class="cx" style="display: block; padding: 0 10px">         * @dataProvider data_wp_rel_nofollow
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function test_wp_rel_nofollow( $input, $output ) {
-               return $this->assertSame( wp_slash( $output ), wp_rel_nofollow( $input ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_wp_rel_nofollow( $input, $output, $expect_deprecation = false ) {
+               if ( true === $expect_deprecation && PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
+               $this->assertSame( wp_slash( $output ), wp_rel_nofollow( $input ) );
</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 data_wp_rel_nofollow() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -39,6 +69,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                '<a href="">Double Quotes</a>',
</span><span class="cx" style="display: block; padding: 0 10px">                                '<a href="" rel="nofollow">Double Quotes</a>',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                true,
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                '<a href="https://wordpress.org">Double Quotes</a>',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -76,6 +107,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">        public function test_append_no_follow_with_valueless_attribute() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $content  = '<p>This is some cool <a href="demo.com" download rel="hola">Code</a></p>';
</span><span class="cx" style="display: block; padding: 0 10px">                $expected = '<p>This is some cool <a href=\"demo.com\" download rel=\"hola nofollow\">Code</a></p>';
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $expected, wp_rel_nofollow( $content ) );
</span></span></pre></div>
<a id="trunktestsphpunittestsformattingwpRelUgcphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/formatting/wpRelUgc.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/formatting/wpRelUgc.php 2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/formatting/wpRelUgc.php   2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -9,6 +9,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 48022
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_add_ugc() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $content  = '<p>This is some cool <a href="/">Code</a></p>';
</span><span class="cx" style="display: block; padding: 0 10px">                $expected = '<p>This is some cool <a href=\"/\" rel=\"nofollow ugc\">Code</a></p>';
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $expected, wp_rel_ugc( $content ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -18,6 +28,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 48022
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_convert_ugc() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $content  = '<p>This is some cool <a href="/" rel="weird">Code</a></p>';
</span><span class="cx" style="display: block; padding: 0 10px">                $expected = '<p>This is some cool <a href=\"/\" rel=\"weird nofollow ugc\">Code</a></p>';
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $expected, wp_rel_ugc( $content ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,8 +47,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 48022
</span><span class="cx" style="display: block; padding: 0 10px">         * @dataProvider data_wp_rel_ugc
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        public function test_wp_rel_ugc( $input, $output ) {
-               return $this->assertSame( wp_slash( $output ), wp_rel_ugc( $input ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ public function test_wp_rel_ugc( $input, $output, $expect_deprecation = false ) {
+               if ( true === $expect_deprecation && PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
+               $this->assertSame( wp_slash( $output ), wp_rel_ugc( $input ) );
</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 data_wp_rel_ugc() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -39,6 +69,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                '<a href="">Double Quotes</a>',
</span><span class="cx" style="display: block; padding: 0 10px">                                '<a href="" rel="nofollow ugc">Double Quotes</a>',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                true,
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                '<a href="https://wordpress.org">Double Quotes</a>',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -76,6 +107,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">        public function test_append_ugc_with_valueless_attribute() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $content  = '<p>This is some cool <a href="demo.com" download rel="hola">Code</a></p>';
</span><span class="cx" style="display: block; padding: 0 10px">                $expected = '<p>This is some cool <a href=\"demo.com\" download rel=\"hola nofollow ugc\">Code</a></p>';
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $expected, wp_rel_ugc( $content ) );
</span></span></pre></div>
<a id="trunktestsphpunittestsformattingwpTrimExcerptphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/formatting/wpTrimExcerpt.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/formatting/wpTrimExcerpt.php    2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/formatting/wpTrimExcerpt.php      2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -71,6 +71,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 51042
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_should_generate_excerpt_for_empty_values() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $post = self::factory()->post->create(
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'post_content' => 'Post content',
</span></span></pre></div>
<a id="trunktestsphpunitteststermwpGenerateTagCloudphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/term/wpGenerateTagCloud.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/term/wpGenerateTagCloud.php     2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/term/wpGenerateTagCloud.php       2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -263,6 +263,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 5172
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_should_include_tag_link_position_class() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 register_taxonomy( 'wptests_tax', 'post' );
</span><span class="cx" style="display: block; padding: 0 10px">                $term_ids = self::factory()->term->create_many( 3, array( 'taxonomy' => 'wptests_tax' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestsxmlrpcmweditPostphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/xmlrpc/mw/editPost.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/mw/editPost.php  2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/xmlrpc/mw/editPost.php    2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -301,6 +301,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 35874
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_draft_not_prematurely_published() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $editor_id = $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post = array(
</span></span></pre></div>
<a id="trunktestsphpunittestsxmlrpcmwnewPostphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php   2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/xmlrpc/mw/newPost.php     2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22,6 +22,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">        function test_no_content() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -32,6 +42,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">        function test_basic_content() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array( 'title' => 'Test' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -41,6 +61,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">        function test_ignore_id() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,6 +83,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">        function test_capable_publish() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -76,6 +116,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">        function test_capable_other_author() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px">                $other_author_id = $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -116,6 +166,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">        function test_empty_author() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $my_author_id = $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array( 'title' => 'Test' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -164,6 +224,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">        function test_capable_set_post_type_as_page() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -184,6 +254,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 16985
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_draft_post_date() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array(
</span></span></pre></div>
<a id="trunktestsphpunittestsxmlrpcwpeditPostphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php  2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/xmlrpc/wp/editPost.php    2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -468,6 +468,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 35874
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_draft_not_prematurely_published() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $editor_id = $this->make_user_by_role( 'editor' );
</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">@@ -504,6 +514,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 45322
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_draft_not_assigned_published_date() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $editor_id = $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Start with a draft post, confirming its post_date_gmt is "zero".
</span></span></pre></div>
<a id="trunktestsphpunittestsxmlrpcwpgetRevisionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/xmlrpc/wp/getRevisions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/wp/getRevisions.php      2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/xmlrpc/wp/getRevisions.php        2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,6 +60,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 22687
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_revision_count_for_auto_draft_post_creation() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post_id = $this->myxmlrpcserver->wp_newPost(
</span></span></pre></div>
<a id="trunktestsphpunittestsxmlrpcwpnewPostphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/xmlrpc/wp/newPost.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/xmlrpc/wp/newPost.php   2021-11-01 21:45:45 UTC (rev 51967)
+++ trunk/tests/phpunit/tests/xmlrpc/wp/newPost.php     2021-11-01 22:22:49 UTC (rev 51968)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -20,6 +20,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">        function test_no_content() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $result = $this->myxmlrpcserver->wp_newPost( array( 1, 'author', 'author', array() ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,6 +39,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">        function test_basic_content() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array( 'post_title' => 'Test' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -38,6 +58,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">        function test_ignore_id() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -50,6 +80,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">        function test_capable_publish() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -73,6 +113,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">        function test_capable_private() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -96,6 +146,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">        function test_capable_other_author() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $other_author_id = $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -133,6 +193,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">        function test_empty_author() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $my_author_id = $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array( 'post_title' => 'Test' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -169,6 +239,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">        function test_invalid_post_status() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -193,6 +273,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">        function test_capable_sticky() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -218,6 +308,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">        function test_post_format() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -230,6 +330,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">        function test_invalid_post_format() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $post   = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -280,6 +390,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">        function test_terms() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $tag1 = wp_create_tag( 'tag1' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -305,6 +425,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">        function test_terms_names() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $ambiguous_name = 'foo';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -348,6 +478,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 28601
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_invalid_post_date_does_not_fatal() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px">                $date_string  = 'invalid_date';
</span><span class="cx" style="display: block; padding: 0 10px">                $post         = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -365,6 +505,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 28601
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_invalid_post_date_gmt_does_not_fatal() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px">                $date_string  = 'invalid_date';
</span><span class="cx" style="display: block; padding: 0 10px">                $post         = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -382,6 +532,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 28601
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_valid_string_post_date() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px">                $date_string  = '1984-01-11 05:00:00';
</span><span class="cx" style="display: block; padding: 0 10px">                $post         = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -399,6 +559,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 28601
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_valid_string_post_date_gmt() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px">                $date_string  = '1984-01-11 05:00:00';
</span><span class="cx" style="display: block; padding: 0 10px">                $post         = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -416,6 +586,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 28601
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_valid_IXR_post_date() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px">                $date_string  = '1984-01-11 05:00:00';
</span><span class="cx" style="display: block; padding: 0 10px">                $post         = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -433,6 +613,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 28601
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function test_valid_IXR_post_date_gmt() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( PHP_VERSION_ID >= 80100 ) {
+                       /*
+                        * For the time being, ignoring PHP 8.1 "null to non-nullable" deprecations coming in
+                        * via hooked in filter functions until a more structural solution to the
+                        * "missing input validation" conundrum has been architected and implemented.
+                        */
+                       $this->expectDeprecation();
+                       $this->expectDeprecationMessageMatches( '`Passing null to parameter \#[0-9]+ \(\$[^\)]+\) of type [^ ]+ is deprecated`' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->make_user_by_role( 'author' );
</span><span class="cx" style="display: block; padding: 0 10px">                $date_string  = '1984-01-11 05:00:00';
</span><span class="cx" style="display: block; padding: 0 10px">                $post         = array(
</span></span></pre>
</div>
</div>

</body>
</html>