You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a collection that extends Doctrine\Common\Collections\ArrayCollection which is persisted to database. This collection has methods that returns void, for example:
public function removeProduct(ProductId $productId): void
{
$index = $this->indexOf($productId);
if ($index !== false) {
$this->remove($index);
}
}
The generated persistent collection is trying to return value from void method:
/**
* {@inheritDoc}
*/
public function removeProduct(ProductId $productId): void
{
$this->initialize();
if ($this->needsSchedulingForSynchronization()) {
$this->changed();
}
return $this->coll->removeProduct($productId);
}
I updated symfony recently, and during that process doctrine/common was also updated. I think that with doctrine/common in version 2.12 it was working, but I'm not 100% sure if I had outdated cache. I can verify that if needed.
Package
Version
doctrine/mongodb-odm-bundle
4.2.2
doctrine/common
3.0.2
How to reproduce
Create collection that is persisted to database
Add void method
Try to store collection
Expected behavior
Void methods are supported by proxy classes
The text was updated successfully, but these errors were encountered:
Bug Report
I have a collection that extends Doctrine\Common\Collections\ArrayCollection which is persisted to database. This collection has methods that returns void, for example:
The generated persistent collection is trying to return value from void method:
I updated symfony recently, and during that process doctrine/common was also updated. I think that with doctrine/common in version 2.12 it was working, but I'm not 100% sure if I had outdated cache. I can verify that if needed.
How to reproduce
Expected behavior
Void methods are supported by proxy classes
The text was updated successfully, but these errors were encountered: