when using Doctrine::compile(), having the require_once()'s in the source files will break things. This is because the file hasn't been included, but the class has been defined in the compiled file. This means you have to rely on autoload to allow compile to function (or strip out all require_once's from the code on compile, but atleast one needs to be maintained). IMPORTANT: you MUST now use autoload.
This commit is contained in:
parent
ae534f69ff
commit
fb2a3bfde9
@ -463,9 +463,10 @@ final class Doctrine {
|
||||
$fp = fopen($file, 'w');
|
||||
if ($fp === false)
|
||||
throw new Doctrine_Exception("Couldn't write compiled data. Failed to open $file");
|
||||
fwrite($fp, "<?php ".implode('', $ret).
|
||||
"\nclass InvalidKeyException extends Exception { }".
|
||||
"\nclass DQLException extends Exception { }"
|
||||
fwrite($fp, "<?php".
|
||||
" class InvalidKeyException extends Exception { }".
|
||||
" class DQLException extends Exception { }".
|
||||
implode('', $ret)
|
||||
);
|
||||
fclose($fp);
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
require_once("Relation.php");
|
||||
/**
|
||||
* Doctrine_Association this class takes care of association mapping
|
||||
* (= many-to-many relationships, where the relationship is handled with an additional relational table
|
||||
|
@ -18,8 +18,7 @@
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.phpdoctrine.com>.
|
||||
*/
|
||||
require_once("Configurable.php");
|
||||
require_once("Record.php");
|
||||
|
||||
/**
|
||||
* Doctrine_Connection
|
||||
*
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
require_once("Relation.php");
|
||||
/**
|
||||
* Foreign Key
|
||||
*/
|
||||
|
@ -1,7 +1,5 @@
|
||||
<?php
|
||||
require_once("Relation.php");
|
||||
/**
|
||||
* Local Key
|
||||
*/
|
||||
class Doctrine_LocalKey extends Doctrine_Relation { }
|
||||
?>
|
||||
|
@ -18,8 +18,7 @@
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.phpdoctrine.com>.
|
||||
*/
|
||||
require_once("Configurable.php");
|
||||
require_once("EventListener.php");
|
||||
|
||||
/**
|
||||
* @package Doctrine ORM
|
||||
* @url www.phpdoctrine.com
|
||||
|
@ -18,7 +18,7 @@
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.phpdoctrine.com>.
|
||||
*/
|
||||
require_once("Hydrate.php");
|
||||
|
||||
/**
|
||||
* Doctrine_Query
|
||||
*
|
||||
|
@ -18,7 +18,7 @@
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.phpdoctrine.com>.
|
||||
*/
|
||||
require_once("Hydrate.php");
|
||||
|
||||
/**
|
||||
* Doctrine_RawSql
|
||||
*
|
||||
|
@ -19,8 +19,6 @@
|
||||
* <http://www.phpdoctrine.com>.
|
||||
*/
|
||||
|
||||
require_once("Access.php");
|
||||
|
||||
/**
|
||||
* Doctrine_Record
|
||||
* All record classes should inherit this super class
|
||||
|
@ -18,8 +18,7 @@
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.phpdoctrine.com>.
|
||||
*/
|
||||
require_once("Configurable.php");
|
||||
require_once("Record.php");
|
||||
|
||||
/**
|
||||
* Doctrine_Session
|
||||
*
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
require_once("Access.php");
|
||||
/**
|
||||
* Doctrine_Statement
|
||||
*
|
||||
|
@ -18,10 +18,7 @@
|
||||
* and is licensed under the LGPL. For more information, see
|
||||
* <http://www.phpdoctrine.com>.
|
||||
*/
|
||||
require_once("Exception/Find.class.php");
|
||||
require_once("Exception/Mapping.class.php");
|
||||
require_once("Exception/PrimaryKey.class.php");
|
||||
require_once("Configurable.php");
|
||||
|
||||
/**
|
||||
* Doctrine_Table represents a database table
|
||||
* each Doctrine_Table holds the information of foreignKeys and associations
|
||||
|
Loading…
Reference in New Issue
Block a user