[TASK] Updates for TYPO3 11

This commit is contained in:
Philipp Dieter
2023-09-26 16:19:53 +02:00
parent e126e674c7
commit a02b1bb939
27 changed files with 258 additions and 287 deletions

View File

@@ -80,10 +80,10 @@ trait DependencyInjectionTrait
$this->objectManager = GeneralUtility::makeInstance(
ObjectManager::class
);
$this->configurationManager = $this->objectManager->get(
$this->configurationManager = GeneralUtility::makeInstance(
ConfigurationManagerInterface::class
);
$this->apiUtility = $this->objectManager->get(
$this->apiUtility = GeneralUtility::makeInstance(
ApiUtility::class
);
$frameworkConfiguration = $this->configurationManager->getConfiguration(
@@ -102,11 +102,7 @@ trait DependencyInjectionTrait
$frameworkConfiguration['persistence']['storagePid']
)
);
$this->reflectionService = GeneralUtility::makeInstance(
ReflectionService::class, GeneralUtility::makeInstance(
CacheManager::class
)
);
$this->reflectionService = GeneralUtility::makeInstance(ReflectionService::class);
$classInfo = $this->reflectionService->getClassSchema(
get_class($this)
);

View File

@@ -127,22 +127,12 @@ trait ValidationTrait
if (is_array($input) && array_key_exists('eID', $input)) {
unset($input['eID']);
}
//@TODO make optional when usiing rest api
//array_walk_recursive(
// $input,
// function (&$value) {
// if (filter_var($value, FILTER_VALIDATE_INT)) {
// $value = (int)$value;
// }
// }
//);
$input = ArrayUtility::toObject($input);
$validationResult = $validator->dataValidation(
$input,
json_encode($schema),
-1
);
if (!$validationResult->isValid()) {
$this->isValid = false;
$this->responseStatus = [400 => 'validationError'];