From 0f638d2da7bdf740976986c4dbfc04b09d7ffa82 Mon Sep 17 00:00:00 2001 From: Philip Gichuhi Date: Tue, 3 Oct 2023 23:31:30 +0300 Subject: [PATCH] Add CHANGELOG entry --- CHANGELOG.md | 1 + .../Refiners/PhpLanguageRefinerTests.cs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 713a034679..afe50b1db2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix null reference exception when a parameter is defined without a schema. (CLI). - Log a message to stderr if a request is skipped due to missing data. (CLI) [#2210](https://github.com/microsoft/kiota/issues/2210) - Fixes code file generation in typescript [#3419](https://github.com/microsoft/kiota/issues/3419) +- Rename composed type wrapper when class already exists in the namespace. [#2964](https://github.com/microsoft/kiota/issues/2964) ## [1.6.1] - 2023-09-11 diff --git a/tests/Kiota.Builder.Tests/Refiners/PhpLanguageRefinerTests.cs b/tests/Kiota.Builder.Tests/Refiners/PhpLanguageRefinerTests.cs index 9f5f755d91..56e2d5a7f2 100644 --- a/tests/Kiota.Builder.Tests/Refiners/PhpLanguageRefinerTests.cs +++ b/tests/Kiota.Builder.Tests/Refiners/PhpLanguageRefinerTests.cs @@ -249,16 +249,16 @@ public async Task RenamesComposedTypeWrapperWhenSimilarClassExistsInNamespace() Name = "Parent" }; root.AddClass(model, parent); - + var composedType = new CodeUnionType { Name = "Union" }; - composedType.AddType(new CodeType { Name = "string" }, new CodeType { Name = "int"}); - + composedType.AddType(new CodeType { Name = "string" }, new CodeType { Name = "int" }); + var composedProperty = parent.AddProperty(new CodeProperty { Name = "property", Type = composedType }).First(); - + await ILanguageRefiner.Refine(new GenerationConfiguration { Language = GenerationLanguage.PHP }, root); Assert.NotNull(root.FindChildByName("UnionWrapper", false)); }