Merge branch 'Doctrine2.2' into Dev

This commit is contained in:
Romain Neutron
2012-03-19 19:06:03 +01:00
27 changed files with 125 additions and 97 deletions

View File

@@ -25,7 +25,6 @@ use Symfony\Component\Console\Application;
use Alchemy\Phrasea;
$Core = require_once dirname(__FILE__) . '/../lib/bootstrap.php';
bootstrap::register_autoloads();
try
{

View File

@@ -1,5 +1,5 @@
# temp pour lint
dir.src=/tmp/jenkinsWorking-dev
dir.src=/tmp/jenkinsWorking-doctrine
# test.ci
dir.dest=/home/sites_web/test-dev.ci.alchemyasp.com/pv3
dir.dest=/home/sites_web/test-doctrine.ci.alchemyasp.com/pv3

View File

@@ -27,11 +27,6 @@ class ApcCache extends DoctrineApc implements Cache
return false;
}
public function getStats()
{
return null;
}
public function get($key)
{
if (!$this->contains($key))
@@ -52,9 +47,4 @@ class ApcCache extends DoctrineApc implements Cache
return $this;
}
public function flush()
{
return apc_clear_cache() && apc_clear_cache('user');
}
}

View File

@@ -28,12 +28,6 @@ class ArrayCache extends DoctrineArray implements Cache
return false;
}
public function getStats()
{
return null;
}
public function get($id)
{
if (!$this->contains($id))
@@ -54,11 +48,4 @@ class ArrayCache extends DoctrineArray implements Cache
return;
}
public function flush()
{
$this->deleteAll();
return true;
}
}

View File

@@ -24,10 +24,6 @@ interface Cache extends DoctrineCache
public function isServer();
public function getStats();
public function flush();
public function get($key);
public function deleteMulti(array $array_keys);

View File

@@ -60,7 +60,7 @@ class Manager
{
foreach ($this->registry as $cacheKey => $service_name)
{
$this->get($cacheKey, $service_name)->getDriver()->flush();
$this->get($cacheKey, $service_name)->getDriver()->flushAll();
}
return $this;
@@ -87,8 +87,7 @@ class Manager
if ($this->hasChange($cacheKey, $service_name))
{
$driver->flush();
$service->getDriver()->flush();
if ($write)
{
$this->registry[$cacheKey] = $service_name;

View File

@@ -27,11 +27,6 @@ class MemcacheCache extends DoctrineMemcache implements Cache
return true;
}
public function getStats()
{
return $this->getMemcache()->getstats();
}
public function get($key)
{
if (!$this->contains($key))
@@ -52,9 +47,4 @@ class MemcacheCache extends DoctrineMemcache implements Cache
return $this;
}
public function flush()
{
return $this->getMemcache()->flush();
}
}

View File

@@ -99,11 +99,6 @@ class RedisCache extends AbstractCache implements Cache
return true;
}
public function getStats()
{
return null;
}
public function get($key)
{
if (!$this->contains($key))
@@ -124,7 +119,7 @@ class RedisCache extends AbstractCache implements Cache
return $this;
}
public function flush()
public function flushAll()
{
return $this->_redis->flushAll();
}

View File

@@ -27,11 +27,6 @@ class XcacheCache extends DoctrineXcache implements Cache
return false;
}
public function getStats()
{
return null;
}
public function get($key)
{
if (!$this->contains($key))
@@ -52,9 +47,4 @@ class XcacheCache extends DoctrineXcache implements Cache
return $this;
}
public function flush()
{
return xcache_clear_cache(XC_TYPE_VAR, 0);
}
}

View File

@@ -443,7 +443,6 @@ class Core extends \Pimple
'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"),

View File

@@ -13,7 +13,7 @@ namespace Alchemy\Phrasea\Loader;
require_once __DIR__ . '/LoaderStrategy.php';
require_once __DIR__ . '/../../../vendor/doctrine2-orm/lib/vendor/doctrine-common/lib/Doctrine/Common/Cache/Cache.php';
require_once __DIR__ . '/../../../vendor/doctrine2-orm/lib/vendor/doctrine-common/lib/Doctrine/Common/Cache/AbstractCache.php';
require_once __DIR__ . '/../../../vendor/doctrine2-orm/lib/vendor/doctrine-common/lib/Doctrine/Common/Cache/CacheProvider.php';
require_once __DIR__ . '/../../../vendor/doctrine2-orm/lib/vendor/doctrine-common/lib/Doctrine/Common/Cache/ApcCache.php';
use Alchemy\Phrasea\Loader\LoaderStrategy as CacheStrategy;

View File

@@ -13,7 +13,7 @@ namespace Alchemy\Phrasea\Loader;
require_once __DIR__ . '/LoaderStrategy.php';
require_once __DIR__ . '/../../../vendor/doctrine2-orm/lib/vendor/doctrine-common/lib/Doctrine/Common/Cache/Cache.php';
require_once __DIR__ . '/../../../vendor/doctrine2-orm/lib/vendor/doctrine-common/lib/Doctrine/Common/Cache/AbstractCache.php';
require_once __DIR__ . '/../../../vendor/doctrine2-orm/lib/vendor/doctrine-common/lib/Doctrine/Common/Cache/CacheProvider.php';
require_once __DIR__ . '/../../../vendor/doctrine2-orm/lib/vendor/doctrine-common/lib/Doctrine/Common/Cache/XcacheCache.php';
use Alchemy\Phrasea\Loader\LoaderStrategy as CacheStrategy;

View File

@@ -1,11 +1,11 @@
<?php
namespace Proxies;
namespace Proxies\__CG__\Entities;
/**
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
*/
class EntitiesBasketProxy extends \Entities\Basket implements \Doctrine\ORM\Proxy\Proxy
class Basket extends \Entities\Basket implements \Doctrine\ORM\Proxy\Proxy
{
private $_entityPersister;
private $_identifier;
@@ -34,10 +34,19 @@ class EntitiesBasketProxy extends \Entities\Basket implements \Doctrine\ORM\Prox
unset($this->_entityPersister, $this->_identifier);
}
}
/** @private */
public function __isInitialized()
{
return $this->__isInitialized__;
}
public function getId()
{
if ($this->__isInitialized__ === false) {
return (int) $this->_identifier["id"];
}
$this->__load();
return parent::getId();
}
@@ -220,4 +229,4 @@ class EntitiesBasketProxy extends \Entities\Basket implements \Doctrine\ORM\Prox
}
}
}
}

View File

@@ -1,11 +1,11 @@
<?php
namespace Proxies;
namespace Proxies\__CG__\Entities;
/**
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
*/
class EntitiesBasketElementProxy extends \Entities\BasketElement implements \Doctrine\ORM\Proxy\Proxy
class BasketElement extends \Entities\BasketElement implements \Doctrine\ORM\Proxy\Proxy
{
private $_entityPersister;
private $_identifier;
@@ -34,10 +34,19 @@ class EntitiesBasketElementProxy extends \Entities\BasketElement implements \Doc
unset($this->_entityPersister, $this->_identifier);
}
}
/** @private */
public function __isInitialized()
{
return $this->__isInitialized__;
}
public function getId()
{
if ($this->__isInitialized__ === false) {
return (int) $this->_identifier["id"];
}
$this->__load();
return parent::getId();
}

View File

@@ -1,11 +1,11 @@
<?php
namespace Proxies;
namespace Proxies\__CG__\Entities;
/**
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
*/
class EntitiesStoryWZProxy extends \Entities\StoryWZ implements \Doctrine\ORM\Proxy\Proxy
class StoryWZ extends \Entities\StoryWZ implements \Doctrine\ORM\Proxy\Proxy
{
private $_entityPersister;
private $_identifier;
@@ -34,10 +34,19 @@ class EntitiesStoryWZProxy extends \Entities\StoryWZ implements \Doctrine\ORM\Pr
unset($this->_entityPersister, $this->_identifier);
}
}
/** @private */
public function __isInitialized()
{
return $this->__isInitialized__;
}
public function getId()
{
if ($this->__isInitialized__ === false) {
return (int) $this->_identifier["id"];
}
$this->__load();
return parent::getId();
}

View File

@@ -1,11 +1,11 @@
<?php
namespace Proxies;
namespace Proxies\__CG__\Entities;
/**
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
*/
class EntitiesUsrListProxy extends \Entities\UsrList implements \Doctrine\ORM\Proxy\Proxy
class UsrList extends \Entities\UsrList implements \Doctrine\ORM\Proxy\Proxy
{
private $_entityPersister;
private $_identifier;
@@ -34,10 +34,19 @@ class EntitiesUsrListProxy extends \Entities\UsrList implements \Doctrine\ORM\Pr
unset($this->_entityPersister, $this->_identifier);
}
}
/** @private */
public function __isInitialized()
{
return $this->__isInitialized__;
}
public function getId()
{
if ($this->__isInitialized__ === false) {
return (int) $this->_identifier["id"];
}
$this->__load();
return parent::getId();
}

View File

@@ -1,11 +1,11 @@
<?php
namespace Proxies;
namespace Proxies\__CG__\Entities;
/**
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
*/
class EntitiesUsrListEntryProxy extends \Entities\UsrListEntry implements \Doctrine\ORM\Proxy\Proxy
class UsrListEntry extends \Entities\UsrListEntry implements \Doctrine\ORM\Proxy\Proxy
{
private $_entityPersister;
private $_identifier;
@@ -34,10 +34,19 @@ class EntitiesUsrListEntryProxy extends \Entities\UsrListEntry implements \Doctr
unset($this->_entityPersister, $this->_identifier);
}
}
/** @private */
public function __isInitialized()
{
return $this->__isInitialized__;
}
public function getId()
{
if ($this->__isInitialized__ === false) {
return (int) $this->_identifier["id"];
}
$this->__load();
return parent::getId();
}

View File

@@ -1,11 +1,11 @@
<?php
namespace Proxies;
namespace Proxies\__CG__\Entities;
/**
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
*/
class EntitiesUsrListOwnerProxy extends \Entities\UsrListOwner implements \Doctrine\ORM\Proxy\Proxy
class UsrListOwner extends \Entities\UsrListOwner implements \Doctrine\ORM\Proxy\Proxy
{
private $_entityPersister;
private $_identifier;
@@ -34,10 +34,19 @@ class EntitiesUsrListOwnerProxy extends \Entities\UsrListOwner implements \Doctr
unset($this->_entityPersister, $this->_identifier);
}
}
/** @private */
public function __isInitialized()
{
return $this->__isInitialized__;
}
public function getId()
{
if ($this->__isInitialized__ === false) {
return (int) $this->_identifier["id"];
}
$this->__load();
return parent::getId();
}

View File

@@ -1,11 +1,11 @@
<?php
namespace Proxies;
namespace Proxies\__CG__\Entities;
/**
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
*/
class EntitiesValidationDataProxy extends \Entities\ValidationData implements \Doctrine\ORM\Proxy\Proxy
class ValidationData extends \Entities\ValidationData implements \Doctrine\ORM\Proxy\Proxy
{
private $_entityPersister;
private $_identifier;
@@ -34,10 +34,19 @@ class EntitiesValidationDataProxy extends \Entities\ValidationData implements \D
unset($this->_entityPersister, $this->_identifier);
}
}
/** @private */
public function __isInitialized()
{
return $this->__isInitialized__;
}
public function getId()
{
if ($this->__isInitialized__ === false) {
return (int) $this->_identifier["id"];
}
$this->__load();
return parent::getId();
}

View File

@@ -1,11 +1,11 @@
<?php
namespace Proxies;
namespace Proxies\__CG__\Entities;
/**
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
*/
class EntitiesValidationParticipantProxy extends \Entities\ValidationParticipant implements \Doctrine\ORM\Proxy\Proxy
class ValidationParticipant extends \Entities\ValidationParticipant implements \Doctrine\ORM\Proxy\Proxy
{
private $_entityPersister;
private $_identifier;
@@ -34,10 +34,19 @@ class EntitiesValidationParticipantProxy extends \Entities\ValidationParticipant
unset($this->_entityPersister, $this->_identifier);
}
}
/** @private */
public function __isInitialized()
{
return $this->__isInitialized__;
}
public function getId()
{
if ($this->__isInitialized__ === false) {
return (int) $this->_identifier["id"];
}
$this->__load();
return parent::getId();
}

View File

@@ -1,11 +1,11 @@
<?php
namespace Proxies;
namespace Proxies\__CG__\Entities;
/**
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
*/
class EntitiesValidationSessionProxy extends \Entities\ValidationSession implements \Doctrine\ORM\Proxy\Proxy
class ValidationSession extends \Entities\ValidationSession implements \Doctrine\ORM\Proxy\Proxy
{
private $_entityPersister;
private $_identifier;
@@ -34,10 +34,19 @@ class EntitiesValidationSessionProxy extends \Entities\ValidationSession impleme
unset($this->_entityPersister, $this->_identifier);
}
}
/** @private */
public function __isInitialized()
{
return $this->__isInitialized__;
}
public function getId()
{
if ($this->__isInitialized__ === false) {
return (int) $this->_identifier["id"];
}
$this->__load();
return parent::getId();
}

View File

@@ -20,6 +20,11 @@ class XcacheCacheTest extends \PHPUnit_Framework_TestCase
*/
public function setUp()
{
if(!function_exists('xcache_info'))
{
$this->markTestSkipped('Xcache not loaded');
}
$this->object = new \Alchemy\Phrasea\Cache\XcacheCache;
}

View File

@@ -23,7 +23,6 @@ use Doctrine\Common\DataFixtures\Loader;
* @link www.phraseanet.com
*/
\bootstrap::register_autoloads();
abstract class PhraseanetPHPUnitAbstract extends WebTestCase

View File

@@ -15,8 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
require_once __DIR__ . "/../../lib/bootstrap.php";
bootstrap::register_autoloads();
$Core = require_once __DIR__ . "/../../lib/bootstrap.php";
$request = http_request::getInstance();
$parm = $request->get_parms('session');

View File

@@ -15,8 +15,7 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
require_once __DIR__ . "/../../lib/bootstrap.php";
bootstrap::register_autoloads();
$Core = require_once __DIR__ . "/../../lib/bootstrap.php";
$app = require __DIR__ .'/../../lib/Alchemy/Phrasea/Application/Overview.php';