AssociationOverride bug #7353

Open
opened 2026-01-22 15:50:29 +01:00 by admin · 0 comments
Owner

Originally created by @kor3k on GitHub (Mar 21, 2024).

Bug Report

Q A
BC Break no
Version >=2.19.2

Summary

this line:
e384978e0b/src/Mapping/AssociationOverride.php (L44)

should be

if ($inverseJoinColumns instanceof InverseJoinColumn) { 

Current behavior

this works

    new ORM\AssociationOverride(
        inverseJoinColumns: [new ORM\InverseJoinColumn()],
    )

but this gives error

    new ORM\AssociationOverride(
        inverseJoinColumns: new ORM\InverseJoinColumn(), // not array
    )
Originally created by @kor3k on GitHub (Mar 21, 2024). ### Bug Report <!-- Fill in the relevant information below to help triage your issue. --> | Q | A |------------ | ------ | BC Break | no | Version | >=2.19.2 #### Summary this line: https://github.com/doctrine/orm/blob/e384978e0bd1bdced06755ee190adf7f713dd006/src/Mapping/AssociationOverride.php#L44 should be ```php if ($inverseJoinColumns instanceof InverseJoinColumn) { ``` #### Current behavior this works ```php new ORM\AssociationOverride( inverseJoinColumns: [new ORM\InverseJoinColumn()], ) ``` but this gives error ```php new ORM\AssociationOverride( inverseJoinColumns: new ORM\InverseJoinColumn(), // not array ) ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7353