Page MenuHomePhabricator

Test output changes slightly between PHP versions
Closed, ResolvedPublic

Description

See https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/635576 and https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/635815/4

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 7.2.34-8+ubuntu20.04.1+deb.sury.org+1 (cli) (built: Oct 31 2020 16:57:33) ( NTS )
PHP 7.3.24-3+ubuntu20.04.1+deb.sury.org+1 (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

https://gerrit.wikimedia.org/r/641197

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

https://gerrit.wikimedia.org/r/641197

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