Skip to content

[RFC] Plan for MongoDB ODM v3 (new major release) #2762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
16 tasks
GromNaN opened this issue Apr 29, 2025 · 0 comments
Open
16 tasks

[RFC] Plan for MongoDB ODM v3 (new major release) #2762

GromNaN opened this issue Apr 29, 2025 · 0 comments
Assignees
Milestone

Comments

@GromNaN
Copy link
Member

GromNaN commented Apr 29, 2025

MongoDB ODM v2 was released in 2018 and PHP and MongoDB have come a long way since then.

I'd like to propose a plan for things that involve breaking changes and that can be achieved for a 3.0 release. The goal is to make the version 2.last version 100% compatible with 3.0, as soon as all deprecations are resolved (following the same process as Symfony of deprecating before removing).

  • Drop lazy proxy libraries and use native lazy objects
    • Add support for native lazy objects in v2.x
    • Require PHP 8.4+
  • Rename lib/Doctrine/ODM/MongoDB/ to src/
  • Drop support for annotations. They are replaced by PHP Attributes
  • Add native types to all properties
  • Add native return types
  • Add native parameter types (this is backwards compatible, should be already the case)
  • Make soft-final classes, hard-final
  • Require ext-mongodb 2
  • Remove support for CollectionInfoIterator, CollectionInfoCommandIterator, IndexInfoIterator, IndexInfoIteratorIterator from ext-mongodb 1.x
  • Remove inheritance strategies COLLECTION_PER_CLASS Deprecate COLLECTION_PER_CLASS inheritance #2742
  • Make classMetadata fields public readonly
  • Switching "symfony/var-dumper" in require-dev #2448
  • Require composer-runtime-api: ^2.0 (see PHPLIB-1302: Use Composer\InstalledVersions mongodb/mongo-php-library#1262)
  • Use #[AsCommand] attribute to enable lazy-loading
@GromNaN GromNaN added this to the 3.0.0 milestone Apr 29, 2025
@GromNaN GromNaN self-assigned this Apr 29, 2025
@GromNaN GromNaN changed the title Plan for MongoDB ODM v3 (new major release) [RFC] Plan for MongoDB ODM v3 (new major release) Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant