Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes failing Php integration tests because of wrong parameter types #5843

Merged
merged 32 commits into from
Dec 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0fbb488
Updated discriminator method to ensure that primitive types don't def…
Nov 27, 2024
d9caaa9
Checked for null type definition
Nov 27, 2024
b553e9e
Default to collection of primitive types for testing
Nov 27, 2024
4dd6a01
More updates on code method writer
Nov 27, 2024
88c7ad2
Rolled back the default to object values
Nov 27, 2024
de7c924
Added back enum check
Nov 27, 2024
35551a1
Defaulted any null type definitions to collection of object values
Nov 27, 2024
803e377
Rolled back
Nov 27, 2024
0f05da2
Ensured that parameter passed to getCollectionOfPrimitiveValues is a …
Nov 28, 2024
aba8d81
Merge branch 'main' into fix/php-integration-tests
timayabi2020 Nov 28, 2024
a5fa774
Updted method write
Nov 29, 2024
17a56af
Updated code method writer for php
Nov 29, 2024
122a646
More experimental updates
Nov 29, 2024
55047ba
Updated parseNodeMethod to be a collection of primitive values if typ…
Nov 29, 2024
d892c51
Defaulted parseNode method to a string incase type definition is null
Nov 29, 2024
f7b2070
Fixed undefined property error
Nov 29, 2024
e38b2b0
Updated method writer during null checks in typedefinition
Nov 29, 2024
32c2757
Updated code writer
Nov 29, 2024
ea585a4
Updates
Nov 29, 2024
a7cab36
Rectified typo
Nov 29, 2024
3af85e6
More tests
Nov 29, 2024
50de6be
Merge branch 'main' into fix/php-integration-tests
timayabi2020 Dec 2, 2024
a11a427
Default to get String values
Dec 2, 2024
994b96c
Revert changes
Dec 3, 2024
6e0bcc6
Added expected data type for setString method which takes a primitive…
Dec 4, 2024
07b21e0
Updated regex in phpstan.neon
Dec 4, 2024
a4f4306
Merge branch 'main' into fix/php-integration-tests
timayabi2020 Dec 4, 2024
8c6e84f
Updated CodeMethodWriter test file for php
Dec 4, 2024
dfc7c49
Merge branch 'main' into fix/php-integration-tests
timayabi2020 Dec 4, 2024
8886b19
$finalValue validation
Dec 5, 2024
694129c
Merge branch 'fix/php-integration-tests' of https://github.com/micros…
Dec 5, 2024
66c738c
Merge branch 'main' into fix/php-integration-tests
timayabi2020 Dec 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rolled back
  • Loading branch information
Microsoft Graph DevX Tooling authored and Microsoft Graph DevX Tooling committed Nov 27, 2024
commit 803e3778c5f5e9f2a137afd2f22d5b73c0bffb11
6 changes: 5 additions & 1 deletion src/Kiota.Builder/Writers/Php/CodeMethodWriter.cs
Original file line number Diff line number Diff line change
@@ -490,7 +490,11 @@ private string GetDeserializationMethodName(CodeTypeBase propType, CodeMethod me
// //CodeType codeType when conventions.PrimitiveTypes.Contains(codeType.Name.ToLowerInvariant()) => $"getCollectionOfPrimitiveValues([{conventions.TranslateType(propType)}::class, '{CreateDiscriminatorMethodName}'])",
// _ => $"getCollectionOfPrimitiveValues([{conventions.TranslateType(propType)}::class, '{CreateDiscriminatorMethodName}'])"
// };
if (currentType.TypeDefinition != null && conventions.PrimitiveTypes.Contains(currentType.TypeDefinition.Name.ToLowerInvariant()))
if (currentType.TypeDefinition == null)
{
parseNodeMethod = $"getCollectionOfPrimitiveValues([{conventions.TranslateType(propType)}::class, '{CreateDiscriminatorMethodName}'])";
}
else if (conventions.PrimitiveTypes.Contains(currentType.TypeDefinition.Name.ToLowerInvariant()))
{
parseNodeMethod = $"getCollectionOfPrimitiveValues([{conventions.TranslateType(propType)}::class, '{CreateDiscriminatorMethodName}'])";
}
Loading