diff --git a/lib/Doctrine/ORM/ActiveEntity.php b/lib/Doctrine/ORM/ActiveEntity.php index 5be8ce82d..89c6b9b36 100644 --- a/lib/Doctrine/ORM/ActiveEntity.php +++ b/lib/Doctrine/ORM/ActiveEntity.php @@ -10,7 +10,7 @@ * * @since 2.0 */ -class Doctrine_ORM_ActiveEntity extends Doctrine_Common_VirtualPropertyObject implements Doctrine_ORM_Entity +class Doctrine_ORM_ActiveEntity { /** * The class descriptor. diff --git a/lib/Doctrine/ORM/Configuration.php b/lib/Doctrine/ORM/Configuration.php index e210f18d4..e324b79b1 100644 --- a/lib/Doctrine/ORM/Configuration.php +++ b/lib/Doctrine/ORM/Configuration.php @@ -44,10 +44,21 @@ class Configuration extends \Doctrine\DBAL\Configuration 'resultCacheImpl' => null, 'queryCacheImpl' => null, 'metadataCacheImpl' => null, - 'metadataDriverImpl' => new AnnotationDriver() + 'metadataDriverImpl' => new AnnotationDriver(), + 'automaticDirtyChecking' => true )); } + public function setAutomaticDirtyChecking($bool) + { + $this->_attributes['automaticDirtyChecking'] = $bool; + } + + public function getAutomaticDirtyChecking() + { + return $this->_attributes['automaticDirtyChecking']; + } + public function setMetadataDriverImpl($driverImpl) { $this->_attributes['metadataDriverImpl'] = $driverImpl; diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index 5c8bb509a..326771d92 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -262,6 +262,8 @@ class UnitOfWork foreach ($entities as $entity) { $entitySet[get_class($entity)][] = $entity; } + } else if ( ! $this->_em->getConfiguration()->getAutomaticDirtyChecking()) { + //TODO } else { $entitySet = $this->_identityMap; } diff --git a/tests/Doctrine/Tests/AllTests.php b/tests/Doctrine/Tests/AllTests.php index 64c219aa0..c94ab4650 100644 --- a/tests/Doctrine/Tests/AllTests.php +++ b/tests/Doctrine/Tests/AllTests.php @@ -10,7 +10,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'AllTests::main'); } -require_once dirname(__FILE__) . '/TestInit.php'; +require_once __DIR__ . '/TestInit.php'; // Suites #require_once 'Common/AllTests.php'; diff --git a/tests/Doctrine/Tests/Common/AllTests.php b/tests/Doctrine/Tests/Common/AllTests.php index 0371ffb2b..0279b62b3 100644 --- a/tests/Doctrine/Tests/Common/AllTests.php +++ b/tests/Doctrine/Tests/Common/AllTests.php @@ -8,7 +8,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Common_AllTests::main'); } -require_once dirname(__FILE__) . '/../TestInit.php'; +require_once __DIR__ . '/../TestInit.php'; // Suites #require_once 'Common/Collections/AllTests.php'; diff --git a/tests/Doctrine/Tests/Common/Collections/AllTests.php b/tests/Doctrine/Tests/Common/Collections/AllTests.php index 3b8a5679f..7da862d5f 100644 --- a/tests/Doctrine/Tests/Common/Collections/AllTests.php +++ b/tests/Doctrine/Tests/Common/Collections/AllTests.php @@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Common_Collections_AllTests::main'); } -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; // Tests #require_once 'Common/Collections/CollectionTest.php'; diff --git a/tests/Doctrine/Tests/Common/Collections/CollectionTest.php b/tests/Doctrine/Tests/Common/Collections/CollectionTest.php index b1c21c6b4..bf7d6b47d 100644 --- a/tests/Doctrine/Tests/Common/Collections/CollectionTest.php +++ b/tests/Doctrine/Tests/Common/Collections/CollectionTest.php @@ -4,7 +4,7 @@ namespace Doctrine\Tests\Common\Collections; use Doctrine\Tests; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; /** * Collection tests. diff --git a/tests/Doctrine/Tests/DBAL/AllTests.php b/tests/Doctrine/Tests/DBAL/AllTests.php index 5667d729a..5d00bdd51 100644 --- a/tests/Doctrine/Tests/DBAL/AllTests.php +++ b/tests/Doctrine/Tests/DBAL/AllTests.php @@ -9,7 +9,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Dbal_AllTests::main'); } -require_once dirname(__FILE__) . '/../TestInit.php'; +require_once __DIR__ . '/../TestInit.php'; // Suites #require_once 'Dbal/Component/AllTests.php'; diff --git a/tests/Doctrine/Tests/DBAL/Component/AllTests.php b/tests/Doctrine/Tests/DBAL/Component/AllTests.php index 157f1aade..3580bad81 100644 --- a/tests/Doctrine/Tests/DBAL/Component/AllTests.php +++ b/tests/Doctrine/Tests/DBAL/Component/AllTests.php @@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Dbal_Component_AllTests::main'); } -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; // Tests #require_once 'Dbal/Component/TestTest.php'; diff --git a/tests/Doctrine/Tests/DBAL/Component/TestTest.php b/tests/Doctrine/Tests/DBAL/Component/TestTest.php index 02e87645c..bcf69aa91 100644 --- a/tests/Doctrine/Tests/DBAL/Component/TestTest.php +++ b/tests/Doctrine/Tests/DBAL/Component/TestTest.php @@ -2,7 +2,7 @@ namespace Doctrine\Tests\DBAL\Component; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; class TestTest extends \Doctrine\Tests\DbalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Ticket/AllTests.php b/tests/Doctrine/Tests/DBAL/Ticket/AllTests.php index 938805457..3d64d890c 100644 --- a/tests/Doctrine/Tests/DBAL/Ticket/AllTests.php +++ b/tests/Doctrine/Tests/DBAL/Ticket/AllTests.php @@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Ticket_AllTests::main'); } -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; // Tests #require_once 'Dbal/Ticket/1Test.php'; diff --git a/tests/Doctrine/Tests/DBAL/Ticket/Test1.php b/tests/Doctrine/Tests/DBAL/Ticket/Test1.php index ab7b44c44..c2b40fbe6 100644 --- a/tests/Doctrine/Tests/DBAL/Ticket/Test1.php +++ b/tests/Doctrine/Tests/DBAL/Ticket/Test1.php @@ -2,7 +2,7 @@ namespace Doctrine\Tests\DBAL\Ticket; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; class Test1 extends \Doctrine\Tests\DbalTestCase { diff --git a/tests/Doctrine/Tests/ORM/AllTests.php b/tests/Doctrine/Tests/ORM/AllTests.php index 1cbbad3b0..6205e4cd0 100644 --- a/tests/Doctrine/Tests/ORM/AllTests.php +++ b/tests/Doctrine/Tests/ORM/AllTests.php @@ -15,7 +15,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Orm_AllTests::main'); } -require_once dirname(__FILE__) . '/../TestInit.php'; +require_once __DIR__ . '/../TestInit.php'; class AllTests { diff --git a/tests/Doctrine/Tests/ORM/Associations/AllTests.php b/tests/Doctrine/Tests/ORM/Associations/AllTests.php index 2906403cb..048e4ad18 100644 --- a/tests/Doctrine/Tests/ORM/Associations/AllTests.php +++ b/tests/Doctrine/Tests/ORM/Associations/AllTests.php @@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Orm_Associations_AllTests::main'); } -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; class AllTests { diff --git a/tests/Doctrine/Tests/ORM/Associations/OneToOneMappingTest.php b/tests/Doctrine/Tests/ORM/Associations/OneToOneMappingTest.php index efa0f31f1..7dcfd026f 100644 --- a/tests/Doctrine/Tests/ORM/Associations/OneToOneMappingTest.php +++ b/tests/Doctrine/Tests/ORM/Associations/OneToOneMappingTest.php @@ -2,7 +2,7 @@ namespace Doctrine\Tests\ORM\Associations; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; class OneToOneMappingTest extends \Doctrine\Tests\OrmTestCase { diff --git a/tests/Doctrine/Tests/ORM/CommitOrderCalculatorTest.php b/tests/Doctrine/Tests/ORM/CommitOrderCalculatorTest.php index fe56fe8f9..d05998faa 100644 --- a/tests/Doctrine/Tests/ORM/CommitOrderCalculatorTest.php +++ b/tests/Doctrine/Tests/ORM/CommitOrderCalculatorTest.php @@ -2,7 +2,7 @@ namespace Doctrine\Tests\ORM; -require_once dirname(__FILE__) . '/../TestInit.php'; +require_once __DIR__ . '/../TestInit.php'; /** * Tests of the commit order calculation. diff --git a/tests/Doctrine/Tests/ORM/Entity/AllTests.php b/tests/Doctrine/Tests/ORM/Entity/AllTests.php index d61f2cd90..bda60599e 100644 --- a/tests/Doctrine/Tests/ORM/Entity/AllTests.php +++ b/tests/Doctrine/Tests/ORM/Entity/AllTests.php @@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Orm_Entity_AllTests::main'); } -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; class AllTests diff --git a/tests/Doctrine/Tests/ORM/Entity/ConstructorTest.php b/tests/Doctrine/Tests/ORM/Entity/ConstructorTest.php index a29e6c30c..e21176487 100644 --- a/tests/Doctrine/Tests/ORM/Entity/ConstructorTest.php +++ b/tests/Doctrine/Tests/ORM/Entity/ConstructorTest.php @@ -2,7 +2,7 @@ namespace Doctrine\Tests\ORM\Entity; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; class ConstructorTest extends \Doctrine\Tests\OrmTestCase { diff --git a/tests/Doctrine/Tests/ORM/EntityManagerTest.php b/tests/Doctrine/Tests/ORM/EntityManagerTest.php index 97d099dbf..60ee4a2d1 100644 --- a/tests/Doctrine/Tests/ORM/EntityManagerTest.php +++ b/tests/Doctrine/Tests/ORM/EntityManagerTest.php @@ -2,7 +2,7 @@ namespace Doctrine\Tests\ORM; -require_once dirname(__FILE__) . '/../TestInit.php'; +require_once __DIR__ . '/../TestInit.php'; /** * EntityManager tests. diff --git a/tests/Doctrine/Tests/ORM/EntityPersisterTest.php b/tests/Doctrine/Tests/ORM/EntityPersisterTest.php index e06c8f582..aeaf0da09 100644 --- a/tests/Doctrine/Tests/ORM/EntityPersisterTest.php +++ b/tests/Doctrine/Tests/ORM/EntityPersisterTest.php @@ -10,7 +10,7 @@ use Doctrine\Tests\Mocks\SequenceMock; use Doctrine\Tests\Models\Forum\ForumUser; use Doctrine\Tests\Models\Forum\ForumAvatar; -require_once dirname(__FILE__) . '/../TestInit.php'; +require_once __DIR__ . '/../TestInit.php'; #require_once 'lib/mocks/Doctrine_EntityManagerMock.php'; #require_once 'lib/mocks/Doctrine_ConnectionMock.php'; diff --git a/tests/Doctrine/Tests/ORM/Functional/AllTests.php b/tests/Doctrine/Tests/ORM/Functional/AllTests.php index 10c8bcc4f..712b5f43b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/AllTests.php +++ b/tests/Doctrine/Tests/ORM/Functional/AllTests.php @@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Orm_Functional_AllTests::main'); } -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; class AllTests { diff --git a/tests/Doctrine/Tests/ORM/Functional/BasicCRUDTest.php b/tests/Doctrine/Tests/ORM/Functional/BasicCRUDTest.php index 1613a50fc..34eaa5e4f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/BasicCRUDTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/BasicCRUDTest.php @@ -6,7 +6,7 @@ use Doctrine\ORM\Export\ClassExporter; use Doctrine\Tests\Models\CMS\CmsUser; use Doctrine\Tests\Models\CMS\CmsPhonenumber; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; /** * Description of BasicCRUDTest diff --git a/tests/Doctrine/Tests/ORM/Hydration/AllTests.php b/tests/Doctrine/Tests/ORM/Hydration/AllTests.php index bad26e993..d2863938f 100644 --- a/tests/Doctrine/Tests/ORM/Hydration/AllTests.php +++ b/tests/Doctrine/Tests/ORM/Hydration/AllTests.php @@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Orm_Hydration_AllTests::main'); } -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; class AllTests diff --git a/tests/Doctrine/Tests/ORM/Hydration/ArrayHydratorTest.php b/tests/Doctrine/Tests/ORM/Hydration/ArrayHydratorTest.php index 2e5f9ac3e..bc01180be 100644 --- a/tests/Doctrine/Tests/ORM/Hydration/ArrayHydratorTest.php +++ b/tests/Doctrine/Tests/ORM/Hydration/ArrayHydratorTest.php @@ -4,7 +4,7 @@ namespace Doctrine\Tests\ORM\Hydration; use Doctrine\Tests\Mocks\HydratorMockStatement; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; /** * Description of ArrayHydratorTest diff --git a/tests/Doctrine/Tests/ORM/Hydration/HydrationTest.php b/tests/Doctrine/Tests/ORM/Hydration/HydrationTest.php index 624007205..eb7f09e0b 100644 --- a/tests/Doctrine/Tests/ORM/Hydration/HydrationTest.php +++ b/tests/Doctrine/Tests/ORM/Hydration/HydrationTest.php @@ -2,7 +2,7 @@ namespace Doctrine\Tests\ORM\Hydration; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; /** * Description of HydrationTest diff --git a/tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php b/tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php index 8e325de18..6b3ab7c3c 100644 --- a/tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php +++ b/tests/Doctrine/Tests/ORM/Hydration/ObjectHydratorTest.php @@ -4,7 +4,7 @@ namespace Doctrine\Tests\ORM\Hydration; use Doctrine\Tests\Mocks\HydratorMockStatement; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; /** * Description of ObjectHydratorTest diff --git a/tests/Doctrine/Tests/ORM/Hydration/ScalarHydratorTest.php b/tests/Doctrine/Tests/ORM/Hydration/ScalarHydratorTest.php index 3f4c04543..b2e08b4de 100644 --- a/tests/Doctrine/Tests/ORM/Hydration/ScalarHydratorTest.php +++ b/tests/Doctrine/Tests/ORM/Hydration/ScalarHydratorTest.php @@ -4,7 +4,7 @@ namespace Doctrine\Tests\ORM\Hydration; use Doctrine\Tests\Mocks\HydratorMockStatement; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; /** * Description of ScalarHydratorTest diff --git a/tests/Doctrine/Tests/ORM/Hydration/SingleScalarHydratorTest.php b/tests/Doctrine/Tests/ORM/Hydration/SingleScalarHydratorTest.php index d9ff8e318..3e78aca62 100644 --- a/tests/Doctrine/Tests/ORM/Hydration/SingleScalarHydratorTest.php +++ b/tests/Doctrine/Tests/ORM/Hydration/SingleScalarHydratorTest.php @@ -4,7 +4,7 @@ namespace Doctrine\Tests\ORM\Hydration; use Doctrine\Tests\Mocks\HydratorMockStatement; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; /** * Description of SingleScalarHydratorTest diff --git a/tests/Doctrine/Tests/ORM/Mapping/AllTests.php b/tests/Doctrine/Tests/ORM/Mapping/AllTests.php index 8c32e19e0..dadf9646b 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AllTests.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AllTests.php @@ -6,7 +6,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Orm_Mapping_AllTests::main'); } -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; class AllTests { diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php index 1bb89c8b3..e2205008a 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataFactoryTest.php @@ -10,7 +10,7 @@ use Doctrine\Tests\Mocks\MetadataDriverMock; use Doctrine\Tests\Mocks\DatabasePlatformMock; use Doctrine\ORM\Mapping\ClassMetadata; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; /** * Description of ClassMetadataFactoryTest diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php index 1c0bb6e64..e92578eaf 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php @@ -4,7 +4,7 @@ namespace Doctrine\Tests\ORM\Mapping; use Doctrine\ORM\Mapping\ClassMetadata; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase { diff --git a/tests/Doctrine/Tests/ORM/Query/AllTests.php b/tests/Doctrine/Tests/ORM/Query/AllTests.php index e1ec65e7f..e2826da99 100644 --- a/tests/Doctrine/Tests/ORM/Query/AllTests.php +++ b/tests/Doctrine/Tests/ORM/Query/AllTests.php @@ -8,7 +8,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) { define('PHPUnit_MAIN_METHOD', 'Orm_Query_AllTests::main'); } -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; #require_once 'IdentifierRecognitionTest.php'; /*require_once 'ScannerTest.php'; diff --git a/tests/Doctrine/Tests/ORM/Query/IdentifierRecognitionTest.php b/tests/Doctrine/Tests/ORM/Query/IdentifierRecognitionTest.php index 81899ded4..35560cac8 100644 --- a/tests/Doctrine/Tests/ORM/Query/IdentifierRecognitionTest.php +++ b/tests/Doctrine/Tests/ORM/Query/IdentifierRecognitionTest.php @@ -21,7 +21,7 @@ namespace Doctrine\Tests\ORM\Query; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; /** * Test case for testing the saving and referencing of query identifiers. diff --git a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php index b2045a0be..fd7115f25 100644 --- a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php +++ b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php @@ -21,7 +21,7 @@ namespace Doctrine\Tests\ORM\Query; -require_once dirname(__FILE__) . '/../../TestInit.php'; +require_once __DIR__ . '/../../TestInit.php'; /** * Test case for testing the saving and referencing of query identifiers. diff --git a/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php b/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php index 80812d067..052fa0a8c 100644 --- a/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php +++ b/tests/Doctrine/Tests/ORM/UnitOfWorkTest.php @@ -11,7 +11,7 @@ use Doctrine\Tests\Mocks\IdentityIdGeneratorMock; use Doctrine\Tests\Models\Forum\ForumUser; use Doctrine\Tests\Models\Forum\ForumAvatar; -require_once dirname(__FILE__) . '/../TestInit.php'; +require_once __DIR__ . '/../TestInit.php'; #require_once 'lib/mocks/Doctrine_EntityManagerMock.php'; #require_once 'lib/mocks/Doctrine_ConnectionMock.php'; diff --git a/tests/Doctrine/Tests/TestInit.php b/tests/Doctrine/Tests/TestInit.php index 5b31764e4..94df9f57e 100644 --- a/tests/Doctrine/Tests/TestInit.php +++ b/tests/Doctrine/Tests/TestInit.php @@ -13,10 +13,10 @@ $classLoader = new \Doctrine\Common\ClassLoader(); //$classLoader->setCheckFileExists(true); $classLoader->register(); -$modelDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'models'; +$modelDir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'models'; set_include_path( get_include_path() - . PATH_SEPARATOR . dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' + . PATH_SEPARATOR . __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'cms' . PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'company' . PATH_SEPARATOR . $modelDir . DIRECTORY_SEPARATOR . 'ecommerce'