Declare the Lua test engine for MediaWiki 1.46+#100
Merged
Conversation
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>
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.
Why
Scribunto 1.46 reworked its PHPUnit test base: each
LuaEngineTestBasesubclass must nowdeclare its engine via
getEngineName(), and the previous pattern (one class run againstevery available engine) is deprecated. Without the method, the
LuaLibrary*tests erroron 1.46+ with
... must implement getEngineName().What
LuaLibraryTestBasedeclaresgetEngineName(): 'LuaStandalone'. LuaStandalone is chosenbecause 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 everyconfigured engine via its own
suite()/makeSuite()machinery. The method is thereforeinert 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+.