MediaWiki master
MediaWiki\DB\AbstractSchemaValidator Class Reference

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

Public Member Functions

callable(string) __construct (callable $missingDepCallback)
 
 checkDependencies ()
 
 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 (AbstractSchemaValidationTest).

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

Since
1.38

Definition at line 44 of file AbstractSchemaValidator.php.

Constructor & Destructor Documentation

◆ __construct()

callable(string) MediaWiki\DB\AbstractSchemaValidator::__construct ( callable $missingDepCallback)
Parameters
callable(string):void$missingDepCallback

Definition at line 53 of file AbstractSchemaValidator.php.

Member Function Documentation

◆ checkDependencies()

MediaWiki\DB\AbstractSchemaValidator::checkDependencies ( )
Returns
bool

Definition at line 61 of file AbstractSchemaValidator.php.

◆ 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 84 of file AbstractSchemaValidator.php.


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