From 3caaa0a2ab7f368155a59c23b10f6311d5761b7f Mon Sep 17 00:00:00 2001 From: sgillot Date: Tue, 8 Jul 2025 16:59:44 +0200 Subject: [PATCH 1/2] issue/81885 : fix a visibility issue in the ShoppingFeedCustomFields class --- README.md | 4 ++++ src/ShoppingFeedCustomFields.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d57255f..3c35bc6 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,10 @@ Requires the shoppingfeed plugin ## Changelog +### 1.0.5 (8-07-2025) + +* fix: set visibility to public for the __wakeup() method in the ShoppingFeedCustomFields class + ### 1.0.4 (28-08-2023) * fix: missing value for select with single value diff --git a/src/ShoppingFeedCustomFields.php b/src/ShoppingFeedCustomFields.php index 524ceff..c3054de 100644 --- a/src/ShoppingFeedCustomFields.php +++ b/src/ShoppingFeedCustomFields.php @@ -96,6 +96,6 @@ private function __clone() { /** * Singleton instance can't be serialized. */ - private function __wakeup() { + public function __wakeup() { } } From f9300744c5e71c7ea82a873fd259e098c9c56238 Mon Sep 17 00:00:00 2001 From: sgillot Date: Tue, 8 Jul 2025 17:36:52 +0200 Subject: [PATCH 2/2] issue/81885 : throw an exception if the __wakeup() method is called --- src/ShoppingFeedCustomFields.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ShoppingFeedCustomFields.php b/src/ShoppingFeedCustomFields.php index c3054de..45292ff 100644 --- a/src/ShoppingFeedCustomFields.php +++ b/src/ShoppingFeedCustomFields.php @@ -97,5 +97,6 @@ private function __clone() { * Singleton instance can't be serialized. */ public function __wakeup() { + throw new \Exception( 'Cannot unserialize a singleton.' ); } }