mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Modify autoload for doctrine
This commit is contained in:
@@ -14,7 +14,6 @@ namespace Alchemy\Phrasea\Application;
|
||||
require_once __DIR__ . "/../../../../lib/classes/API/OAuth2/Autoloader.class.php";
|
||||
require_once __DIR__ . "/../../../../lib/bootstrap.php";
|
||||
|
||||
\bootstrap::register_autoloads();
|
||||
\API_OAuth2_Autoloader::register();
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
@@ -13,7 +13,7 @@ namespace Alchemy\Phrasea\Application;
|
||||
|
||||
require_once __DIR__ . "/../../../../lib/bootstrap.php";
|
||||
require_once __DIR__ . "/../../../../lib/classes/API/OAuth2/Autoloader.class.php";
|
||||
\bootstrap::register_autoloads();
|
||||
|
||||
\API_OAuth2_Autoloader::register();
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
@@ -421,6 +421,11 @@ class Core extends \Pimple
|
||||
'Proxies' => realpath(__DIR__ . '/../../Doctrine/'),
|
||||
'Doctrine\\Logger' => realpath(__DIR__ . '/../../'),
|
||||
'Monolog' => realpath(__DIR__ . '/../../vendor/Silex/vendor/monolog/src'),
|
||||
'Gedmo' => realpath(__DIR__ . '/../../vendor/doctrine2-gedmo/lib'),
|
||||
'Events' => realpath(__DIR__ . '/../../Doctrine'),
|
||||
'DoctrineExtensions' => realpath(__DIR__ . "/../../vendor/doctrine2-beberlei/lib"),
|
||||
'Types' => realpath(__DIR__ . "/../../Doctrine"),
|
||||
'PhraseaFixture' => realpath(__DIR__ . "/../../conf.d"),
|
||||
));
|
||||
|
||||
$loader->register();
|
||||
|
@@ -15,8 +15,7 @@ use Alchemy\Phrasea\Core,
|
||||
Alchemy\Phrasea\Core\Service,
|
||||
Alchemy\Phrasea\Core\Service\ServiceAbstract,
|
||||
Alchemy\Phrasea\Core\Service\ServiceInterface;
|
||||
use Doctrine\DBAL\Types\Type,
|
||||
Doctrine\Common\Cache\AbstractCache;
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
|
||||
|
||||
/**
|
||||
@@ -52,8 +51,6 @@ class Doctrine extends ServiceAbstract implements ServiceInterface
|
||||
{
|
||||
parent::__construct($name, $options, $dependencies);
|
||||
|
||||
static::loadClasses();
|
||||
|
||||
if (empty($options))
|
||||
{
|
||||
throw new \Exception(sprintf(
|
||||
@@ -245,6 +242,12 @@ class Doctrine extends ServiceAbstract implements ServiceInterface
|
||||
, realpath(__DIR__ . '/../../../../../Doctrine')
|
||||
);
|
||||
$classLoader->register();
|
||||
|
||||
$classLoader = new \Doctrine\Common\ClassLoader(
|
||||
'Events'
|
||||
, realpath(__DIR__ . '/../../../../../Doctrine')
|
||||
);
|
||||
$classLoader->register();
|
||||
|
||||
$classLoader = new \Doctrine\Common\ClassLoader(
|
||||
'Symfony'
|
||||
|
Reference in New Issue
Block a user