Development

Changeset 10772

You must first sign up to be able to contribute.

Changeset 10772

Show
Ignore:
Timestamp:
08/11/08 12:16:05 (3 months ago)
Author:
francois
Message:

sfPropelFinderPlugin Fixed problem with sfPropelFinder, symfony cache, and Propel 1.3 (based on a patch by mrhyde) (closes #4159)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfPropelFinderPlugin/README

    r10765 r10772  
    558558### 2008-07-07 | 0.3.0 Beta 
    559559 
     560* mrhyde:   Fixed problem with `sfPropelFinder`, symfony cache, and Propel 1.3 
    560561* francois: Added `sfPropelFinder::combine()` method to handle complex queries with And and Or 
    561562* francois: Added support for `with()` in `findPk()` (and documented the method) 
  • plugins/sfPropelFinderPlugin/lib/sfModelFinder.php

    r10771 r10772  
    230230  } 
    231231   
    232    
     232  public function __sleep() 
     233  { 
     234    // If the connection is a PDO instance, PHP throws an exception when serializing a finder object 
     235    // So we must ply well with it 
     236    $attributes = get_object_vars($this); 
     237    unset($attributes['connection']); 
     238    return array_keys($attributes); 
     239  } 
    233240} 
  • plugins/sfPropelFinderPlugin/test/unit/sfPropelFinderPagerTest.php

    r10664 r10772  
    4949 
    5050// cleanup database 
     51AuthorPeer::doDeleteAll(); 
     52CommentPeer::doDeleteAll(); 
     53CategoryPeer::doDeleteAll(); 
    5154ArticlePeer::doDeleteAll(); 
    5255 
    53 $t = new lime_test(31, new lime_output_color()); 
     56$t = new lime_test(32, new lime_output_color()); 
    5457 
    5558$article1 = new Article(); 
     
    165168  'getResults() does not repeat conditions' 
    166169); 
     170 
     171$t->diag('sfPropelFinderPager issues with symfony cache'); 
     172 
     173try 
     174{ 
     175  serialize($pager); 
     176  $t->pass('A pager can be serialized'); 
     177} 
     178catch(Exception $e) 
     179{ 
     180  $t->fail('A pager can be serialized'); 
     181}