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

Fix PHP Snippets. #1655

Merged
merged 10 commits into from
Jul 9, 2023
Merged

Fix PHP Snippets. #1655

merged 10 commits into from
Jul 9, 2023

Conversation

SilasKenneth
Copy link
Member

  • Fix issue with setting Odata types and OdataID
  • Update the tests

Overview

Brief description of what this PR does, and why it is needed.

Demo

Optional. Screenshots, curl examples, etc.

Notes

Optional. Ancillary topics, caveats, alternative strategies that didn't work out, anything else.

Testing Instructions

  • How to test this PR
  • Prefer bulleted description
  • Start after checking out this branch
  • Include any setup required, such as bundling scripts, restarting services, etc.
  • Include test case, and expected output

@SilasKenneth SilasKenneth self-assigned this Jul 4, 2023
@SilasKenneth SilasKenneth marked this pull request as ready for review July 5, 2023 15:36
@SilasKenneth SilasKenneth requested a review from a team as a code owner July 5, 2023 15:36
andrueastman
andrueastman previously approved these changes Jul 6, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jul 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

97.1% 97.1% Coverage
0.0% 0.0% Duplication

@SilasKenneth SilasKenneth merged commit 24c6c06 into dev Jul 9, 2023
11 checks passed
@SilasKenneth SilasKenneth deleted the fix/php-snippets branch July 9, 2023 12:56
SilasKenneth added a commit that referenced this pull request Jul 18, 2023
* Bump apidoctor from `927ac29` to `ce76ead` (#1656)

Bumps [apidoctor](https://github.com/OneDrive/apidoctor) from `927ac29` to `ce76ead`.
- [Commits](OneDrive/apidoctor@927ac29...ce76ead)

---
updated-dependencies:
- dependency-name: apidoctor
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fixes type names in collection initializers (#1657)

* Fixes reserved type escaping in collections

* Revert

* Fix snippets

* Bump xunit.runner.visualstudio from 2.4.5 to 2.5.0 (#1659)

Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.4.5 to 2.5.0.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](xunit/visualstudio.xunit@v2.4.5...2.5.0)

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix PHP Snippets. (#1655)

* Fix issue with setting Odata types and OdataID

* Update the tests

* Change DateTime instantiation.

* Fix how array of enums are represented.

* Remove unused variable.

* Fix path parameter rendering.

* Remove unused imports.

* Fix indexer method name.

* Fix escaping reserved keywords in types.

* Bump xunit from 2.4.2 to 2.5.0 (#1658)

* Bump xunit from 2.4.2 to 2.5.0

Bumps [xunit](https://github.com/xunit/xunit) from 2.4.2 to 2.5.0.
- [Commits](xunit/xunit@2.4.2...2.5.0)

---
updated-dependencies:
- dependency-name: xunit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fixes test signature

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Omondi <andrew.omondi@microsoft.com>

* Bump Microsoft.AspNetCore.Authorization from 7.0.8 to 7.0.9 (#1662)

Bumps [Microsoft.AspNetCore.Authorization](https://github.com/dotnet/aspnetcore) from 7.0.8 to 7.0.9.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.8...v7.0.9)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Authorization
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump Microsoft.AspNetCore.Mvc.NewtonsoftJson from 7.0.8 to 7.0.9 (#1661)

Bumps [Microsoft.AspNetCore.Mvc.NewtonsoftJson](https://github.com/dotnet/aspnetcore) from 7.0.8 to 7.0.9.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.8...v7.0.9)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Mvc.NewtonsoftJson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump Microsoft.AspNetCore.Authentication.JwtBearer from 7.0.8 to 7.0.9 (#1663)

Bumps [Microsoft.AspNetCore.Authentication.JwtBearer](https://github.com/dotnet/aspnetcore) from 7.0.8 to 7.0.9.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.8...v7.0.9)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Authentication.JwtBearer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump Microsoft.VisualStudio.Web.CodeGeneration.Design (#1664)

Bumps [Microsoft.VisualStudio.Web.CodeGeneration.Design](https://github.com/dotnet/Scaffolding) from 7.0.7 to 7.0.8.
- [Release notes](https://github.com/dotnet/Scaffolding/releases)
- [Commits](https://github.com/dotnet/Scaffolding/commits)

---
updated-dependencies:
- dependency-name: Microsoft.VisualStudio.Web.CodeGeneration.Design
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump MSTest.TestFramework from 3.0.4 to 3.1.1 (#1666)

Bumps [MSTest.TestFramework](https://github.com/microsoft/testfx) from 3.0.4 to 3.1.1.
- [Release notes](https://github.com/microsoft/testfx/releases)
- [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md)
- [Commits](microsoft/testfx@v3.0.4...v3.1.1)

---
updated-dependencies:
- dependency-name: MSTest.TestFramework
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix more snippets concerning maps and enum casing. (#1660)

* Fix issue with setting Odata types and OdataID

* Update the tests

* Change DateTime instantiation.

* Fix how array of enums are represented.

* Remove unused variable.

* Fix path parameter rendering.

* Remove unused imports.

* Fix indexer method name.

* Fix escaping reserved keywords in types.

* Fix issue with enums and maps.

* Use unused parameter.

* Fix enum value casing.

* Fix issue with objects inside array or maps.

* Update CodeSnippetsReflection.OpenAPI/LanguageGenerators/PhpGenerator.cs

Co-authored-by: Eastman <andrueastman@users.noreply.github.com>

* Update CodeSnippetsReflection.OpenAPI/LanguageGenerators/PhpGenerator.cs

Co-authored-by: Eastman <andrueastman@users.noreply.github.com>

* Fix failing tests after review.

---------

Co-authored-by: Eastman <andrueastman@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eastman <andrueastman@users.noreply.github.com>
Co-authored-by: Andrew Omondi <andrew.omondi@microsoft.com>
millicentachieng added a commit that referenced this pull request Jul 27, 2023
* Merge latest changes from Dev (#1668)

* Bump apidoctor from `927ac29` to `ce76ead` (#1656)

Bumps [apidoctor](https://github.com/OneDrive/apidoctor) from `927ac29` to `ce76ead`.
- [Commits](OneDrive/apidoctor@927ac29...ce76ead)

---
updated-dependencies:
- dependency-name: apidoctor
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fixes type names in collection initializers (#1657)

* Fixes reserved type escaping in collections

* Revert

* Fix snippets

* Bump xunit.runner.visualstudio from 2.4.5 to 2.5.0 (#1659)

Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.4.5 to 2.5.0.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](xunit/visualstudio.xunit@v2.4.5...2.5.0)

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix PHP Snippets. (#1655)

* Fix issue with setting Odata types and OdataID

* Update the tests

* Change DateTime instantiation.

* Fix how array of enums are represented.

* Remove unused variable.

* Fix path parameter rendering.

* Remove unused imports.

* Fix indexer method name.

* Fix escaping reserved keywords in types.

* Bump xunit from 2.4.2 to 2.5.0 (#1658)

* Bump xunit from 2.4.2 to 2.5.0

Bumps [xunit](https://github.com/xunit/xunit) from 2.4.2 to 2.5.0.
- [Commits](xunit/xunit@2.4.2...2.5.0)

---
updated-dependencies:
- dependency-name: xunit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fixes test signature

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Omondi <andrew.omondi@microsoft.com>

* Bump Microsoft.AspNetCore.Authorization from 7.0.8 to 7.0.9 (#1662)

Bumps [Microsoft.AspNetCore.Authorization](https://github.com/dotnet/aspnetcore) from 7.0.8 to 7.0.9.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.8...v7.0.9)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Authorization
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump Microsoft.AspNetCore.Mvc.NewtonsoftJson from 7.0.8 to 7.0.9 (#1661)

Bumps [Microsoft.AspNetCore.Mvc.NewtonsoftJson](https://github.com/dotnet/aspnetcore) from 7.0.8 to 7.0.9.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.8...v7.0.9)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Mvc.NewtonsoftJson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump Microsoft.AspNetCore.Authentication.JwtBearer from 7.0.8 to 7.0.9 (#1663)

Bumps [Microsoft.AspNetCore.Authentication.JwtBearer](https://github.com/dotnet/aspnetcore) from 7.0.8 to 7.0.9.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.8...v7.0.9)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Authentication.JwtBearer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump Microsoft.VisualStudio.Web.CodeGeneration.Design (#1664)

Bumps [Microsoft.VisualStudio.Web.CodeGeneration.Design](https://github.com/dotnet/Scaffolding) from 7.0.7 to 7.0.8.
- [Release notes](https://github.com/dotnet/Scaffolding/releases)
- [Commits](https://github.com/dotnet/Scaffolding/commits)

---
updated-dependencies:
- dependency-name: Microsoft.VisualStudio.Web.CodeGeneration.Design
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump MSTest.TestFramework from 3.0.4 to 3.1.1 (#1666)

Bumps [MSTest.TestFramework](https://github.com/microsoft/testfx) from 3.0.4 to 3.1.1.
- [Release notes](https://github.com/microsoft/testfx/releases)
- [Changelog](https://github.com/microsoft/testfx/blob/main/docs/Changelog.md)
- [Commits](microsoft/testfx@v3.0.4...v3.1.1)

---
updated-dependencies:
- dependency-name: MSTest.TestFramework
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix more snippets concerning maps and enum casing. (#1660)

* Fix issue with setting Odata types and OdataID

* Update the tests

* Change DateTime instantiation.

* Fix how array of enums are represented.

* Remove unused variable.

* Fix path parameter rendering.

* Remove unused imports.

* Fix indexer method name.

* Fix escaping reserved keywords in types.

* Fix issue with enums and maps.

* Use unused parameter.

* Fix enum value casing.

* Fix issue with objects inside array or maps.

* Update CodeSnippetsReflection.OpenAPI/LanguageGenerators/PhpGenerator.cs

Co-authored-by: Eastman <andrueastman@users.noreply.github.com>

* Update CodeSnippetsReflection.OpenAPI/LanguageGenerators/PhpGenerator.cs

Co-authored-by: Eastman <andrueastman@users.noreply.github.com>

* Fix failing tests after review.

---------

Co-authored-by: Eastman <andrueastman@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eastman <andrueastman@users.noreply.github.com>
Co-authored-by: Andrew Omondi <andrew.omondi@microsoft.com>

* Bump apidoctor from `ab6e5c3` to `b1ac82e` (#1674) (#1682)

Bumps [apidoctor](https://github.com/OneDrive/apidoctor) from `ab6e5c3` to `b1ac82e`.
- [Commits](OneDrive/apidoctor@ab6e5c3...b1ac82e)

---
updated-dependencies:
- dependency-name: apidoctor
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Eastman <andrueastman@users.noreply.github.com>
Co-authored-by: silaskenneth <silaskenneth1@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Omondi <andrew.omondi@microsoft.com>
Co-authored-by: Faith Kangai <fey101@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants