Use namespaced PHP classes for extension Scribunto

This change depends on the Scribunto change
I74fd43f7920c8772e9078f745ac6062d5461a7f1 included in REL1_40.

Depends-On: I74fd43f7920c8772e9078f745ac6062d5461a7f1
Change-Id: Id4156a8934583971df6b449d13f3d8eb6cee6368
This commit is contained in:
Fomafix 2024-10-13 12:48:58 +00:00
parent 6930fe4bc3
commit 4bcd4ac8cb

View file

@ -2,10 +2,10 @@
namespace MediaWiki\Extension\ParserFunctions;
use Scribunto_LuaError;
use Scribunto_LuaLibraryBase;
use MediaWiki\Extension\Scribunto\Engines\LuaCommon\LibraryBase;
use MediaWiki\Extension\Scribunto\Engines\LuaCommon\LuaError;
class LuaLibrary extends Scribunto_LuaLibraryBase {
class LuaLibrary extends LibraryBase {
public function register() {
$lib = [
'expr' => [ $this, 'expr' ],
@ -22,7 +22,7 @@ class LuaLibrary extends Scribunto_LuaLibraryBase {
$exprParser = new ExprParser();
return [ $exprParser->doExpression( $expression ) ];
} catch ( ExprError $e ) {
throw new Scribunto_LuaError( $e->getMessage() );
throw new LuaError( $e->getMessage() );
}
}