From 18d84d65b0ebcdf0c167b821d4d9fd1501a93350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 21 Oct 2026 15:47:51 +0200 Subject: [PATCH] fix: import no longer writes fileadmin/products_import.info The marker was display-only for the TYPO3 10 backend module, which is not ported. Locally fileadmin is hardlinked from the TYPO3 10 project, so writing it also changed that project's copy. Co-Authored-By: Claude Opus 5.5 --- .../Classes/Service/ApiImportSource.php | 3 - .../Service/ImportTimestampService.php | 61 ------------------- 2 files changed, 64 deletions(-) delete mode 100644 packages/ep_products/Classes/Service/ImportTimestampService.php diff --git a/packages/ep_products/Classes/Service/ApiImportSource.php b/packages/ep_products/Classes/Service/ApiImportSource.php index 4db2f73..e918751 100644 --- a/packages/ep_products/Classes/Service/ApiImportSource.php +++ b/packages/ep_products/Classes/Service/ApiImportSource.php @@ -37,7 +37,6 @@ final class ApiImportSource implements ProductImportSource, SingletonInterface, private const STAGING_SUBDIR = 'ep_products_import'; private const BASELINE_FILE = 'api-imported.info'; - private const IMPORT_MARKER = 'fileadmin/products_import.info'; /** * @var ApiClient|null @@ -93,8 +92,6 @@ final class ApiImportSource implements ProductImportSource, SingletonInterface, GeneralUtility::mkdir_deep(dirname($file)); GeneralUtility::writeFile($file, $sourceGeneratedAt->format(\DateTimeInterface::ATOM), false); } - - (new ImportTimestampService())->writeImportTimestamp(self::IMPORT_MARKER); } /** diff --git a/packages/ep_products/Classes/Service/ImportTimestampService.php b/packages/ep_products/Classes/Service/ImportTimestampService.php deleted file mode 100644 index c3bf175..0000000 --- a/packages/ep_products/Classes/Service/ImportTimestampService.php +++ /dev/null @@ -1,61 +0,0 @@ -format('d.m.Y H:i:s')); - } - - public function isImportRequired(string $uploadTimestampFile, string $importTimestampFile): bool - { - $updatedTimestampPath = GeneralUtility::getFileAbsFileName($uploadTimestampFile); - - if (!$updatedTimestampPath || !file_exists($updatedTimestampPath)) { - $this->writeImportTimestamp($importTimestampFile); - - return true; - } - - $line = trim(file($updatedTimestampPath)[0]); - - if (empty($line)) { - return true; - } - - $lastUploadAt = \DateTime::createFromFormat('d.m.Y H:i:s', $line); - - $lastImportAt = $this->readImportTimestamp($importTimestampFile); - - if (null === $lastImportAt || $lastUploadAt > $lastImportAt) { - $this->writeImportTimestamp($importTimestampFile); - - return true; - } - - return false; - } - -}