From dde755a2cd555ca881fe5c1a15ec344199579008 Mon Sep 17 00:00:00 2001
From: Kevin Ditscheid <kevin.ditscheid@sgalinski.de>
Date: Thu, 30 Jul 2020 09:33:35 +0200
Subject: [PATCH] [TASK] Relocated extbase persistence configuration to new
 Classes.php

---
 Configuration/Extbase/Persistence/Classes.php    | 16 ++++++++++++++++
 Configuration/TypoScript/Common/setup.typoscript |  2 ++
 2 files changed, 18 insertions(+)
 create mode 100644 Configuration/Extbase/Persistence/Classes.php

diff --git a/Configuration/Extbase/Persistence/Classes.php b/Configuration/Extbase/Persistence/Classes.php
new file mode 100644
index 00000000..0bea07f4
--- /dev/null
+++ b/Configuration/Extbase/Persistence/Classes.php
@@ -0,0 +1,16 @@
+<?php
+declare(strict_types=1);
+
+// if you need to change this, keep in mind the changes need to be done in
+// Configuration/TypoScript/Common/setup.typoscript for TYPO3 9, too
+return [
+	\SGalinski\SgJobs\Domain\Model\FileReference::class => [
+		'tableName' => 'sys_file_reference'
+	],
+	\SGalinski\SgJobs\Domain\Model\JobApplication::class => [
+		'tableName' => 'tx_sgjobs_domain_model_job_application'
+	],
+	\SGalinski\SgJobs\Domain\Model\ExperienceLevel::class => [
+		'tableName' => 'tx_sgjobs_domain_model_experience_level'
+	]
+];
diff --git a/Configuration/TypoScript/Common/setup.typoscript b/Configuration/TypoScript/Common/setup.typoscript
index d8efbf31..f36453bb 100644
--- a/Configuration/TypoScript/Common/setup.typoscript
+++ b/Configuration/TypoScript/Common/setup.typoscript
@@ -1,5 +1,7 @@
 config.tx_extbase {
 	persistence {
+		# @deprecated This configuration does not work in TYPO3 10 at all, you need to also change
+		# Configuration/Extbase/Persistence/Classes.php
 		classes {
 			SGalinski\SgJobs\Domain\Model\FileReference {
 				mapping {
-- 
GitLab