Declare the Lua test engine for MediaWiki 1.46+#96
Closed
malberts wants to merge 1 commit into
Closed
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. 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>
b09f10b to
1be66cb
Compare
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
MediaWiki 1.46 reworked Scribunto's PHPUnit test base.
LuaEngineTestBasenowrequires each subclass to declare its engine via
getEngineName(); the previouspattern, where one test class was run against every available engine through a
data provider, is deprecated. Without the method, the
LuaLibrary*tests erroron 1.46+ with
... must implement getEngineName().What
LuaLibraryTestBasenow declaresgetEngineName(): 'LuaStandalone'. LuaStandaloneis 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-luasandboxis absent).Older MediaWiki versions (REL1_43 to REL1_45) don't call
getEngineName()and keepusing 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/mastermatrix rowsremain
experimentaland continue to fail on separate, unrelated compatibilityissues that are being addressed independently; this change does not by itself turn
those rows green.