MediaWiki master
MediaWiki\DB\AbstractSchemaValidator Class Reference

Validate abstract schema json files against their JSON schema. More...

Public Member Functions

 __construct ()
 
 validate (string $path)
 

Detailed Description

Validate abstract schema json files against their JSON schema.

This is used for static validation from the command-line via generateSchemaSql.php, generateSchemaChangeSql, and the PHPUnit structure test suite (AbstractSchemaTest).

The files are normally read by the generateSchemaSql.php and generateSchemaSqlChange.php maintenance scripts.

Since
1.38

Definition at line 30 of file AbstractSchemaValidator.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\DB\AbstractSchemaValidator::__construct ( )
Exceptions
AbstractSchemaValidationError

Definition at line 32 of file AbstractSchemaValidator.php.

Member Function Documentation

◆ validate()

MediaWiki\DB\AbstractSchemaValidator::validate ( string $path)
Parameters
string$pathfile to validate
Returns
bool true if passes validation
Exceptions
AbstractSchemaValidationErroron any failure

Definition at line 51 of file AbstractSchemaValidator.php.


The documentation for this class was generated from the following file: