From b77a82b7c74f97c0907a6e65bd821db1931678ec Mon Sep 17 00:00:00 2001 From: Olivier Date: Wed, 23 Nov 2011 14:24:16 +0100 Subject: [PATCH] Add vendor MongoDB to travis-ci --- Tests/autoload.php.dist | 17 ++++++++++++----- vendor/vendors.php | 6 +++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Tests/autoload.php.dist b/Tests/autoload.php.dist index e19f48fe..fd3f868b 100644 --- a/Tests/autoload.php.dist +++ b/Tests/autoload.php.dist @@ -17,10 +17,12 @@ use Doctrine\Common\Annotations\AnnotationRegistry; $loader = new UniversalClassLoader(); $loader->registerNamespaces(array( - 'Symfony' => array($vendorDir.'/symfony/src', $vendorDir.'/symfony/tests'), - 'Doctrine' => array($vendorDir.'/doctrine/lib'), - 'Doctrine\\Common' => array($vendorDir.'/doctrine-common/lib'), - 'Doctrine\\DBAL' => array($vendorDir.'/doctrine-dbal/lib'), + 'Symfony' => array($vendorDir.'/symfony/src', $vendorDir.'/symfony/tests'), + 'Doctrine' => array($vendorDir.'/doctrine/lib'), + 'Doctrine\\Common' => array($vendorDir.'/doctrine-common/lib'), + 'Doctrine\\DBAL' => array($vendorDir.'/doctrine-dbal/lib'), + 'Doctrine\\ODM\\MongoDB' => array($vendorDir.'/doctrine-mongodb-odm/lib'), + 'Doctrine\\MongoDB' => array($vendorDir.'/doctrine-mongodb/lib'), )); $loader->registerPrefixes(array( 'Twig_' => $vendorDir.'/twig/lib', @@ -39,7 +41,12 @@ AnnotationRegistry::registerLoader(function($class) use ($loader) { $loader->loadClass($class); return class_exists($class, false); }); -AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php'); +AnnotationRegistry::registerFile( + $vendorDir.'/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php' +); +AnnotationRegistry::registerFile( + $vendorDir.'/doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/Mapping/Annotations/DoctrineAnnotations.php' +); spl_autoload_register(function($class) { if (0 === strpos($class, 'Genemu\\Bundle\\FormBundle\\')) { diff --git a/vendor/vendors.php b/vendor/vendors.php index fae5a11b..6bc93923 100644 --- a/vendor/vendors.php +++ b/vendor/vendors.php @@ -14,11 +14,15 @@ set_time_limit(0); $vendorDir = __DIR__; +$version = isset($_SERVER['SYMFONY_VERSION']) ? $_SERVER['SYMFONY_VERSION'] : 'origin/master'; + $deps = array( - array('symfony', 'git://github.com/symfony/symfony.git', isset($_SERVER['SYMFONY_VERSION']) ? $_SERVER['SYMFONY_VERSION'] : 'origin/master'), + array('symfony', 'git://github.com/symfony/symfony.git', $version), array('doctrine', 'git://github.com/doctrine/doctrine2.git', 'origin/master'), array('doctrine-common', 'git://github.com/doctrine/common.git', 'origin/master'), array('doctrine-dbal', 'git://github.com/doctrine/dbal.git', 'origin/master'), + array('doctrine-mongodb', 'git://github.com/doctrine/mongodb.git', 'origin/master'), + array('doctrine-mongodb-odm', 'git://github.com/doctrine/mongodb-odm.git', 'origin/master'), ); foreach ($deps as $dep) {