[FLOW3-general] Help needed - test migration tools for FLOW3 1.0.0 alpha 7!

Zachary Davis, Cast Iron Coding LLC zach at castironcoding.com
Sun Jan 17 14:50:48 CET 2010


Karsten Dambekalns wrote:

> Two known gotchas: arrays in arrays and SplObjectStorage instances in
> arrays (possible to persist until now) are not (yet?) supported in
> alpha7. If you get an exception telling you this, please still answer
> here, so I know we need to implement support for that :)
> 

In my application, I have two models: accounts and users. Account models 
have a property like this:

/**
* @var \SplObjectStorage<\F3\MyApp\Domain\Model\User>
*/
protected $users;

Prior to upgrading the FLOW3 source, I was able to persist Account 
objects without setting the $users property. After upgrading, attempts 
to persist accounts fail with this error:

#1: Catchable Fatal Error: Argument 1 passed to 
F3\FLOW3\Persistence\Backend\PdoBackend::processSplObjectStorage() must 
be an instance of SplObjectStorage, null given, called in 
/opt/local/apache2/htdocs/tutorial/Packages/Framework/FLOW3/Classes/Persistence/Backend/PdoBackend.php 
on line 247 and defined in 
/opt/local/apache2/htdocs/tutorial/Packages/Framework/FLOW3/Classes/Persistence/Backend/PdoBackend.php 
line 388 (More information)

For now, I've fixed it by setting users to an empty SplObjectStorage 
instance in the User constructor.

Not sure if this is a bug or desired behavior, but I thought I'd post it 
in case anyone else runs into a similar problem after upgrading.

Zach



More information about the FLOW3-general mailing list