From 4f39919e068c0a24963f19b9ee9241defcf8521f Mon Sep 17 00:00:00 2001 From: Djamy Date: Wed, 2 Jan 2019 16:13:12 +0100 Subject: [PATCH 1/2] Add possibility to reset shipment with compatibility with doctrine Proxies (= null) --- src/Marello/Bundle/ShippingBundle/Entity/HasShipmentTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Marello/Bundle/ShippingBundle/Entity/HasShipmentTrait.php b/src/Marello/Bundle/ShippingBundle/Entity/HasShipmentTrait.php index 9a928bbcf..b6c67ea9f 100644 --- a/src/Marello/Bundle/ShippingBundle/Entity/HasShipmentTrait.php +++ b/src/Marello/Bundle/ShippingBundle/Entity/HasShipmentTrait.php @@ -20,11 +20,11 @@ public function getShipment() } /** - * @param Shipment $shipment + * @param null|Shipment $shipment * * @return $this */ - public function setShipment(Shipment $shipment) + public function setShipment(?Shipment $shipment = null) { $this->shipment = $shipment; From 50972cc499a67d6b762e15cc45647dc5504b099c Mon Sep 17 00:00:00 2001 From: Djamy Date: Wed, 2 Jan 2019 16:20:54 +0100 Subject: [PATCH 2/2] Make the interface compatible with the modified Trait --- .../ShippingBundle/Integration/ShippingAwareInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Marello/Bundle/ShippingBundle/Integration/ShippingAwareInterface.php b/src/Marello/Bundle/ShippingBundle/Integration/ShippingAwareInterface.php index 6eab4ec1a..e339ee7ea 100644 --- a/src/Marello/Bundle/ShippingBundle/Integration/ShippingAwareInterface.php +++ b/src/Marello/Bundle/ShippingBundle/Integration/ShippingAwareInterface.php @@ -8,5 +8,5 @@ interface ShippingAwareInterface { public function getShipment(); - public function setShipment(Shipment $shipment); + public function setShipment(?Shipment $shipment); }