Skip to content

Commit

Permalink
changed manifest version, namespaces of classes, requiring MW >= 1.35.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FO-nTTaX committed Nov 23, 2021
1 parent 97cdbc2 commit dced585
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
10 changes: 5 additions & 5 deletions extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "VariablesLua",
"version": "1.4.2",
"version": "1.5.0",
"author": [
"[https://fo-nttax.de Alex Winkler]"
],
Expand All @@ -9,7 +9,7 @@
"license-name": "MIT",
"type": "other",
"requires": {
"MediaWiki": ">= 1.28.0",
"MediaWiki": ">= 1.35.0",
"extensions": {
"Scribunto": "*",
"Variables": ">= 2.0"
Expand All @@ -21,12 +21,12 @@
]
},
"AutoloadNamespaces": {
"Liquipedia\\VariablesLua\\": "src/"
"Liquipedia\\Extension\\VariablesLua\\": "src/"
},
"Hooks": {
"ScribuntoExternalLibraries": [
"Liquipedia\\VariablesLua\\Hooks::onScribuntoExternalLibraries"
"Liquipedia\\Extension\\VariablesLua\\Hooks\\LegacyHooks::onScribuntoExternalLibraries"
]
},
"manifest_version": 1
"manifest_version": 2
}
2 changes: 1 addition & 1 deletion lua/mw.ext.VariablesLua.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function VariablesLua.varexists( name )
name = tostring( name )
local exists = php.varexists( name )

return exists and exists ~= ""
return exists and exists ~= ''
end

function VariablesLua.setupInterface( options )
Expand Down
8 changes: 5 additions & 3 deletions src/Hooks.php → src/Hooks/LegacyHooks.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php

namespace Liquipedia\VariablesLua;
namespace Liquipedia\Extension\VariablesLua\Hooks;

class Hooks {
use Liquipedia\Extension\VariablesLua\ScribuntoLuaLibrary;

class LegacyHooks {

/**
* Register Lua Library
* @param strin $engine
* @param string $engine
* @param array &$extraLibraries
* @return array
*/
Expand Down
5 changes: 3 additions & 2 deletions src/ScribuntoLuaLibrary.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php

namespace Liquipedia\VariablesLua;
namespace Liquipedia\Extension\VariablesLua;

use ExtVariables;
use Scribunto_LuaLibraryBase;

class ScribuntoLuaLibrary extends \Scribunto_LuaLibraryBase {
class ScribuntoLuaLibrary extends Scribunto_LuaLibraryBase {

public function register() {
$lib = [
Expand Down

0 comments on commit dced585

Please sign in to comment.