Open ReservedDeveloper opened 9 years ago
its easier to review if you just open a PR
The snag here is that you can't necessarily take the above mentioned approach for the method, since this bundle doesn't have concrete dependencies on doctrine/mongodb-odm
.
You could do a method_exists($om, 'getSchemaManager')
or is_a($om, 'Doctrine\ODM\MongoDB\DocumentManager')
check, but both approaches feel super brittle, so I'm not sure what would be the best tactic here without requiring any further dependencies.
@ReservedDeveloper can't we use something like if ('ODM' === $type) {
for detecting ODM?
@alexislefebvre no .. the type will be specific to the ODM .. but we can check for 'ORM' !== $type
When attempting to use
\Liip\FunctionalTestBundle\Test\WebTestCase::loadFixtureFiles()
passing inappend=false
, I encountered an error. I believe it has to do with detection of the DB platform as shown in L382-L394.My workaround, presently, is as follows:
Not sure if that would be the ideal approach, or if there's a better platform agnostic way of determining which class methods need to be called for a reset. Just wanted to call it out for a future release!