Development

#2218 ([PATCH] enhancement for debugging fixtures)

You must first sign up to be able to contribute.

Ticket #2218 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] enhancement for debugging fixtures

Reported by: DrCore Assigned to: fabien
Priority: minor Milestone: 1.0.8
Component: model Version:
Keywords: sfPropeldata propel Cc:
Qualification: Ready for core team

Description

When loading fixtures through propel-load-data a very general error message can appear saying 'You must give a name for each fixture data entry'. It is usually not clear where the problem lies. I propose to add some extra information to the error like the table name.

Index: lib/addon/propel/sfPropelData.class.php
===================================================================
--- lib/addon/propel/sfPropelData.class.php     (revision 5025)
+++ lib/addon/propel/sfPropelData.class.php     (working copy)
@@ -100,7 +100,7 @@
 
         if (!is_array($data))
         {
-          throw new Exception('You must give a name for each fixture data entry');
+          throw new Exception('You must give a name for each fixture data entry (class '.$class')');
         }
 
         foreach ($data as $name => $value)

Change History

09/10/07 14:15:31 changed by DrCore

There is a little goof in the original patch.

Index: lib/addon/propel/sfPropelData.class.php
===================================================================
--- lib/addon/propel/sfPropelData.class.php     (revision 5025)
+++ lib/addon/propel/sfPropelData.class.php     (working copy)
@@ -100,7 +100,7 @@
 
         if (!is_array($data))
         {
-          throw new Exception('You must give a name for each fixture data entry');
+          throw new Exception('You must give a name for each fixture data entry (class '.$class.')');
         }
 
         foreach ($data as $name => $value)

09/10/07 14:41:19 changed by noel

  • version deleted.

This is an enhancement, not a bug. So, we won't add it in the 1.0 branch.

10/01/07 07:52:36 changed by dwhittle

  • qualification set to Ready for core team.

10/01/07 09:35:03 changed by fabien

  • milestone set to 1.0.8.

10/01/07 09:37:17 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

in r5339 and r5340