This PR was squashed before being merged into the 2.3 branch (closes #14841).
Discussion
----------
[DoctrineBridge] Fixed #14840
[DoctrineBridge] Fixed compatibility with entities packed in Phar
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #14840
| License | MIT
| Doc PR | none
Commits
-------
92ad5df
[DoctrineBridge] Fixed #14840
This commit is contained in:
commit
dcc6581206
@ -129,11 +129,15 @@ abstract class AbstractDoctrineExtension extends Extension
|
|||||||
*/
|
*/
|
||||||
protected function setMappingDriverConfig(array $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));
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user