Info regarding ORM 3.0 #6973

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

Originally created by @rixafy on GitHub (May 6, 2022).

Feature Request

Q A
New Feature yes
RFC yes
BC Break yes

Summary

Hi, I want to ask, is there some ongoing discussion about ORM 3.0 and possible BC breaks and features? Because I have an ideas and I don't know if it has been already discussed.

Nullable columns

Will be a default value for nullable column the PHP ? or |null instead of false? It would be a huge time saver, since I barely add something in #[Column] attribute and I think that all my properties match the PHP value, and it's like 60+ complex entities. I know you didn't want this BC break in 2.x, so is it for sure it will be in 3.0?

Rearranging columns

Another great feature would be column rearranging, so ORM would keep 1:1 column order with database, because as projects gets older and there is a lot of columns in tables, if someone wants to add something like $externalId right after the $id property, and in the database it's always at the end, or we need to manually edit and add queries, what is also time consuming. Another thing is that if schema is generated again for some reason in new app instance, the column order matches those in entities, but older database has that column at the end.

Originally created by @rixafy on GitHub (May 6, 2022). ### Feature Request <!-- Fill in the relevant information below to help triage your issue. --> | Q | A |------------ | ------ | New Feature | yes | RFC | yes | BC Break | yes #### Summary Hi, I want to ask, is there some ongoing discussion about ORM 3.0 and possible BC breaks and features? Because I have an ideas and I don't know if it has been already discussed. ### Nullable columns Will be a default value for nullable column the PHP `?` or `|null` instead of false? It would be a huge time saver, since I barely add something in `#[Column]` attribute and I think that all my properties match the PHP value, and it's like 60+ complex entities. I know you didn't want this BC break in 2.x, so is it for sure it will be in 3.0? ### Rearranging columns Another great feature would be column rearranging, so ORM would keep 1:1 column order with database, because as projects gets older and there is a lot of columns in tables, if someone wants to add something like `$externalId` right after the `$id` property, and in the database it's always at the end, or we need to manually edit and add queries, what is also time consuming. Another thing is that if schema is generated again for some reason in new app instance, the column order matches those in entities, but older database has that column at the end.
admin closed this issue 2026-01-22 15:42:26 +01:00
Author
Owner

@derrabus commented on GitHub (May 8, 2022):

There is a 3.0.x branch in this repository that already documents all breaking changes planned so far. 3.0.0 won't ship any new features. If you want to contribute a new feature, you have to target 2.13.x currently. If you want to introduce a breaking change, you need to prepare an upgrade path first and implement that in 2.13.x.

Regarding your features:

  • No, nullability won't be deferred from property type declarations. This has been evaluated and discussed and we ultimately decided against it.

  • I personally don't think that the ORM should concern itself with column ordering. If you want to maintain a specific order, this can be solved outside of the ORM. If you disagree, please open a separate ticket for discussing that feature.

@derrabus commented on GitHub (May 8, 2022): There is a 3.0.x branch in this repository that already documents all breaking changes planned so far. 3.0.0 won't ship any new features. If you want to contribute a new feature, you have to target 2.13.x currently. If you want to introduce a breaking change, you need to prepare an upgrade path first and implement that in 2.13.x. Regarding your features: * No, nullability won't be deferred from property type declarations. This has been evaluated and discussed and we ultimately decided against it. * I personally don't think that the ORM should concern itself with column ordering. If you want to maintain a specific order, this can be solved outside of the ORM. If you disagree, please open a separate ticket for discussing that feature.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6973