Skip to content

Commit

Permalink
[DoctrineBridge] Fixed #14840
Browse files Browse the repository at this point in the history
  • Loading branch information
saksmt authored and fabpot committed Sep 14, 2015
1 parent 5607f71 commit 92ad5df
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -129,11 +129,15 @@ protected function setMappingDriverAlias($mappingConfig, $mappingName)
*/
protected function setMappingDriverConfig(array $mappingConfig, $mappingName)
{
if (!is_dir($mappingConfig['dir'])) {
$mappingDirectory = $mappingConfig['dir'];
if (!is_dir($mappingDirectory)) {
throw new \InvalidArgumentException(sprintf('Invalid Doctrine mapping path given. Cannot load Doctrine mapping/bundle named "%s".', $mappingName));
}

$this->drivers[$mappingConfig['type']][$mappingConfig['prefix']] = realpath($mappingConfig['dir']);
if (substr($mappingDirectory, 0, 7) !== 'phar://') {
$mappingDirectory = realpath($mappingDirectory);
}
$this->drivers[$mappingConfig['type']][$mappingConfig['prefix']] = $mappingDirectory;
}

/**
Expand Down

0 comments on commit 92ad5df

Please sign in to comment.