$type the implementation class to instantiate * @return PropertyMappingConfiguration */ public function build($type = PropertyMappingConfiguration::class) { $configuration = new $type(); $configuration->setTypeConverterOptions(PersistentObjectConverter::class, [ PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED => true, PersistentObjectConverter::CONFIGURATION_MODIFICATION_ALLOWED => true, ]); $configuration->allowAllProperties(); return $configuration; } }