From 7e9c4560745c967451dab6cd3e1f673d90aec897 Mon Sep 17 00:00:00 2001 From: Jeppe Bundgaard Date: Tue, 25 Nov 2025 15:27:56 +0100 Subject: [PATCH] Deprecate `book_wash_f` methods with exception messages - Added deprecation exceptions in `beforeSave` to guide users to the new booking page and updated booking object usage. --- services/nginx/app/modules/forms/objects/book_wash_f.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/nginx/app/modules/forms/objects/book_wash_f.php b/services/nginx/app/modules/forms/objects/book_wash_f.php index 80d34937..5fb937c5 100644 --- a/services/nginx/app/modules/forms/objects/book_wash_f.php +++ b/services/nginx/app/modules/forms/objects/book_wash_f.php @@ -41,6 +41,7 @@ class book_wash_f extends form_helper_c */ public function beforeSave(): void { + throw new \Exception('Deprecated: Please refresh the page, and use the new booking page instead.'); // Set the department id to the department id of the user self::setDepartmentId(self::getSanitizedData('department_id')); // Set the customer number to the customer number of the user @@ -61,6 +62,7 @@ class book_wash_f extends form_helper_c $department = (new departments_o())->selectId((int)self::getSanitizedData('department_id')); $department->getObjectProperties(); // Get the bookings_new object + throw new \Exception('Deprecated: Use bookings_o instead of bookings_new_o'); $bookings = new bookings_o(); // Check if the wash type contains the interior wash $wants_wash_certificate = (bool)self::getSanitizedData('wants_wash_certificate');