-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.15.1 generated warnings in AttributeDriver::joinColumnToArray() #10690
Comments
🤔 where does that |
#10671 looks like it could cause the issue, Cc @BoShurik @verfriemelt-dot-org can you try removing the lines introduced in that PR? |
yes, can confirm.
seems we have assinged |
when checking where this is coming from, it might be this wrongly defined entity?
i guess
would be correct? 🤔 well yes in fact, that works with the new version then. thanks for your help anyways :) |
Maybe yes… did the schema validation Symfony command not warn about the issue? |
nope:
and with the 2.15.1 i got the same issue like we discussed here:
|
Has the syntax below been deprecated and removed? I don't get any warning with both 2.14.3 and 2.15.0 (everything is working as expected) #[ORM\ManyToMany(targetEntity: Product::class)]
#[ORM\JoinTable(name: 'news_product',
schema: 'a_different_db',
joinColumns: [
ORM\JoinColumn::class => ['name' => 'news_id', 'referencedColumnName' => 'id'],
],
inverseJoinColumns: [
ORM\JoinColumn::class => ['name' => 'product_id', 'referencedColumnName' => 'id'],
]
)]
private Collection $products; Upgrading to 2.15.1 my Symfony 5.4 project throws an ErrorException: "Warning: Attempt to read property "name" on array" here
If I change the #[ORM\ManyToMany(targetEntity: Product::class)]
#[ORM\JoinTable(name: 'news_product',
schema: 'a_different_db',
joinColumns: [
new ORM\JoinColumn(name: 'news_id', referencedColumnName: 'id'),
],
inverseJoinColumns: [
new ORM\JoinColumn(name: 'product_id', referencedColumnName: 'id'),
]
)]
private Collection $products; |
As far as I understood that's because these join column declarations did not do anything in previous versions. Please let me know if I am wrong. |
BC Break Report
Summary
this change: https://github.com/doctrine/orm/pull/10671/files#diff-c058a8444ffba22cecd48a76b9577187ef8eba003369d9b8d94313b4325d1b76
results in warnings due to seemling a wrong data type beeing passed?
Previous behavior
no warnings
Current behavior
warnings described above
How to reproduce
the entity which triggers:
is that entity somewhat misconfigured? or is that a bug?
thanks for your effort ✌️
The text was updated successfully, but these errors were encountered: