Add documentation about ClassMetadata::getAssociationMapping in 3.0 Upgrade Note #6478

Closed
opened 2026-01-22 15:33:50 +01:00 by admin · 1 comment
Owner

Originally created by @VincentLanglet on GitHub (May 31, 2020).

Support Question

I'm trying to do a refactoring on a massive project an introducing new Interface. I would like to have these interface compatible with both Doctrine 2.x and 3.x.
I mainly work with

  • ClassMetaData::$fieldMappings
  • ClassMetaData::$associationMappings

I saw that both getFieldMappings and getAssociationMappings are removed in ClassMetaData.

When I read the Upgrade note,
https://github.com/doctrine/orm/blob/master/UPGRADE.md#bc-break-removed-methods-in-classmetadata-1
there is a mention about ClassMetadata::getFieldMapping but none about ClassMetadata::getAssociationMapping or ClassMetaData::ONE_TO_ONE, ClassMetaData::ONE_TO_MANY, ClassMetaData::MANY_TO_ONE and ClassMetaData::MANY_TO_MANY constants.

Where can I find some explanations about the migration ?
Does supporting both doctrine 2.x and 3.x on a project will be easy if I work with these properties ?

Originally created by @VincentLanglet on GitHub (May 31, 2020). ### Support Question I'm trying to do a refactoring on a massive project an introducing new Interface. I would like to have these interface compatible with both Doctrine 2.x and 3.x. I mainly work with - ClassMetaData::$fieldMappings - ClassMetaData::$associationMappings I saw that both `getFieldMappings` and `getAssociationMappings` are removed in ClassMetaData. When I read the Upgrade note, https://github.com/doctrine/orm/blob/master/UPGRADE.md#bc-break-removed-methods-in-classmetadata-1 there is a mention about `ClassMetadata::getFieldMapping` but none about `ClassMetadata::getAssociationMapping` or `ClassMetaData::ONE_TO_ONE`, `ClassMetaData::ONE_TO_MANY`, `ClassMetaData::MANY_TO_ONE` and `ClassMetaData::MANY_TO_MANY` constants. Where can I find some explanations about the migration ? Does supporting both doctrine 2.x and 3.x on a project will be easy if I work with these properties ?
admin closed this issue 2026-01-22 15:33:51 +01:00
Author
Owner

@beberlei commented on GitHub (Jun 4, 2020):

@VincentLanglet don't waste your time on doctrine 3 support now, nothing is set in stone yet, please build against 2.* and we will work on upgrade path as we get there (far out).

@beberlei commented on GitHub (Jun 4, 2020): @VincentLanglet don't waste your time on doctrine 3 support now, nothing is set in stone yet, please build against 2.* and we will work on upgrade path as we get there (far out).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6478