Author: Russ
Date: 2010-03-17 16:44:41 +0100 (Wed, 17 Mar 2010)
New Revision: 28577

Modified:
   
plugins/sfDoctrinePlugin/branches/1.3-2.0/config/sfDoctrine2PluginConfiguration.class.php
   
plugins/sfDoctrinePlugin/branches/1.3-2.0/lib/task/sfDoctrineBaseTask.class.php
   
plugins/sfDoctrinePlugin/branches/1.3-2.0/lib/task/sfDoctrineUpdateSchemaTask.class.php
Log:
[1.4][sfDoctrine2Plugin] Make cli return status codes


Modified: 
plugins/sfDoctrinePlugin/branches/1.3-2.0/config/sfDoctrine2PluginConfiguration.class.php
===================================================================
--- 
plugins/sfDoctrinePlugin/branches/1.3-2.0/config/sfDoctrine2PluginConfiguration.class.php
   2010-03-17 13:12:36 UTC (rev 28576)
+++ 
plugins/sfDoctrinePlugin/branches/1.3-2.0/config/sfDoctrine2PluginConfiguration.class.php
   2010-03-17 15:44:41 UTC (rev 28577)
@@ -46,6 +46,10 @@
     $classLoader->setBasePath(__DIR__.'/../lib/vendor/doctrine');
     $classLoader->register();
 
+    $classLoader = new \Doctrine\Common\IsolatedClassLoader('Entities');
+    
$classLoader->setBasePath(sfConfig::get('sf_lib_dir').'/entities/doctrine');
+    $classLoader->register();
+
     $this->dispatcher->connect('component.method_not_found', array($this, 
'componentMethodNotFound'));
   }
 

Modified: 
plugins/sfDoctrinePlugin/branches/1.3-2.0/lib/task/sfDoctrineBaseTask.class.php
===================================================================
--- 
plugins/sfDoctrinePlugin/branches/1.3-2.0/lib/task/sfDoctrineBaseTask.class.php 
    2010-03-17 13:12:36 UTC (rev 28576)
+++ 
plugins/sfDoctrinePlugin/branches/1.3-2.0/lib/task/sfDoctrineBaseTask.class.php 
    2010-03-17 15:44:41 UTC (rev 28577)
@@ -63,7 +63,7 @@
     $config->setAttribute("em", $em);
 
     $cli = new \Doctrine\Common\Cli\CliController($config);
-    $cli->run($args);
+    return $cli->run($args);
   }
 
   protected function getEntityManager($name = null)
@@ -91,4 +91,4 @@
 
     return $database->getEntityManager();
   }
-}
\ No newline at end of file
+}

Modified: 
plugins/sfDoctrinePlugin/branches/1.3-2.0/lib/task/sfDoctrineUpdateSchemaTask.class.php
===================================================================
--- 
plugins/sfDoctrinePlugin/branches/1.3-2.0/lib/task/sfDoctrineUpdateSchemaTask.class.php
     2010-03-17 13:12:36 UTC (rev 28576)
+++ 
plugins/sfDoctrinePlugin/branches/1.3-2.0/lib/task/sfDoctrineUpdateSchemaTask.class.php
     2010-03-17 15:44:41 UTC (rev 28577)
@@ -55,6 +55,13 @@
     $options['update'] = true;
     $args = $this->prepareDoctrineCliArguments($options, $keys);
 
-    $this->callDoctrineCli('Orm:schema-tool', $args);
+    $retval = $this->callDoctrineCli('Orm:schema-tool', $args);
+
+    if ($retval === true)
+    {
+      return 0;
+    }
+
+    return 1;
   }
 }
\ No newline at end of file

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to