diff --git a/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs b/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs index c9cbaf7910..579882a14a 100644 --- a/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs +++ b/src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs @@ -500,7 +500,7 @@ private string GetDeserializationMethodName(CodeTypeBase propType, CodeMethod me } else { - parseNodeMethod = $"getCollectionOfPrimitiveValues([{conventions.TranslateType(propType)}::class, '{CreateDiscriminatorMethodName}'])"; + parseNodeMethod = $"getCollectionOfObjectValues([{conventions.TranslateType(propType)}::class, '{CreateDiscriminatorMethodName}'])"; } else if (currentType.TypeDefinition is CodeEnum) parseNodeMethod = $"getEnumValue({propertyType.ToFirstCharacterUpperCase()}::class)";