code: protected function validateMappingConfiguration(array $mappingConfig, $mappingName)
      {
          if (!$mappingConfig['type'] || !$mappingConfig['dir'] || !$mappingConfig['prefix']) {
              throw new \InvalidArgumentException(
                  sprintf('Hydra mapping definitions for "%s" require at least the "type", "dir" and "prefix" options.', $mappingName)
              );
          }
  
          if (!is_dir($mappingConfig['dir'])) {
              throw new \InvalidArgumentException(
                  sprintf('Specified non-existing directory "%s" as Hydra mapping source.', $mappingConfig['dir'])
              );
          }
  
          if (!in_array($mappingConfig['type'], array('xml', 'yml', 'annotation', 'php', 'staticphp'))) {
              // FIXXME Make sure hydra.metadata_driver exists
              throw new \InvalidArgumentException(
                  'Can only configure "xml", "yml", "annotation", "php" or '.
                  '"staticphp" through the HydraBundle. Use your own bundle to configure other metadata drivers. '.
                  'You can register them by adding a new driver to the '.
                  '"hydra.metadata_driver" service definition.'
              );
          }
      }
docs: Validates the the specified mapping information
  
  @param array  $mappingConfig
  @param string $mappingName
  
  @throws \InvalidArgumentException