Repository navigation
feat(ext): add ext-wikidiff2 with libthai and libdatrie - #1322
Merged
Merged
Conversation
Add static library packages for `libdatrie` and `libthai` and the C++ `ext-wikidiff2` PHP extension package for Linux and Darwin, along with a smoke test. Copies `src/php_wikidiff2.h` to the extension root before `buildconf` so PHP's `build/genif.sh` discovers `phpext_wikidiff2_ptr`.
henderkes
approved these changes
Dec 4, 2026
henderkes
left a comment
Collaborator
There was a problem hiding this comment.
Actually useful, I'm hosting some mediawiki things too.
|
StaticPHP Test Bot Detected: Extensions: |
crazywhalecc
approved these changes
Dec 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Closes #1320.
Adds static library packages for
libdatrieandlibthaiand the C++ext-wikidiff2PHP extension for Linux and Darwin:config/pkg/lib/libdatrie.yml&src/Package/Library/libdatrie.php: fetchestlwg/libdatrieviaghreland buildslibdatrie.a,include/datrie/, anddatrie-0.2.pcwithSUBDIRS=datrie(skipping thetrietoolCLI binary).config/pkg/lib/libthai.yml&src/Package/Library/libthai.php: fetchestlwg/libthaiviaghrel(depending onlibdatrie) and buildslibthai.a,include/thai/, andlibthai.pcwith--disable-dictanddictdatadir=/usr/share/libthai(so Thai word-breaking uses/usr/share/libthai/thbrk.trion hosts withlibthai-dataorLIBTHAI_DICTDIRif set, and degrades to line-level diffs otherwise).config/pkg/ext/ext-wikidiff2.yml&src/Package/Extension/wikidiff2.php: enablesext-wikidiff2(lang: cpp,arg-type: enable, depending onlibthai) and copiessrc/php_wikidiff2.hto the extension root beforebuildconfso PHP'sbuild/genif.shdiscoversphpext_wikidiff2_ptr.src/globals/ext-tests/wikidiff2.php: smoke test exercisingwikidiff2_do_diff()andwikidiff2_inline_json_diff().Source note:
ext-wikidiff2.ymlcurrently usestype: git(rev: master) because the latest tagged release (1.14.1) predates removal of the hardcoded-lstdc++link inconfig.m4(277f93cd, needed on macOSlibc++). Once Wikimedia tags the next release (T446466), we can switch this toghtagtarorpie.Testing:
spc build:php-cli wikidiff2(PHP 8.5.13) on macOS arm64 and Linux x86_64 musl (ZigToolchain), includingext-tests/wikidiff2.php..phptsuite on both macOS arm64 and Linux x86_64 musl (29/30 passed; onlythai1.phptfails without a runtimethbrk.tridictionary).Checklist before merging
*.phpor*.yml, run them locally to ensure your changes are valid:composer cs-fixcomposer analysecomposer testbin/spc dev:lint-config