diff --git a/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php index 637971cb58d..457b7cda7c8 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php @@ -155,7 +155,7 @@ public function getAllClassNames() if ($this->_paths) { foreach ((array) $this->_paths as $path) { if ( ! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath(); + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); } $iterator = new \RecursiveIteratorIterator( diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index d623705598b..e531a27f780 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -435,7 +435,7 @@ public function getAllClassNames() foreach ($this->_paths as $path) { if ( ! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath(); + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); } $iterator = new \RecursiveIteratorIterator( diff --git a/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php b/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php index 01edab71b61..d89b1ed68d8 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php @@ -78,7 +78,7 @@ public function getAllClassNames() foreach ($this->_paths as $path) { if ( ! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath(); + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); } $iterator = new \RecursiveIteratorIterator( diff --git a/lib/Doctrine/ORM/Mapping/MappingException.php b/lib/Doctrine/ORM/Mapping/MappingException.php index 9fa5906bf64..8ea5be2139f 100644 --- a/lib/Doctrine/ORM/Mapping/MappingException.php +++ b/lib/Doctrine/ORM/Mapping/MappingException.php @@ -170,9 +170,16 @@ public static function unsupportedOptimisticLockingType($entity, $fieldName, $un ); } - public static function fileMappingDriversRequireConfiguredDirectoryPath() + public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null) { - return new self('File mapping drivers must have a valid directory path, however the given path seems to be incorrect!'); + if ( ! empty($path)) { + $path = '[' . $path . ']'; + } + + return new self( + 'File mapping drivers must have a valid directory path, ' . + 'however the given path ' . $path . ' seems to be incorrect!' + ); } /** diff --git a/tools/sandbox/Entities/User.php b/tools/sandbox/Entities/User.php index 9f6af35e1ed..cd184212c0d 100644 --- a/tools/sandbox/Entities/User.php +++ b/tools/sandbox/Entities/User.php @@ -13,7 +13,7 @@ class User /** @Column(type="string", length=50) */ private $name; /** - * @OneToOne(targetEntity="Address") + * @OneToOne(targetEntity="Address", inversedBy="user") * @JoinColumn(name="address_id", referencedColumnName="id") */ private $address;