Commit
* added a RegistryInterface * changed all classes to depend on the Registry instead of a specific EntityManager This is more consistent as the validator already took the registry and this allows to use any entity manager in Forms.
- Loading branch information
There are no files selected for viewing
3 comments
on commit fbf3695
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the standalone Form, I simply was trying this in Silex:
$extensions[] = new \Symfony\Bridge\Doctrine\Form\DoctrineOrmExtension($app['doctrine.orm.em']);
However, with this new registry argument, I don't understand which concrete class to instantiate which implements RegistryInterface?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mgatto you need to write another implementation of the interface for Silex as the implementation provided here depends of the DI component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I'll give it a try and post it to the Silex project.
Is $this->em defined? Or should it be retrieved from the registry?