Skip to content

Commit

Permalink
Add vendor MongoDB to travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
genemu committed Nov 23, 2011
1 parent 36fd64e commit b77a82b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
17 changes: 12 additions & 5 deletions Tests/autoload.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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\\')) {
Expand Down
6 changes: 5 additions & 1 deletion vendor/vendors.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b77a82b

Please sign in to comment.