Page MenuHomePhabricator

Test output changes slightly between PHP versions
Closed, ResolvedPublic


See and

Seems to be subtle whitespace changes, but enough to cause the tests to fail which is annoying and slightly concerning.

Event Timeline

Esanders created this task.Oct 23 2020, 8:50 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 23 2020, 8:50 AM

This only affects the tests for CommentFormatter, which uses HtmlFormatter, which uses he built-in DOM methods in PHP. The tests for code using Parsoid only don't have this problem.

The following all fail for me locally:

php7.2 ../../core/tests/phpunit/phpunit.php tests/phpunit/CommentFormatterTest.php
php7.3 ../../core/tests/phpunit/phpunit.php tests/phpunit/CommentFormatterTest.php
php7.4 ../../core/tests/phpunit/phpunit.php tests/phpunit/CommentFormatterTest.php

using these versions:

PHP (cli) (built: Oct 31 2020 16:57:33) ( NTS )
PHP (cli) (built: Oct 31 2020 17:00:17) ( NTS )
PHP 7.4.12 (cli) (built: Oct 31 2020 17:04:25) ( NTS )

Maybe there is some common system dependency, or config, rather than PHP version?

Change 641197 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Use Parsoid DOMCompat/DOMUtils in CommentFormatter

Change 641197 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Use Parsoid DOMCompat/DOMUtils in CommentFormatter

ppelberg closed this task as Resolved.Sat, Nov 21, 3:01 AM
ppelberg claimed this task.