diff --git a/lib/Alchemy/Phrasea/Core.php b/lib/Alchemy/Phrasea/Core.php index 5f14a15d35..101c8b21c6 100644 --- a/lib/Alchemy/Phrasea/Core.php +++ b/lib/Alchemy/Phrasea/Core.php @@ -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; } diff --git a/lib/Alchemy/Phrasea/Core/Service/Doctrine.php b/lib/Alchemy/Phrasea/Core/Service/Doctrine.php index ef5f85f7e2..4b39a232ed 100644 --- a/lib/Alchemy/Phrasea/Core/Service/Doctrine.php +++ b/lib/Alchemy/Phrasea/Core/Service/Doctrine.php @@ -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(); diff --git a/lib/Alchemy/Phrasea/Core/Service/DoctrineTestSQLite.php b/lib/Alchemy/Phrasea/Core/Service/DoctrineTestSQLite.php index 00dd0187e7..721990f996 100644 --- a/lib/Alchemy/Phrasea/Core/Service/DoctrineTestSQLite.php +++ b/lib/Alchemy/Phrasea/Core/Service/DoctrineTestSQLite.php @@ -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();