Remove unused convert/closure methods in type classes #542

jmikola opened this Issue Mar 28, 2013 · 3 comments


None yet
2 participants

jmikola commented Mar 28, 2013

  • closureToMongo() is never used and should likely be removed across the board.
  • convertToPHPValue() is only used for identifier fields (called by ClassMetadataInfo::getPHPIdentifierValue()).

Earlier discussion on this subject: #237

malarzm added the task label Mar 6, 2015


malarzm commented Jun 13, 2015

@jmikola citing part of #237 (comment)

I know he [@jwage] has plans to ultimately generate code for persister classes as well, so that explains why we have a pair of closure methods.

do we still want to remove closureToMongo? Personally I don't think we'll do generated persisters before 2.0.0 :)

/cc @jwage


jmikola commented Jun 13, 2015

I don't see the harm in leaving it in place for the existing types, especially since the base Type class includes it. Theoretically, generated Persister classes shouldn't require a major version bump since it'd just be a new feature; however, I think removing the method for 1.0.0 would require a bump to 2.0.0 if we need to introduce the method to the base Type class (which may as well be our interface).


malarzm commented Jun 13, 2015

I think that we should leave them, maybe they'll come in handy one day :)

malarzm closed this Jun 13, 2015

malarzm removed this from the 1.0.0 milestone Jun 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment