Use composer vendors

This commit is contained in:
Romain Neutron
2012-01-05 10:39:09 +01:00
parent 4ed348f101
commit 1884d71c33
3 changed files with 28 additions and 30 deletions

View File

@@ -15,7 +15,7 @@ use Symfony\Component\HttpFoundation\Request,
Symfony\Component\Serializer;
use Alchemy\Phrasea\Core\Configuration;
require_once __DIR__ . '/../../vendor/Silex/vendor/pimple/lib/Pimple.php';
require_once __DIR__ . '/../../../vendor/.composer/autoload.php';
/**
*
@@ -358,9 +358,8 @@ class Core extends \Pimple
*/
public static function initAutoloads()
{
require_once __DIR__ . '/../../vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
require_once __DIR__ . '/../../vendor/Twig/lib/Twig/Autoloader.php';
require_once __DIR__ . '/../../vendor/Twig-extensions/lib/Twig/Extensions/Autoloader.php';
require_once __DIR__ . '/../../../vendor/twig/twig/lib/Twig/Autoloader.php';
require_once __DIR__ . '/../../../vendor/twig/extensions/lib/Twig/Extensions/Autoloader.php';
\Twig_Autoloader::register();
\Twig_Extensions_Autoloader::register();
@@ -371,16 +370,10 @@ class Core extends \Pimple
$loader->registerNamespaces(array(
'Alchemy' => __DIR__ . '/../..',
'Symfony\\Component\\Yaml' => __DIR__ . '/../../vendor/symfony/src',
'Symfony\\Component\\Console' => __DIR__ . '/../../vendor/symfony/src',
'Symfony\\Component\\Serializer' => __DIR__ . '/../../vendor/symfony/src',
'Symfony\\Component\\DependencyInjection' => __DIR__ . '/../../vendor/symfony/src',
));
$loader->register();
require_once __DIR__ . '/../../vendor/Silex/autoload.php';
return;
}

View File

@@ -30,22 +30,30 @@ class Doctrine
public function __construct(Array $doctrineConfiguration = array())
{
require_once __DIR__ . '/../../../../vendor/doctrine2-orm/lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
static::loadClasses();
$config = new \Doctrine\ORM\Configuration();
//debug mode
/*
* debug mode
*/
$debug = isset($doctrineConfiguration["debug"]) ? : false;
//doctrine cache
/*
* doctrine cache
*/
$cache = isset($doctrineConfiguration["orm"]["cache"]) ? $doctrineConfiguration["orm"]["cache"] : false;
//doctrine log configuration
/*
* doctrine log configuration
*/
$log = isset($doctrineConfiguration["log"]) ? $doctrineConfiguration["log"] : false;
//service logger configuration
/*
* service logger configuration
*/
$logger = !isset($doctrineConfiguration['logger']) ? : $doctrineConfiguration['logger'];
//default query cache & meta chache
/*
* default query cache & meta chache
*/
$metaCache = $this->getCache();
$queryCache = $this->getCache();
@@ -110,13 +118,13 @@ class Doctrine
$classLoader = new \Doctrine\Common\ClassLoader(
'Doctrine\ORM'
, realpath(__DIR__ . '/../../../../vendor/doctrine2-orm/lib')
, realpath(__DIR__ . '/../../../../../vendor/doctrine/orm/lib')
);
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader(
'Doctrine\DBAL'
, realpath(__DIR__ . '/../../../../vendor/doctrine2-orm/lib/vendor/doctrine-dbal/lib')
, realpath(__DIR__ . '/../../../../../vendor/doctrine/orm/lib/vendor/doctrine-dbal/lib')
);
$classLoader->register();
@@ -134,7 +142,7 @@ class Doctrine
$classLoader = new \Doctrine\Common\ClassLoader(
'Doctrine\Common'
, realpath(__DIR__ . '/../../../../vendor/doctrine2-orm/lib/vendor/doctrine-common/lib')
, realpath(__DIR__ . '/../../../../../vendor/doctrine/orm/lib/vendor/doctrine-common/lib')
);
$classLoader->register();
@@ -158,7 +166,7 @@ class Doctrine
$classLoader = new \Doctrine\Common\ClassLoader(
'Symfony'
, realpath(__DIR__ . '/../../../../vendor/doctrine2-orm/lib/vendor')
, realpath(__DIR__ . '/../../../../../vendor/doctrine/orm/lib/vendor')
);
$classLoader->register();
@@ -186,7 +194,7 @@ class Doctrine
$classLoader = new \Doctrine\Common\ClassLoader(
'Gedmo'
, __DIR__ . "/../../../../vendor/doctrine2-gedmo/lib"
, __DIR__ . "/../../../../../vendor/gedmo/doctrine-extensions/lib"
);
$classLoader->register();

View File

@@ -26,9 +26,6 @@ class DoctrineTestSQLite
public function __construct()
{
require_once __DIR__ . '/../../../../vendor/doctrine2-orm/lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
static::loadClasses();
$config = new \Doctrine\ORM\Configuration();
@@ -93,19 +90,19 @@ class DoctrineTestSQLite
$classLoader = new \Doctrine\Common\ClassLoader(
'Doctrine\ORM'
, realpath(__DIR__ . '/../../../../vendor/doctrine2-orm/lib')
, realpath(__DIR__ . '/../../../../../vendor/doctrine/orm/lib')
);
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader(
'Doctrine\DBAL'
, realpath(__DIR__ . '/../../../../vendor/doctrine2-orm/lib/vendor/doctrine-dbal/lib')
, realpath(__DIR__ . '/../../../../../vendor/doctrine/orm/lib/vendor/doctrine-dbal/lib')
);
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader(
'Doctrine\Common'
, realpath(__DIR__ . '/../../../../vendor/doctrine2-orm/lib/vendor/doctrine-common/lib')
, realpath(__DIR__ . '/../../../../../vendor/doctrine/orm/lib/vendor/doctrine-common/lib')
);
$classLoader->register();
@@ -130,7 +127,7 @@ class DoctrineTestSQLite
$classLoader = new \Doctrine\Common\ClassLoader(
'Symfony'
, realpath(__DIR__ . '/../../../../vendor/doctrine2-orm/lib/vendor')
, realpath(__DIR__ . '/../../../../../vendor/doctrine/orm/lib/vendor')
);
$classLoader->register();
@@ -144,7 +141,7 @@ class DoctrineTestSQLite
$classLoader = new \Doctrine\Common\ClassLoader(
'Gedmo'
, __DIR__ . "/../../../../vendor/doctrine2-gedmo/lib"
, __DIR__ . "/../../../../vendor/gedmo/doctrine-extensions/lib"
);
$classLoader->register();