Development

#3210 ([PATCH] propel:load-data problem with classname case)

You must first sign up to be able to contribute.

Ticket #3210 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

[PATCH] propel:load-data problem with classname case

Reported by: trivoallan Assigned to: fabien
Priority: major Milestone: 1.1.0 beta3
Component: model Version: 1.1.0 DEV
Keywords: Cc:
Qualification: Unreviewed

Description

This prevents me from loading fixtures on my php-5.2.0-ubuntu box.

Attachments

propel_load_data.patch (1.7 kB) - added by trivoallan on 03/26/08 15:10:53.

Change History

03/26/08 15:10:53 changed by trivoallan

  • attachment propel_load_data.patch added.

03/26/08 15:20:57 changed by trivoallan

  • version changed from 1.1.0 BETA2 to 1.1.0 DEV.

(follow-up: ↓ 3 ) 03/26/08 15:45:46 changed by fabien

  • milestone set to 1.1.0 beta3.

I need more information about what does not work... IM?

(in reply to: ↑ 2 ) 03/26/08 16:05:55 changed by trivoallan

Replying to fabien:

I need more information about what does not work... IM?

Warning: call_user_func(trackPeer::doDeleteAll): First argument is expected to be a valid callback in lib/symfony/plugins/sfPropelPlugin/lib/propel/sfPropelData.class.php on line 248

Warning: constant(): Couldn't find constant trackPeer::TABLE_NAME in lib/symfony/plugins/sfPropelPlugin/lib/propel/sfPropelData.class.php on line 83
                                            
  Cannot fetch TableMap for undefined table:   
                                               

i'm available on #symfony if you want to discuss the issue further.

03/27/08 13:47:48 changed by fabien

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

in r8112

(in reply to: ↑ description ; follow-up: ↓ 6 ) 04/02/08 19:09:33 changed by n7lyg

  • priority changed from minor to major.

Replying to trivoallan:

This prevents me from loading fixtures on my php-5.2.0-ubuntu box.

I have experienced the same problem. I tried to install your proposed fix, but it breaks the fixture loading from sfGuardPlugin. The sfGuardPlugin has generated Peer class names that start with sfGuard. This fix tries to call SfGuardUserPeer? instead of sfGuardUserPeer. So, you either have to change all plugin code or the user-generated model code or modify the fix so that it looks for both capitalized and non-capitalized names.

(in reply to: ↑ 5 ; follow-up: ↓ 7 ) 04/02/08 22:37:43 changed by n7lyg

Replying to n7lyg: I fixed this patch by checking strcmp (substr ($class, 0, 2), 'sf')) in front of the two occurrences of ucfirst. If successful, do the ucfirst, otherwise just assign $class to the output variable without doing the ucfirst. This allows the sfGuard classes to sneak through.

(in reply to: ↑ 6 ) 04/02/08 22:38:41 changed by trivoallan

Replying to n7lyg:

Replying to n7lyg: I fixed this patch by checking strcmp (substr ($class, 0, 2), 'sf')) in front of the two occurrences of ucfirst. If successful, do the ucfirst, otherwise just assign $class to the output variable without doing the ucfirst. This allows the sfGuard classes to sneak through.

as this is more a, sfGuard related issue, could you open a new ticket and describe it ?

thanks

04/07/08 23:16:13 changed by n7lyg

Ticket 3291 submitted.