Page MenuHomePhabricator

wikidiff2 isn't compatible with PHP 8.0
Closed, ResolvedPublic

Description

Related: T268925: Luasandbox fails to compile with PHP 8.0

root@1276224aa863:/srv/wikidiff2# make
/bin/bash /srv/wikidiff2/libtool --mode=compile g++ -I. -I/srv/wikidiff2 -I/srv/wikidiff2/include -I/srv/wikidiff2/main -I/srv/wikidiff2 -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib  -DHAVE_CONFIG_H  -Wno-write-strings -std=c++11 -g -O2    -c /srv/wikidiff2/php_wikidiff2.cpp -o php_wikidiff2.lo 
libtool: compile:  g++ -I. -I/srv/wikidiff2 -I/srv/wikidiff2/include -I/srv/wikidiff2/main -I/srv/wikidiff2 -I/usr/include/php/20200930 -I/usr/include/php/20200930/main -I/usr/include/php/20200930/TSRM -I/usr/include/php/20200930/Zend -I/usr/include/php/20200930/ext -I/usr/include/php/20200930/ext/date/lib -DHAVE_CONFIG_H -Wno-write-strings -std=c++11 -g -O2 -c /srv/wikidiff2/php_wikidiff2.cpp  -fPIC -DPIC -o .libs/php_wikidiff2.o
/srv/wikidiff2/php_wikidiff2.cpp: In function 'void zif_wikidiff2_do_diff(zend_execute_data*, zval*)':
/srv/wikidiff2/php_wikidiff2.cpp:102:32: error: expected ')' before 'TSRMLS_CC'
  if (zend_parse_parameters(argc TSRMLS_CC, "ssl|l", &text1, &text1_len, &text2,
                           ~    ^~~~~~~~~~
                                )
/srv/wikidiff2/php_wikidiff2.cpp: In function 'void zif_wikidiff2_inline_diff(zend_execute_data*, zval*)':
/srv/wikidiff2/php_wikidiff2.cpp:137:32: error: expected ')' before 'TSRMLS_CC'
  if (zend_parse_parameters(argc TSRMLS_CC, "ssl", &text1, &text1_len, &text2,
                           ~    ^~~~~~~~~~
                                )
/srv/wikidiff2/php_wikidiff2.cpp: In function 'void zif_wikidiff2_inline_json_diff(zend_execute_data*, zval*)':
/srv/wikidiff2/php_wikidiff2.cpp:172:32: error: expected ')' before 'TSRMLS_CC'
  if (zend_parse_parameters(argc TSRMLS_CC, "ssl", &text1, &text1_len, &text2,
                           ~    ^~~~~~~~~~
                                )
make: *** [Makefile:209: php_wikidiff2.lo] Error 1

Note that config.m4 will prevent building on PHP 8, so that part needs to be disabled.

Event Timeline

Change 644831 had a related patch set uploaded (by MaxSem; owner: MaxSem):
[mediawiki/php/wikidiff2@master] Add PHP 8 support

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

Change 644831 merged by jenkins-bot:
[mediawiki/php/wikidiff2@master] Add PHP 8 support

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

Mentioned in SAL (#wikimedia-releng) [2020-12-08T02:43:43Z] <James_F> Zuul: [mediawiki/php/wikidiff2] Make PHP 8.0 tests voting T269052

Next step is to do a release, and push the built library into CI and prod, I guess?

Edit: found https://www.mediawiki.org/wiki/Wikidiff2/Release_process which means a root is needed, or a couple of people from WMDE: https://gerrit.wikimedia.org/r/plugins/gitiles/operations/puppet/+/refs/heads/production/modules/admin/data/data.yaml#142

Adding PHP 8 compat was a no-op for earlier versions. Is there anything else that needs to be released? Otherwise, I'd not bother.

Adding PHP 8 compat was a no-op for earlier versions. Is there anything else that needs to be released? Otherwise, I'd not bother.

I don't think so. I just guessed it might make sense so you have a clear way to communicate this like "PHP8 support since version 1.11". But no hard feelings.

Adding PHP 8 compat was a no-op for earlier versions. Is there anything else that needs to be released? Otherwise, I'd not bother.

Did you mean you don't want to bother with a new release or bother updating the version string? Debian is going to switch to PHP 8.0 pretty soon so I'll need a new version for that. I also don't understand why we'd release a version with a different internal version string...

Change 647051 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/php/wikidiff2@master] Release 1.11.0

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

Meh, I was too concentrated on WMF prod.

Meh, I was too concentrated on WMF prod.

Oh, gotcha. Agreed that there's no point in deploying the updated version to prod right now.

Change 647051 merged by jenkins-bot:
[mediawiki/php/wikidiff2@master] Release 1.11.0

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

OK, if we don't need to deploy to CI or prod, is there anything else to do here except announce the release?