Bumped Common dependency to RC1, fixing related issues in the test suite.
This commit is contained in:
parent
7ff9976b3c
commit
207d624f5f
2
lib/vendor/doctrine-common
vendored
2
lib/vendor/doctrine-common
vendored
@ -1 +1 @@
|
||||
Subproject commit 3b5123434e979c7adfd42061484b5a8f10a3431b
|
||||
Subproject commit 0bd0fa68bbdc4d81c7742f2c972b5ed0c02b0640
|
@ -73,8 +73,8 @@ class ECommerceCategory
|
||||
public function removeProduct(ECommerceProduct $product)
|
||||
{
|
||||
$removed = $this->products->removeElement($product);
|
||||
if ($removed !== null) {
|
||||
$removed->removeCategory($this);
|
||||
if ($removed) {
|
||||
$product->removeCategory($this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,8 +114,8 @@ class ECommerceCategory
|
||||
public function removeChild(ECommerceCategory $child)
|
||||
{
|
||||
$removed = $this->children->removeElement($child);
|
||||
if ($removed !== null) {
|
||||
$removed->removeParent();
|
||||
if ($removed) {
|
||||
$child->removeParent();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -112,11 +112,10 @@ class ECommerceProduct
|
||||
public function removeFeature(ECommerceFeature $feature)
|
||||
{
|
||||
$removed = $this->features->removeElement($feature);
|
||||
if ($removed !== null) {
|
||||
$removed->removeProduct();
|
||||
return true;
|
||||
if ($removed) {
|
||||
$feature->removeProduct();
|
||||
}
|
||||
return false;
|
||||
return $removed;
|
||||
}
|
||||
|
||||
public function addCategory(ECommerceCategory $category)
|
||||
@ -130,8 +129,8 @@ class ECommerceProduct
|
||||
public function removeCategory(ECommerceCategory $category)
|
||||
{
|
||||
$removed = $this->categories->removeElement($category);
|
||||
if ($removed !== null) {
|
||||
$removed->removeProduct($this);
|
||||
if ($removed) {
|
||||
$category->removeProduct($this);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user