mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Info regarding ORM 3.0 #6973
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rixafy on GitHub (May 6, 2022).
Feature Request
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|nullinstead 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
$externalIdright after the$idproperty, 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.@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.