Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6011516
validateRegistrationFile.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1018 B
Referenced Files
None
Subscribers
None
validateRegistrationFile.php
View Options
<?php
use
MediaWiki\Registration\ExtensionJsonValidationError
;
use
MediaWiki\Registration\ExtensionJsonValidator
;
// @codeCoverageIgnoreStart
require_once
__DIR__
.
'/Maintenance.php'
;
// @codeCoverageIgnoreEnd
class
ValidateRegistrationFile
extends
Maintenance
{
public
function
__construct
()
{
parent
::
__construct
();
$this
->
addArg
(
'path'
,
'Path or glob pattern to extension.json/skin.json file.'
,
true
);
}
public
function
execute
()
{
$validator
=
new
ExtensionJsonValidator
(
function
(
$msg
)
{
$this
->
fatalError
(
$msg
);
}
);
$validator
->
checkDependencies
();
$paths
=
glob
(
$this
->
getArg
(
0
)
);
foreach
(
$paths
as
$path
)
{
try
{
$validator
->
validate
(
$path
);
$this
->
output
(
"$path validates against the schema!
\n
"
);
}
catch
(
ExtensionJsonValidationError
$e
)
{
$this
->
fatalError
(
$e
->
getMessage
()
);
}
}
}
}
// @codeCoverageIgnoreStart
$maintClass
=
ValidateRegistrationFile
::
class
;
require_once
RUN_MAINTENANCE_IF_MAIN
;
// @codeCoverageIgnoreEnd
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 4 2026, 10:00 (5 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a2/3b/1363f8d06837f0c8d2c0b4da9c09
Default Alt Text
validateRegistrationFile.php (1018 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment