mongodb-odm
mongodb-odm copied to clipboard
Improve documentation around custom types
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.
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.
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?
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.