Skip to content

Declare the Lua test engine for MediaWiki 1.46+#96

Closed
malberts wants to merge 1 commit into
masterfrom
tests/lua-engine-name
Closed

Declare the Lua test engine for MediaWiki 1.46+#96
malberts wants to merge 1 commit into
masterfrom
tests/lua-engine-name

Conversation

@malberts

Copy link
Copy Markdown
Collaborator

Why

MediaWiki 1.46 reworked Scribunto's PHPUnit test base. LuaEngineTestBase now
requires each subclass to declare its engine via getEngineName(); the previous
pattern, where one test class was run against every available engine through a
data provider, is deprecated. Without the method, the LuaLibrary* tests error
on 1.46+ with ... must implement getEngineName().

What

LuaLibraryTestBase now declares getEngineName(): 'LuaStandalone'. LuaStandalone
is chosen because Scribunto bundles its interpreter, so the tests run in CI with no
extra Lua extension to install (a LuaSandbox target would be skipped wherever
php-luasandbox is absent).

Older MediaWiki versions (REL1_43 to REL1_45) don't call getEngineName() and keep
using the data-provider pattern, so the method is inert there and the change stays
compatible across the whole supported range.

Note

This is a focused Scribunto-1.46 compatibility fix. The 1.46/master matrix rows
remain experimental and continue to fail on separate, unrelated compatibility
issues that are being addressed independently; this change does not by itself turn
those rows green.

Scribunto 1.46 requires each LuaEngineTestBase subclass to declare its
engine via getEngineName(); the previous "one class exercises every engine"
data-provider pattern is deprecated. Target LuaStandalone, whose interpreter
Scribunto bundles, so the tests run in CI without installing a Lua
extension. Earlier MediaWiki versions don't call getEngineName() and keep
using the data-provider pattern, so the method is harmless there and this
stays compatible across the supported range.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@malberts malberts force-pushed the tests/lua-engine-name branch from b09f10b to 1be66cb Compare June 11, 2026 21:59
@malberts malberts closed this Jun 12, 2026
@malberts malberts deleted the tests/lua-engine-name branch June 12, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant