SchemaValidator
in package
Performs strict validation of the mapping schema
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- getUpdateSchemaList() : array<string|int, string>
- Returns the list of missing Database Schema updates.
- schemaInSyncWithMetadata() : bool
- Checks if the Database Schema is in sync with the current metadata state.
- validateClass() : array<string|int, string>
- Validates a single class of the current.
- validateMapping() : mixed
- Checks the internal consistency of all mapping files.
Properties
$em
private
EntityManagerInterface
$em
Methods
__construct()
public
__construct(EntityManagerInterface $em) : mixed
Parameters
- $em : EntityManagerInterface
getUpdateSchemaList()
Returns the list of missing Database Schema updates.
public
getUpdateSchemaList() : array<string|int, string>
Return values
array<string|int, string>schemaInSyncWithMetadata()
Checks if the Database Schema is in sync with the current metadata state.
public
schemaInSyncWithMetadata() : bool
Return values
boolvalidateClass()
Validates a single class of the current.
public
validateClass(ClassMetadataInfo $class) : array<string|int, string>
Parameters
- $class : ClassMetadataInfo
Tags
Return values
array<string|int, string>validateMapping()
Checks the internal consistency of all mapping files.
public
validateMapping() : mixed
There are several checks that can't be done at runtime or are too expensive, which can be verified with this command. For example:
- Check if a relation with "mappedBy" is actually connected to that specified field.
- Check if "mappedBy" and "inversedBy" are consistent to each other.
- Check if "referencedColumnName" attributes are really pointing to primary key columns.