From f6d17b79d886bd7a39c7bcf75d1921476d1ffaa0 Mon Sep 17 00:00:00 2001 From: guilhermeblanco Date: Sat, 30 Jan 2010 21:11:13 +0000 Subject: [PATCH] [2.0][DDC-286][DDC-287] Fixed missing method and casting. Thanks Hannes for reporting and patch. --- lib/Doctrine/ORM/Mapping/MappingException.php | 6 ++++++ lib/Doctrine/ORM/Tools/Cli/Tasks/SchemaToolTask.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Mapping/MappingException.php b/lib/Doctrine/ORM/Mapping/MappingException.php index e3dcf5cdd..b3524b7bf 100644 --- a/lib/Doctrine/ORM/Mapping/MappingException.php +++ b/lib/Doctrine/ORM/Mapping/MappingException.php @@ -127,4 +127,10 @@ class MappingException extends \Doctrine\ORM\ORMException return new self('The column ' . $joinColumn . ' must be mapped to a field in class ' . $className . ' since it is referenced by a join column of another class.'); } + + public static function annotationDriverRequiresConfiguredDirectoryPath() + { + return new self('The annotation driver needs to have a directory path'); + } + } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Cli/Tasks/SchemaToolTask.php b/lib/Doctrine/ORM/Tools/Cli/Tasks/SchemaToolTask.php index c3fdd253f..a7b589563 100644 --- a/lib/Doctrine/ORM/Tools/Cli/Tasks/SchemaToolTask.php +++ b/lib/Doctrine/ORM/Tools/Cli/Tasks/SchemaToolTask.php @@ -145,7 +145,7 @@ class SchemaToolTask extends AbstractTask if ($metadataDriver instanceof \Doctrine\ORM\Mapping\Driver\AnnotationDriver) { if (isset($arguments['class-dir'])) { - $metadataDriver->addPaths($arguments['class-dir']); + $metadataDriver->addPaths((array) $arguments['class-dir']); } else { throw new CliException( 'The supplied configuration uses the annotation metadata driver. ' .