Open jmikola opened 11 years ago
@jmikola is this still relevant? Do we want to add type mappings for GeoJSON in 2.x?
I have no recollection of any user ever requesting this, so I wouldn't prioritize it.
Side note: I do have plans to upgrade GeoJSON with support for the new BSON interfaces in ext-mongodb
, which would allow the driver to handle the BSON conversion of those classes on its own. I also intend to update the namespace to Jmikola\GeoJSON
(instead of global GeoJSON
) in what would have to be a major version bump.
Does ODM 2.0 include any of the GeoJSON support that was previously in Doctrine MongoDB? If so, I can work on this sooner than later.
Does ODM 2.0 include any of the GeoJSON support that was previously in Doctrine MongoDB?
Yes, I've included this when moving all the logic from doctrine/mongodb to ODM.
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.
Removing the stale
label, as I think this is still worthwhile.
I added it to the roadmap for 2.1. Should be a nice little improvement along with some aggregation changes.
Recap: @alcaeus suggested creating a GeoJSON 1.1 version that aliases the new class names as a forward-compatibility layer for proper renames in 2.0. See: https://dev.to/greg0ire/how-to-deprecate-a-type-in-php-48cf
ODM 2.0 can then require GeoJSON 1.0 or 1.1 and we can safely keep the current code with maual jsonSerialize()
unwrapping as-is. If ODM 2.1+ then decides to introduce GeoJSON type mappings, we could then update the requirement to GeoJSON 2.0.
Creating this from #530.
doctrine/mongodb 1.1 supports GeoJSON and 2dsphere queries as of https://github.com/doctrine/mongodb/pull/109.
Todo items: