getName()); $class = $this->reflectionProvider->getClass($className); // Erst die Instanz erstellen $instance = $class->newInstance(); $properties = $requestClass->getProperties(); foreach ($properties as $property) { $propertyName = $property->getName(); $value = $data->get($propertyName, null); try { // Jetzt auf die tatsächliche Instanz setzen $this->propertyValueConverter->setPropertyValue($property, $instance, $value); } catch (\Throwable $e) { // Fehler beim Setzen ignorieren } } $validator = $this->container->get(Validator::class); $validationResult = $validator->validate($instance); if ($validationResult->hasErrors()) { throw new ValidationException($validationResult, 'test'); } return $instance; } }