From ce428b679bd9c0457af885ff1f5c107b63ddbd72 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Mon, 6 Jan 2025 16:34:19 +1300 Subject: [PATCH 1/2] FIX Stop using deprecated API --- src/DataObjects/QueuedJobDescriptor.php | 2 +- src/Jobs/DoormanQueuedJobTask.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/DataObjects/QueuedJobDescriptor.php b/src/DataObjects/QueuedJobDescriptor.php index 1012a3f5..1467f5b7 100644 --- a/src/DataObjects/QueuedJobDescriptor.php +++ b/src/DataObjects/QueuedJobDescriptor.php @@ -243,7 +243,7 @@ protected function getJobDir() // make sure our temp dir is in place. This is what will be inotify watched $jobDir = Config::inst()->get(QueuedJobService::class, 'cache_dir'); if ($jobDir[0] !== '/') { - $jobDir = TEMP_FOLDER . '/' . $jobDir; + $jobDir = TEMP_PATH . '/' . $jobDir; } if (!is_dir($jobDir ?? '')) { diff --git a/src/Jobs/DoormanQueuedJobTask.php b/src/Jobs/DoormanQueuedJobTask.php index e77f4008..4b9867c4 100644 --- a/src/Jobs/DoormanQueuedJobTask.php +++ b/src/Jobs/DoormanQueuedJobTask.php @@ -2,7 +2,6 @@ namespace Symbiote\QueuedJobs\Jobs; -use SilverStripe\Dev\Deprecation; use AsyncPHP\Doorman\Cancellable; use AsyncPHP\Doorman\Expires; use AsyncPHP\Doorman\Process; From fa73fd4ff856bd95dbf3759fb83c6b9b843744cc Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Mon, 6 Jan 2025 16:34:31 +1300 Subject: [PATCH 2/2] ENH Minor refactor to remove PHP 5.* condition --- src/Services/JobErrorHandler.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Services/JobErrorHandler.php b/src/Services/JobErrorHandler.php index 9559ef7a..f757df3b 100644 --- a/src/Services/JobErrorHandler.php +++ b/src/Services/JobErrorHandler.php @@ -25,14 +25,9 @@ public function clear() public function handleError($errno, $errstr, $errfile, $errline) { if (error_reporting()) { - // Don't throw E_DEPRECATED in PHP 5.3+ - if (defined('E_DEPRECATED')) { - if ($errno == E_DEPRECATED || $errno == E_USER_DEPRECATED) { - return; - } - } - switch ($errno) { + case E_DEPRECATED: + case E_USER_DEPRECATED: case E_NOTICE: case E_USER_NOTICE: case E_STRICT: