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

Add use import statements for PHP Snippets #2000

Merged
merged 41 commits into from
Mar 26, 2024
Merged

Conversation

shemogumbe
Copy link
Contributor

@shemogumbe shemogumbe commented Mar 19, 2024

Overview

Use statements added at the top of php snippets for model and request builder namespaces.

Demo

<?php
use Microsoft\Graph\Graph;
use Microsoft\Graph\Generated\Users\Item\Authentication\Operations\Item;


$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);

$requestConfiguration = new LongRunningOperationItemRequestBuilderGetRequestConfiguration();
$queryParameters = LongRunningOperationItemRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->aadgdc = "AM4P";
$queryParameters->aadgsu = "ssprprod-a";
$requestConfiguration->queryParameters = $queryParameters;


$result = $graphServiceClient->users()->byUserId('user-id')->authentication()->operations()->byLongRunningOperationId('longRunningOperation-id')->get($requestConfiguration)->wait();

Testing Instructions

Check this branch https://github.com/microsoftgraph/microsoft-graph-docs/blob/preview-snippet-generation/140119/includes/snippets/php/v1/delta-query-groups-initial-request-php-snippets.md

@shemogumbe shemogumbe marked this pull request as ready for review March 20, 2024 15:37
@shemogumbe shemogumbe requested a review from a team as a code owner March 20, 2024 15:37
Copy link

sonarcloud bot commented Mar 25, 2024

@shemogumbe shemogumbe merged commit 94e5641 into dev Mar 26, 2024
11 checks passed
@shemogumbe shemogumbe deleted the shem/php_snipet_imports branch March 26, 2024 19:34
@thewahome thewahome mentioned this pull request Apr 8, 2024
thewahome added a commit that referenced this pull request Apr 8, 2024
Bump apidoctor from 1708be5 to 1916d8c (#2004)

Add use import statements for PHP Snippets (#2000)

Bump Microsoft.OpenApi.OData from 1.6.0 to 1.6.1 (#2007)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2008)

Bump MSTest.TestFramework from 3.2.2 to 3.3.0 (#2009)

Bump MSTest.TestFramework from 3.3.0 to 3.3.1 (#2011)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2010)

Chore: change drop location (#2012)
shemogumbe added a commit that referenced this pull request Apr 24, 2024
* Merge dev to master (#2013)

Bump apidoctor from 1708be5 to 1916d8c (#2004)

Add use import statements for PHP Snippets (#2000)

Bump Microsoft.OpenApi.OData from 1.6.0 to 1.6.1 (#2007)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2008)

Bump MSTest.TestFramework from 3.2.2 to 3.3.0 (#2009)

Bump MSTest.TestFramework from 3.3.0 to 3.3.1 (#2011)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2010)

Chore: change drop location (#2012)

* update submodules

* update submodules

---------

Co-authored-by: Millicent Achieng <achieng.milli@gmail.com>
Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>
shemogumbe added a commit that referenced this pull request May 9, 2024
* Merge dev to master (#2013)

Bump apidoctor from 1708be5 to 1916d8c (#2004)

Add use import statements for PHP Snippets (#2000)

Bump Microsoft.OpenApi.OData from 1.6.0 to 1.6.1 (#2007)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2008)

Bump MSTest.TestFramework from 3.2.2 to 3.3.0 (#2009)

Bump MSTest.TestFramework from 3.3.0 to 3.3.1 (#2011)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2010)

Chore: change drop location (#2012)

* Remove built request configiguation name

* Update unit tests for updated request configuration name

* Update imports to inlcude base request configuration

* update tests

---------

Co-authored-by: Millicent Achieng <achieng.milli@gmail.com>
Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>
SilasKenneth added a commit that referenced this pull request May 17, 2024
* update request configuration class  (#2034)

* Merge dev to master (#2013)

Bump apidoctor from 1708be5 to 1916d8c (#2004)

Add use import statements for PHP Snippets (#2000)

Bump Microsoft.OpenApi.OData from 1.6.0 to 1.6.1 (#2007)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2008)

Bump MSTest.TestFramework from 3.2.2 to 3.3.0 (#2009)

Bump MSTest.TestFramework from 3.3.0 to 3.3.1 (#2011)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2010)

Chore: change drop location (#2012)

* Remove built request configiguation name

* Update unit tests for updated request configuration name

* Update imports to inlcude base request configuration

* update tests

---------

Co-authored-by: Millicent Achieng <achieng.milli@gmail.com>
Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>

* Bump Microsoft.AspNetCore.Authorization from 8.0.4 to 8.0.5 (#2049)

Bumps [Microsoft.AspNetCore.Authorization](https://github.com/dotnet/aspnetcore) from 8.0.4 to 8.0.5.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v8.0.4...v8.0.5)

---
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.Authentication.JwtBearer from 8.0.4 to 8.0.5 (#2048)

Bumps [Microsoft.AspNetCore.Authentication.JwtBearer](https://github.com/dotnet/aspnetcore) from 8.0.4 to 8.0.5.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v8.0.4...v8.0.5)

---
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>

* Fix model import paths + Add support for enum imports (#2047)

* Initial work on fixing paths.

* Remove unused test.

* Add imports for DateOnly, TimeOnly and Enums.

* Fix issue with spelling.

* Do slight refactor to improve style.

* Fix more issues with the snippets.

* Take care of corner cases.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Shem Ogumbe <shemnashon@gmail.com>
Co-authored-by: Millicent Achieng <achieng.milli@gmail.com>
Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
SilasKenneth added a commit that referenced this pull request May 23, 2024
* Merge dev to master (#2013)

Bump apidoctor from 1708be5 to 1916d8c (#2004)

Add use import statements for PHP Snippets (#2000)

Bump Microsoft.OpenApi.OData from 1.6.0 to 1.6.1 (#2007)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2008)

Bump MSTest.TestFramework from 3.2.2 to 3.3.0 (#2009)

Bump MSTest.TestFramework from 3.3.0 to 3.3.1 (#2011)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2010)

Chore: change drop location (#2012)

* update submodules

* update submodules

* Latest dev changes. (#2053)

* update request configuration class  (#2034)

* Merge dev to master (#2013)

Bump apidoctor from 1708be5 to 1916d8c (#2004)

Add use import statements for PHP Snippets (#2000)

Bump Microsoft.OpenApi.OData from 1.6.0 to 1.6.1 (#2007)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2008)

Bump MSTest.TestFramework from 3.2.2 to 3.3.0 (#2009)

Bump MSTest.TestFramework from 3.3.0 to 3.3.1 (#2011)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2010)

Chore: change drop location (#2012)

* Remove built request configiguation name

* Update unit tests for updated request configuration name

* Update imports to inlcude base request configuration

* update tests

---------

Co-authored-by: Millicent Achieng <achieng.milli@gmail.com>
Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>

* Bump Microsoft.AspNetCore.Authorization from 8.0.4 to 8.0.5 (#2049)

Bumps [Microsoft.AspNetCore.Authorization](https://github.com/dotnet/aspnetcore) from 8.0.4 to 8.0.5.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v8.0.4...v8.0.5)

---
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.Authentication.JwtBearer from 8.0.4 to 8.0.5 (#2048)

Bumps [Microsoft.AspNetCore.Authentication.JwtBearer](https://github.com/dotnet/aspnetcore) from 8.0.4 to 8.0.5.
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v8.0.4...v8.0.5)

---
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>

* Fix model import paths + Add support for enum imports (#2047)

* Initial work on fixing paths.

* Remove unused test.

* Add imports for DateOnly, TimeOnly and Enums.

* Fix issue with spelling.

* Do slight refactor to improve style.

* Fix more issues with the snippets.

* Take care of corner cases.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Shem Ogumbe <shemnashon@gmail.com>
Co-authored-by: Millicent Achieng <achieng.milli@gmail.com>
Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Millicent Achieng <achieng.milli@gmail.com>
Co-authored-by: Charles Wahome <thewahome.cw@gmail.com>
Co-authored-by: shemogumbe <shemogumbe@microsoft.com>
Co-authored-by: Shem Ogumbe <shemnashon@gmail.com>
Co-authored-by: Faith Kangai <fey101@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
SilasKenneth pushed a commit that referenced this pull request May 23, 2024
* Merge dev to master (#2013)

Bump apidoctor from 1708be5 to 1916d8c (#2004)

Add use import statements for PHP Snippets (#2000)

Bump Microsoft.OpenApi.OData from 1.6.0 to 1.6.1 (#2007)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2008)

Bump MSTest.TestFramework from 3.2.2 to 3.3.0 (#2009)

Bump MSTest.TestFramework from 3.3.0 to 3.3.1 (#2011)

Bump Microsoft.VisualStudio.Azure.Containers.Tools.Targets (#2010)

Chore: change drop location (#2012)

* Remove built request configiguation name

* Update unit tests for updated request configuration name

* Update imports to inlcude base request configuration

* update tests

---------

Co-authored-by: Millicent Achieng <achieng.milli@gmail.com>
Co-authored-by: Charles Wahome <thewahome.cw@gmail.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

4 participants