File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Upgrade to 3.0
2
2
3
+ ## Minor BC BREAK: Changed order of arguments passed to ` OneToOne ` , ` ManyToOne ` and ` Index ` mapping PHP attributes
4
+
5
+ To keep PHP mapping attributes consistent, order of arguments passed to above attributes has been changed
6
+ so ` $targetEntity ` is a first argument now. This change affects only non-named arguments usage.
7
+
3
8
## BC BREAK: AUTO keyword for identity generation defaults to IDENTITY for PostgreSQL now
4
9
5
10
When using the AUTO strategy to let Doctrine determine the identity generation mecehanism for
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ final class Index implements MappingAttribute
16
16
* @param array<string,mixed>|null $options
17
17
*/
18
18
public function __construct (
19
+ public readonly string |null $ name = null ,
19
20
public readonly array |null $ columns = null ,
20
21
public readonly array |null $ fields = null ,
21
- public readonly string |null $ name = null ,
22
22
public readonly array |null $ flags = null ,
23
23
public readonly array |null $ options = null ,
24
24
) {
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ final class OneToMany implements MappingAttribute
15
15
* @psalm-param 'LAZY'|'EAGER'|'EXTRA_LAZY' $fetch
16
16
*/
17
17
public function __construct (
18
- public readonly string |null $ mappedBy = null ,
19
18
public readonly string |null $ targetEntity = null ,
19
+ public readonly string |null $ mappedBy = null ,
20
20
public readonly array |null $ cascade = null ,
21
21
public readonly string $ fetch = 'LAZY ' ,
22
22
public readonly bool $ orphanRemoval = false ,
Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ final class OneToOne implements MappingAttribute
15
15
* @psalm-param 'LAZY'|'EAGER'|'EXTRA_LAZY' $fetch
16
16
*/
17
17
public function __construct (
18
+ public readonly string |null $ targetEntity = null ,
18
19
public readonly string |null $ mappedBy = null ,
19
20
public readonly string |null $ inversedBy = null ,
20
- public readonly string |null $ targetEntity = null ,
21
21
public readonly array |null $ cascade = null ,
22
22
public readonly string $ fetch = 'LAZY ' ,
23
23
public readonly bool $ orphanRemoval = false ,
You can’t perform that action at this time.
0 commit comments