Skip to content

Declare the Lua test engine for MediaWiki 1.46+#100

Merged
malberts merged 1 commit into
masterfrom
tests/lua-getenginename
Jun 12, 2026
Merged

Declare the Lua test engine for MediaWiki 1.46+#100
malberts merged 1 commit into
masterfrom
tests/lua-getenginename

Conversation

@malberts

Copy link
Copy Markdown
Collaborator

Why

Scribunto 1.46 reworked its PHPUnit test base: each LuaEngineTestBase subclass must now
declare its engine via getEngineName(), and the previous pattern (one class run against
every available engine) is deprecated. Without the method, the LuaLibrary* tests error
on 1.46+ with ... must implement getEngineName().

What

LuaLibraryTestBase declares getEngineName(): 'LuaStandalone'. LuaStandalone is chosen
because Scribunto bundles its interpreter, so the tests run in CI with no extra Lua
extension to install.

Effect on MediaWiki < 1.46

Pre-1.46 MediaWiki does not call getEngineName(); it runs each test against every
configured engine via its own suite()/makeSuite() machinery. The method is therefore
inert on REL1_43 to REL1_45, which keep running the Lua tests on LuaStandalone exactly as
before (verified on PHP 8.1: identical results with and without the method). This change
only affects 1.46+.

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. Without it the LuaLibrary tests error on
1.46+ with "must implement getEngineName()". Target LuaStandalone, whose
interpreter Scribunto bundles, so the tests run in CI without installing a Lua
extension.

Pre-1.46 MediaWiki does not call getEngineName() (it runs every configured
engine through its own suite() machinery), so the method is inert there: the
REL1_43 to REL1_45 rows are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@malberts malberts merged commit 98e3740 into master Jun 12, 2026
3 of 6 checks passed
@malberts malberts deleted the tests/lua-getenginename 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