Author: Jonathan.Wage
Date: 2010-03-26 18:19:58 +0100 (Fri, 26 Mar 2010)
New Revision: 28809
Modified:
branches/1.3/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateAdminTask.class.php
branches/1.3/lib/plugins/sfPropelPlugin/lib/task/sfPropelGenerateAdminTask.class.php
branches/1.4/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateAdminTask.class.php
branches/1.4/lib/plugins/sfPropelPlugin/lib/task/sfPropelGenerateAdminTask.class.php
Log:
[1.3, 1.4] Throw exception when routing file cannot be written in
doctrine:generate-admin task (fixes #8356)
Modified:
branches/1.3/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateAdminTask.class.php
===================================================================
---
branches/1.3/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateAdminTask.class.php
2010-03-26 17:00:04 UTC (rev 28808)
+++
branches/1.3/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateAdminTask.class.php
2010-03-26 17:19:58 UTC (rev 28809)
@@ -134,7 +134,11 @@
, $name, $model, $module, isset($options['plural']) ? $options['plural']
: $module, $primaryKey).$content;
$this->logSection('file+', $routing);
- file_put_contents($routing, $content);
+
+ if (false === file_put_contents($routing, $content))
+ {
+ throw new sfCommandException(sprintf('Unable to write to file, %s.',
$routing));
+ }
}
$arguments['route'] = $this->getRouteFromName($name);
Modified:
branches/1.3/lib/plugins/sfPropelPlugin/lib/task/sfPropelGenerateAdminTask.class.php
===================================================================
---
branches/1.3/lib/plugins/sfPropelPlugin/lib/task/sfPropelGenerateAdminTask.class.php
2010-03-26 17:00:04 UTC (rev 28808)
+++
branches/1.3/lib/plugins/sfPropelPlugin/lib/task/sfPropelGenerateAdminTask.class.php
2010-03-26 17:19:58 UTC (rev 28809)
@@ -133,7 +133,11 @@
, $name, $model, $module, isset($options['plural']) ? $options['plural']
: $module, $primaryKey).$content;
$this->logSection('file+', $routing);
- file_put_contents($routing, $content);
+
+ if (false === file_put_contents($routing, $content))
+ {
+ throw new sfCommandException(sprintf('Unable to write to file, %s.',
$routing));
+ }
}
$arguments['route'] = $this->getRouteFromName($name);
Modified:
branches/1.4/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateAdminTask.class.php
===================================================================
---
branches/1.4/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateAdminTask.class.php
2010-03-26 17:00:04 UTC (rev 28808)
+++
branches/1.4/lib/plugins/sfDoctrinePlugin/lib/task/sfDoctrineGenerateAdminTask.class.php
2010-03-26 17:19:58 UTC (rev 28809)
@@ -134,7 +134,11 @@
, $name, $model, $module, isset($options['plural']) ? $options['plural']
: $module, $primaryKey).$content;
$this->logSection('file+', $routing);
- file_put_contents($routing, $content);
+
+ if (false === file_put_contents($routing, $content))
+ {
+ throw new sfCommandException(sprintf('Unable to write to file, %s.',
$routing));
+ }
}
$arguments['route'] = $this->getRouteFromName($name);
Modified:
branches/1.4/lib/plugins/sfPropelPlugin/lib/task/sfPropelGenerateAdminTask.class.php
===================================================================
---
branches/1.4/lib/plugins/sfPropelPlugin/lib/task/sfPropelGenerateAdminTask.class.php
2010-03-26 17:00:04 UTC (rev 28808)
+++
branches/1.4/lib/plugins/sfPropelPlugin/lib/task/sfPropelGenerateAdminTask.class.php
2010-03-26 17:19:58 UTC (rev 28809)
@@ -133,7 +133,11 @@
, $name, $model, $module, isset($options['plural']) ? $options['plural']
: $module, $primaryKey).$content;
$this->logSection('file+', $routing);
- file_put_contents($routing, $content);
+
+ if (false === file_put_contents($routing, $content))
+ {
+ throw new sfCommandException(sprintf('Unable to write to file, %s.',
$routing));
+ }
}
$arguments['route'] = $this->getRouteFromName($name);
--
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.