mongodb-odm icon indicating copy to clipboard operation
mongodb-odm copied to clipboard

Improve documentation around custom types

Open alcaeus opened this issue 6 years ago • 3 comments
trafficstars

The Type::convertToDatabaseValue() and Type:: convertToPHPValue() specify that the methods receive a PHP and database type and return the opposite type. However, there are numerous instances where convertToPHPValue() is called with a PHP value. Built-in types all handle this gracefully, so we should document this in the method signatures as well.

We may also want to add a short section to the documentation on how to add a custom type.

alcaeus avatar Nov 08 '19 12:11 alcaeus

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 08 '19 12:12 stale[bot]

I assume this part of the docs is meant: https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/custom-mapping-types.html

Do we need to target a specific branch for the extended information?

SenseException avatar Dec 08 '19 23:12 SenseException

This can be added to the lowest supported branch, which at the moment would be 1.3.x. I've added it to the roadmap to be triaged and to keep the Bot happy.

alcaeus avatar Dec 09 '19 07:12 alcaeus